Use npm install to avoid yarn version issue in go-nitro
This commit is contained in:
parent
d3af85ec85
commit
f50c981e78
@ -37,6 +37,12 @@
|
|||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
6. Exit project repo
|
||||||
|
|
||||||
|
```
|
||||||
|
cd ../
|
||||||
|
```
|
||||||
|
|
||||||
### Testnet Onboarding App
|
### Testnet Onboarding App
|
||||||
|
|
||||||
1. Clone the repository
|
1. Clone the repository
|
||||||
@ -70,6 +76,12 @@
|
|||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
5. Exit project repo
|
||||||
|
|
||||||
|
```
|
||||||
|
cd ../
|
||||||
|
```
|
||||||
|
|
||||||
### Stack Orchestrator
|
### Stack Orchestrator
|
||||||
|
|
||||||
- Follow these steps to install laconic-so: <https://git.vdb.to/cerc-io/stack-orchestrator#install>
|
- Follow these steps to install laconic-so: <https://git.vdb.to/cerc-io/stack-orchestrator#install>
|
||||||
@ -300,12 +312,10 @@
|
|||||||
cd ~
|
cd ~
|
||||||
# 'yarn global' commands only work with 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
|
npm install -g <go-nitro-repo-absolute-path>/packages/nitro-rpc-client
|
||||||
```
|
```
|
||||||
|
|
||||||
- Replace `<go-nitro-path>` with absolute path to the cloned go-nitro repo
|
- Replace `<go-nitro-repo-absolute-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>
|
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
@ -320,10 +330,15 @@
|
|||||||
|
|
||||||
- Check status of L1
|
- Check status of L1
|
||||||
|
|
||||||
```bash
|
- Run command in intervals of 3 seconds to check new blocks are created
|
||||||
laconic-so deployment --dir fixturenet-eth-deployment exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
|
||||||
|
|
||||||
# Check geth logs, ensure that new blocks are getting mined
|
```bash
|
||||||
|
laconic-so deployment --dir fixturenet-eth-deployment exec foundry "cast block-number"
|
||||||
|
```
|
||||||
|
|
||||||
|
- Check geth logs to ensure that new blocks are getting created
|
||||||
|
|
||||||
|
```bash
|
||||||
laconic-so deployment --dir fixturenet-eth-deployment logs -f fixturenet-eth-geth-1
|
laconic-so deployment --dir fixturenet-eth-deployment logs -f fixturenet-eth-geth-1
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -385,6 +400,7 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir fixturenet-eth-deployment exec foundry "cast balance $ACCOUNT --rpc-url $L2_RPC"
|
laconic-so deployment --dir fixturenet-eth-deployment exec foundry "cast balance $ACCOUNT --rpc-url $L2_RPC"
|
||||||
|
|
||||||
# 100000000000000000
|
# 100000000000000000
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -408,6 +424,7 @@
|
|||||||
# Use same account on both Geth and Optimism
|
# Use same account on both Geth and Optimism
|
||||||
export OPTIMISM_DEPLOYER_PK=$GETH_DEPLOYER_PK
|
export OPTIMISM_DEPLOYER_PK=$GETH_DEPLOYER_PK
|
||||||
```
|
```
|
||||||
|
|
||||||
- Export variables for token name, token symbol and initial supply
|
- Export variables for token name, token symbol and initial supply
|
||||||
```bash
|
```bash
|
||||||
export TOKEN_NAME="LaconicNetworkToken"
|
export TOKEN_NAME="LaconicNetworkToken"
|
||||||
@ -467,6 +484,7 @@
|
|||||||
|
|
||||||
- Export variables for L1 token address
|
- Export variables for L1 token address
|
||||||
|
|
||||||
|
<!-- TODO: Export token address from contract deployment env in go-nitro -->
|
||||||
```bash
|
```bash
|
||||||
export L1_ASSET_ADDRESS="<Token Address on L1>"
|
export L1_ASSET_ADDRESS="<Token Address on L1>"
|
||||||
export A_CHAIN_ADDRESS="0xe22AD83A0dE117bA0d03d5E94Eb4E0d80a69C62a"
|
export A_CHAIN_ADDRESS="0xe22AD83A0dE117bA0d03d5E94Eb4E0d80a69C62a"
|
||||||
@ -509,10 +527,14 @@
|
|||||||
yarn start
|
yarn start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NOTE: Ignore source map warnings in the terminal
|
||||||
|
|
||||||
- Start `laconic-wallet` android app (run steps in laconic-wallet repo)
|
- Start `laconic-wallet` android app (run steps in laconic-wallet repo)
|
||||||
|
|
||||||
- Set up the Android device
|
- Set up the Android device
|
||||||
- For a physical device, refer to the [React Native documentation for running on a physical device](https://reactnative.dev/docs/running-on-device)
|
- For a physical device, refer to the [React Native documentation for running on a physical device](https://reactnative.dev/docs/running-on-device)
|
||||||
- For a virtual device, continue with the steps
|
- For a virtual device, continue with the steps
|
||||||
|
|
||||||
- Setup port forwarding for your device using the following command:
|
- Setup port forwarding for your device using the following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -647,7 +669,7 @@
|
|||||||
l2 = true
|
l2 = true
|
||||||
```
|
```
|
||||||
|
|
||||||
- In a new terminal, initialize node A on L1
|
- In a new terminal, go to go-nitro repo root and initialize node A on L1
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Export L1 contract addresses
|
# Export L1 contract addresses
|
||||||
@ -702,11 +724,14 @@
|
|||||||
|
|
||||||
- Set address of bridge and address of custom token on L1 in the current terminal
|
- Set address of bridge and address of custom token on L1 in the current terminal
|
||||||
|
|
||||||
|
<!-- TODO: Get token address from go-nitro deployments env -->
|
||||||
```bash
|
```bash
|
||||||
export BRIDGE_ADDRESS=0xBBB676f9cFF8D242e9eaC39D063848807d3D1D94
|
export BRIDGE_ADDRESS=0xBBB676f9cFF8D242e9eaC39D063848807d3D1D94
|
||||||
export L1_ASSET_ADDRESS="<Token Address on L1>"
|
export L1_ASSET_ADDRESS="<Token Address on L1>"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NOTE: Replace `<Token Address on L1>` with LNT token address deployed previously on L1 in [Run](#run) section
|
||||||
|
|
||||||
- Create ledger channel between A and Bridge with custom token
|
- Create ledger channel between A and Bridge with custom token
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -792,7 +817,7 @@
|
|||||||
- Send transaction request to the Wallet
|
- Send transaction request to the Wallet
|
||||||
- Approve and send transaction to laconicd chain
|
- Approve and send transaction to laconicd chain
|
||||||
- Repeat onboarding for other (Charlies's) account
|
- Repeat onboarding for other (Charlies's) account
|
||||||
- List the participants on stage 1:
|
- List the participants on stage 1 (run in the directory where laconicd deployment was created):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd query onboarding list"
|
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd query onboarding list"
|
||||||
@ -825,7 +850,13 @@
|
|||||||
sudo rm -rf stage1-genesis
|
sudo rm -rf stage1-genesis
|
||||||
```
|
```
|
||||||
|
|
||||||
- Copy over the generated genesis file (`.json`) containing the onboarding module state with funded participants to data directory in deployment (`stage1-deployment/data/genesis-config`):
|
- Change directory to stage1 deployment directory
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd <stage1-deployment-directory-absolute-path>
|
||||||
|
```
|
||||||
|
|
||||||
|
- Copy over the generated genesis file (`.json`) containing the onboarding module state with funded participants to data directory in stage1 deployment (`stage1-deployment/data/genesis-config`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run where deployments are created
|
# Run where deployments are created
|
||||||
@ -849,6 +880,7 @@
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Query the balances of registered participants:
|
- Query the balances of registered participants:
|
||||||
|
<!-- TODO: Show balances on laconic-wallet -->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export A_LACONIC_ADDRESS=<Alice Laconic address>
|
export A_LACONIC_ADDRESS=<Alice Laconic address>
|
||||||
@ -947,6 +979,7 @@
|
|||||||
# Expected output:
|
# Expected output:
|
||||||
# {"ID":"0x15dbe6b996e4e46fdd6ea3e2074cbca58014dbb07368e3e7ba286df5c7b9da0d","Status":"Open","Balance":{"AssetAddress":"<Token_address_on_L2>","Me":"0xa8d2d06ace9c7ffc24ee785c2695678aecdfd7a0","Them":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","MyBalance":1000200,"TheirBalance":999800},"ChannelMode":"Open"}
|
# {"ID":"0x15dbe6b996e4e46fdd6ea3e2074cbca58014dbb07368e3e7ba286df5c7b9da0d","Status":"Open","Balance":{"AssetAddress":"<Token_address_on_L2>","Me":"0xa8d2d06ace9c7ffc24ee785c2695678aecdfd7a0","Them":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","MyBalance":1000200,"TheirBalance":999800},"ChannelMode":"Open"}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Demo cleanup
|
## Demo cleanup
|
||||||
|
|
||||||
- Stop the bridge, A, A', C and C' terminals
|
- Stop the bridge, A, A', C and C' terminals
|
||||||
|
Loading…
Reference in New Issue
Block a user