|
| 1 | +import { L1_TO_L2_MSG_SUBTREE_HEIGHT } from '@aztec/constants'; |
1 | 2 | import { SecretValue, getActiveNetworkName } from '@aztec/foundation/config'; |
2 | 3 | import { keccak256String } from '@aztec/foundation/crypto'; |
3 | 4 | import { EthAddress } from '@aztec/foundation/eth-address'; |
@@ -1019,6 +1020,24 @@ export const deployL1Contracts = async ( |
1019 | 1020 | // Write verification data (constructor args + linked libraries) to file for later forge verify |
1020 | 1021 | if (createVerificationJson) { |
1021 | 1022 | try { |
| 1023 | + // Add Inbox / Outbox verification records (constructor args are created inside RollupCore) |
| 1024 | + const rollupAddr = l1Contracts.rollupAddress.toString(); |
| 1025 | + const inboxAddr = l1Contracts.inboxAddress.toString(); |
| 1026 | + const outboxAddr = l1Contracts.outboxAddress.toString(); |
| 1027 | + const feeAsset = l1Contracts.feeJuiceAddress.toString(); |
| 1028 | + const version = await rollup.getVersion(); |
| 1029 | + |
| 1030 | + const inboxCtor = encodeAbiParameters( |
| 1031 | + [{ type: 'address' }, { type: 'address' }, { type: 'uint256' }, { type: 'uint256' }], |
| 1032 | + [rollupAddr, feeAsset, version, BigInt(L1_TO_L2_MSG_SUBTREE_HEIGHT)], |
| 1033 | + ); |
| 1034 | + |
| 1035 | + const outboxCtor = encodeAbiParameters([{ type: 'address' }, { type: 'uint256' }], [rollupAddr, version]); |
| 1036 | + |
| 1037 | + deployer.verificationRecords.push( |
| 1038 | + { name: 'Inbox', address: inboxAddr, constructorArgsHex: inboxCtor, libraries: [] }, |
| 1039 | + { name: 'Outbox', address: outboxAddr, constructorArgsHex: outboxCtor, libraries: [] }, |
| 1040 | + ); |
1022 | 1041 | const date = new Date(); |
1023 | 1042 | const formattedDate = date.toISOString().slice(2, 19).replace(/[-T:]/g, ''); |
1024 | 1043 | // Ensure the verification output directory exists |
|
0 commit comments