Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Commit 8c1214f

Browse files
chore: upgrade 403 to 5.0.0 (#346)
# 🤖 Linear Closes AZT-XXX ## Description --------- Signed-off-by: ilpepepig <167773062+ilpepepig@users.noreply.github.com> Co-authored-by: ilpepepig <167773062+ilpepepig@users.noreply.github.com> Co-authored-by: ilpepepig <ilpepepig@defi.sucks>
1 parent 7eb029b commit 8c1214f

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/token_contract/src/test/test_authorization_contract/Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ compiler_version = ">=1.0.0"
55
type = "contract"
66

77
[dependencies]
8-
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.3.0", directory = "noir-projects/aztec-nr/aztec" }
8+
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v5.0.0-rc.1", directory = "noir-projects/aztec-nr/aztec" }

src/ts/test/escrow.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { TxStatus } from '@aztec/aztec.js/tx';
21
import { deriveKeys } from '@aztec/stdlib/keys';
32
import { PublicKeys } from '@aztec/aztec.js/keys';
43
import { type AztecNode } from '@aztec/aztec.js/node';
54
import { AztecAddress } from '@aztec/aztec.js/addresses';
65
import { type EmbeddedWallet } from '@aztec/wallets/embedded';
76
import { BlockNumber } from '@aztec/foundation/branded-types';
87
import { ContractDeployer } from '@aztec/aztec.js/deployment';
9-
import { Fr, Point } from '@aztec/aztec.js/fields';
8+
import { Fr } from '@aztec/aztec.js/fields';
109
import { PublicKey } from '@aztec/stdlib/keys';
1110
import {
1211
getContractInstanceFromInstantiationParams,
@@ -48,8 +47,10 @@ type NoirWrappedPoint = {
4847
};
4948
};
5049

51-
const noirWrappedPointToPoint = (wrapped: NoirWrappedPoint) =>
52-
new Point(new Fr(wrapped.inner.x), new Fr(wrapped.inner.y), !!wrapped.inner.is_infinite);
50+
// `PublicKey` is a Grumpkin curve point; its constructor derives `isInfinite` from `x`/`y`,
51+
// so the Noir `is_infinite` flag carries no extra information for a valid (non-infinity) key.
52+
const noirWrappedPointToPublicKey = (wrapped: NoirWrappedPoint): PublicKey =>
53+
new PublicKey(new Fr(wrapped.inner.x), new Fr(wrapped.inner.y));
5354

5455
// Builds a JS `PublicKeys` from the new v5 PublicKeys layout returned by the Noir circuit:
5556
// `{ npk_m_hash, ivpk_m: { inner: { x, y, is_infinite } }, ovpk_m_hash, tpk_m_hash, mspk_m_hash, fbpk_m_hash }`.
@@ -63,7 +64,7 @@ const noirPublicKeysToPublicKeys = (publicKeys: {
6364
}): PublicKeys =>
6465
new PublicKeys(
6566
new Fr(publicKeys.npk_m_hash),
66-
noirWrappedPointToPoint(publicKeys.ivpk_m) as unknown as PublicKey,
67+
noirWrappedPointToPublicKey(publicKeys.ivpk_m),
6768
new Fr(publicKeys.ovpk_m_hash),
6869
new Fr(publicKeys.tpk_m_hash),
6970
new Fr(publicKeys.mspk_m_hash),

0 commit comments

Comments
 (0)