Add steps to export asset addresses in a new file
This commit is contained in:
parent
086342be67
commit
172a1f9f46
@ -438,8 +438,6 @@
|
||||
export CA_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.ConsensusApp.address' /app/deployment/nitro-addresses.json")
|
||||
export VPA_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.VirtualPaymentApp.address' /app/deployment/nitro-addresses.json")
|
||||
|
||||
export ASSET_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.TestToken.address' /app/deployment/nitro-addresses.json")
|
||||
|
||||
export BRIDGE_NITRO_ADDRESS=$(laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-node-info -p 4005 -h nitro-bridge" | jq -r '.SCAddress')
|
||||
|
||||
export BRIDGE_PEER_ID=$(laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-node-info -p 4005 -h nitro-bridge" | jq -r '.MessageServicePeerId')
|
||||
@ -447,22 +445,36 @@
|
||||
export L1_BRIDGE_MULTIADDR="/dns4/bridge.laconic.com/tcp/3005/p2p/$BRIDGE_PEER_ID"
|
||||
export L2_BRIDGE_MULTIADDR="/dns4/bridge.laconic.com/tcp/3006/p2p/$BRIDGE_PEER_ID"
|
||||
|
||||
# Create the required config file
|
||||
# Create the required config files
|
||||
cat <<EOF > nitro-node-config.yml
|
||||
nitro_chain_url: "wss://fixturenet-eth.laconic.com"
|
||||
na_address: "$NA_ADDRESS"
|
||||
ca_address: "$CA_ADDRESS"
|
||||
vpa_address: "$VPA_ADDRESS"
|
||||
asset_address: "${ASSET_ADDRESS}"
|
||||
bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS"
|
||||
nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR"
|
||||
nitro_l2_bridge_multiaddr: "$L2_BRIDGE_MULTIADDR"
|
||||
EOF
|
||||
|
||||
$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq --arg chainId "$GETH_CHAIN_ID" '{
|
||||
($chainId): [
|
||||
{
|
||||
"name": .[$chainId][0].name,
|
||||
"chainId": .[$chainId][0].chainId,
|
||||
"contracts": (
|
||||
.[$chainId][0].contracts
|
||||
| to_entries
|
||||
| map(select(.key | in({"ConsensusApp":1, "NitroAdjudicator":1, "VirtualPaymentApp":1}) | not))
|
||||
| from_entries
|
||||
)
|
||||
}
|
||||
]
|
||||
}' /app/deployment/nitro-addresses.json") > assets.json
|
||||
```
|
||||
|
||||
* The required config file should be generated at `/srv/bridge/nitro-node-config.yml`
|
||||
* The required config files should be generated at `/srv/bridge/nitro-node-config.yml` and `/srv/bridge/assets.json`
|
||||
|
||||
* Check in the generated file at location `ops/stage2/nitro-node-config.yml` within this repository
|
||||
* Check in the generated files at locations `ops/stage2/nitro-node-config.yml` and `ops/stage2/assets.json` within this repository respectively
|
||||
|
||||
* List down L2 channels created by the bridge:
|
||||
|
||||
|
@ -35,12 +35,35 @@
|
||||
# na_address: ""
|
||||
# ca_address: ""
|
||||
# vpa_address: ""
|
||||
# asset_address: ""
|
||||
# bridge_nitro_address: ""
|
||||
# nitro_l1_bridge_multiaddr: ""
|
||||
# nitro_l2_bridge_multiaddr: ""
|
||||
```
|
||||
|
||||
* Fetch required asset addresses:
|
||||
|
||||
```bash
|
||||
wget -O assets.json https://git.vdb.to/cerc-io/testnet-laconicd-stack/raw/branch/main/ops/stage2/assets.json
|
||||
|
||||
# Example output:
|
||||
# {
|
||||
# "1212": [
|
||||
# {
|
||||
# "name": "geth",
|
||||
# "chainId": "1212",
|
||||
# "contracts": {
|
||||
# "TestToken": {
|
||||
# "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
|
||||
# },
|
||||
# "TestToken2": {
|
||||
# "address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
```
|
||||
|
||||
* TODO: Get L1 tokens on your address
|
||||
|
||||
* Edit `nitro-vars.yml` and add the following variables:
|
||||
|
Loading…
Reference in New Issue
Block a user