Struct ethabi::Contract [−][src]
API building calls to contracts ABI.
Fields
constructor: Option<Constructor>
Contract constructor.
functions: HashMap<String, Vec<Function>>
Contract functions.
events: HashMap<String, Vec<Event>>
Contract events, maps signature to event.
fallback: bool
Contract has fallback function.
Implementations
impl Contract
[src][−]
pub fn load<T: Read>(reader: T) -> Result<Self>
[src][−]
Loads contract from json.
pub fn constructor(&self) -> Option<&Constructor>
[src][−]
Creates constructor call builder.
pub fn function(&self, name: &str) -> Result<&Function>
[src][−]
Get the function named name
, the first if there are overloaded
versions of the same function.
pub fn event(&self, name: &str) -> Result<&Event>
[src][−]
Get the contract event named name
, the first if there are multiple.
pub fn events_by_name(&self, name: &str) -> Result<&Vec<Event>>
[src][−]
Get all contract events named name
.
pub fn functions_by_name(&self, name: &str) -> Result<&Vec<Function>>
[src][−]
Get all functions named name
.
pub fn functions(&self) -> Functions<'_>ⓘ
[src][−]
Iterate over all functions of the contract in arbitrary order.
pub fn events(&self) -> Events<'_>ⓘ
[src][−]
Iterate over all events of the contract in arbitrary order.
pub fn fallback(&self) -> bool
[src][−]
Returns true if contract has fallback
Trait Implementations
impl Clone for Contract
[src][+]
impl Debug for Contract
[src][+]
impl<'a> Deserialize<'a> for Contract
[src][+]
impl PartialEq<Contract> for Contract
[src][+]
impl StructuralPartialEq for Contract
[src]
Auto Trait Implementations
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,