hashgraph / hashgraph/hedera-docs
Clearer guidance on setting and updating Token Keys inside of solidity
- Dominant language
- MDX
- Stars
- 10
- Forks
- 49
- Avg merge
- 19h 49m
- Merged PRs (30d)
- 17
Description
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:
- documentation which highlights this non-trivial implementation
- @jaycoolh is working on an example src code + documentation for this ref https://swirldslabs.monday.com/boards/7690803481/pulses/8314134492
- may also make sense to update current docs with a pointer / reference to the doc new content Jake is creating to get better coverage
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
Contributor guide
Assessment
This issue has not been assessed yet.