Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/contracts/scripts/deploy-scripts/mainnet-genesis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

export L2_BLOCK_GAS_LIMIT=15000000
export L2_CHAIN_ID=10
export BLOCK_SIGNER_ADDRESS=0x00000398232E2064F896018496b4b44b3D62751F
export L1_STANDARD_BRIDGE_ADDRESS=0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1
export L1_FEE_WALLET_ADDRESS=0x391716d440c151c42cdf1c95c1d83a5427bca52c
export L1_CROSS_DOMAIN_MESSENGER_ADDRESS=0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1
export WHITELIST_OWNER=0x648E3e8101BFaB7bf5997Bd007Fb473786019159
export GAS_PRICE_ORACLE_OWNER=0x7107142636C85c549690b1Aca12Bdb8052d26Ae6
yarn build:dump
53 changes: 12 additions & 41 deletions packages/contracts/scripts/deploy-scripts/mainnet.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
#!/bin/bash

### All available deploy options at the time of deployment: ###
# --ctc-force-inclusion-period-seconds Number of seconds that the sequencer has to include transactions before the L1 queue. (default: 2592000)
# --ctc-max-transaction-gas-limit Max gas limit for L1 queue transactions. (default: 11000000)
# --deploy-scripts override deploy script folder path
# --em-max-gas-per-queue-per-epoch Maximum gas allowed in a given queue for each epoch. (default: 250000000)
# --em-max-transaction-gas-limit Maximum allowed transaction gas limit. (default: 11000000)
# --em-min-transaction-gas-limit Minimum allowed transaction gas limit. (default: 50000)
# --em-ovm-chain-id Chain ID for the L2 network. (default: 420)
# --em-seconds-per-epoch Number of seconds in each epoch. (default: 0)
# --export export current network deployments
# --export-all export all deployments into one file
# --gasprice gas price to use for transactions
# --l1-block-time-seconds Number of seconds on average between every L1 block. (default: 15)
# --no-compile disable pre compilation
# --no-impersonation do not impersonate unknown accounts
# --ovm-address-manager-owner Address that will own the Lib_AddressManager. Must be provided or this deployment will fail.
# --ovm-proposer-address Address of the account that will propose state roots. Must be provided or this deployment will fail.
# --ovm-relayer-address Address of the message relayer. Must be provided or this deployment will fail.
# --ovm-sequencer-address Address of the sequencer. Must be provided or this deployment will fail.
# --reset whether to delete deployments files first
# --scc-fraud-proof-window Number of seconds until a transaction is considered finalized. (default: 604800)
# --scc-sequencer-publish-window Number of seconds that the sequencer is exclusively allowed to post state roots. (default: 1800)
# --silent whether to remove log
# --tags specify which deploy script to execute via tags, separated by commas
# --watch redeploy on every change of contract or deploy script
# --write whether to write deployments to file


### DEPLOYMENT SCRIPT ###
# To be called from root of contracts dir #

Expand All @@ -47,22 +19,21 @@ fi

CONTRACTS_TARGET_NETWORK=mainnet \
npx hardhat deploy \
--ctc-force-inclusion-period-seconds 12592000 \
--ctc-max-transaction-gas-limit 11000000 \
--em-max-gas-per-queue-per-epoch 250000000 \
--em-max-transaction-gas-limit 11000000 \
--em-min-transaction-gas-limit 50000 \
--em-ovm-chain-id 10 \
--em-seconds-per-epoch 0 \
--l1-block-time-seconds 15 \
--ovm-address-manager-owner 0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A \
--ovm-proposer-address 0x473300df21D047806A082244b417f96b32f13A33 \
--ovm-relayer-address 0x0000000000000000000000000000000000000000 \
--ovm-sequencer-address 0x6887246668a3b87F54DeB3b94Ba47a6f63F32985 \
--reset \
--ctc-max-transaction-gas-limit 15000000 \
--ctc-l2-gas-discount-divisor 32 \
--ctc-enqueue-gas-cost 60000 \
--scc-fraud-proof-window 604800 \
--scc-sequencer-publish-window 12592000 \
--ovm-sequencer-address 0x6887246668a3b87F54DeB3b94Ba47a6f63F32985 \
--ovm-proposer-address 0x473300df21D047806A082244b417f96b32f13A33 \
--ovm-address-manager-owner 0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A \
Comment on lines +28 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should these be compared against?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They aren't really changed, the diff is just a bit messed up.
But I believe the right way to check is to ensure that they match what's in the AddressManager now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be compared against the existing mainnet configuration values

--gasprice 150000000000 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be the best value to use at the time, will need to determine what it should be at deploy time

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be determined at runtime using seth but unsure if we want to add another dependency to this script

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seth basefee or seth gas-price

--num-deploy-confirmations 4 \
--tags upgrade \
--network mainnet

CONTRACTS_TARGET_NETWORK=mainnet \
npx hardhat etherscan-verify --network mainnet
npx hardhat etherscan-verify \
--network mainnet \
--sleep
Comment on lines 36 to +39
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need any of this with #1722.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth keeping for now given that we don't throw if the etherscan validation fails the first time around.