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

cli: support NEP11-related commands #1918

Merged
merged 20 commits into from
Apr 30, 2021
Merged

cli: support NEP11-related commands #1918

merged 20 commits into from
Apr 30, 2021

Conversation

AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Apr 26, 2021

Close #1860, close #1864.

TODO:

  • tests for balance and transfer (something is wrong with transfer implementation or NFT example, investigating)
  • formatting

@AnnaShaleva AnnaShaleva force-pushed the cli/nep11 branch 3 times, most recently from 9fe9cb8 to f53f414 Compare April 27, 2021 15:30
@AnnaShaleva AnnaShaleva marked this pull request as ready for review April 27, 2021 15:38
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

It'd be nice to test properties of course.

pkg/smartcontract/manifest/manifest.go Outdated Show resolved Hide resolved
cli/wallet/nep17.go Outdated Show resolved Hide resolved
cli/wallet/nep11.go Outdated Show resolved Hide resolved
cli/wallet/nep11.go Outdated Show resolved Hide resolved
cli/wallet/nep17.go Outdated Show resolved Hide resolved
cli/wallet/nep17.go Outdated Show resolved Hide resolved
@AnnaShaleva AnnaShaleva force-pushed the cli/nep11 branch 3 times, most recently from 4e2e87b to f5789e4 Compare April 29, 2021 14:02
@@ -123,7 +123,7 @@ func (c *Client) TransferNEP11D(acc *wallet.Account, to util.Uint160,
if err != nil {
return util.Uint256{}, fmt.Errorf("bad account address: %w", err)
}
tx, err := c.createNEP11TransferTx(acc, tokenHash, gas, cosigners, acc.Address, from, to, amount, tokenID)
tx, err := c.createNEP11TransferTx(acc, tokenHash, gas, cosigners, from, to, amount, tokenID)
Copy link
Member Author

Choose a reason for hiding this comment

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

Tests are TBD in #1940.

@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #1918 (2a02674) into master (5924123) will decrease coverage by 0.16%.
The diff coverage is 72.67%.

❗ Current head 2a02674 differs from pull request most recent head f61ab6b. Consider uploading reports for the commit f61ab6b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1918      +/-   ##
==========================================
- Coverage   82.92%   82.75%   -0.17%     
==========================================
  Files         289      290       +1     
  Lines       22883    23355     +472     
==========================================
+ Hits        18975    19328     +353     
- Misses       2713     2797      +84     
- Partials     1195     1230      +35     
Impacted Files Coverage Δ
pkg/smartcontract/manifest/manifest.go 99.19% <ø> (ø)
pkg/rpc/client/helper.go 51.47% <34.78%> (-8.53%) ⬇️
pkg/rpc/client/nep11.go 47.11% <38.29%> (-7.13%) ⬇️
cli/cmdargs/parser.go 92.30% <40.00%> (+0.09%) ⬆️
pkg/rpc/client/nep.go 49.05% <62.50%> (+5.81%) ⬆️
pkg/rpc/response/result/invoke.go 77.38% <73.80%> (+1.29%) ⬆️
cli/wallet/nep11.go 78.71% <78.71%> (ø)
cli/wallet/nep17.go 74.15% <82.14%> (+0.18%) ⬆️
cli/wallet/wallet.go 72.19% <100.00%> (+0.26%) ⬆️
pkg/config/config.go 71.42% <100.00%> (+4.76%) ⬆️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5924123...f61ab6b. Read the comment docs.

We need to distinguish NEP11 and NEP17 tokens preesnted in the wallet.
@roman-khimov roman-khimov merged commit 3acdbbd into master Apr 30, 2021
@roman-khimov roman-khimov deleted the cli/nep11 branch April 30, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpc: support all NEP11 methods which return iterators CLI support for NEP-11 and NNS
2 participants