Crates.io | starknet-selector-decoder |
lib.rs | starknet-selector-decoder |
version | 0.1.4 |
source | src |
created_at | 2024-02-29 02:59:26.33636 |
updated_at | 2024-06-02 14:58:31.455704 |
description | Lookup Starknet selectors from hash to string |
homepage | |
repository | https://github.com/amanusk/starknet-selector-decoder |
max_upload_size | |
id | 1157299 |
size | 465,206 |
Simple tool to get the string value of a starknet selector hash. From readable string to hash is easy, just compute the hash, but if you only have the hash and want the string, it needs to be looked up.
The map is comrised of all selectors declared on Starknet mainnet and gets updated.
use starknet_selector_decoder::get_selector;
let result =
get_selector("0x0083afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e");
match result {
Some(selector) => assert_eq!(selector, "transfer"),
None => assert!(false),
}
Licensed under either of
at your option.