@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.
Files changed (37) hide show
  1. package/dest/client.d.ts +1 -3
  2. package/dest/client.d.ts.map +1 -1
  3. package/dest/client.js +0 -2
  4. package/dest/private/circuit_recording/circuit_recorder.d.ts +36 -23
  5. package/dest/private/circuit_recording/circuit_recorder.d.ts.map +1 -1
  6. package/dest/private/circuit_recording/circuit_recorder.js +65 -69
  7. package/dest/private/circuit_recording/file_circuit_recorder.d.ts +7 -19
  8. package/dest/private/circuit_recording/file_circuit_recorder.d.ts.map +1 -1
  9. package/dest/private/circuit_recording/file_circuit_recorder.js +38 -42
  10. package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts +1 -1
  11. package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -1
  12. package/dest/private/circuit_recording/simulator_recorder_wrapper.js +11 -14
  13. package/dest/public/avm/fixtures/base_avm_simulation_tester.js +1 -1
  14. package/dest/public/avm/fixtures/utils.js +1 -1
  15. package/dest/public/fixtures/amm_test.js +2 -2
  16. package/dest/public/fixtures/bulk_test.js +2 -2
  17. package/dest/public/fixtures/custom_bytecode_tester.d.ts +1 -1
  18. package/dest/public/fixtures/custom_bytecode_tester.d.ts.map +1 -1
  19. package/dest/public/fixtures/custom_bytecode_tester.js +2 -2
  20. package/dest/public/fixtures/token_test.js +3 -3
  21. package/dest/public/fixtures/utils.js +1 -1
  22. package/dest/public/public_tx_simulator/contract_provider_for_cpp.js +2 -2
  23. package/dest/public/state_manager/state_manager.js +1 -1
  24. package/package.json +16 -16
  25. package/src/client.ts +0 -2
  26. package/src/private/circuit_recording/circuit_recorder.ts +84 -78
  27. package/src/private/circuit_recording/file_circuit_recorder.ts +38 -48
  28. package/src/private/circuit_recording/simulator_recorder_wrapper.ts +9 -15
  29. package/src/public/avm/fixtures/base_avm_simulation_tester.ts +1 -1
  30. package/src/public/avm/fixtures/utils.ts +1 -1
  31. package/src/public/fixtures/amm_test.ts +2 -2
  32. package/src/public/fixtures/bulk_test.ts +2 -2
  33. package/src/public/fixtures/custom_bytecode_tester.ts +2 -2
  34. package/src/public/fixtures/token_test.ts +3 -3
  35. package/src/public/fixtures/utils.ts +1 -1
  36. package/src/public/public_tx_simulator/contract_provider_for_cpp.ts +2 -2
  37. 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.fromNumber(42);
25
- const sender = AztecAddress.fromNumber(111);
26
- const receiver = AztecAddress.fromNumber(222);
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.fromNumber(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
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.fromString(address);
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.fromString(address);
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.fromNumber(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
405
+ AztecAddress.fromNumberUnsafe(CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS),
406
406
  contractAddress.toField(),
407
407
  );
408
408
  assert(