optimism
optimism copied to clipboard
How to set L2_CHAIN_ID before deploying L2 using Custom Gas Token
CONTRACT_ADDRESSES_PATH=deployments/artifact.json
DEPLOY_CONFIG_PATH=<PATH_TO_MY_DEPLOY_CONFIG>
STATE_DUMP_PATH=<PATH_TO_WRITE_L2_ALLOCS>
forge script scripts/L2Genesis.s.sol:L2Genesis
--sig 'runWithStateDump()' --chain-id $L2_CHAIN_ID
The L2 chain id is pulled from the deploy config, see here