@aztec/protocol-contracts 1.0.0-staging.2 → 1.0.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.
@@ -2,14 +2,13 @@ import { Fr } from '@aztec/foundation/fields';
2
2
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
3
3
  import type { ContractInstanceUpdateWithAddress } from '@aztec/stdlib/contract';
4
4
  import type { PublicLog } from '@aztec/stdlib/logs';
5
- import type { UInt64 } from '@aztec/stdlib/types';
6
5
  /** Event emitted from the ContractInstanceDeployer. */
7
6
  export declare class ContractInstanceUpdatedEvent {
8
7
  readonly address: AztecAddress;
9
8
  readonly prevContractClassId: Fr;
10
9
  readonly newContractClassId: Fr;
11
- readonly timestampOfChange: UInt64;
12
- constructor(address: AztecAddress, prevContractClassId: Fr, newContractClassId: Fr, timestampOfChange: UInt64);
10
+ readonly blockOfChange: number;
11
+ constructor(address: AztecAddress, prevContractClassId: Fr, newContractClassId: Fr, blockOfChange: number);
13
12
  static isContractInstanceUpdatedEvent(log: PublicLog): boolean;
14
13
  static fromLog(log: PublicLog): ContractInstanceUpdatedEvent;
15
14
  toContractInstanceUpdate(): ContractInstanceUpdateWithAddress;
@@ -1 +1 @@
1
- {"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-deployer/contract_instance_updated_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,uDAAuD;AACvD,qBAAa,4BAA4B;aAErB,OAAO,EAAE,YAAY;aACrB,mBAAmB,EAAE,EAAE;aACvB,kBAAkB,EAAE,EAAE;aACtB,iBAAiB,EAAE,MAAM;gBAHzB,OAAO,EAAE,YAAY,EACrB,mBAAmB,EAAE,EAAE,EACvB,kBAAkB,EAAE,EAAE,EACtB,iBAAiB,EAAE,MAAM;IAG3C,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS;IAOpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS;IAW7B,wBAAwB,IAAI,iCAAiC;CAQ9D"}
1
+ {"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-deployer/contract_instance_updated_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,uDAAuD;AACvD,qBAAa,4BAA4B;aAErB,OAAO,EAAE,YAAY;aACrB,mBAAmB,EAAE,EAAE;aACvB,kBAAkB,EAAE,EAAE;aACtB,aAAa,EAAE,MAAM;gBAHrB,OAAO,EAAE,YAAY,EACrB,mBAAmB,EAAE,EAAE,EACvB,kBAAkB,EAAE,EAAE,EACtB,aAAa,EAAE,MAAM;IAGvC,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS;IAOpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS;IAW7B,wBAAwB,IAAI,iCAAiC;CAQ9D"}
@@ -7,12 +7,12 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
7
7
  address;
8
8
  prevContractClassId;
9
9
  newContractClassId;
10
- timestampOfChange;
11
- constructor(address, prevContractClassId, newContractClassId, timestampOfChange){
10
+ blockOfChange;
11
+ constructor(address, prevContractClassId, newContractClassId, blockOfChange){
12
12
  this.address = address;
13
13
  this.prevContractClassId = prevContractClassId;
14
14
  this.newContractClassId = newContractClassId;
15
- this.timestampOfChange = timestampOfChange;
15
+ this.blockOfChange = blockOfChange;
16
16
  }
17
17
  static isContractInstanceUpdatedEvent(log) {
18
18
  return log.contractAddress.equals(ProtocolContractAddress.ContractInstanceDeployer) && log.fields[0].toBigInt() === DEPLOYER_CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE;
@@ -23,15 +23,15 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
23
23
  const address = reader.readObject(AztecAddress);
24
24
  const prevContractClassId = reader.readObject(Fr);
25
25
  const newContractClassId = reader.readObject(Fr);
26
- const timestampOfChange = reader.readObject(Fr).toBigInt();
27
- return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, timestampOfChange);
26
+ const blockOfChange = reader.readObject(Fr).toNumber();
27
+ return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, blockOfChange);
28
28
  }
29
29
  toContractInstanceUpdate() {
30
30
  return {
31
31
  address: this.address,
32
32
  prevContractClassId: this.prevContractClassId,
33
33
  newContractClassId: this.newContractClassId,
34
- timestampOfChange: this.timestampOfChange
34
+ blockOfChange: this.blockOfChange
35
35
  };
36
36
  }
