Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add BTS API and commands for NEAR #502

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

MuhammedIrfan
Copy link
Collaborator

Checklist:

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines

Related Issues:

Closes #429

@MuhammedIrfan MuhammedIrfan added the team: hugobyte Relevant to HugoByte label Sep 19, 2022
@MuhammedIrfan MuhammedIrfan self-assigned this Sep 19, 2022
Base automatically changed from hugobyte/development to main September 22, 2022 12:58
@MuhammedIrfan MuhammedIrfan marked this pull request as ready for review October 7, 2022 16:20
Copy link
Contributor

@CyrusVorwald CyrusVorwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move these docs to the appropriate place in /docs based on the newly added sets of documentation to main.

doc/near/bts.md Outdated
```


## Usage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These usages are not clear enough how to use because there are input parameters with no examples of what those should be. Please add the real-world usage for these commands instead of linking to the CLI commands.

doc/near/bts.md Outdated

### Transfer NEAR to Cross-Chain
1. Deposit NEAR to BTS [here](#deposit-near-to-bts)
2. Query Transfer Fee [here] (#get-fee)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correctly linking because there is a space between [here] and (#get-fee)

doc/near/bts.md Outdated

**CLI Command**
```console
NEAR_ENV=testnet near call <NEP141 Contract> ft_transfer_call '{"receiver_id": "<BTS>", "amount": "<AMOUNT>", "msg": ""}' --accountId <ACCOUNT ID> --amount <1 yoctoNEAR in highest Denomination ie 0.000000000000000000000001>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a description for what the input parameters are.

doc/near/bts.md Outdated

**CLI Command**
```console
NEAR_ENV=testnet near call <BTS> transfer '{"coin_name": "<Coin Name>", "destination": "btp://<Network>/<Address>", "amount": "<Amount in lowest Denomination, For NEAR in yoctoNEAR ie 1 NEAR = 1^24 yoctoNEAR>"}' --gas 300000000000000 --accountId <ACCOUNT ID>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a description for what the input parameters are. For example, the user may not know what BTS is or what btp:///

is. I also don't see what the valid possible inputs are for btp:/// because there is no NEAR info in https://github.com/icon-project/icon-bridge/blob/main/docs/testnet_deployment.json

@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #502 (06f1c54) into main (4e691bb) will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #502      +/-   ##
============================================
+ Coverage     42.01%   42.08%   +0.06%     
  Complexity      801      801              
============================================
  Files           115      115              
  Lines         11321    11321              
  Branches        941      941              
============================================
+ Hits           4757     4764       +7     
+ Misses         6155     6147       -8     
- Partials        409      410       +1     
Impacted Files Coverage Δ
cmd/iconbridge/chain/substrate-eth/receiver.go 63.26% <0.00%> (+0.48%) ⬆️
cmd/iconbridge/chain/bsc/receiver.go 58.82% <0.00%> (+1.22%) ⬆️

@MuhammedIrfan MuhammedIrfan linked an issue Oct 19, 2022 that may be closed by this pull request
4 tasks
@MuhammedIrfan
Copy link
Collaborator Author

@CyrusVorwald-ICON I have updated with the requested changes. Please review.

"near": {
"bmc":"7270a79be789d770f2de015047684e2806597eeee96ee3ca87b179c6399deaaf",
"bts":"bts.iconbridge-6.testnet",
"ICX":"btp-icx.bts.iconbridge-6.testnet"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move tokens above smart contract addresses to be consistent with icon and bsc, and add an equivalent contract for each of the tokens listed on icon and bsc that are not currently listed on near

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, where are the NEAR token addresses for the other networks?

@MuhammedIrfan MuhammedIrfan marked this pull request as draft November 18, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: hugobyte Relevant to HugoByte
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document explaining the workflow of cross-chain transfer from NEAR
3 participants