Skip to content

Commit 204ee76

Browse files
committed
chore: fix env fields for local deployment
1 parent e3cc03c commit 204ee76

2 files changed

Lines changed: 31 additions & 16 deletions

File tree

examples/L2/contracts/.env.devnet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ INITIAL_STATE_ROOT=0x3c1d1c01f8e0a4533085bc9d8a3829c5f6872e6d6cf62e04ae71acbc803
55
PROGRAM_ID=<PROGRAM_ID>
66
# Address of the wallet you want to set as owner
77
OWNER_ADDRESS=<CONTRACT_OWNER_ADDRESS>
8-
# Private key used to deploy the contract
9-
PRIVATE_KEY=<PRIVATE_KEY_TO_DEPLOY>
8+
# A prefunded rich account
9+
PRIVATE_KEY=0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a
1010
# This is the aligned proof aggregator address in devnet
11-
ALIGNED_PROOF_AGGREGATOR_ADDRESS=0xe84CD4084d8131841CE6DC265361f81F4C59a1d4
11+
ALIGNED_PROOF_AGGREGATOR_ADDRESS=0xFD471836031dc5108809D173A067e8486B9047A3
1212
ETHERSCAN_API_KEY=""

examples/L2/contracts/scripts/deploy.sh

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,31 @@ cd "$parent_path"
66
# At this point we are in contracts
77
cd ../
88

9-
forge script ./script/StateTransitionDeployer.s.sol \
10-
$PROGRAM_ID \
11-
$INITIAL_STATE_ROOT \
12-
$ALIGNED_PROOF_AGGREGATOR_ADDRESS \
13-
$OWNER_ADDRESS \
14-
--rpc-url $RPC_URL \
15-
--private-key $PRIVATE_KEY \
16-
--broadcast \
17-
--verify \
18-
--etherscan-api-key $ETHERSCAN_API_KEY \
19-
--slow \
20-
--sig "run(bytes32,bytes32,address,address)" \
21-
--via-ir
9+
if [ "$ETHERSCAN_API_KEY" = "0x0" ]; then
10+
forge script ./script/StateTransitionDeployer.s.sol \
11+
$PROGRAM_ID \
12+
$INITIAL_STATE_ROOT \
13+
$ALIGNED_PROOF_AGGREGATOR_ADDRESS \
14+
$OWNER_ADDRESS \
15+
--rpc-url $RPC_URL \
16+
--private-key $PRIVATE_KEY \
17+
--broadcast \
18+
--slow \
19+
--sig "run(bytes32,bytes32,address,address)" \
20+
--via-ir
21+
else
22+
forge script ./script/StateTransitionDeployer.s.sol \
23+
$PROGRAM_ID \
24+
$INITIAL_STATE_ROOT \
25+
$ALIGNED_PROOF_AGGREGATOR_ADDRESS \
26+
$OWNER_ADDRESS \
27+
--rpc-url $RPC_URL \
28+
--private-key $PRIVATE_KEY \
29+
--broadcast \
30+
--verify \
31+
--etherscan-api-key $ETHERSCAN_API_KEY \
32+
--slow \
33+
--sig "run(bytes32,bytes32,address,address)" \
34+
--via-ir
35+
fi
36+

0 commit comments

Comments
 (0)