[−][src]Struct web3::contract::Contract
Ethereum Contract Interface
Implementations
impl<T: Transport> Contract<T>
[src]
pub async fn signed_call_with_confirmations<'_, '_>(
&'_ self,
func: &'_ str,
params: impl Tokenize,
options: Options,
confirmations: usize,
key: impl Key
) -> Result<TransactionReceipt>
[src]
&'_ self,
func: &'_ str,
params: impl Tokenize,
options: Options,
confirmations: usize,
key: impl Key
) -> Result<TransactionReceipt>
Execute a signed contract function and wait for confirmations
impl<T: Transport> Contract<T>
[src]
pub fn deploy(eth: Eth<T>, json: &[u8]) -> Result<Builder<T>>
[src]
Creates deployment builder for a contract given it's ABI in JSON.
pub fn deploy_from_truffle<S>(
eth: Eth<T>,
json: &[u8],
linker: HashMap<S, Address>
) -> Result<Builder<T>> where
S: AsRef<str> + Eq + Hash,
[src]
eth: Eth<T>,
json: &[u8],
linker: HashMap<S, Address>
) -> Result<Builder<T>> where
S: AsRef<str> + Eq + Hash,
test
impl<T: Transport> Contract<T>
[src]
pub fn new(eth: Eth<T>, address: Address, abi: Contract) -> Self
[src]
Creates new Contract Interface given blockchain address and ABI
pub fn from_json(eth: Eth<T>, address: Address, json: &[u8]) -> Result<Self>
[src]
Creates new Contract Interface given blockchain address and JSON containing ABI
pub fn abi(&self) -> &Contract
[src]
Get the underlying contract ABI.
pub fn address(&self) -> Address
[src]
Returns contract address
pub async fn call<P, '_, '_>(
&'_ self,
func: &'_ str,
params: P,
from: Address,
options: Options
) -> Result<H256> where
P: Tokenize,
[src]
&'_ self,
func: &'_ str,
params: P,
from: Address,
options: Options
) -> Result<H256> where
P: Tokenize,
Execute a contract function
pub async fn call_with_confirmations<'_, '_>(
&'_ self,
func: &'_ str,
params: impl Tokenize,
from: Address,
options: Options,
confirmations: usize
) -> Result<TransactionReceipt>
[src]
&'_ self,
func: &'_ str,
params: impl Tokenize,
from: Address,
options: Options,
confirmations: usize
) -> Result<TransactionReceipt>
Execute a contract function and wait for confirmations
pub async fn estimate_gas<P, '_, '_>(
&'_ self,
func: &'_ str,
params: P,
from: Address,
options: Options
) -> Result<U256> where
P: Tokenize,
[src]
&'_ self,
func: &'_ str,
params: P,
from: Address,
options: Options
) -> Result<U256> where
P: Tokenize,
Estimate gas required for this function call.
pub async fn query<R, A, B, P, '_, '_>(
&'_ self,
func: &'_ str,
params: P,
from: A,
options: Options,
block: B
) -> Result<R> where
R: Detokenize,
A: Into<Option<Address>>,
B: Into<Option<BlockId>>,
P: Tokenize,
[src]
&'_ self,
func: &'_ str,
params: P,
from: A,
options: Options,
block: B
) -> Result<R> where
R: Detokenize,
A: Into<Option<Address>>,
B: Into<Option<BlockId>>,
P: Tokenize,
Call constant function
pub async fn events<A, B, C, R, '_, '_>(
&'_ self,
event: &'_ str,
topic0: A,
topic1: B,
topic2: C
) -> Result<Vec<R>> where
A: Tokenize,
B: Tokenize,
C: Tokenize,
R: Detokenize,
[src]
&'_ self,
event: &'_ str,
topic0: A,
topic1: B,
topic2: C
) -> Result<Vec<R>> where
A: Tokenize,
B: Tokenize,
C: Tokenize,
R: Detokenize,
Find events matching the topics.
Trait Implementations
impl<T: Clone + Transport> Clone for Contract<T>
[src]
impl<T: Debug + Transport> Debug for Contract<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Contract<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Contract<T> where
T: Send,
T: Send,
impl<T> Sync for Contract<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Contract<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Contract<T> where
T: UnwindSafe,
T: UnwindSafe,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,