-
Notifications
You must be signed in to change notification settings - Fork 50
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
SRC20: A method to retrieve assets #143
Comments
Note that if |
I'm not sure this is the right approach, as this requires significant ( |
If you could suggest another way to enumerate assets or sub_ids, this would be useful. A simpler approach would be to simply require sequential sub_ids. |
A contract could choose to return sequential sub_ids or use a mapping from asset index to asset. The former requires zero storage and the latter only one storage slot per asset. Note that the majority of the current SRC20 implementations use sub_id = 0 and have only one asset requiring no |
I currently have to do symbolic execution of the contracts to impute the assets. Not an option for the causal user. |
Motivation
SRC20 has a
total_assets()
method to get the number of assets present and we have new log types to retrieve these datathrough log scraping.
However it is still impossible retrieve contract metadata entirely from state as we cannot make any assumptions about the
AssetId
orsub_id
.Might it not be a good idea to add a method:
With this we can enumerate contained assets.
The text was updated successfully, but these errors were encountered: