-
Notifications
You must be signed in to change notification settings - Fork 462
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 created asset index to txn status #490
Merged
tsachiherman
merged 6 commits into
algorand:master
from
justicz:maxj/add_created_asset_to_txn_status
Nov 9, 2019
Merged
Add created asset index to txn status #490
tsachiherman
merged 6 commits into
algorand:master
from
justicz:maxj/add_created_asset_to_txn_status
Nov 9, 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
rotemh
reviewed
Nov 8, 2019
one comment, otherwise, looks good to me |
rotemh
reviewed
Nov 8, 2019
rotemh
approved these changes
Nov 8, 2019
This is probably good but I feel like it would be better with a test that submits a create-asset transaction, gets this response, then looks up the creator's account info to see that the same asset id is listed there. |
tsachiherman
approved these changes
Nov 9, 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.
looks good to me.
winder
pushed a commit
that referenced
this pull request
Nov 12, 2019
* add created asset id to api transaction and print during goal asset create * move createdassetindex into results struct * fix txn counter math * add comment * only add asset created info to pending endpoint * add comment
This was referenced Nov 13, 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.
This PR adds a new field to
v1.Transaction
calledTransactionResults
. This field is a struct containingCreatedAssetIndex
, the index (if any) of an asset created by this transaction.It computes the created asset index by looking up the block associated with the transaction if it was confirmed (and the correct type of transaction), computing the offset within that block, and adjusting based on
TxnCounter
.Currently we're just returning this on a best-effort basis. If we don't have access to the block, we can't compute the created asset index based on just the transaction id.