Move the step to run bridge to Demo section

This commit is contained in:
Prathamesh Musale 2024-07-16 19:18:07 +05:30
parent 5c808de518
commit d3af85ec85

View File

@ -298,11 +298,11 @@
```bash
cd ~
# 'yarn global' commands work only in Yarn versions below 2.x.
# 'yarn global' commands only work with Yarn versions below 2.x.
yarn global add file:<go-nitro-repo-absolute-path>/packages/nitro-rpc-client
```
- Replace `<go-nitro-path>` with absolute path to the cloned go-nitro repo
- Make sure the yarn global bin directory is included in your PATH. If it is not, add `export PATH="$(yarn global bin):$PATH"` to your ~/.bashrc or ~/.zshrc file
- <https://classic.yarnpkg.com/en/docs/cli/global#toc-yarn-global>
@ -546,19 +546,6 @@
Gas Price - `200000`
```
- Go to go-nitro repo root
- Start nitro bridge using CLI
```bash
# Export contract addresses stored in output files
source ./packages/nitro-protocol/hardhat-deployments/geth/.contracts.env
source ./packages/nitro-protocol/hardhat-deployments/optimism/.contracts.env
# Start bridge CLI
./nitro-bridge -config cmd/test-configs/bridge.toml
```
## Demo
- Start the stack for stage 0 laconicd (run command in directory where stage0-deployment had been created)
@ -574,21 +561,35 @@
- Fund accounts on laconicd:
- Export laconic addresses of Alice and Charlie (take the addresses from laconic wallet):
```bash
export A_LACONIC_ADDRESS=<Alice Laconic address>
export C_LACONIC_ADDRESS=<Charlie Laconic address>
```
- Send photons from funded account to Alice and Charlie:
```bash
# Send funds from funded account to Alice
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd tx bank send alice $A_LACONIC_ADDRESS 100000000000photon --fees 100photon --keyring-backend test"
# Send funds from funded account to Charlie
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd tx bank send alice $C_LACONIC_ADDRESS 100000000000photon --fees 100photon --keyring-backend test"
```
TODO: Use a faucet for funding accounts
- Go to go-nitro repo root and start the nitro bridge using CLI:
```bash
export A_LACONIC_ADDRESS=<Alice Laconic address>
export C_LACONIC_ADDRESS=<Charlie Laconic address>
# Export contract addresses stored in output files
source ./packages/nitro-protocol/hardhat-deployments/geth/.contracts.env
source ./packages/nitro-protocol/hardhat-deployments/optimism/.contracts.env
# Start bridge CLI
./nitro-bridge -config cmd/test-configs/bridge.toml
```
- Send photons from funded account to Alice and Charlie:
```bash
# Send funds from funded account to Alice
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd tx bank send alice $A_LACONIC_ADDRESS 100000000000photon --fees 100photon --keyring-backend test"
# Send funds from funded account to Charlie
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd tx bank send alice $C_LACONIC_ADDRESS 100000000000photon --fees 100photon --keyring-backend test"
```
TODO: Use a faucet for funding accounts
- Get Ethereum private keys for accounts Alice and Charlie from `laconic-wallet` (to be used as statechannel PKs)
- Start nitro nodes for Alice and Charlie on L1 and L2:
@ -814,12 +815,12 @@
```bash
cd ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd
./scripts/generate-stage1-genesis.sh <stage0-deployment-absolute-path>
# Expected output:
# Genesis file for stage1 written to output/genesis.json
# Remove the temporary data directory
sudo rm -rf stage1-genesis
```
@ -872,7 +873,7 @@
```bash
echo $NODE_EXTRA_CA_CERTS
# ~/.local/share/mkcert/rootCA.pem
# If not present, set the environment variable
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"
```