-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Add] Get Accounts and Balances for NeoToken #3610
base: master
Are you sure you want to change the base?
[Add] Get Accounts and Balances for NeoToken #3610
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
{ | ||
var keyBytes = key.ToArray(); | ||
var addressHash = new UInt160(keyBytes.AsSpan(prefixKey.Length)); | ||
yield return new(addressHash, value.GetInteroperable<AccountState>().Balance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful for external callers to return AccountState
instead of just balance. External caller can perform further selection by himself if only balance is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccountState
only holds balance
and AccountState
was added for serialization, I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably decimals will be soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccountState only holds balance
I confused AccountState
with NeoAccountState
. So I mean that for Neo token it might be useful to return NeoAccountState
because it contains additional voting information.
Probably decimals will be soon
Hope, it won't happen 🥲
Description
--For Offline Usage--
Allows for SDK users to get the accounts of
Neo
holders with their balances.Change Log
GetAccounts
andBalanceOf
on classNeoToken
.Type of change
How Has This Been Tested?
TestGetAccounts
TestBalanceOf
Test Configuration:
Checklist: