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

Clearer guidance on setting and updating Token Keys inside of solidity #899

Open
jaycoolh opened this issue Feb 10, 2025 · 1 comment
Open

Comments

@jaycoolh
Copy link

Problem:

  • setting and updating an HTS token key for an entity outside of the Smart Contract (e.g. a generic ECDSA hedera account) is not very intuitive
  • there is no clear guidance in docs on how to do it, currently need to scrape between various smart-contract test scripts and util methods

See here for some more context: https://www.loom.com/share/8d5ad302b72b47338e0f2db7df23a764?sid=df826f70-b41e-4aa2-9520-db543cc19c46

Solution:

Here are the source github files which were used to identify the technical solution:

Solidity SC - https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/examples/token-create/TokenCreateContract.sol

JS test calling the SC function which sets a non-contract key - https://github.com/hashgraph/hedera-smart-contracts/blob/3aa15429b4bb1279381d99a687892d54acb3ea97/test/system-contracts/hedera-token-service/token-create/tokenCreateContract.js#L347

JS util which formats the key in the correct format - https://github.com/hashgraph/hedera-smart-contracts/blob/main/test/system-contracts/hedera-token-service/utils.js#L753

@jaycoolh
Copy link
Author

may also make sense to update current docs with a pointer / reference to the doc new content Jake is creating to get better coverage

@theekrystallee what do you think on this point? Do you think there are any locations in the current docs where a pointer to the stuff I am building out will be useful>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant