Skip to content

amanusk/starknet-selector-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starknet Selector Decoder

Description

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.

Example

use starknet_selector_decoder::get_selector;

let result =
   get_selector("0x0083afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e");
match result {
   Some(selector) => assert_eq!(selector, "transfer"),
   None => assert!(false),
}

License

Licensed under either of

at your option.

About

Lookup Starknet selectors from hash to string

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published