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

NEP-11 tracking #2266

Merged
merged 11 commits into from
Nov 19, 2021
Merged

NEP-11 tracking #2266

merged 11 commits into from
Nov 19, 2021

Conversation

roman-khimov
Copy link
Member

@roman-khimov roman-khimov commented Nov 17, 2021

We don't have divisible NFTs to test it completely, but that can wait until #1940.

There is a lot of similarity, so try reusing common code and use more neutral
naming.
Setting NewNEPXXBatch avoids the need to get them from the database which is
useful for newly tracked accounts.
Make it a bit more efficient.
@roman-khimov roman-khimov added the rpc RPC server and client label Nov 17, 2021
@roman-khimov roman-khimov added this to the v0.98.0 milestone Nov 17, 2021
@roman-khimov roman-khimov marked this pull request as ready for review November 18, 2021 14:05
@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #2266 (f1145c8) into master (965c3b2) will increase coverage by 0.02%.
The diff coverage is 79.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2266      +/-   ##
==========================================
+ Coverage   84.10%   84.13%   +0.02%     
==========================================
  Files         305      306       +1     
  Lines       29351    29696     +345     
==========================================
+ Hits        24685    24984     +299     
- Misses       3285     3299      +14     
- Partials     1381     1413      +32     
Impacted Files Coverage Δ
pkg/core/state/native_state.go 72.22% <ø> (ø)
pkg/core/storage/store.go 91.66% <ø> (ø)
pkg/rpc/client/nep11.go 50.84% <0.00%> (ø)
pkg/rpc/client/nep17.go 70.00% <ø> (ø)
pkg/smartcontract/manifest/manifest.go 99.34% <ø> (ø)
cli/wallet/nep11.go 78.43% <69.23%> (ø)
pkg/rpc/server/server.go 77.97% <71.26%> (-0.55%) ⬇️
cli/wallet/nep17.go 76.10% <75.00%> (ø)
pkg/core/blockchain.go 79.46% <80.00%> (-0.32%) ⬇️
pkg/core/state/tokens.go 84.78% <84.78%> (ø)
... and 18 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 965c3b2...f1145c8. Read the comment docs.

Comment on lines +65 to +66
NewNEP11Batch: true,
NewNEP17Batch: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer inverted DirtyNEP11Batch flag to better handle defaults.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, but can be done later.

docs/rpc.md Outdated Show resolved Hide resolved
Standards are NEP-11 and NEP-17, not NEP11, not NEP17, not anything
else. Variable/function names of course can use whatever fits, but documents
and comments should be consistent wrt this.
We're using proper util.Uint160 values everywhere in the client.
@roman-khimov roman-khimov merged commit aa06770 into master Nov 19, 2021
@roman-khimov roman-khimov deleted the nep-11-tracking branch November 19, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpc RPC server and client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants