pub struct EvmFunction {
pub name: String,
pub selector: [u8; 4],
pub signature: String,
pub blocks: Vec<EvmBasicBlock>,
pub is_payable: bool,
pub is_view: bool,
}Expand description
An EVM function / entry point within a contract.
Each function has a 4-byte ABI selector and a sequence of basic blocks.
Fields§
§name: StringHuman-readable name of the function.
selector: [u8; 4]4-byte function selector (first 4 bytes of keccak256(signature)).
signature: StringABI signature string, e.g. "transfer(address,uint256)".
blocks: Vec<EvmBasicBlock>Basic blocks forming the function body.
is_payable: boolWhether this function is payable.
is_view: boolWhether this function is a view (does not modify state).
Implementations§
Trait Implementations§
Source§impl Clone for EvmFunction
impl Clone for EvmFunction
Source§fn clone(&self) -> EvmFunction
fn clone(&self) -> EvmFunction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EvmFunction
impl RefUnwindSafe for EvmFunction
impl Send for EvmFunction
impl Sync for EvmFunction
impl Unpin for EvmFunction
impl UnsafeUnpin for EvmFunction
impl UnwindSafe for EvmFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more