Struct web30::client::Web3[][src]

pub struct Web3 { /* fields omitted */ }
Expand description

An instance of Web3Client.

Implementations

Returns the EIP155 chain ID used for transaction signing at the current best block. Null is returned if not available.

Sends a transaction which changes blockchain state. options takes a vector of SendTxOption for configuration unlike the lower level eth_send_transaction() this call builds the transaction abstracting away details like chain id, gas, and network id. WARNING: you must specify networkID in situations where a single node is operating no more than one chain. Otherwise it is possible for the full node to trick the client into signing transactions on unintended chains potentially to their benefit

Sends a transaction which does not change blockchain state, usually to get information. optionally this data can come from some historic block

Waits for a transaction with the given hash to be included in a block it will wait for at most timeout time and optionally can wait for n blocks to have passed

Checks if any given contract is approved to spend money from any given erc20 contract using any given address. What exactly this does can be hard to grok, essentially when you want contract A to be able to spend your erc20 contract funds you need to call ‘approve’ on the ERC20 contract with your own address and A’s address so that in the future when you call contract A it can manipulate your ERC20 balances. This function checks if that has already been done.

Approves a given contract to spend erc20 funds from the given address from the erc20 contract provided. What exactly this does can be hard to grok, essentially when you want contract A to be able to spend your erc20 contract funds you need to call ‘approve’ on the ERC20 contract with your own address and A’s address so that in the future when you call contract A it can manipulate your ERC20 balances. This function performs that action and waits for it to complete for up to Timeout duration options takes a vector of SendTxOption for configuration unlike the lower level eth_send_transaction() this call builds the transaction abstracting away details like chain id, gas, and network id.

Send an erc20 token to the target address, optionally wait until it enters the blockchain options takes a vector of SendTxOption for configuration unlike the lower level eth_send_transaction() this call builds the transaction abstracting away details like chain id, gas, and network id. WARNING: you must specify networkID in situations where a single node is operating no more than one chain. Otherwise it is possible for the full node to trick the client into signing transactions on unintended chains potentially to their benefit

Waits for a single event but instead of creating a filter and checking for changes this function waits for the provided wait time before checking if the event has occurred. This function will wait for at

Sets up an event filter, waits for a single event to happen, then removes the filter. Includes a local filter. If a captured event does not pass this filter, it is ignored. This differs from wait_for_event_alt in that it will check for filter changes every second and potentially exit earlier than the wait_for time provided by the user.

Checks for multiple events as defined by their signature strings over a block range. If no ending block is provided the latest will be used. This function will not wait for events to occur.

Checks for multiple events as defined by arbitrary user input over a block range. If no ending block is provided the latest will be used. This function will not wait for events to occur

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.