Struct web3::contract::Contract
[−]
[src]
pub struct Contract<T: Transport> { /* fields omitted */ }
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.
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
) -> CallResult<H256, T::Out> where
P: Tokenize,
[src]
&self,
func: &str,
params: P,
from: Address,
options: Options
) -> CallResult<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
) -> CallResult<U256, T::Out> where
P: Tokenize,
[src]
&self,
func: &str,
params: P,
from: Address,
options: Options
) -> CallResult<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