From 919673c3c66ea48a581f392b75b3a077250ad842 Mon Sep 17 00:00:00 2001 From: Shreyas K S Date: Tue, 13 Sep 2022 15:28:02 +0530 Subject: [PATCH 1/3] add commands for interacting with bts using near cli --- doc/near/bts.md | 38 ++++++++++++++++++++++++++++++++++++++ doc/near/testnet.md | 10 ++++++++++ 2 files changed, 48 insertions(+) create mode 100644 doc/near/bts.md create mode 100644 doc/near/testnet.md diff --git a/doc/near/bts.md b/doc/near/bts.md new file mode 100644 index 000000000..6233faaad --- /dev/null +++ b/doc/near/bts.md @@ -0,0 +1,38 @@ +## Requirements + +* **NEAR CLI** + The NEAR [Command Line Interface (CLI)](https://github.com/near/near-cli) is a tool that enables to interact with the NEAR network directly from the shell. Under the hood, NEAR CLI utilizes the NEAR [JavaScript API](https://github.com/near/near-api-js) + + + #### Installation + ```npm install -g near-cli``` +* **NEAR Wallet** + - Testnet: https://wallet.testnet.near.org/ + - Mainnet: https://wallet.near.org/ + +* **Authorize CLI** + ```near login``` +## API +*Path to BTS Rust ReadMe* + +## Usage + +**Transfer NEAR** +- Deposit +```NEAR_ENV=testnet near call deposit --amount --accountId ``` +- Transfer +```NEAR_ENV=testnet near call transfer '{"coin_name": "", "destination": "btp:///
", "amount": ""}' --gas 300000000000000 --accountId ``` + +**Receiving Cross-Chain Native Coins** +- Withdraw +```NEAR_ENV=testnet near call withdraw '{"coin_name": "", "amount":""}' --amount 0.000000000000000000000001 --gas 300000000000000 --accountId ``` + +**Reclaiming Failed Transfer** +- Reclaim +```NEAR_ENV=testnet near call reclaim '{"coin_name": "", "amount":""}' --amount 0.000000000000000000000001 --gas 300000000000000 --accountId ``` + +## Environment + +- [Testnet](./testnet.md) + + diff --git a/doc/near/testnet.md b/doc/near/testnet.md new file mode 100644 index 000000000..b6df28740 --- /dev/null +++ b/doc/near/testnet.md @@ -0,0 +1,10 @@ +## Testnet + +### BTS +bts.iconbridge.testnet +### Registered Tokens + +| Coin/Token|Coin Name| Network| Denomination| NEP141 Contract | +|:---------|:--------|:--------|:------------|:----------| +| NEAR | btp-0x1.near-NEAR | 0x1.near | 24 | N/A | +| ICX | btp-0x2.icon-ICX | 0x2.icon | 18 | btp-icx.bts.iconbridge.testnet | From 25756f21c4f2d8a74ff370a0b323d2990046f09c Mon Sep 17 00:00:00 2001 From: Shreyas K S Date: Tue, 13 Sep 2022 15:32:57 +0530 Subject: [PATCH 2/3] fix syntax --- doc/near/bts.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/near/bts.md b/doc/near/bts.md index 6233faaad..3f078893d 100644 --- a/doc/near/bts.md +++ b/doc/near/bts.md @@ -19,17 +19,25 @@ **Transfer NEAR** - Deposit -```NEAR_ENV=testnet near call deposit --amount --accountId ``` +```console +NEAR_ENV=testnet near call deposit --amount --accountId +``` - Transfer -```NEAR_ENV=testnet near call transfer '{"coin_name": "", "destination": "btp:///
", "amount": ""}' --gas 300000000000000 --accountId ``` +```console +NEAR_ENV=testnet near call transfer '{"coin_name": "", "destination": "btp:///
", "amount": ""}' --gas 300000000000000 --accountId +``` **Receiving Cross-Chain Native Coins** - Withdraw -```NEAR_ENV=testnet near call withdraw '{"coin_name": "", "amount":""}' --amount 0.000000000000000000000001 --gas 300000000000000 --accountId ``` +```console +NEAR_ENV=testnet near call withdraw '{"coin_name": "", "amount":""}' --amount 0.000000000000000000000001 --gas 300000000000000 --accountId +``` **Reclaiming Failed Transfer** - Reclaim -```NEAR_ENV=testnet near call reclaim '{"coin_name": "", "amount":""}' --amount 0.000000000000000000000001 --gas 300000000000000 --accountId ``` +```console +NEAR_ENV=testnet near call reclaim '{"coin_name": "", "amount":""}' --amount 0.000000000000000000000001 --gas 300000000000000 --accountId +``` ## Environment From f0a8995d97f7bf2012f1e1053c601ac52f2ae9ed Mon Sep 17 00:00:00 2001 From: Shreyas K S Date: Tue, 13 Sep 2022 15:34:26 +0530 Subject: [PATCH 3/3] fix syntax --- doc/near/bts.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/near/bts.md b/doc/near/bts.md index 3f078893d..026f9f6a6 100644 --- a/doc/near/bts.md +++ b/doc/near/bts.md @@ -5,13 +5,17 @@ #### Installation - ```npm install -g near-cli``` + ```console + npm install -g near-cli + ``` * **NEAR Wallet** - Testnet: https://wallet.testnet.near.org/ - Mainnet: https://wallet.near.org/ * **Authorize CLI** - ```near login``` + ```console + near login + ``` ## API *Path to BTS Rust ReadMe*