Add configuration for L1 beacon endpoint and funding amounts for Optimism accounts #4
@ -17,8 +17,8 @@ services:
|
|||||||
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
||||||
CERC_L1_ADDRESS: ${CERC_L1_ADDRESS}
|
CERC_L1_ADDRESS: ${CERC_L1_ADDRESS}
|
||||||
CERC_L1_PRIV_KEY: ${CERC_L1_PRIV_KEY}
|
CERC_L1_PRIV_KEY: ${CERC_L1_PRIV_KEY}
|
||||||
CERC_L2_PROPOSER_AMOUNT: ${CERC_L2_PROPOSER_AMOUNT}
|
CERC_PROPOSER_AMOUNT: ${CERC_PROPOSER_AMOUNT}
|
||||||
CERC_L2_BATCHER_AMOUNT: ${CERC_L2_BATCHER_AMOUNT}
|
CERC_BATCHER_AMOUNT: ${CERC_BATCHER_AMOUNT}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
- ../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
|
- ../config/fixturenet-optimism/optimism-contracts/deploy-contracts.sh:/app/packages/contracts-bedrock/deploy-contracts.sh
|
||||||
|
@ -10,6 +10,6 @@ DEFAULT_CERC_L1_PORT=8545
|
|||||||
# that are used to send balance to Optimism Proxy contract
|
# that are used to send balance to Optimism Proxy contract
|
||||||
# (enables them to do transactions on L2)
|
# (enables them to do transactions on L2)
|
||||||
DEFAULT_CERC_L1_ACCOUNTS_CSV_URL="http://fixturenet-eth-bootnode-geth:9898/accounts.csv"
|
DEFAULT_CERC_L1_ACCOUNTS_CSV_URL="http://fixturenet-eth-bootnode-geth:9898/accounts.csv"
|
||||||
DEFAULT_CERC_L2_PROPOSER_AMOUNT="0.2ether"
|
DEFAULT_CERC_PROPOSER_AMOUNT="0.2ether"
|
||||||
DEFAULT_CERC_L2_BATCHER_AMOUNT="0.1ether"
|
DEFAULT_CERC_BATCHER_AMOUNT="0.1ether"
|
||||||
DEFAULT_CERC_L1_BEACON=http://fixturenet-eth-lighthouse-1:8001
|
DEFAULT_CERC_L1_BEACON=http://fixturenet-eth-lighthouse-1:8001
|
@ -9,8 +9,8 @@ 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_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_PROPOSER_AMOUNT="${CERC_PROPOSER_AMOUNT:-${DEFAULT_CERC_PROPOSER_AMOUNT}}"
|
||||||
CERC_L2_BATCHER_AMOUNT="${CERC_L2_BATCHER_AMOUNT:-${DEFAULT_CERC_L2_BATCHER_AMOUNT}}"
|
CERC_BATCHER_AMOUNT="${CERC_BATCHER_AMOUNT:-${DEFAULT_CERC_BATCHER_AMOUNT}}"
|
||||||
|
|
||||||
export DEPLOYMENT_CONTEXT="$CERC_L1_CHAIN_ID"
|
export DEPLOYMENT_CONTEXT="$CERC_L1_CHAIN_ID"
|
||||||
# Optional create2 salt for deterministic deployment of contract implementations
|
# Optional create2 salt for deterministic deployment of contract implementations
|
||||||
@ -71,8 +71,8 @@ if [ -n "$CERC_L1_ADDRESS" ] && [ -n "$CERC_L1_PRIV_KEY" ]; then
|
|||||||
|
|
||||||
echo "Funding accounts."
|
echo "Funding accounts."
|
||||||
wait_for_block 1 300
|
wait_for_block 1 300
|
||||||
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_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
|
cast send --from $ADMIN --rpc-url $CERC_L1_RPC --value $CERC_BATCHER_AMOUNT $BATCHER --private-key $ADMIN_KEY
|
||||||
else
|
else
|
||||||
curl -o accounts.csv $CERC_L1_ACCOUNTS_CSV_URL
|
curl -o accounts.csv $CERC_L1_ACCOUNTS_CSV_URL
|
||||||
# Admin
|
# Admin
|
||||||
|
@ -116,9 +116,9 @@ Inside the `fixturenet-optimism-deployment` deployment directory, open `config.e
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Optional
|
# Optional
|
||||||
# Funding amounts for proposer and batcher accounts
|
# Funding amounts for proposer and batcher accounts on L1
|
||||||
CERC_L2_PROPOSER_AMOUNT= # Default 0.2ether
|
CERC_PROPOSER_AMOUNT= # Default 0.2ether
|
||||||
CERC_L2_BATCHER_AMOUNT= # Default 0.1ether
|
CERC_BATCHER_AMOUNT= # Default 0.1ether
|
||||||
```
|
```
|
||||||
|
|
||||||
## Start the stack
|
## Start the stack
|
||||||
|
@ -80,9 +80,10 @@ Inside the deployment directory, open the file `config.env` and add the followin
|
|||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
|
|
||||||
# Funding amounts for proposer and batcher accounts
|
# Funding amounts for proposer and batcher accounts on L1
|
||||||
CERC_L2_PROPOSER_AMOUNT=
|
# (Accounts funded using the Admin account)
|
||||||
CERC_L2_BATCHER_AMOUNT=
|
CERC_PROPOSER_AMOUNT=
|
||||||
|
CERC_BATCHER_AMOUNT=
|
||||||
```
|
```
|
||||||
|
|
||||||
* NOTE: If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port, or use the `ip a` command to find the IP address of the `docker0` interface (this will usually be something like `172.17.0.1` or `172.18.0.1`)
|
* NOTE: If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port, or use the `ip a` command to find the IP address of the `docker0` interface (this will usually be something like `172.17.0.1` or `172.18.0.1`)
|
||||||
|
Loading…
Reference in New Issue
Block a user