37
37
  }
@@ -26,12 +26,12 @@ export const ProtocolContractAddress = {
26
26
  Router: AztecAddress.fromBigInt(6n)
27
27
  };
28
28
  export const ProtocolContractLeaves = {
29
- AuthRegistry: Fr.fromHexString('0x2f6bd1a89bea5be521192b074d53d5b817eb0773fb4796808b7cdbb43e97f4ad'),
30
- ContractInstanceDeployer: Fr.fromHexString('0x1418af8890574a35028cf969a94453459e1c77c4c93b1061cdf8fb03fc4dcce3'),
31
- ContractClassRegisterer: Fr.fromHexString('0x201dc45e1087ee8bc9670d05d148d9c000b0a2d53e7d2fe00ffde9f24036c525'),
32
- MultiCallEntrypoint: Fr.fromHexString('0x245e788b0c40a2eb49e49dd4a6b879051a1858e049c4c42f53aaab2c6bc32047'),
33
- FeeJuice: Fr.fromHexString('0x2a6db4554b77a284cbfd14c6339cf2396ef59e50a5a52bddf8154400e3c42c1e'),
34
- Router: Fr.fromHexString('0x038226b32405bcbe548a8dd4c4790401b9193ebf8782e9f60a429ad7ecc58f05')
29
+ AuthRegistry: Fr.fromHexString('0x1a43e7ccd2806bfcfeeae509654e9a85e80b309d24bc26c404d92f990e791155'),
30
+ ContractInstanceDeployer: Fr.fromHexString('0x23b758e7800d414211265d9c13659f8db42700d50159481b51f52ae58f0a74e3'),
31
+ ContractClassRegisterer: Fr.fromHexString('0x1de181b09738274d8234ac93e0855c6b7dd30d70cdec1cdae6165c9bf95b3725'),
32
+ MultiCallEntrypoint: Fr.fromHexString('0x0a4490e3870d70497492c90ab326ebfcfe21b9c35f6973eb01580f8f2214256e'),
33
+ FeeJuice: Fr.fromHexString('0x16bee193c23c6636a3c35e7bd0dcde738c6890294924df97a4cfa0fcf3955456'),
34
+ Router: Fr.fromHexString('0x1c09fe5e2b02096d43a156b133a83f8e4e13415e6dc530fe1f0d1753fef6c4ff')
35
35
  };
36
- export const protocolContractTreeRoot = Fr.fromHexString('0x00d0980697e140a074810b2bee11c5042763b87e95bfdbf2f28269c79e6abad6');
36
+ export const protocolContractTreeRoot = Fr.fromHexString('0x0ef0ebce007b13ba690a833063974936ba993b1d97d31029b77ddef6d5cf6082');
37
37
  export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('0x2ec28b91a5f838506d6042915005ff55cf7a0a5f889a83b11faed33a31b486f2');
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aztec/protocol-contracts",
3
3
  "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/protocol-contracts",
4
4
  "description": "Canonical Noir contracts for the Aztec Network",
5
- "version": "1.0.0-staging.2",
5
+ "version": "1.0.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./dest/index.js",
@@ -73,9 +73,9 @@
73
73
  ]
74
74
  },
