Skip to content

Commit

Permalink
feat: enable customization of L1/L2 chain info (#10730)
Browse files Browse the repository at this point in the history
* feat: enable customization of L1/L2 chain info

* add faultGameWithdrawalDelay

* Update config.sh
  • Loading branch information
barnabasbusa committed Jun 4, 2024
1 parent 1595335 commit 5db8adf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ export GS_PROPOSER_PRIVATE_KEY=
export GS_SEQUENCER_ADDRESS=
export GS_SEQUENCER_PRIVATE_KEY=


##################################################
# Chain Information #
##################################################

# L1 chain information
export L1_CHAIN_ID=11155111
export L1_BLOCK_TIME=12

# L2 chain information
export L2_CHAIN_ID=42069
export L2_BLOCK_TIME=2

##################################################
# op-node Configuration #
##################################################
Expand Down
13 changes: 9 additions & 4 deletions packages/contracts-bedrock/scripts/getting-started/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ reqenv "GS_BATCHER_ADDRESS"
reqenv "GS_PROPOSER_ADDRESS"
reqenv "GS_SEQUENCER_ADDRESS"
reqenv "L1_RPC_URL"
reqenv "L1_CHAIN_ID"
reqenv "L2_CHAIN_ID"
reqenv "L1_BLOCK_TIME"
reqenv "L2_BLOCK_TIME"

# Get the finalized block timestamp and hash
block=$(cast block finalized --rpc-url "$L1_RPC_URL")
Expand All @@ -29,10 +33,10 @@ config=$(cat << EOL
{
"l1StartingBlockTag": "$blockhash",
"l1ChainID": 11155111,
"l2ChainID": 42069,
"l2BlockTime": 2,
"l1BlockTime": 12,
"l1ChainID": $L1_CHAIN_ID,
"l2ChainID": $L2_CHAIN_ID,
"l2BlockTime": $L2_BLOCK_TIME,
"l1BlockTime": $L1_BLOCK_TIME,
"maxSequencerDrift": 600,
"sequencerWindowSize": 3600,
Expand Down Expand Up @@ -97,6 +101,7 @@ config=$(cat << EOL
"faultGameGenesisBlock": 0,
"faultGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"faultGameSplitDepth": 14,
"faultGameWithdrawalDelay": 604800,
"preimageOracleMinProposalSize": 1800000,
"preimageOracleChallengePeriod": 86400
Expand Down

0 comments on commit 5db8adf

Please sign in to comment.