Update steps to get your own nitro node's address

This commit is contained in:
Shreerang Kale 2024-10-30 14:19:12 +05:30 committed by nabarun
parent 8b6f49992a
commit 0e5f14a7a3

View File

@ -195,7 +195,7 @@ Nitro nodes can be set up on a target machine using Ansible:
* Get your Nitro node's info: * Get your Nitro node's info:
```bash ```bash
laconic-so deployment --dir l1-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-node-info -p 4005 -h nitro-node" laconic-so deployment --dir l2-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-node-info -p 4005 -h nitro-node"
# Expected output: # Expected output:
# { # {
@ -379,9 +379,6 @@ Perform payments using a virtual payment channel created with another Nitro node
```bash ```bash
export BRIDGE_NITRO_ADDRESS=$(yq eval '.bridge_nitro_address' nitro-node-config.yml) export BRIDGE_NITRO_ADDRESS=$(yq eval '.bridge_nitro_address' nitro-node-config.yml)
# Obtain the Nitro address of the participant with whom you want to create payment channel with
export COUNTER_PARTY_ADDRESS=<counterparty-nitro-address>
# Mirrored channel on L2 # Mirrored channel on L2
export L2_CHANNEL_ID=<l2-channel-id> export L2_CHANNEL_ID=<l2-channel-id>
@ -389,6 +386,21 @@ Perform payments using a virtual payment channel created with another Nitro node
export PAYMENT_CHANNEL_AMOUNT=500 export PAYMENT_CHANNEL_AMOUNT=500
``` ```
* Set counterparty address
```bash
export COUNTER_PARTY_ADDRESS=<counterparty-nitro-address>
```
* Get the nitro address of the counterparty's node with whom you want create payment channel
* To get the nitro address of the your node:
```bash
laconic-so deployment --dir l2-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-node-info -p 4005 -h nitro-node"
# `SCAddress` -> nitro address
```
* Check for existing payment channels for the L2 channel: * Check for existing payment channels for the L2 channel:
```bash ```bash
@ -543,14 +555,28 @@ Perform swaps using a swap channel created with another Nitro node over the mirr
```bash ```bash
export BRIDGE_NITRO_ADDRESS=$(yq eval '.bridge_nitro_address' nitro-node-config.yml) export BRIDGE_NITRO_ADDRESS=$(yq eval '.bridge_nitro_address' nitro-node-config.yml)
# Counterparty to create the swap channel with export GETH_CHAIN_ID="1212"
export COUNTER_PARTY_ADDRESS=<counterparty-nitro-address>
# Get asset addresses from assets.json file # Get asset addresses from assets.json file
export ASSET_ADDRESS_1=$(jq -r --arg chainId "$CHAIN_ID" '.[$chainId][0].contracts.TestToken.address' assets.json) export ASSET_ADDRESS_1=$(jq -r --arg chainId "$GETH_CHAIN_ID" '.[$chainId][0].contracts.TestToken.address' assets.json)
export ASSET_ADDRESS_2=$(jq -r --arg chainId "$CHAIN_ID" '.[$chainId][0].contracts.TestToken2.address' assets.json) export ASSET_ADDRESS_2=$(jq -r --arg chainId "$GETH_CHAIN_ID" '.[$chainId][0].contracts.TestToken2.address' assets.json)
``` ```
* Set counterparty address
```bash
export COUNTER_PARTY_ADDRESS=<counterparty-nitro-address>
```
* Get the nitro address of the counterparty's node with whom you want create swap channel
* To get the nitro address of the your node:
```bash
laconic-so deployment --dir l2-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-node-info -p 4005 -h nitro-node"
# `SCAddress` -> nitro address
```
* Create swap channel: * Create swap channel:
```bash ```bash