pub struct Interface {
pub abi: Abi,
pub methods: HashMap<H32, (String, usize)>,
pub events: HashMap<H256, (String, usize)>,
}
Expand description
Struct representing publicly accessible interface of a smart contract.
Fields§
§abi: Abi
The contract ABI
methods: HashMap<H32, (String, usize)>
A mapping from method signature to a name-index pair for accessing functions in the contract ABI. This is used to avoid allocation when searching for matching functions by signature.
events: HashMap<H256, (String, usize)>
A mapping from event signature to a name-index pair for resolving events in the contract ABI.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Interface
impl<'de> Deserialize<'de> for Interface
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Interface
Auto Trait Implementations§
impl Freeze for Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
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