@aztec/simulator 5.0.0-nightly.20260629 → 5.0.0-nightly.20260701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/public/avm/fixtures/base_avm_simulation_tester.js +1 -1
- package/dest/public/avm/fixtures/utils.js +1 -1
- package/dest/public/fixtures/amm_test.js +2 -2
- package/dest/public/fixtures/bulk_test.js +2 -2
- package/dest/public/fixtures/custom_bytecode_tester.d.ts +1 -1
- package/dest/public/fixtures/custom_bytecode_tester.d.ts.map +1 -1
- package/dest/public/fixtures/custom_bytecode_tester.js +2 -2
- package/dest/public/fixtures/token_test.js +3 -3
- package/dest/public/fixtures/utils.js +1 -1
- package/dest/public/public_tx_simulator/contract_provider_for_cpp.js +2 -2
- package/dest/public/state_manager/state_manager.js +1 -1
- package/package.json +16 -16
- package/src/public/avm/fixtures/base_avm_simulation_tester.ts +1 -1
- package/src/public/avm/fixtures/utils.ts +1 -1
- package/src/public/fixtures/amm_test.ts +2 -2
- package/src/public/fixtures/bulk_test.ts +2 -2
- package/src/public/fixtures/custom_bytecode_tester.ts +2 -2
- package/src/public/fixtures/token_test.ts +3 -3
- package/src/public/fixtures/utils.ts +1 -1
- package/src/public/public_tx_simulator/contract_provider_for_cpp.ts +2 -2
- package/src/public/state_manager/state_manager.ts +1 -1
|
@@ -107,7 +107,7 @@ import { createContractClassAndInstance } from './utils.js';
|
|
|
107
107
|
await this.contractDataSource.addContractInstance(contractInstance);
|
|
108
108
|
}
|
|
109
109
|
async insertContractAddressNullifier(contractAddress) {
|
|
110
|
-
const contractAddressNullifier = await siloNullifier(AztecAddress.
|
|
110
|
+
const contractAddressNullifier = await siloNullifier(AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS), contractAddress.toField());
|
|
111
111
|
await this.merkleTrees.sequentialInsert(MerkleTreeId.NULLIFIER_TREE, [
|
|
112
112
|
contractAddressNullifier.toBuffer()
|
|
113
113
|
]);
|
|
@@ -90,7 +90,7 @@ export function resolveContractAssertionMessage(functionName, revertReason, outp
|
|
|
90
90
|
immutablesHash,
|
|
91
91
|
publicKeys
|
|
92
92
|
});
|
|
93
|
-
const contractAddressNullifier = await siloNullifier(AztecAddress.
|
|
93
|
+
const contractAddressNullifier = await siloNullifier(AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS), contractInstance.address.toField());
|
|
94
94
|
return {
|
|
95
95
|
contractClass,
|
|
96
96
|
contractInstance,
|
|
@@ -11,8 +11,8 @@ const INITIAL_TOKEN_BALANCE = 1_000_000_000n;
|
|
|
11
11
|
* You do NOT need permission to remove this test!
|
|
12
12
|
*/ export async function ammTest(tester, logger, tokenArtifact, ammArtifact, expectToBeTrue) {
|
|
13
13
|
const timer = new Timer();
|
|
14
|
-
const admin = AztecAddress.
|
|
15
|
-
const sender = AztecAddress.
|
|
14
|
+
const admin = AztecAddress.fromNumberUnsafe(42);
|
|
15
|
+
const sender = AztecAddress.fromNumberUnsafe(111);
|
|
16
16
|
logger.debug(`Deploying tokens`);
|
|
17
17
|
const token0 = await setUpToken(tester, tokenArtifact, admin, expectToBeTrue, /*seed=*/ 0);
|
|
18
18
|
const token1 = await setUpToken(tester, tokenArtifact, admin, expectToBeTrue, /*seed=*/ 1);
|
|
@@ -3,7 +3,7 @@ import { Timer } from '@aztec/foundation/timer';
|
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
export async function bulkTest(tester, logger, avmTestContractArtifact) {
|
|
5
5
|
const timer = new Timer();
|
|
6
|
-
const deployer = AztecAddress.
|
|
6
|
+
const deployer = AztecAddress.fromNumberUnsafe(42);
|
|
7
7
|
const avmTestContract = await tester.registerAndDeployContract(/*constructorArgs=*/ [], deployer, avmTestContractArtifact);
|
|
8
8
|
// Needed since we invoke the Fee Juice Contract in the bulk test.registerFeeJuiceContract
|
|
9
9
|
await tester.registerFeeJuiceContract();
|
|
@@ -136,7 +136,7 @@ export async function bulkTest(tester, logger, avmTestContractArtifact) {
|
|
|
136
136
|
}
|
|
137
137
|
export async function megaBulkTest(tester, logger, avmTestContractArtifact) {
|
|
138
138
|
const timer = new Timer();
|
|
139
|
-
const deployer = AztecAddress.
|
|
139
|
+
const deployer = AztecAddress.fromNumberUnsafe(42);
|
|
140
140
|
const avmTestContract = await tester.registerAndDeployContract(/*constructorArgs=*/ [], deployer, avmTestContractArtifact);
|
|
141
141
|
// Needed since we invoke the Fee Juice Contract in the bulk test.registerFeeJuiceContract
|
|
142
142
|
await tester.registerFeeJuiceContract();
|
|
@@ -31,4 +31,4 @@ export declare function executeCustomBytecode(contract: ContractInstanceWithAddr
|
|
|
31
31
|
* @returns The execution result
|
|
32
32
|
*/
|
|
33
33
|
export declare function deployAndExecuteCustomBytecode(bytecode: Buffer, tester: PublicTxSimulationTester, txLabel?: string, contractName?: string, deployer?: AztecAddress, calldata?: any[]): Promise<PublicTxResult>;
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tX2J5dGVjb2RlX3Rlc3Rlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3B1YmxpYy9maXh0dXJlcy9jdXN0b21fYnl0ZWNvZGVfdGVzdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLGNBQWMsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3hELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMzRCxPQUFPLEtBQUssRUFBRSwyQkFBMkIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRTFFLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBRTVFOzs7Ozs7O0dBT0c7QUFDSCx3QkFBc0Isb0JBQW9CLENBQ3hDLFFBQVEsRUFBRSxNQUFNLEVBQ2hCLE1BQU0sRUFBRSx3QkFBd0IsRUFDaEMsWUFBWSxHQUFFLE1BQWlDLEVBQy9DLFFBQVEsR0FBRSxZQUFnRCxHQUN6RCxPQUFPLENBQUMsMkJBQTJCLENBQUMsQ0FpQnRDO0FBRUQ7Ozs7Ozs7R0FPRztBQUNILHdCQUFzQixxQkFBcUIsQ0FDekMsUUFBUSxFQUFFLDJCQUEyQixFQUNyQyxNQUFNLEVBQUUsd0JBQXdCLEVBQ2hDLE9BQU8sR0FBRSxNQUE2QixFQUN0QyxRQUFRLEdBQUUsR0FBRyxFQUFPLEdBQ25CLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FRekI7QUFFRDs7Ozs7Ozs7O0dBU0c7QUFDSCx3QkFBc0IsOEJBQThCLENBQ2xELFFBQVEsRUFBRSxNQUFNLEVBQ2hCLE1BQU0sRUFBRSx3QkFBd0IsRUFDaEMsT0FBTyxHQUFFLE1BQTZCLEVBQ3RDLFlBQVksR0FBRSxNQUFpQyxFQUMvQyxRQUFRLEdBQUUsWUFBZ0QsRUFDMUQsUUFBUSxHQUFFLEdBQUcsRUFBTyxHQUNuQixPQUFPLENBQUMsY0FBYyxDQUFDLENBR3pCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom_bytecode_tester.d.ts","sourceRoot":"","sources":["../../../src/public/fixtures/custom_bytecode_tester.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE5E;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,EAChC,YAAY,GAAE,MAAiC,EAC/C,QAAQ,GAAE,
|
|
1
|
+
{"version":3,"file":"custom_bytecode_tester.d.ts","sourceRoot":"","sources":["../../../src/public/fixtures/custom_bytecode_tester.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE5E;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,EAChC,YAAY,GAAE,MAAiC,EAC/C,QAAQ,GAAE,YAAgD,GACzD,OAAO,CAAC,2BAA2B,CAAC,CAiBtC;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,2BAA2B,EACrC,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,MAA6B,EACtC,QAAQ,GAAE,GAAG,EAAO,GACnB,OAAO,CAAC,cAAc,CAAC,CAQzB;AAED;;;;;;;;;GASG;AACH,wBAAsB,8BAA8B,CAClD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,MAA6B,EACtC,YAAY,GAAE,MAAiC,EAC/C,QAAQ,GAAE,YAAgD,EAC1D,QAAQ,GAAE,GAAG,EAAO,GACnB,OAAO,CAAC,cAAc,CAAC,CAGzB"}
|
|
@@ -7,7 +7,7 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
7
7
|
* @param contractName - The name of the contract
|
|
8
8
|
* @param deployer - The deployer address
|
|
9
9
|
* @returns The deployed contract instance
|
|
10
|
-
*/ export async function deployCustomBytecode(bytecode, tester, contractName = 'CustomBytecodeContract', deployer = AztecAddress.
|
|
10
|
+
*/ export async function deployCustomBytecode(bytecode, tester, contractName = 'CustomBytecodeContract', deployer = AztecAddress.fromNumberUnsafe(42)) {
|
|
11
11
|
const contractArtifact = emptyContractArtifact();
|
|
12
12
|
contractArtifact.name = contractName;
|
|
13
13
|
contractArtifact.functions = [
|
|
@@ -47,7 +47,7 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
47
47
|
* @param deployer - The deployer address
|
|
48
48
|
* @param calldata - The calldata to use
|
|
49
49
|
* @returns The execution result
|
|
50
|
-
*/ export async function deployAndExecuteCustomBytecode(bytecode, tester, txLabel = 'CustomBytecodeTest', contractName = 'CustomBytecodeContract', deployer = AztecAddress.
|
|
50
|
+
*/ export async function deployAndExecuteCustomBytecode(bytecode, tester, txLabel = 'CustomBytecodeTest', contractName = 'CustomBytecodeContract', deployer = AztecAddress.fromNumberUnsafe(42), calldata = []) {
|
|
51
51
|
const testContract = await deployCustomBytecode(bytecode, tester, contractName, deployer);
|
|
52
52
|
return await executeCustomBytecode(testContract, tester, txLabel, calldata);
|
|
53
53
|
}
|
|
@@ -3,9 +3,9 @@ import { Timer } from '@aztec/foundation/timer';
|
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
export async function tokenTest(tester, logger, tokenArtifact, expectToBeTrue, options = {}) {
|
|
5
5
|
const timer = new Timer();
|
|
6
|
-
const admin = AztecAddress.
|
|
7
|
-
const sender = AztecAddress.
|
|
8
|
-
const receiver = AztecAddress.
|
|
6
|
+
const admin = AztecAddress.fromNumberUnsafe(42);
|
|
7
|
+
const sender = AztecAddress.fromNumberUnsafe(111);
|
|
8
|
+
const receiver = AztecAddress.fromNumberUnsafe(222);
|
|
9
9
|
const token = await setUpToken(tester, tokenArtifact, admin, expectToBeTrue);
|
|
10
10
|
const mintAmount = 100n;
|
|
11
11
|
// EXECUTE! This means that if using AvmProvingTester subclass, it will PROVE the transaction!
|
|
@@ -159,7 +159,7 @@ export async function addNewContractInstanceToTx(tx, contractInstance, skipNulli
|
|
|
159
159
|
contractInstance.deployer.toField()
|
|
160
160
|
];
|
|
161
161
|
const contractInstanceLog = new PrivateLog(padArrayEnd(logFields, Fr.ZERO, PRIVATE_LOG_SIZE_IN_FIELDS), logFields.length);
|
|
162
|
-
const contractAddressNullifier = await siloNullifier(AztecAddress.
|
|
162
|
+
const contractAddressNullifier = await siloNullifier(AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS), contractInstance.address.toField());
|
|
163
163
|
const accumulatedData = tx.data.forPublic ? tx.data.forPublic.revertibleAccumulatedData : tx.data.forRollup.end;
|
|
164
164
|
if (!skipNullifierInsertion) {
|
|
165
165
|
const nextNullifierIndex = countAccumulatedItems(accumulatedData.nullifiers);
|
|
@@ -13,7 +13,7 @@ export class ContractProviderForCpp {
|
|
|
13
13
|
this.globalVariables = globalVariables;
|
|
14
14
|
this.getContractInstance = async (address)=>{
|
|
15
15
|
this.log.trace(`Contract provider callback: getContractInstance(${address})`);
|
|
16
|
-
const aztecAddr = AztecAddress.
|
|
16
|
+
const aztecAddr = AztecAddress.fromStringUnsafe(address);
|
|
17
17
|
const instance = await this.contractsDB.getContractInstance(aztecAddr, this.globalVariables.timestamp);
|
|
18
18
|
if (!instance) {
|
|
19
19
|
this.log.debug(`Contract instance not found: ${address}`);
|
|
@@ -58,7 +58,7 @@ export class ContractProviderForCpp {
|
|
|
58
58
|
this.getDebugFunctionName = async (address, selector)=>{
|
|
59
59
|
this.log.trace(`Contract provider callback: getDebugFunctionName(${address}, ${selector})`);
|
|
60
60
|
// Parse address and selector strings
|
|
61
|
-
const aztecAddr = AztecAddress.
|
|
61
|
+
const aztecAddr = AztecAddress.fromStringUnsafe(address);
|
|
62
62
|
const selectorFr = Fr.fromString(selector);
|
|
63
63
|
const functionSelector = FunctionSelector.fromFieldOrUndefined(selectorFr);
|
|
64
64
|
if (!functionSelector) {
|
|
@@ -287,7 +287,7 @@ import { PublicStorage } from './public_storage.js';
|
|
|
287
287
|
// Nullifier check! We do this regardless of whether or not the instance exists,
|
|
288
288
|
// as even for non-existence, we need to generate nullifier check hints.
|
|
289
289
|
// This will internally decide whether to check the nullifier tree or not depending on doMerkleOperations.
|
|
290
|
-
const nullifierExistsInTree = await this.checkNullifierExists(AztecAddress.
|
|
290
|
+
const nullifierExistsInTree = await this.checkNullifierExists(AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS), contractAddress.toField());
|
|
291
291
|
assert(exists == nullifierExistsInTree, `Contract instance for address ${contractAddress} in DB: ${exists} != nullifier tree: ${nullifierExistsInTree}. This is a bug!`);
|
|
292
292
|
if (!exists) {
|
|
293
293
|
this.log.debug(`Contract instance NOT FOUND (address=${contractAddress})`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/simulator",
|
|
3
|
-
"version": "5.0.0-nightly.
|
|
3
|
+
"version": "5.0.0-nightly.20260701",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": "./dest/server.js",
|
|
@@ -64,26 +64,26 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/constants": "5.0.0-nightly.
|
|
68
|
-
"@aztec/foundation": "5.0.0-nightly.
|
|
69
|
-
"@aztec/native": "5.0.0-nightly.
|
|
70
|
-
"@aztec/noir-acvm_js": "5.0.0-nightly.
|
|
71
|
-
"@aztec/noir-noirc_abi": "5.0.0-nightly.
|
|
72
|
-
"@aztec/noir-protocol-circuits-types": "5.0.0-nightly.
|
|
73
|
-
"@aztec/noir-types": "5.0.0-nightly.
|
|
74
|
-
"@aztec/protocol-contracts": "5.0.0-nightly.
|
|
75
|
-
"@aztec/standard-contracts": "5.0.0-nightly.
|
|
76
|
-
"@aztec/stdlib": "5.0.0-nightly.
|
|
77
|
-
"@aztec/telemetry-client": "5.0.0-nightly.
|
|
78
|
-
"@aztec/world-state": "5.0.0-nightly.
|
|
67
|
+
"@aztec/constants": "5.0.0-nightly.20260701",
|
|
68
|
+
"@aztec/foundation": "5.0.0-nightly.20260701",
|
|
69
|
+
"@aztec/native": "5.0.0-nightly.20260701",
|
|
70
|
+
"@aztec/noir-acvm_js": "5.0.0-nightly.20260701",
|
|
71
|
+
"@aztec/noir-noirc_abi": "5.0.0-nightly.20260701",
|
|
72
|
+
"@aztec/noir-protocol-circuits-types": "5.0.0-nightly.20260701",
|
|
73
|
+
"@aztec/noir-types": "5.0.0-nightly.20260701",
|
|
74
|
+
"@aztec/protocol-contracts": "5.0.0-nightly.20260701",
|
|
75
|
+
"@aztec/standard-contracts": "5.0.0-nightly.20260701",
|
|
76
|
+
"@aztec/stdlib": "5.0.0-nightly.20260701",
|
|
77
|
+
"@aztec/telemetry-client": "5.0.0-nightly.20260701",
|
|
78
|
+
"@aztec/world-state": "5.0.0-nightly.20260701",
|
|
79
79
|
"lodash.clonedeep": "^4.5.0",
|
|
80
80
|
"lodash.merge": "^4.6.2",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@aztec/kv-store": "5.0.0-nightly.
|
|
85
|
-
"@aztec/noir-contracts.js": "5.0.0-nightly.
|
|
86
|
-
"@aztec/noir-test-contracts.js": "5.0.0-nightly.
|
|
84
|
+
"@aztec/kv-store": "5.0.0-nightly.20260701",
|
|
85
|
+
"@aztec/noir-contracts.js": "5.0.0-nightly.20260701",
|
|
86
|
+
"@aztec/noir-test-contracts.js": "5.0.0-nightly.20260701",
|
|
87
87
|
"@jest/globals": "^30.0.0",
|
|
88
88
|
"@types/jest": "^30.0.0",
|
|
89
89
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
@@ -149,7 +149,7 @@ export abstract class BaseAvmSimulationTester {
|
|
|
149
149
|
|
|
150
150
|
private async insertContractAddressNullifier(contractAddress: AztecAddress) {
|
|
151
151
|
const contractAddressNullifier = await siloNullifier(
|
|
152
|
-
AztecAddress.
|
|
152
|
+
AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
|
|
153
153
|
contractAddress.toField(),
|
|
154
154
|
);
|
|
155
155
|
await this.merkleTrees.sequentialInsert(MerkleTreeId.NULLIFIER_TREE, [contractAddressNullifier.toBuffer()]);
|
|
@@ -146,7 +146,7 @@ export async function createContractClassAndInstance(
|
|
|
146
146
|
});
|
|
147
147
|
|
|
148
148
|
const contractAddressNullifier = await siloNullifier(
|
|
149
|
-
AztecAddress.
|
|
149
|
+
AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
|
|
150
150
|
contractInstance.address.toField(),
|
|
151
151
|
);
|
|
152
152
|
|
|
@@ -25,8 +25,8 @@ export async function ammTest(
|
|
|
25
25
|
) {
|
|
26
26
|
const timer = new Timer();
|
|
27
27
|
|
|
28
|
-
const admin = AztecAddress.
|
|
29
|
-
const sender = AztecAddress.
|
|
28
|
+
const admin = AztecAddress.fromNumberUnsafe(42);
|
|
29
|
+
const sender = AztecAddress.fromNumberUnsafe(111);
|
|
30
30
|
|
|
31
31
|
logger.debug(`Deploying tokens`);
|
|
32
32
|
const token0 = await setUpToken(tester, tokenArtifact, admin, expectToBeTrue, /*seed=*/ 0);
|
|
@@ -13,7 +13,7 @@ export async function bulkTest(
|
|
|
13
13
|
) {
|
|
14
14
|
const timer = new Timer();
|
|
15
15
|
|
|
16
|
-
const deployer = AztecAddress.
|
|
16
|
+
const deployer = AztecAddress.fromNumberUnsafe(42);
|
|
17
17
|
const avmTestContract = await tester.registerAndDeployContract(
|
|
18
18
|
/*constructorArgs=*/ [],
|
|
19
19
|
deployer,
|
|
@@ -114,7 +114,7 @@ export async function megaBulkTest(
|
|
|
114
114
|
) {
|
|
115
115
|
const timer = new Timer();
|
|
116
116
|
|
|
117
|
-
const deployer = AztecAddress.
|
|
117
|
+
const deployer = AztecAddress.fromNumberUnsafe(42);
|
|
118
118
|
const avmTestContract = await tester.registerAndDeployContract(
|
|
119
119
|
/*constructorArgs=*/ [],
|
|
120
120
|
deployer,
|
|
@@ -17,7 +17,7 @@ export async function deployCustomBytecode(
|
|
|
17
17
|
bytecode: Buffer,
|
|
18
18
|
tester: PublicTxSimulationTester,
|
|
19
19
|
contractName: string = 'CustomBytecodeContract',
|
|
20
|
-
deployer: AztecAddress = AztecAddress.
|
|
20
|
+
deployer: AztecAddress = AztecAddress.fromNumberUnsafe(42),
|
|
21
21
|
): Promise<ContractInstanceWithAddress> {
|
|
22
22
|
const contractArtifact = emptyContractArtifact();
|
|
23
23
|
contractArtifact.name = contractName;
|
|
@@ -75,7 +75,7 @@ export async function deployAndExecuteCustomBytecode(
|
|
|
75
75
|
tester: PublicTxSimulationTester,
|
|
76
76
|
txLabel: string = 'CustomBytecodeTest',
|
|
77
77
|
contractName: string = 'CustomBytecodeContract',
|
|
78
|
-
deployer: AztecAddress = AztecAddress.
|
|
78
|
+
deployer: AztecAddress = AztecAddress.fromNumberUnsafe(42),
|
|
79
79
|
calldata: any[] = [],
|
|
80
80
|
): Promise<PublicTxResult> {
|
|
81
81
|
const testContract = await deployCustomBytecode(bytecode, tester, contractName, deployer);
|
|
@@ -21,9 +21,9 @@ export async function tokenTest(
|
|
|
21
21
|
) {
|
|
22
22
|
const timer = new Timer();
|
|
23
23
|
|
|
24
|
-
const admin = AztecAddress.
|
|
25
|
-
const sender = AztecAddress.
|
|
26
|
-
const receiver = AztecAddress.
|
|
24
|
+
const admin = AztecAddress.fromNumberUnsafe(42);
|
|
25
|
+
const sender = AztecAddress.fromNumberUnsafe(111);
|
|
26
|
+
const receiver = AztecAddress.fromNumberUnsafe(222);
|
|
27
27
|
|
|
28
28
|
const token = await setUpToken(tester, tokenArtifact, admin, expectToBeTrue);
|
|
29
29
|
|
|
@@ -255,7 +255,7 @@ export async function addNewContractInstanceToTx(
|
|
|
255
255
|
);
|
|
256
256
|
|
|
257
257
|
const contractAddressNullifier = await siloNullifier(
|
|
258
|
-
AztecAddress.
|
|
258
|
+
AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
|
|
259
259
|
contractInstance.address.toField(),
|
|
260
260
|
);
|
|
261
261
|
|
|
@@ -23,7 +23,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
23
23
|
public getContractInstance = async (address: string): Promise<Buffer | undefined> => {
|
|
24
24
|
this.log.trace(`Contract provider callback: getContractInstance(${address})`);
|
|
25
25
|
|
|
26
|
-
const aztecAddr = AztecAddress.
|
|
26
|
+
const aztecAddr = AztecAddress.fromStringUnsafe(address);
|
|
27
27
|
|
|
28
28
|
const instance = await this.contractsDB.getContractInstance(aztecAddr, this.globalVariables.timestamp);
|
|
29
29
|
|
|
@@ -88,7 +88,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
88
88
|
this.log.trace(`Contract provider callback: getDebugFunctionName(${address}, ${selector})`);
|
|
89
89
|
|
|
90
90
|
// Parse address and selector strings
|
|
91
|
-
const aztecAddr = AztecAddress.
|
|
91
|
+
const aztecAddr = AztecAddress.fromStringUnsafe(address);
|
|
92
92
|
const selectorFr = Fr.fromString(selector);
|
|
93
93
|
const functionSelector = FunctionSelector.fromFieldOrUndefined(selectorFr);
|
|
94
94
|
|
|
@@ -402,7 +402,7 @@ export class PublicPersistableStateManager {
|
|
|
402
402
|
|
|
403
403
|
// This will internally decide whether to check the nullifier tree or not depending on doMerkleOperations.
|
|
404
404
|
const nullifierExistsInTree = await this.checkNullifierExists(
|
|
405
|
-
AztecAddress.
|
|
405
|
+
AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
|
|
406
406
|
contractAddress.toField(),
|
|
407
407
|
);
|
|
408
408
|
assert(
|