Struct ethers_core::abi::Contract [−][src]
pub struct Contract { pub constructor: Option<Constructor>, pub functions: HashMap<String, Vec<Function, Global>, RandomState>, pub events: HashMap<String, Vec<Event, Global>, RandomState>, pub receive: bool, pub fallback: bool, }
Expand description
API building calls to contracts ABI.
Fields
constructor: Option<Constructor>
Contract constructor.
functions: HashMap<String, Vec<Function, Global>, RandomState>
Contract functions.
events: HashMap<String, Vec<Event, Global>, RandomState>
Contract events, maps signature to event.
receive: bool
Contract has receive function.
fallback: bool
Contract has fallback function.
Implementations
Creates constructor call builder.
Get the function named name
, the first if there are overloaded
versions of the same function.
Get the contract event named name
, the first if there are multiple.
Get all contract events named name
.
Get all functions named name
.
Iterate over all functions of the contract in arbitrary order.
Trait Implementations
pub fn deserialize<D>(
deserializer: D
) -> Result<Contract, <D as Deserializer<'a>>::Error> where
D: Deserializer<'a>,
pub fn deserialize<D>(
deserializer: D
) -> Result<Contract, <D as Deserializer<'a>>::Error> where
D: Deserializer<'a>,
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
Auto Trait Implementations
impl RefUnwindSafe for Contract
impl UnwindSafe for Contract
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self