Crate ethers_contract[−][src]
Type-safe abstractions for interacting with Ethereum smart contracts
Interacting with a smart contract requires broadcasting carefully crafted
transactions where the data field contains
the function's
selector
along with the arguments of the called function. This module provides the
Contract and ContractFactory abstractions so that you do not have to worry about that.
It also provides typesafe bindings via the abigen macro and the Abigen builder.
Modules
| builders | This module exposes low lever builder structures which are only consumed by the type-safe ABI bindings generators. |
Macros
| abigen | abigenProc macro to generate type-safe bindings to a contract. This macro accepts
an Ethereum contract ABI or a path. Note that this path is rooted in
the crate's root |
Structs
| Abigen | abigenBuilder struct for generating type-safe bindings from a contract's ABI |
| BaseContract | A reduced form of |
| Contract | A Contract is an abstraction of an executable program on the Ethereum Blockchain. It has code (called byte code) as well as allocated long-term memory (called storage). Every deployed Contract has an address, which is used to connect to it so that it may be sent messages to call its methods. |
| ContractFactory | To deploy a contract to the Ethereum network, a |
| Multicall | A Multicall is an abstraction for sending batched calls/transactions to the Ethereum blockchain.
It stores an instance of the |
Enums
| AbiError | |
| ContractError | An Error which is thrown when interacting with a smart contract |
Functions
| decode_function_data | Helper for ABI decoding raw data based on a function's input or output. |
| encode_function_data | Helper for ABI encoding arguments for a specific function |