Struct ethers::abi::Function [−]
pub struct Function {
pub name: String,
pub inputs: Vec<Param, Global>,
pub outputs: Vec<Param, Global>,
pub constant: bool,
pub state_mutability: StateMutability,
}
Expand description
Contract function specification.
Fields
name: String
Function name.
inputs: Vec<Param, Global>
Function input.
outputs: Vec<Param, Global>
Function output.
constant: bool
The constant attribute was removed in Solidity 0.5.0 and has been replaced with stateMutability. If parsing a JSON AST created with this version or later this value will always be false, which may be wrong.
Constant function.
state_mutability: StateMutability
Whether the function reads or modifies blockchain state
Implementations
impl Function
impl Function
Prepares ABI function call with given input params.
pub fn short_signature(&self) -> [u8; 4]
pub fn short_signature(&self) -> [u8; 4]
Return the 4 byte short signature of this function.
Parses the ABI function output to list of tokens.
Parses the ABI function input to a list of tokens.
Trait Implementations
impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Function, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Function, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Function
Auto Trait Implementations
impl RefUnwindSafe for Function
impl UnwindSafe for Function
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more