-
Notifications
You must be signed in to change notification settings - Fork 100
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
Check NEP11 methods #777
Closed
+12
−1
Closed
Check NEP11 methods #777
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8039e9d
init
Ashuaidehao 8457ad3
Merge branch 'master' into Fix-nep11-check
superboyiii 9e634d0
Merge branch 'master' into Fix-nep11-check
Jim8y e5b9439
Merge branch 'master' into Fix-nep11-check
Jim8y 72ed244
Merge branch 'master' into Fix-nep11-check
Jim8y 67de03d
Merge branch 'master' into Fix-nep11-check
Jim8y 853f743
Merge branch 'master' into Fix-nep11-check
vncoelho 92e4a2d
Merge branch 'master' into Fix-nep11-check
vncoelho 387644c
Merge branch 'master' into Fix-nep11-check
vncoelho b847ecf
Merge branch 'master' into Fix-nep11-check
Jim8y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should be an
else if
Because the function is one or the other. Also if the token has both functions you don't check for that either. As the code sits right now, if 1st function exists look for other function. Which isn't valid to what NEP-11 sayshttps://github.com/neo-project/proposals/blob/master/nep-11.mediawiki#user-content-decimals
You need to get the decimals to determined which function to use.
Edit: this may help you sum up that function into a class
https://github.com/cschuchardt88/neo-modules/blob/RestServer/src/RestServer/Tokens/NEP11Token.cs
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.
I think also balance1 and balance2 is a bad naming.
Let's say something like "balanceInteger" and "balanceDivisible"
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.
Also there is no need to check to
abi
for these functions.@vncoelho I think
balanceDivisible
andbalanceNonDivisible
would fit better.