-
Notifications
You must be signed in to change notification settings - Fork 453
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 asset decimals field #601
Merged
tsachiherman
merged 12 commits into
algorand:master
from
justicz:maxj/add_asset_decimals
Dec 5, 2019
Merged
Add asset decimals field #601
tsachiherman
merged 12 commits into
algorand:master
from
justicz:maxj/add_asset_decimals
Dec 5, 2019
Conversation
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
This was referenced Dec 3, 2019
zeldovich
reviewed
Dec 3, 2019
tsachiherman
reviewed
Dec 4, 2019
tsachiherman
reviewed
Dec 4, 2019
tsachiherman
reviewed
Dec 4, 2019
rotemh
reviewed
Dec 4, 2019
justicz
force-pushed
the
maxj/add_asset_decimals
branch
from
December 4, 2019 21:03
e7ad58d
to
2f88b18
Compare
tsachiherman
approved these changes
Dec 5, 2019
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.
thanks for the changes.
This was referenced Dec 5, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prerequisite PR: #576
Decimals
toAssetParams
. I made it auint32
because I know we've had weird byte-alignment issues on certain builds, but if we don't need to worry about that we can make it auint8
.WellFormed
to ensure this field is only nonzero after the protocol upgrade.goal
, respect theDecimals
field if it can fetch the asset params (it can't do that on offline machines, for example).goal
still takes the base unit of the asset (you cannot pass-a 1.234
of an asset withDecimals = 3
). This is because we will sometimes fail to get an asset's parameters, for example if the machine is generating txns offline, and it would be bad to have changing semantics for theamount
argument.Decimals
to the API model ofAssetParams