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

core,rpc: implement NEP5-related logic #723

Merged
merged 9 commits into from
Mar 5, 2020
Merged

core,rpc: implement NEP5-related logic #723

merged 9 commits into from
Mar 5, 2020

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Mar 5, 2020

  1. Track NEP5 balances and transfer events.
  2. Implement getnep5balances and getnep5transfers RPC.

Closes #498 .

VM can produce both big.Int and []byte because they
are converted to each other on demand.
@codecov
Copy link

codecov bot commented Mar 5, 2020

Codecov Report

Merging #723 into master will increase coverage by 0.26%.
The diff coverage is 67.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #723      +/-   ##
==========================================
+ Coverage   66.47%   66.73%   +0.26%     
==========================================
  Files         134      135       +1     
  Lines       11895    12127     +232     
==========================================
+ Hits         7907     8093     +186     
- Misses       3625     3643      +18     
- Partials      363      391      +28
Impacted Files Coverage Δ
pkg/core/storage/store.go 37.5% <ø> (ø) ⬆️
pkg/rpc/server/prometheus.go 100% <ø> (ø) ⬆️
pkg/rpc/client/rpc.go 0% <0%> (ø) ⬆️
pkg/smartcontract/parameter.go 74.89% <100%> (-0.31%) ⬇️
pkg/core/state/account.go 58.75% <23.07%> (-6.93%) ⬇️
pkg/core/blockchain.go 46.44% <59.25%> (+1.47%) ⬆️
pkg/core/dao.go 70.24% <65%> (-0.35%) ⬇️
pkg/rpc/server/server.go 83.97% <80.41%> (-0.7%) ⬇️
pkg/core/state/nep5.go 80.48% <80.48%> (ø)
... and 2 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 d03b2ef...c019ce5. Read the comment docs.

pkg/core/blockchain.go Outdated Show resolved Hide resolved
pkg/core/state/account.go Outdated Show resolved Hide resolved
pkg/core/state/account.go Show resolved Hide resolved
pkg/core/helper_test.go Outdated Show resolved Hide resolved
docs/rpc.md Show resolved Hide resolved
pkg/rpc/server/server.go Outdated Show resolved Hide resolved
pkg/rpc/server/server.go Outdated Show resolved Hide resolved
pkg/core/blockchain.go Outdated Show resolved Hide resolved
Also transfer tokens between accounts.
Every NEP5 contract MUST have `decimals` method which
is used to properly display token amount.
When changing test chain it can be rather annoying
to replace all of the occurences of the contract hash.
@roman-khimov roman-khimov merged commit fbdc60b into master Mar 5, 2020
@roman-khimov roman-khimov deleted the feature/nep5 branch March 5, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Completely new functionality rpc RPC server and client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NEP5 balance and transactions tracking
2 participants