Commit graph

14 commits

Author SHA1 Message Date
Evgenii Stratonikov
31eca342eb *: replace all NEP5 occurences to NEP17 2020-11-24 13:08:24 +03:00
Roman Khimov
41af738c1b state: drop (*NEP5TransferLog).DecodeBinaryReturnCount
It's no longer needed.
2020-09-22 19:21:12 +03:00
Roman Khimov
e4b52d3947 core/rpc: add continue flag to iterating functions
Most of the time we don't need to get all transfers from the DB and
deserialize them.
2020-09-21 22:23:34 +03:00
Roman Khimov
373c669c6a core/state: reverse the order of ForEachTransfer
When using limits we're usually concerned about the most recent
transfers. Returning 3 transfers from the middle of the chain isn't very
helpful.
2020-09-21 22:05:15 +03:00
Anna Shaleva
0dd1730632 core: store NEP5Transfer asset by ID instead of hash
To avoid problems with retrieving decimals for migrated contracts.
2020-07-29 15:15:48 +03:00
Anna Shaleva
abe3c94b95 core: use big.Int to store NEP5 balances
closes #1133
2020-07-09 13:26:39 +03:00
Anna Shaleva
43b28ffa06 core: get rid of NEP5TransferSize
Part of #1133

It will help us to use big.Int to store amount of NEP5 tokens. As far as
big.Int doesn't have constant size, we shouldn't use `NEP5TransferSize`
constant anymore.
2020-07-09 13:25:03 +03:00
Evgenii Stratonikov
0036b3e52b random: make use or random package in tests
Also implement Bytes/Fill routines for generating byte slices.
2020-03-27 10:27:46 +03:00
Evgenii Stratonikov
9abda40171 testserdes: implement helpers for encode/decode routines
Frequently one needs to check if struct serializes/deserializes
properly. This commit implements helpers for such cases including:
1. JSON
2. io.Serializable interface
2020-03-27 10:27:46 +03:00
Evgenii Stratonikov
3c6d9653b0 core/state: add Size() method to NEP5TransferLog 2020-03-12 12:58:30 +03:00
Evgenii Stratonikov
ebf867b11d state: add a test for NEP5Transfer size
It's size is used in NEP5TransferLog so we need to be
sure it reflects reality.
2020-03-10 13:02:14 +03:00
Evgenii Stratonikov
95a8fa234f rpc: implement getnep5transfers RPC 2020-03-05 18:22:40 +03:00
Evgenii Stratonikov
f92fd3c948 core: track NEP5 transfers 2020-03-05 18:22:40 +03:00
Evgenii Stratonikov
e8c4179a9c core: track NEP5 balances 2020-03-05 18:22:19 +03:00