HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

Moduleweb3-ethereum-1.1.0.1Haskell2010

Network.Ethereum.Api.Types

Ethereum generic JSON-RPC types.

Synopsis
newtypenewtype Quantity

Should be viewed as type to representing QUANTITY in Web3 JSON RPC docs

When encoding QUANTITIES (integers, numbers): encode as hex, prefix with "0x", the most compact representation (slight exception: zero should be represented as "0x0"). Examples:

0x41 (65 in decimal) 0x400 (1024 in decimal) WRONG: 0x (should always have at least one digit - zero is "0x0") WRONG: 0x0400 (no leading zeroes allowed) WRONG: ff (must be prefixed 0x)

Instances12Enum, Eq, Integral, Num, Ord, Real, …
newtypenewtype Byte

Type representing a Byte in Web3 JSON RPC docs ("#componentsschemas/byte")

The encoding is similar to Quantity, encoding as hex string.

Constructors

Instances12Enum, Eq, Integral, Num, Ord, Real, …
  • Enum ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Eq ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Integral ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Num ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Ord ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Real ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Show ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • IsString ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • Generic ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • FromJSON ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • ToJSON ByteDefined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
  • type Rep Byte = D1 ('MetaData "Byte" "Network.Ethereum.Api.Types" "web3-ethereum-1.1.0.1-738WWo75PiF1Z3zfKtoo7x" 'True) (C1 ('MetaCons "Byte" 'PrefixI 'True) (S1 ('MetaSel ('Just "unByte") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))Defined in web3-ethereum-1.1.0.1 · Network.Ethereum.Api.Types
datadata SyncActive

An object with sync status data.

Constructors

Instances6Eq, Show, Generic, FromJSON, ToJSON, Rep
datadata SyncingState

Sync state pulled by low-level call eth_syncing.

Instances5Eq, Show, Generic, FromJSON, Rep
datadata Change

Changes pulled by low-level call eth_getFilterChanges, eth_getLogs, and eth_getFilterLogs

Constructors

Instances6Eq, Show, Generic, FromJSON, ToJSON, Rep
datadata Call

The contract call params.

Constructors

  • Call
    • callFrom :: !Maybe Address

      DATA, 20 Bytes - The address the transaction is send from.

    • callTo :: !Maybe Address

      DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.

    • callGas :: !Maybe Quantity

      QUANTITY - (optional, default: 3000000) Integer of the gas provided for the transaction execution. It will return unused gas.

    • callGasPrice :: !Maybe Quantity

      QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas.

    • callValue :: !Maybe Quantity

      QUANTITY - (optional) Integer of the value sent with this transaction.

    • callData :: !Maybe HexString

      DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.

    • callNonce :: !Maybe Quantity

      QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.

Instances7Eq, Show, Generic, FromJSON, ToJSON, Default, …
datadata DefaultBlock

The state of blockchain for contract call.

Instances6Eq, Ord, Show, Generic, ToJSON, Rep
datadata Filter e

Low-level event filter data structure.

Constructors

  • Filter
    • filterAddress :: !Maybe [Address]

      DATA|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.

    • filterFromBlock :: !DefaultBlock

      QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.

    • filterToBlock :: !DefaultBlock

      QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.

    • filterTopics :: !Maybe [Maybe HexString]

      Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options.

Instances14Eq, Show, Generic, ToJSON, Default, Rep, …
datadata TxReceipt

The Receipt of a Transaction

Constructors

Instances5Show, Generic, FromJSON, ToJSON, Rep
datadata Transaction

Transaction information.

Constructors

Instances6Eq, Show, Generic, FromJSON, ToJSON, Rep
datadata BlockT tx

Block information. It is parameterized by the type of transactions stored in the block because sometimes only TX hashes may be stored.

Constructors

Instances5Show, Generic, FromJSON, ToJSON, Rep
datadata FeeHistory

Fee History information

Constructors

Instances5Show, Generic, FromJSON, ToJSON, Rep