[][src]Module ethers_core::utils

Various utilities

Re-exports

pub use rlp;

Structs

CompiledContract

The result of a solc compilation

Ganache

Builder for launching ganache-cli.

GanacheInstance

A ganache CLI instance. Will close the instance when dropped.

Solc

Solidity Compiler Bindings

Constants

WEI_IN_ETHER

1 Ether = 1e18 Wei

Functions

format_ether

Format the output for the user which prefer to see values in ether (instead of wei)

format_units

Divides with the number of decimals

get_contract_address

The address for an Ethereum contract is deterministically computed from the address of its creator (sender) and how many transactions the creator has sent (nonce). The sender and nonce are RLP encoded and then hashed with Keccak-256.

get_create2_address

Returns the CREATE2 of a smart contract as specified in EIP1014

hash_message

Hash a message according to EIP-191.

id

Calculate the function selector as per the contract ABI specification. This is defined as the first 4 bytes of the Keccak256 hash of the function signature.

keccak256

Compute the Keccak-256 hash of input bytes.

parse_ether

Converts the input to a U256 and converts from Ether to Wei.

parse_units

Multiplies with the number of decimals

serialize

Serialize a type.