Add instructions to setup and run testnet L2 and Nitro deployments #26
@ -106,6 +106,55 @@
|
||||
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{"target_host" : "localhost", "skip_container_build": true}' -kK --user $USER
|
||||
```
|
||||
|
||||
* Bridge funds on L2:
|
||||
|
||||
* Set the following variables:
|
||||
|
||||
```bash
|
||||
cd /srv/op-sepolia
|
||||
|
||||
L1_RPC=http://host.docker.internal:8545
|
||||
L2_RPC=http://host.docker.internal:9545
|
||||
|
||||
NETWORK=<the network name found above>
|
||||
|
||||
DEPLOYMENT_CONTEXT=11155111
|
||||
ACCOUNT=<admin-account-address>
|
||||
```
|
||||
|
||||
* Read the bridge contract address from the L1 deployment records in the `op-node` container:
|
||||
|
||||
```bash
|
||||
BRIDGE=$(laconic-so deployment --dir optimism-deployment exec op-node "cat /l1-deployment/$DEPLOYMENT_CONTEXT-deploy.json" | jq -r .L1StandardBridgeProxy)
|
||||
|
||||
# Get the funded account's pk
|
||||
ACCOUNT_PK=$(laconic-so deployment --dir optimism-deployment exec op-node "jq -r '.AdminKey' /l2-accounts/accounts.json")
|
||||
```
|
||||
|
||||
* Check that the starting balance for account on L2 is 0:
|
||||
|
||||
```bash
|
||||
docker run --rm --network $NETWORK cerc/optimism-contracts:local "cast balance $ACCOUNT --rpc-url $L2_RPC"
|
||||
|
||||
# 0
|
||||
```
|
||||
|
||||
* Use cast to send ETH to the bridge contract:
|
||||
|
||||
```bash
|
||||
docker run --rm cerc/optimism-contracts:local "cast send --from $ACCOUNT --value 1ether $BRIDGE --rpc-url $L1_RPC --private-key $ACCOUNT_PK"
|
||||
```
|
||||
|
||||
* Allow a couple minutes for the bridge to complete
|
||||
|
||||
* Check balance on L2
|
||||
|
||||
```bash
|
||||
docker run --rm --network $NETWORK cerc/optimism-contracts:local "cast balance $ACCOUNT --rpc-url $L2_RPC"
|
||||
|
||||
# 100000000000000000
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
|
Loading…
Reference in New Issue
Block a user