selector

Macro selector 

Source
selector!() { /* proc-macro */ }
Expand description

Computes the first four bytes of the Keccak-256 hash of the provided string literal at compile time.

ยงExamples

use ethp::selector;
use hex_literal::hex;

assert_eq!(selector!("transfer(address,uint256)"), hex!("a9059cbb"));