SelectorTrait
Fully qualified path: alexandria_evm::selector::SelectorTrait
pub trait SelectorTrait
Trait functions
compute_selector
Computes the EVM function selector (first 4 bytes of the Keccak-256 hash of a function signature).
Arguments
self- AByteArraycontaining the UTF-8 string of the function signature, e.g.,"transfer(address,uint256)".
Returns
felt252- The 4-byte (32-bit) selector represented as afelt252value.
Fully qualified path: alexandria_evm::selector::SelectorTrait::compute_selector
fn compute_selector(self: ByteArray) -> felt252