From 1ea14f9a7eaaae5646fc1b4d50f1d22ea3aba333 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Wed, 30 Oct 2024 14:19:12 +0530 Subject: [PATCH] Update steps to get your own nitro node's address --- testnet-nitro-node.md | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/testnet-nitro-node.md b/testnet-nitro-node.md index 76bb632..7abeae4 100644 --- a/testnet-nitro-node.md +++ b/testnet-nitro-node.md @@ -195,7 +195,7 @@ Nitro nodes can be set up on a target machine using Ansible: * Get your Nitro node's info: ```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: # { @@ -379,9 +379,6 @@ Perform payments using a virtual payment channel created with another Nitro node ```bash 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= - # Mirrored channel on L2 export L2_CHANNEL_ID= @@ -389,6 +386,21 @@ Perform payments using a virtual payment channel created with another Nitro node export PAYMENT_CHANNEL_AMOUNT=500 ``` +* Set counterparty address + + ```bash + export COUNTER_PARTY_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: ```bash @@ -543,14 +555,28 @@ Perform swaps using a swap channel created with another Nitro node over the mirr ```bash export BRIDGE_NITRO_ADDRESS=$(yq eval '.bridge_nitro_address' nitro-node-config.yml) - # Counterparty to create the swap channel with - export COUNTER_PARTY_ADDRESS= + export GETH_CHAIN_ID="1212" # 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_2=$(jq -r --arg chainId "$CHAIN_ID" '.[$chainId][0].contracts.TestToken2.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 "$GETH_CHAIN_ID" '.[$chainId][0].contracts.TestToken2.address' assets.json) ``` +* Set counterparty address + + ```bash + export COUNTER_PARTY_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: ```bash