@aztec/protocol-contracts 1.0.0 → 1.1.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/artifacts/AuthRegistry.json +173 -164
- package/artifacts/ContractClassRegisterer.json +81 -81
- package/artifacts/ContractInstanceDeployer.json +116 -116
- package/artifacts/FeeJuice.json +156 -156
- package/artifacts/MultiCallEntrypoint.json +141 -141
- package/artifacts/Router.json +81 -81
- package/dest/instance-deployer/contract_instance_updated_event.d.ts +3 -2
- package/dest/instance-deployer/contract_instance_updated_event.d.ts.map +1 -1
- package/dest/instance-deployer/contract_instance_updated_event.js +6 -6
- package/dest/protocol_contract_data.js +7 -7
- package/package.json +4 -4
- package/src/instance-deployer/contract_instance_updated_event.ts +5 -4
- package/src/protocol_contract_data.ts +7 -7
|
@@ -2,13 +2,14 @@ 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';
|
|
5
6
|
/** Event emitted from the ContractInstanceDeployer. */
|
|
6
7
|
export declare class ContractInstanceUpdatedEvent {
|
|
7
8
|
readonly address: AztecAddress;
|
|
8
9
|
readonly prevContractClassId: Fr;
|
|
9
10
|
readonly newContractClassId: Fr;
|
|
10
|
-
readonly
|
|
11
|
-
constructor(address: AztecAddress, prevContractClassId: Fr, newContractClassId: Fr,
|
|
11
|
+
readonly timestampOfChange: UInt64;
|
|
12
|
+
constructor(address: AztecAddress, prevContractClassId: Fr, newContractClassId: Fr, timestampOfChange: UInt64);
|
|
12
13
|
static isContractInstanceUpdatedEvent(log: PublicLog): boolean;
|
|
13
14
|
static fromLog(log: PublicLog): ContractInstanceUpdatedEvent;
|
|
14
15
|
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;
|
|
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"}
|
|
@@ -7,12 +7,12 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
7
7
|
address;
|
|
8
8
|
prevContractClassId;
|
|
9
9
|
newContractClassId;
|
|
10
|
-
|
|
11
|
-
constructor(address, prevContractClassId, newContractClassId,
|
|
10
|
+
timestampOfChange;
|
|
11
|
+
constructor(address, prevContractClassId, newContractClassId, timestampOfChange){
|
|
12
12
|
this.address = address;
|
|
13
13
|
this.prevContractClassId = prevContractClassId;
|
|
14
14
|
this.newContractClassId = newContractClassId;
|
|
15
|
-
this.
|
|
15
|
+
this.timestampOfChange = timestampOfChange;
|
|
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
|
|
27
|
-
return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId,
|
|
26
|
+
const timestampOfChange = reader.readObject(Fr).toBigInt();
|
|
27
|
+
return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, timestampOfChange);
|
|
28
28
|
}
|
|
29
29
|
toContractInstanceUpdate() {
|
|
30
30
|
return {
|
|
31
31
|
address: this.address,
|
|
32
32
|
prevContractClassId: this.prevContractClassId,
|
|
33
33
|
newContractClassId: this.newContractClassId,
|
|
34
|
-
|
|
34
|
+
timestampOfChange: this.timestampOfChange
|
|
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('
|
|
30
|
-
ContractInstanceDeployer: Fr.fromHexString('
|
|
31
|
-
ContractClassRegisterer: Fr.fromHexString('
|
|
32
|
-
MultiCallEntrypoint: Fr.fromHexString('
|
|
33
|
-
FeeJuice: Fr.fromHexString('
|
|
34
|
-
Router: Fr.fromHexString('
|
|
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')
|
|
35
35
|
};
|
|
36
|
-
export const protocolContractTreeRoot = Fr.fromHexString('
|
|
36
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x00d0980697e140a074810b2bee11c5042763b87e95bfdbf2f28269c79e6abad6');
|
|
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.
|
|
5
|
+
"version": "1.1.2",
|
|
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.
|
|
77
|
-
"@aztec/foundation": "1.
|
|
78
|
-
"@aztec/stdlib": "1.
|
|
76
|
+
"@aztec/constants": "1.1.2",
|
|
77
|
+
"@aztec/foundation": "1.1.2",
|
|
78
|
+
"@aztec/stdlib": "1.1.2",
|
|
79
79
|
"lodash.chunk": "^4.2.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
@@ -4,6 +4,7 @@ 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';
|
|
7
8
|
|
|
8
9
|
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
9
10
|
|
|
@@ -13,7 +14,7 @@ export class ContractInstanceUpdatedEvent {
|
|
|
13
14
|
public readonly address: AztecAddress,
|
|
14
15
|
public readonly prevContractClassId: Fr,
|
|
15
16
|
public readonly newContractClassId: Fr,
|
|
16
|
-
public readonly
|
|
17
|
+
public readonly timestampOfChange: UInt64,
|
|
17
18
|
) {}
|
|
18
19
|
|
|
19
20
|
static isContractInstanceUpdatedEvent(log: PublicLog) {
|
|
@@ -29,9 +30,9 @@ export class ContractInstanceUpdatedEvent {
|
|
|
29
30
|
const address = reader.readObject(AztecAddress);
|
|
30
31
|
const prevContractClassId = reader.readObject(Fr);
|
|
31
32
|
const newContractClassId = reader.readObject(Fr);
|
|
32
|
-
const
|
|
33
|
+
const timestampOfChange = reader.readObject(Fr).toBigInt();
|
|
33
34
|
|
|
34
|
-
return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId,
|
|
35
|
+
return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, timestampOfChange);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
toContractInstanceUpdate(): ContractInstanceUpdateWithAddress {
|
|
@@ -39,7 +40,7 @@ export class ContractInstanceUpdatedEvent {
|
|
|
39
40
|
address: this.address,
|
|
40
41
|
prevContractClassId: this.prevContractClassId,
|
|
41
42
|
newContractClassId: this.newContractClassId,
|
|
42
|
-
|
|
43
|
+
timestampOfChange: this.timestampOfChange,
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -40,17 +40,17 @@ Router: AztecAddress.fromBigInt(6n)
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
export const ProtocolContractLeaves = {
|
|
43
|
-
AuthRegistry: Fr.fromHexString('
|
|
44
|
-
ContractInstanceDeployer: Fr.fromHexString('
|
|
45
|
-
ContractClassRegisterer: Fr.fromHexString('
|
|
46
|
-
MultiCallEntrypoint: Fr.fromHexString('
|
|
47
|
-
FeeJuice: Fr.fromHexString('
|
|
48
|
-
Router: Fr.fromHexString('
|
|
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')
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
export const protocolContractTreeRoot = Fr.fromHexString('
|
|
53
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x00d0980697e140a074810b2bee11c5042763b87e95bfdbf2f28269c79e6abad6');
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|