Check payment channel after making payment

This commit is contained in:
Neeraj 2024-08-23 11:11:17 +05:30
parent 5610385b14
commit a60850aa36
2 changed files with 37 additions and 18 deletions

View File

@ -731,7 +731,7 @@
- Reset nitro-node deployments:
- Stop nitro-node deployments and remove volumes:
- Stop nitro-node, bridge, nitro-contracts deployments and remove volumes:
```bash
# Run where deployments are created
@ -743,7 +743,7 @@
laconic-so deployment --dir nitro-contracts-deployment stop --delete-volumes
```
- Clear nitro-node and bridge deployments:
- Clear nitro-node, nitro-contracts and bridge deployments:
```bash
# Run where deployments are created

View File

@ -316,7 +316,19 @@
- Create virtual channel from Alice to Charlie
```bash
laconic-so deployment --dir alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-fund 0x03Eb7a84E286c671836b9897AaE24b31D36f9cA8 --amount 1000 -p 4005 -h nitro-node"
laconic-so deployment --dir alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-fund 0x03Eb7a84E286c671836b9897AaE24b31D36f9cA8 --amount 1000 -p 4005 -h nitro-node"
```
- Set the payment channel id in a variable
```bash
PAYMENT_CHANNEL_ID=<payment channel id>
```
- Check payment channel between Alice and Charlie
```bash
laconic-so deployment --dir alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-payment-channel $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
# Expected output:
# {
@ -332,18 +344,6 @@
# }
```
- Set the payment channel id in a variable
```bash
PAYMENT_CHANNEL_ID=<payment channel id>
```
- Check payment channel between Alice and Charlie
```bash
laconic-so deployment --dir alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-payment-channel $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
```
- After virtual fund objective is complete, make payments
```bash
@ -356,7 +356,26 @@
# }
```
- Close payment channel after payments
- Check payment channel between Alice and Charlie after payment
```bash
laconic-so deployment --dir alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-payment-channel $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
# Expected output:
# {
# ID: '0xf982de03e17fd8ff30b138f142bc17c3deb24a48ec38b41c13e621fa65172f3c',
# Status: 'Open',
# Balance: {
# AssetAddress: '0x0000000000000000000000000000000000000000',
# Payee: '0x03eb7a84e286c671836b9897aae24b31d36f9ca8',
# Payer: '0x4b64e26da8279ab12bcd4ca9974ec2b4741e175e',
# PaidSoFar: 200n,
# RemainingFunds: 800n
# }
# }
```
- Close payment channel
```bash
laconic-so deployment --dir alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-defund $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
@ -393,7 +412,7 @@
- Reset nitro-node deployments:
- Stop nitro-node deployments and remove volumes:
- Stop nitro-node, nitro-contracts deployments and remove volumes:
```bash
# Run where deployments are created
@ -402,7 +421,7 @@
laconic-so deployment --dir nitro-contracts-deployment stop --delete-volumes
```
- Clear nitro-node and bridge deployments:
- Clear nitro-node and nitro-contracts deployments:
```bash
# Run where deployments are created