Skip to content
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

Automatic reference_hash calculation at compile-time #12

Open
encody opened this issue Jul 21, 2022 · 0 comments
Open

Automatic reference_hash calculation at compile-time #12

encody opened this issue Jul 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@encody
Copy link
Contributor

encody commented Jul 21, 2022

Standards like NEP-141 have a field called reference_hash, described as:

the base64-encoded sha256 hash of the JSON file contained in the reference field.

With compile-time macros, it is possible to automatically download the reference field and calculate the hash. This would be immensely convenient for quickly adding an additional layer of security. Currently, not very many fungible tokens use the reference, and therefore the reference_hash fields, but the ones that do use reference don't seem to use reference_hash. This may be due to projects wanting to keep non-volatile metadata on-chain and volatile metadata off-chain, where it's easier to maintain control of and update.

Regardless, this would be a really cool feature to have.

@encody encody added the enhancement New feature or request label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant