Add configuration for L1 beacon endpoint and funding amounts for Optimism accounts #4

Merged
nabarun merged 5 commits from deep-stack/fixturenet-optimism-stack:ag-configure-funding-amount into main 2024-09-03 09:42:09 +00:00
3 changed files with 9 additions and 3 deletions
Showing only changes of commit 51bc39645b - Show all commits

View File

@ -17,6 +17,8 @@ services:
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
CERC_L1_ADDRESS: ${CERC_L1_ADDRESS}
CERC_L1_PRIV_KEY: ${CERC_L1_PRIV_KEY}
CERC_L2_PROPOSER_AMOUNT: ${CERC_L2_PROPOSER_AMOUNT}
CERC_L2_BATCHER_AMOUNT: ${CERC_L2_BATCHER_AMOUNT}
volumes:
- ../config/network/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
- ../config/fixturenet-optimism/optimism-contracts/deploy-contracts.sh:/app/packages/contracts-bedrock/deploy-contracts.sh

View File

@ -10,3 +10,5 @@ DEFAULT_CERC_L1_PORT=8545
# that are used to send balance to Optimism Proxy contract
# (enables them to do transactions on L2)
DEFAULT_CERC_L1_ACCOUNTS_CSV_URL="http://fixturenet-eth-bootnode-geth:9898/accounts.csv"
DEFAULT_CERC_L2_PROPOSER_AMOUNT="0.2ether"
DEFAULT_CERC_L2_BATCHER_AMOUNT="0.1ether"

View File

@ -9,6 +9,9 @@ CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
CERC_L1_ACCOUNTS_CSV_URL="${CERC_L1_ACCOUNTS_CSV_URL:-${DEFAULT_CERC_L1_ACCOUNTS_CSV_URL}}"
CERC_L2_PROPOSER_AMOUNT="${CERC_L2_PROPOSER_AMOUNT:-${DEFAULT_CERC_L2_PROPOSER_AMOUNT}}"
CERC_L2_BATCHER_AMOUNT="${CERC_L2_BATCHER_AMOUNT:-${DEFAULT_CERC_L2_BATCHER_AMOUNT}}"
export DEPLOYMENT_CONTEXT="$CERC_L1_CHAIN_ID"
# Optional create2 salt for deterministic deployment of contract implementations
export IMPL_SALT=$(openssl rand -hex 32)
@ -68,9 +71,8 @@ if [ -n "$CERC_L1_ADDRESS" ] && [ -n "$CERC_L1_PRIV_KEY" ]; then
echo "Funding accounts."
wait_for_block 1 300
cast send --from $ADMIN --rpc-url $CERC_L1_RPC --value 5ether $PROPOSER --private-key $ADMIN_KEY
cast send --from $ADMIN --rpc-url $CERC_L1_RPC --value 10ether $BATCHER --private-key $ADMIN_KEY
cast send --from $ADMIN --rpc-url $CERC_L1_RPC --value 2ether $SEQ --private-key $ADMIN_KEY
cast send --from $ADMIN --rpc-url $CERC_L1_RPC --value $CERC_L2_PROPOSER_AMOUNT $PROPOSER --private-key $ADMIN_KEY
cast send --from $ADMIN --rpc-url $CERC_L1_RPC --value $CERC_L2_BATCHER_AMOUNT $BATCHER --private-key $ADMIN_KEY
else
curl -o accounts.csv $CERC_L1_ACCOUNTS_CSV_URL
# Admin