Skip to content

Commit 0cd3259

Browse files
authored
feat[contracts]: add mainnet deploy script (ethereum-optimism#1147)
* Add mainnet deploy script * Update mainnet.sh * Address PR review feedback
1 parent 588058f commit 0cd3259

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

  • packages/contracts/scripts/deploy-scripts
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/bin/bash
2+
3+
### All available deploy options at the time of deployment: ###
4+
# --ctc-force-inclusion-period-seconds Number of seconds that the sequencer has to include transactions before the L1 queue. (default: 2592000)
5+
# --ctc-max-transaction-gas-limit Max gas limit for L1 queue transactions. (default: 11000000)
6+
# --deploy-scripts override deploy script folder path
7+
# --em-max-gas-per-queue-per-epoch Maximum gas allowed in a given queue for each epoch. (default: 250000000)
8+
# --em-max-transaction-gas-limit Maximum allowed transaction gas limit. (default: 11000000)
9+
# --em-min-transaction-gas-limit Minimum allowed transaction gas limit. (default: 50000)
10+
# --em-ovm-chain-id Chain ID for the L2 network. (default: 420)
11+
# --em-seconds-per-epoch Number of seconds in each epoch. (default: 0)
12+
# --export export current network deployments
13+
# --export-all export all deployments into one file
14+
# --gasprice gas price to use for transactions
15+
# --l1-block-time-seconds Number of seconds on average between every L1 block. (default: 15)
16+
# --no-compile disable pre compilation
17+
# --no-impersonation do not impersonate unknown accounts
18+
# --ovm-address-manager-owner Address that will own the Lib_AddressManager. Must be provided or this deployment will fail.
19+
# --ovm-proposer-address Address of the account that will propose state roots. Must be provided or this deployment will fail.
20+
# --ovm-relayer-address Address of the message relayer. Must be provided or this deployment will fail.
21+
# --ovm-sequencer-address Address of the sequencer. Must be provided or this deployment will fail.
22+
# --reset whether to delete deployments files first
23+
# --scc-fraud-proof-window Number of seconds until a transaction is considered finalized. (default: 604800)
24+
# --scc-sequencer-publish-window Number of seconds that the sequencer is exclusively allowed to post state roots. (default: 1800)
25+
# --silent whether to remove log
26+
# --tags specify which deploy script to execute via tags, separated by commas
27+
# --watch redeploy on every change of contract or deploy script
28+
# --write whether to write deployments to file
29+
30+
31+
### DEPLOYMENT SCRIPT ###
32+
# To be called from root of contracts dir #
33+
34+
# Required env vars
35+
if [[ -z "$CONTRACTS_DEPLOYER_KEY" ]]; then
36+
echo "Must pass CONTRACTS_DEPLOYER_KEY"
37+
exit 1
38+
fi
39+
if [[ -z "$CONTRACTS_RPC_URL" ]]; then
40+
echo "Must pass CONTRACTS_RPC_URL"
41+
exit 1
42+
fi
43+
if [[ -z "$ETHERSCAN_API_KEY" ]]; then
44+
echo "Must pass ETHERSCAN_API_KEY"
45+
exit 1
46+
fi
47+
48+
CONTRACTS_TARGET_NETWORK=mainnet \
49+
npx hardhat deploy \
50+
--ctc-force-inclusion-period-seconds 12592000 \
51+
--ctc-max-transaction-gas-limit 11000000 \
52+
--em-max-gas-per-queue-per-epoch 250000000 \
53+
--em-max-transaction-gas-limit 11000000 \
54+
--em-min-transaction-gas-limit 50000 \
55+
--em-ovm-chain-id 10 \
56+
--em-seconds-per-epoch 0 \
57+
--l1-block-time-seconds 15 \
58+
--ovm-address-manager-owner 0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A \
59+
--ovm-proposer-address 0x473300df21D047806A082244b417f96b32f13A33 \
60+
--ovm-relayer-address 0x0000000000000000000000000000000000000000 \
61+
--ovm-sequencer-address 0x6887246668a3b87F54DeB3b94Ba47a6f63F32985 \
62+
--reset \
63+
--scc-fraud-proof-window 604800 \
64+
--scc-sequencer-publish-window 12592000 \
65+
--network mainnet
66+
67+
CONTRACTS_TARGET_NETWORK=mainnet \
68+
npx hardhat etherscan-verify --network mainnet

0 commit comments

Comments
 (0)