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

Mention token amount limits in balance readers #3268

Open
cthulhu-rider opened this issue Dec 18, 2023 · 2 comments
Open

Mention token amount limits in balance readers #3268

cthulhu-rider opened this issue Dec 18, 2023 · 2 comments
Labels
enhancement Improving existing functionality I3 Minimal impact S4 Routine U4 Nothing urgent

Comments

@cthulhu-rider
Copy link
Contributor

Is your feature request related to a problem? Please describe.

some tokens are limited in quantity. For example, NEO <= 100KK according to docs. This limit is missing in https://pkg.go.dev/github.com/nspcc-dev/neo-go/pkg/rpcclient/neo (in particular https://pkg.go.dev/github.com/nspcc-dev/neo-go@v0.104.0/pkg/rpcclient/neptoken#Base.BalanceOf). This complicates code checks and optimization like using fixed bitsize math instead of big integers if possible

Describe the solution you'd like

mention limits in BalanceOf methods' docs

Describe alternatives you've considered

do not touch

Additional context

* inspired by nspcc-dev/neofs-node#2683 (comment)

@roman-khimov
Copy link
Member

Technically, you have NEP-17 totalSupply to get it and that's the standard NEP-17 way. At the same time it's well-known for NEO and won't change.

@cthulhu-rider
Copy link
Contributor Author

@roman-khimov, i thought about checking limits against totalSupply but this seems an overhead to me when it returns static value like for NEO

@roman-khimov roman-khimov added I3 Minimal impact U4 Nothing urgent S4 Routine enhancement Improving existing functionality labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I3 Minimal impact S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

2 participants