Module ethers_core::utils

source ·
Expand description

Various utilities

Re-exports§

Modules§

  • Moonbeam utils Moonbeam utilities

Structs§

  • AnvilNon-WebAssembly
    Builder for launching anvil.
  • AnvilInstanceNon-WebAssembly
    An anvil CLI instance. Will close the instance when dropped.
  • Represents a node’s chain configuration.
  • Consensus configuration for Clique.
  • Empty consensus configuration for proof-of-work networks.
  • GanacheNon-WebAssembly
    Builder for launching ganache-cli.
  • GanacheInstanceNon-WebAssembly
    A ganache CLI instance. Will close the instance when dropped.
  • This represents the chain configuration, specifying the genesis block, header fields, and hard fork switch blocks.
  • An account in the state of the genesis block.
  • GethNon-WebAssembly
    Builder for launching geth.
  • GethInstanceNon-WebAssembly
    A geth instance. Will close the instance when dropped.

Enums§

  • This enum holds the numeric types that a possible to be returned by parse_units and that are taken by format_units.
  • Common Ethereum unit types.

Constants§

Functions§

  • The default EIP-1559 fee estimator which is based on the work by MyCrypto
  • Returns a bytes32 string representation of text. If the length of text exceeds 32 bytes, an error is returned.
  • Format the output for the user which prefer to see values in ether (instead of wei)
  • Divides the provided amount with 10^{units} provided.
  • Converts a Bytes value into a H256, accepting inputs that are less than 32 bytes long. These inputs will be left padded with zeros.
  • Deserializes the input into an Option<HashMap<H256, H256>>, using from_unformatted_hex to deserialize the keys and values.
  • 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.
  • Returns the CREATE2 address of a smart contract as specified in EIP1014
  • Returns the CREATE2 address of a smart contract as specified in EIP1014, taking the pre-computed hash of the init code as input.
  • Hash a message according to EIP-191 (version 0x01).
  • 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.
  • Compute the Keccak-256 hash of input bytes.
  • Returns the decoded string represented by the bytes32 encoded data.
  • Parses an EIP-1191 checksum address.
  • Converts the input to a U256 and converts from Ether to Wei.
  • Multiplies the provided amount with 10^{units} provided.
  • Converts an public key, in compressed or uncompressed form to an Ethereum address
  • Convert a raw, uncompressed public key to an address.
  • Converts a K256 SigningKey to an Ethereum Address
  • Serialize a type.
  • Encodes an Ethereum address to its EIP-55 checksum.