-
Notifications
You must be signed in to change notification settings - Fork 21
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
added get_token_id function in smart contract library #858
added get_token_id function in smart contract library #858
Conversation
a20029e
to
3836a48
Compare
fot the test I created a token, then a smart contract where we used the token id in the content, after transfer we can see that the content was updated with the token_id |
3836a48
to
67d802f
Compare
lib/archethic/utils.ex
Outdated
@doc """ | ||
get token properties based on the genesis address and the transaction | ||
""" | ||
@spec get_token_properties(binary(), Transaction.t()) :: {:ok, map()} | {:error, atom()} |
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.
You may specify the possible atom return when an error occur, it will be easier to understand the possible result
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.
done
lib/archethic/utils.ex
Outdated
name: Map.get(map, "name", ""), | ||
supply: Map.get(map, "supply"), | ||
symbol: Map.get(map, "symbol", ""), | ||
type: type, |
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.
The type should be retrieve from the map, the expected type are fungible
or non-fungible
and not the transaction type
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.
done
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #640
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: