@aztec/end-to-end 2.0.0-nightly.20250831 → 2.0.0-nightly.20250902

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;;;;GAqDF"}
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
- // Exactly 1 event should be emitted in the transaction
40
- if (txReceipt.logs.length !== 1) {
41
- throw new Error(`Wrong number of logs found in ${txHash} transaction (got ${txReceipt.logs.length} expected 1)\n${tryJsonStringify(txReceipt.logs)}`);
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 decode the event and get leaf out of it
44
- const messageSentLog = txReceipt.logs[0];
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.20250831",
3
+ "version": "2.0.0-nightly.20250902",
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.20250831",
29
- "@aztec/archiver": "2.0.0-nightly.20250831",
30
- "@aztec/aztec": "2.0.0-nightly.20250831",
31
- "@aztec/aztec-node": "2.0.0-nightly.20250831",
32
- "@aztec/aztec.js": "2.0.0-nightly.20250831",
33
- "@aztec/bb-prover": "2.0.0-nightly.20250831",
34
- "@aztec/blob-lib": "2.0.0-nightly.20250831",
35
- "@aztec/blob-sink": "2.0.0-nightly.20250831",
36
- "@aztec/bot": "2.0.0-nightly.20250831",
37
- "@aztec/cli": "2.0.0-nightly.20250831",
38
- "@aztec/constants": "2.0.0-nightly.20250831",
39
- "@aztec/entrypoints": "2.0.0-nightly.20250831",
40
- "@aztec/epoch-cache": "2.0.0-nightly.20250831",
41
- "@aztec/ethereum": "2.0.0-nightly.20250831",
42
- "@aztec/foundation": "2.0.0-nightly.20250831",
43
- "@aztec/kv-store": "2.0.0-nightly.20250831",
44
- "@aztec/l1-artifacts": "2.0.0-nightly.20250831",
45
- "@aztec/merkle-tree": "2.0.0-nightly.20250831",
46
- "@aztec/node-keystore": "2.0.0-nightly.20250831",
47
- "@aztec/noir-contracts.js": "2.0.0-nightly.20250831",
48
- "@aztec/noir-noirc_abi": "2.0.0-nightly.20250831",
49
- "@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250831",
50
- "@aztec/noir-test-contracts.js": "2.0.0-nightly.20250831",
51
- "@aztec/p2p": "2.0.0-nightly.20250831",
52
- "@aztec/protocol-contracts": "2.0.0-nightly.20250831",
53
- "@aztec/prover-client": "2.0.0-nightly.20250831",
54
- "@aztec/prover-node": "2.0.0-nightly.20250831",
55
- "@aztec/pxe": "2.0.0-nightly.20250831",
56
- "@aztec/sequencer-client": "2.0.0-nightly.20250831",
57
- "@aztec/simulator": "2.0.0-nightly.20250831",
58
- "@aztec/slasher": "2.0.0-nightly.20250831",
59
- "@aztec/stdlib": "2.0.0-nightly.20250831",
60
- "@aztec/telemetry-client": "2.0.0-nightly.20250831",
61
- "@aztec/validator-client": "2.0.0-nightly.20250831",
62
- "@aztec/world-state": "2.0.0-nightly.20250831",
28
+ "@aztec/accounts": "2.0.0-nightly.20250902",
29
+ "@aztec/archiver": "2.0.0-nightly.20250902",
30
+ "@aztec/aztec": "2.0.0-nightly.20250902",
31
+ "@aztec/aztec-node": "2.0.0-nightly.20250902",
32
+ "@aztec/aztec.js": "2.0.0-nightly.20250902",
33
+ "@aztec/bb-prover": "2.0.0-nightly.20250902",
34
+ "@aztec/blob-lib": "2.0.0-nightly.20250902",
35
+ "@aztec/blob-sink": "2.0.0-nightly.20250902",
36
+ "@aztec/bot": "2.0.0-nightly.20250902",
37
+ "@aztec/cli": "2.0.0-nightly.20250902",
38
+ "@aztec/constants": "2.0.0-nightly.20250902",
39
+ "@aztec/entrypoints": "2.0.0-nightly.20250902",
40
+ "@aztec/epoch-cache": "2.0.0-nightly.20250902",
41
+ "@aztec/ethereum": "2.0.0-nightly.20250902",
42
+ "@aztec/foundation": "2.0.0-nightly.20250902",
43
+ "@aztec/kv-store": "2.0.0-nightly.20250902",
44
+ "@aztec/l1-artifacts": "2.0.0-nightly.20250902",
45
+ "@aztec/merkle-tree": "2.0.0-nightly.20250902",
46
+ "@aztec/node-keystore": "2.0.0-nightly.20250902",
47
+ "@aztec/noir-contracts.js": "2.0.0-nightly.20250902",
48
+ "@aztec/noir-noirc_abi": "2.0.0-nightly.20250902",
49
+ "@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250902",
50
+ "@aztec/noir-test-contracts.js": "2.0.0-nightly.20250902",
51
+ "@aztec/p2p": "2.0.0-nightly.20250902",
52
+ "@aztec/protocol-contracts": "2.0.0-nightly.20250902",
53
+ "@aztec/prover-client": "2.0.0-nightly.20250902",
54
+ "@aztec/prover-node": "2.0.0-nightly.20250902",
55
+ "@aztec/pxe": "2.0.0-nightly.20250902",
56
+ "@aztec/sequencer-client": "2.0.0-nightly.20250902",
57
+ "@aztec/simulator": "2.0.0-nightly.20250902",
58
+ "@aztec/slasher": "2.0.0-nightly.20250902",
59
+ "@aztec/stdlib": "2.0.0-nightly.20250902",
60
+ "@aztec/telemetry-client": "2.0.0-nightly.20250902",
61
+ "@aztec/validator-client": "2.0.0-nightly.20250902",
62
+ "@aztec/world-state": "2.0.0-nightly.20250902",
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
- // Exactly 1 event should be emitted in the transaction
52
- if (txReceipt.logs.length !== 1) {
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 ${txReceipt.logs.length} expected 1)\n${tryJsonStringify(txReceipt.logs)}`,
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 decode the event and get leaf out of it
59
- const messageSentLog = txReceipt.logs[0];
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