[−][src]Struct web3_etz::contract::Contract
Ethereum Contract Interface
Methods
impl<T: Transport> Contract<T>
[src]
pub fn deploy(eth: Eth<T>, json: &[u8]) -> Result<Builder<T>, Error>
[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>, Error> where
S: AsRef<str> + Eq + Hash,
[src]
eth: Eth<T>,
json: &[u8],
linker: HashMap<S, Address>
) -> Result<Builder<T>, Error> 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, Error>
[src]
eth: Eth<T>,
address: Address,
json: &[u8]
) -> Result<Self, Error>
Creates new Contract Interface given blockchain address and JSON containing ABI
pub fn address(&self) -> Address
[src]
Returns contract address
pub fn call<P>(
&self,
func: &str,
params: P,
from: Address,
options: Options
) -> CallFuture<H256, T::Out> where
P: Tokenize,
[src]
&self,
func: &str,
params: P,
from: Address,
options: Options
) -> CallFuture<H256, T::Out> where
P: Tokenize,
Execute a contract function
pub fn call_with_confirmations<P>(
&self,
func: &str,
params: P,
from: Address,
options: Options,
confirmations: usize
) -> SendTransactionWithConfirmation<T> where
P: Tokenize,
[src]
&self,
func: &str,
params: P,
from: Address,
options: Options,
confirmations: usize
) -> SendTransactionWithConfirmation<T> where
P: Tokenize,
Execute a contract function and wait for confirmations
pub fn estimate_gas<P>(
&self,
func: &str,
params: P,
from: Address,
options: Options
) -> CallFuture<U256, T::Out> where
P: Tokenize,
[src]
&self,
func: &str,
params: P,
from: Address,
options: Options
) -> CallFuture<U256, T::Out> where
P: Tokenize,
Estimate gas required for this function call.
pub fn query<R, A, B, P>(
&self,
func: &str,
params: P,
from: A,
options: Options,
block: B
) -> QueryResult<R, T::Out> where
R: Detokenize,
A: Into<Option<Address>>,
B: Into<Option<BlockNumber>>,
P: Tokenize,
[src]
&self,
func: &str,
params: P,
from: A,
options: Options,
block: B
) -> QueryResult<R, T::Out> where
R: Detokenize,
A: Into<Option<Address>>,
B: Into<Option<BlockNumber>>,
P: Tokenize,
Call constant function
Trait Implementations
impl<T: Clone + Transport> Clone for Contract<T>
[src]
fn clone(&self) -> Contract<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug + Transport> Debug for Contract<T>
[src]
Auto Trait Implementations
impl<T> Sync for Contract<T> where
T: Sync,
T: Sync,
impl<T> Send for Contract<T> where
T: Send,
T: Send,
impl<T> Unpin for Contract<T> where
T: Unpin,
T: Unpin,
impl<T> RefUnwindSafe for Contract<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for Contract<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,