75
75
  "dependencies": {
76
- "@aztec/constants": "1.0.0-staging.2",
77
- "@aztec/foundation": "1.0.0-staging.2",
78
- "@aztec/stdlib": "1.0.0-staging.2",
76
+ "@aztec/constants": "1.0.0",
77
+ "@aztec/foundation": "1.0.0",
78
+ "@aztec/stdlib": "1.0.0",
79
79
  "lodash.chunk": "^4.2.0",
80
80
  "lodash.omit": "^4.5.0",
81
81
  "tslib": "^2.4.0"
@@ -4,7 +4,6 @@ import { BufferReader } from '@aztec/foundation/serialize';
4
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { ContractInstanceUpdateWithAddress } from '@aztec/stdlib/contract';
6
6
  import type { PublicLog } from '@aztec/stdlib/logs';
7
- import type { UInt64 } from '@aztec/stdlib/types';
8
7
 
9
8
  import { ProtocolContractAddress } from '../protocol_contract_data.js';
10
9
 
@@ -14,7 +13,7 @@ export class ContractInstanceUpdatedEvent {
14
13
  public readonly address: AztecAddress,
15
14
  public readonly prevContractClassId: Fr,
16
15
  public readonly newContractClassId: Fr,
17
- public readonly timestampOfChange: UInt64,
16
+ public readonly blockOfChange: number,
18
17
  ) {}
19
18
 
20
19
  static isContractInstanceUpdatedEvent(log: PublicLog) {
@@ -30,9 +29,9 @@ export class ContractInstanceUpdatedEvent {
30
29
  const address = reader.readObject(AztecAddress);
31
30
  const prevContractClassId = reader.readObject(Fr);
32
31
  const newContractClassId = reader.readObject(Fr);
33
- const timestampOfChange = reader.readObject(Fr).toBigInt();
32
+ const blockOfChange = reader.readObject(Fr).toNumber();
34
33
 
35
- return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, timestampOfChange);
34
+ return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, blockOfChange);
36
35
  }
37
36
 
38
37
  toContractInstanceUpdate(): ContractInstanceUpdateWithAddress {
@@ -40,7 +39,7 @@ export class ContractInstanceUpdatedEvent {
40
39
  address: this.address,
41
40
  prevContractClassId: this.prevContractClassId,
42
41
  newContractClassId: this.newContractClassId,
43
- timestampOfChange: this.timestampOfChange,
42
+ blockOfChange: this.blockOfChange,
44
43
  };
45
44
  }
46
45
  }
@@ -40,17 +40,17 @@ Router: AztecAddress.fromBigInt(6n)
40
40
 
41
41
 
42
42
  export const ProtocolContractLeaves = {
43
- AuthRegistry: Fr.fromHexString('0x2f6bd1a89bea5be521192b074d53d5b817eb0773fb4796808b7cdbb43e97f4ad'),
44
- ContractInstanceDeployer: Fr.fromHexString('0x1418af8890574a35028cf969a94453459e1c77c4c93b1061cdf8fb03fc4dcce3'),
45
- ContractClassRegisterer: Fr.fromHexString('0x201dc45e1087ee8bc9670d05d148d9c000b0a2d53e7d2fe00ffde9f24036c525'),
46
- MultiCallEntrypoint: Fr.fromHexString('0x245e788b0c40a2eb49e49dd4a6b879051a1858e049c4c42f53aaab2c6bc32047'),
47
- FeeJuice: Fr.fromHexString('0x2a6db4554b77a284cbfd14c6339cf2396ef59e50a5a52bddf8154400e3c42c1e'),
48
- Router: Fr.fromHexString('0x038226b32405bcbe548a8dd4c4790401b9193ebf8782e9f60a429ad7ecc58f05')
43
+ AuthRegistry: Fr.fromHexString('0x1a43e7ccd2806bfcfeeae509654e9a85e80b309d24bc26c404d92f990e791155'),
44
+ ContractInstanceDeployer: Fr.fromHexString('0x23b758e7800d414211265d9c13659f8db42700d50159481b51f52ae58f0a74e3'),
45
+ ContractClassRegisterer: Fr.fromHexString('0x1de181b09738274d8234ac93e0855c6b7dd30d70cdec1cdae6165c9bf95b3725'),
46
+ MultiCallEntrypoint: Fr.fromHexString('0x0a4490e3870d70497492c90ab326ebfcfe21b9c35f6973eb01580f8f2214256e'),
47
+ FeeJuice: Fr.fromHexString('0x16bee193c23c6636a3c35e7bd0dcde738c6890294924df97a4cfa0fcf3955456'),
48
+ Router: Fr.fromHexString('0x1c09fe5e2b02096d43a156b133a83f8e4e13415e6dc530fe1f0d1753fef6c4ff')
49
49
  };
50
50
 
51
51
 
52
52
 
53
- export const protocolContractTreeRoot = Fr.fromHexString('0x00d0980697e140a074810b2bee11c5042763b87e95bfdbf2f28269c79e6abad6');
53
+ export const protocolContractTreeRoot = Fr.fromHexString('0x0ef0ebce007b13ba690a833063974936ba993b1d97d31029b77ddef6d5cf6082');
54
54
 
55
55
 
56
56