@aztec/simulator 5.0.0-rc.1 → 5.0.0-rc.2
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/client.d.ts +1 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +0 -2
- package/dest/private/circuit_recording/circuit_recorder.d.ts +36 -23
- package/dest/private/circuit_recording/circuit_recorder.d.ts.map +1 -1
- package/dest/private/circuit_recording/circuit_recorder.js +65 -69
- package/dest/private/circuit_recording/file_circuit_recorder.d.ts +7 -19
- package/dest/private/circuit_recording/file_circuit_recorder.d.ts.map +1 -1
- package/dest/private/circuit_recording/file_circuit_recorder.js +38 -42
- package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts +1 -1
- package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -1
- package/dest/private/circuit_recording/simulator_recorder_wrapper.js +11 -14
- 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/client.ts +0 -2
- package/src/private/circuit_recording/circuit_recorder.ts +84 -78
- package/src/private/circuit_recording/file_circuit_recorder.ts +38 -48
- package/src/private/circuit_recording/simulator_recorder_wrapper.ts +9 -15
- 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
|
@@ -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(
|