Skip to content

Commit 84d3e40

Browse files
committed
add inbox/outbox
1 parent 5341dcb commit 84d3e40

File tree

5 files changed

+32
-2
lines changed

5 files changed

+32
-2
lines changed

l1-contracts/scripts/verify-from-json.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ resolve_fqn() {
123123
echo "src/core/Rollup.sol:Rollup" ;;
124124
SlashFactory)
125125
echo "src/periphery/SlashFactory.sol:SlashFactory" ;;
126+
Inbox)
127+
echo "src/core/messagebridge/Inbox.sol:Inbox" ;;
128+
Outbox)
129+
echo "src/core/messagebridge/Outbox.sol:Outbox" ;;
126130
*)
127131
echo "" ;;
128132
esac
@@ -197,9 +201,11 @@ for i in $(seq 0 $((records_len - 1))); do
197201
if [[ -n "$libs_summary" ]]; then echo " Libraries: $libs_summary"; fi
198202
if [[ -n "$ctor" && "$ctor" != "0x" ]]; then echo " Constructor args: (hex) ${#ctor} bytes"; fi
199203

200-
echo " Command: ${cmd[*]}"
201-
202204
"${cmd[@]}"
205+
206+
# Wait a bit to ensure etherscan verification is complete
207+
sleep 5
208+
203209
sourcify_import "$addr"
204210
done
205211

yarn-project/ethereum/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
],
3333
"dependencies": {
3434
"@aztec/blob-lib": "workspace:^",
35+
"@aztec/constants": "workspace:^",
3536
"@aztec/foundation": "workspace:^",
3637
"@aztec/l1-artifacts": "workspace:^",
3738
"@viem/anvil": "^0.0.10",

yarn-project/ethereum/src/deploy_l1_contracts.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { L1_TO_L2_MSG_SUBTREE_HEIGHT } from '@aztec/constants';
12
import { SecretValue, getActiveNetworkName } from '@aztec/foundation/config';
23
import { keccak256String } from '@aztec/foundation/crypto';
34
import { EthAddress } from '@aztec/foundation/eth-address';
@@ -1019,6 +1020,24 @@ export const deployL1Contracts = async (
10191020
// Write verification data (constructor args + linked libraries) to file for later forge verify
10201021
if (createVerificationJson) {
10211022
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+
);
10221041
const date = new Date();
10231042
const formattedDate = date.toISOString().slice(2, 19).replace(/[-T:]/g, '');
10241043
// Ensure the verification output directory exists

yarn-project/ethereum/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
{
1111
"path": "../blob-lib"
1212
},
13+
{
14+
"path": "../constants"
15+
},
1316
{
1417
"path": "../foundation"
1518
},

yarn-project/yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ __metadata:
672672
resolution: "@aztec/ethereum@workspace:ethereum"
673673
dependencies:
674674
"@aztec/blob-lib": "workspace:^"
675+
"@aztec/constants": "workspace:^"
675676
"@aztec/foundation": "workspace:^"
676677
"@aztec/l1-artifacts": "workspace:^"
677678
"@jest/globals": "npm:^30.0.0"

0 commit comments

Comments
 (0)