forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[coin.move] CoinMetadata getter functions (MystenLabs#6911)
- Currently, `CoinMetadata` can be accessed for off-chain consumption, however there is a class of use-cases where we would like to consume the metadata fields (decimals, name, symbol, etc.) on-chain. For example, a protocol might want to perform checks on the metadata corresponding to a `CoinType` on-chain, e.g. check that `decimals==8`. Currently this is impossible because the metadata fields are opaque. The following getters allow inspection of `CoinMetadata` fields.
- Loading branch information
Showing
4 changed files
with
174 additions
and
7 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
crates/sui-config/tests/snapshots/snapshot_tests__empty_genesis_snapshot_matches.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters