@aztec/end-to-end 2.0.0-nightly.20250901 → 2.0.0-nightly.20250903
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l1_to_l2_messaging.d.ts","sourceRoot":"","sources":["../../src/fixtures/l1_to_l2_messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAMhE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE;IAAE,SAAS,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;IAAC,UAAU,EAAE,EAAE,CAAA;CAAE,EACjE,GAAG,EAAE;IACH,QAAQ,EAAE,wBAAwB,CAAC;IACnC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC;CAClF;;;;
|
|
1
|
+
{"version":3,"file":"l1_to_l2_messaging.d.ts","sourceRoot":"","sources":["../../src/fixtures/l1_to_l2_messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAMhE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE;IAAE,SAAS,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;IAAC,UAAU,EAAE,EAAE,CAAA;CAAE,EACjE,GAAG,EAAE;IACH,QAAQ,EAAE,wBAAwB,CAAC;IACnC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC;CAClF;;;;GAgEF"}
|
|
@@ -36,17 +36,27 @@ export async function sendL1ToL2Message(message, ctx) {
|
|
|
36
36
|
if (txReceipt.transactionHash !== txHash) {
|
|
37
37
|
throw new Error(`Receipt transaction hash mismatch: ${txReceipt.transactionHash} !== ${txHash}`);
|
|
38
38
|
}
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
// Filter for MessageSent events from the Inbox contract by trying to decode each log
|
|
40
|
+
const messageSentLogs = txReceipt.logs.filter((log)=>log.address.toLowerCase() === ctx.l1ContractAddresses.inboxAddress.toString().toLowerCase()).map((log)=>{
|
|
41
|
+
try {
|
|
42
|
+
const decoded = decodeEventLog({
|
|
43
|
+
abi: InboxAbi,
|
|
44
|
+
data: log.data,
|
|
45
|
+
topics: log.topics
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
log,
|
|
49
|
+
decoded
|
|
50
|
+
};
|
|
51
|
+
} catch {
|
|
52
|
+
return null; // Not a decodable event from this ABI
|
|
53
|
+
}
|
|
54
|
+
}).filter((item)=>item !== null && item.decoded.eventName === 'MessageSent');
|
|
55
|
+
if (messageSentLogs.length !== 1) {
|
|
56
|
+
throw new Error(`Wrong number of MessageSent logs found in ${txHash} transaction (got ${messageSentLogs.length} expected 1)\n${tryJsonStringify(messageSentLogs.map((item)=>item.log))}`);
|
|
42
57
|
}
|
|
43
|
-
// We
|
|
44
|
-
const
|
|
45
|
-
const topics = decodeEventLog({
|
|
46
|
-
abi: InboxAbi,
|
|
47
|
-
data: messageSentLog.data,
|
|
48
|
-
topics: messageSentLog.topics
|
|
49
|
-
});
|
|
58
|
+
// We already have the decoded event
|
|
59
|
+
const topics = messageSentLogs[0].decoded;
|
|
50
60
|
const receivedMsgHash = topics.args.hash;
|
|
51
61
|
const receivedGlobalLeafIndex = topics.args.index;
|
|
52
62
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "2.0.0-nightly.
|
|
3
|
+
"version": "2.0.0-nightly.20250903",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,41 +25,41 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "2.0.0-nightly.
|
|
29
|
-
"@aztec/archiver": "2.0.0-nightly.
|
|
30
|
-
"@aztec/aztec": "2.0.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "2.0.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "2.0.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "2.0.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "2.0.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "2.0.0-nightly.
|
|
36
|
-
"@aztec/bot": "2.0.0-nightly.
|
|
37
|
-
"@aztec/cli": "2.0.0-nightly.
|
|
38
|
-
"@aztec/constants": "2.0.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "2.0.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "2.0.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "2.0.0-nightly.
|
|
42
|
-
"@aztec/foundation": "2.0.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "2.0.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "2.0.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "2.0.0-nightly.
|
|
46
|
-
"@aztec/node-keystore": "2.0.0-nightly.
|
|
47
|
-
"@aztec/noir-contracts.js": "2.0.0-nightly.
|
|
48
|
-
"@aztec/noir-noirc_abi": "2.0.0-nightly.
|
|
49
|
-
"@aztec/noir-protocol-circuits-types": "2.0.0-nightly.
|
|
50
|
-
"@aztec/noir-test-contracts.js": "2.0.0-nightly.
|
|
51
|
-
"@aztec/p2p": "2.0.0-nightly.
|
|
52
|
-
"@aztec/protocol-contracts": "2.0.0-nightly.
|
|
53
|
-
"@aztec/prover-client": "2.0.0-nightly.
|
|
54
|
-
"@aztec/prover-node": "2.0.0-nightly.
|
|
55
|
-
"@aztec/pxe": "2.0.0-nightly.
|
|
56
|
-
"@aztec/sequencer-client": "2.0.0-nightly.
|
|
57
|
-
"@aztec/simulator": "2.0.0-nightly.
|
|
58
|
-
"@aztec/slasher": "2.0.0-nightly.
|
|
59
|
-
"@aztec/stdlib": "2.0.0-nightly.
|
|
60
|
-
"@aztec/telemetry-client": "2.0.0-nightly.
|
|
61
|
-
"@aztec/validator-client": "2.0.0-nightly.
|
|
62
|
-
"@aztec/world-state": "2.0.0-nightly.
|
|
28
|
+
"@aztec/accounts": "2.0.0-nightly.20250903",
|
|
29
|
+
"@aztec/archiver": "2.0.0-nightly.20250903",
|
|
30
|
+
"@aztec/aztec": "2.0.0-nightly.20250903",
|
|
31
|
+
"@aztec/aztec-node": "2.0.0-nightly.20250903",
|
|
32
|
+
"@aztec/aztec.js": "2.0.0-nightly.20250903",
|
|
33
|
+
"@aztec/bb-prover": "2.0.0-nightly.20250903",
|
|
34
|
+
"@aztec/blob-lib": "2.0.0-nightly.20250903",
|
|
35
|
+
"@aztec/blob-sink": "2.0.0-nightly.20250903",
|
|
36
|
+
"@aztec/bot": "2.0.0-nightly.20250903",
|
|
37
|
+
"@aztec/cli": "2.0.0-nightly.20250903",
|
|
38
|
+
"@aztec/constants": "2.0.0-nightly.20250903",
|
|
39
|
+
"@aztec/entrypoints": "2.0.0-nightly.20250903",
|
|
40
|
+
"@aztec/epoch-cache": "2.0.0-nightly.20250903",
|
|
41
|
+
"@aztec/ethereum": "2.0.0-nightly.20250903",
|
|
42
|
+
"@aztec/foundation": "2.0.0-nightly.20250903",
|
|
43
|
+
"@aztec/kv-store": "2.0.0-nightly.20250903",
|
|
44
|
+
"@aztec/l1-artifacts": "2.0.0-nightly.20250903",
|
|
45
|
+
"@aztec/merkle-tree": "2.0.0-nightly.20250903",
|
|
46
|
+
"@aztec/node-keystore": "2.0.0-nightly.20250903",
|
|
47
|
+
"@aztec/noir-contracts.js": "2.0.0-nightly.20250903",
|
|
48
|
+
"@aztec/noir-noirc_abi": "2.0.0-nightly.20250903",
|
|
49
|
+
"@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250903",
|
|
50
|
+
"@aztec/noir-test-contracts.js": "2.0.0-nightly.20250903",
|
|
51
|
+
"@aztec/p2p": "2.0.0-nightly.20250903",
|
|
52
|
+
"@aztec/protocol-contracts": "2.0.0-nightly.20250903",
|
|
53
|
+
"@aztec/prover-client": "2.0.0-nightly.20250903",
|
|
54
|
+
"@aztec/prover-node": "2.0.0-nightly.20250903",
|
|
55
|
+
"@aztec/pxe": "2.0.0-nightly.20250903",
|
|
56
|
+
"@aztec/sequencer-client": "2.0.0-nightly.20250903",
|
|
57
|
+
"@aztec/simulator": "2.0.0-nightly.20250903",
|
|
58
|
+
"@aztec/slasher": "2.0.0-nightly.20250903",
|
|
59
|
+
"@aztec/stdlib": "2.0.0-nightly.20250903",
|
|
60
|
+
"@aztec/telemetry-client": "2.0.0-nightly.20250903",
|
|
61
|
+
"@aztec/validator-client": "2.0.0-nightly.20250903",
|
|
62
|
+
"@aztec/world-state": "2.0.0-nightly.20250903",
|
|
63
63
|
"@iarna/toml": "^2.2.5",
|
|
64
64
|
"@jest/globals": "^30.0.0",
|
|
65
65
|
"@noble/curves": "=1.0.0",
|
|
@@ -48,20 +48,31 @@ export async function sendL1ToL2Message(
|
|
|
48
48
|
throw new Error(`Receipt transaction hash mismatch: ${txReceipt.transactionHash} !== ${txHash}`);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
//
|
|
52
|
-
|
|
51
|
+
// Filter for MessageSent events from the Inbox contract by trying to decode each log
|
|
52
|
+
const messageSentLogs = txReceipt.logs
|
|
53
|
+
.filter(log => log.address.toLowerCase() === ctx.l1ContractAddresses.inboxAddress.toString().toLowerCase())
|
|
54
|
+
.map(log => {
|
|
55
|
+
try {
|
|
56
|
+
const decoded = decodeEventLog({
|
|
57
|
+
abi: InboxAbi,
|
|
58
|
+
data: log.data,
|
|
59
|
+
topics: log.topics,
|
|
60
|
+
});
|
|
61
|
+
return { log, decoded };
|
|
62
|
+
} catch {
|
|
63
|
+
return null; // Not a decodable event from this ABI
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
.filter((item): item is { log: any; decoded: any } => item !== null && item.decoded.eventName === 'MessageSent');
|
|
67
|
+
|
|
68
|
+
if (messageSentLogs.length !== 1) {
|
|
53
69
|
throw new Error(
|
|
54
|
-
`Wrong number of logs found in ${txHash} transaction (got ${
|
|
70
|
+
`Wrong number of MessageSent logs found in ${txHash} transaction (got ${messageSentLogs.length} expected 1)\n${tryJsonStringify(messageSentLogs.map(item => item.log))}`,
|
|
55
71
|
);
|
|
56
72
|
}
|
|
57
73
|
|
|
58
|
-
// We
|
|
59
|
-
const
|
|
60
|
-
const topics = decodeEventLog({
|
|
61
|
-
abi: InboxAbi,
|
|
62
|
-
data: messageSentLog.data,
|
|
63
|
-
topics: messageSentLog.topics,
|
|
64
|
-
});
|
|
74
|
+
// We already have the decoded event
|
|
75
|
+
const topics = messageSentLogs[0].decoded;
|
|
65
76
|
const receivedMsgHash = topics.args.hash;
|
|
66
77
|
const receivedGlobalLeafIndex = topics.args.index;
|
|
67
78
|
|