@aztec/protocol-contracts 0.30.1 → 0.32.0

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.
@@ -8,10 +8,12 @@ export function getCanonicalClassRegisterer(): ProtocolContract {
8
8
  return getCanonicalProtocolContract(ContractClassRegistererArtifact, 1);
9
9
  }
10
10
 
11
- /**
12
- * Address of the canonical class registerer.
13
- * @remarks This should not change often, hence we hardcode it to save from having to recompute it every time.
14
- */
15
- export const ClassRegistererAddress = AztecAddress.fromString(
16
- '0x2140db629d95644ef26140fa5ae87749ae28d373176af9a2e458052ced96c7b3',
17
- );
11
+ let address: AztecAddress | undefined = undefined;
12
+
13
+ /** Returns the address for the canonical deployment of the class registerer */
14
+ export function getCanonicalClassRegistererAddress() {
15
+ if (!address) {
16
+ address = getCanonicalClassRegisterer().address;
17
+ }
18
+ return address;
19
+ }
@@ -0,0 +1,6 @@
1
+ import { loadContractArtifact } from '@aztec/types/abi';
2
+ import { NoirCompiledContract } from '@aztec/types/noir';
3
+
4
+ import MultiCallEntrypoint from '../artifacts/MultiCallEntrypoint.json' assert { type: 'json' };
5
+
6
+ export const MultiCallEntrypointArtifact = loadContractArtifact(MultiCallEntrypoint as NoirCompiledContract);
@@ -0,0 +1,12 @@
1
+ import { AztecAddress, EthAddress, Point } from '@aztec/circuits.js';
2
+
3
+ import { ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js';
4
+ import { MultiCallEntrypointArtifact } from './artifact.js';
5
+
6
+ export function getCanonicalMultiCallEntrypointContract(): ProtocolContract {
7
+ return getCanonicalProtocolContract(MultiCallEntrypointArtifact, 1, [], Point.ZERO, EthAddress.ZERO);
8
+ }
9
+
10
+ export function getCanonicalMultiCallEntrypointAddress(): AztecAddress {
11
+ return getCanonicalMultiCallEntrypointContract().address;
12
+ }