web3-ethereum-1.0.0.0: Ethereum support for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2021
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.Ethereum.Api.Types

Description

Ethereum generic JSON-RPC types.

Synopsis

Documentation

newtype Quantity Source #

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)

Constructors

Quantity 

Fields

Instances

Instances details
Enum Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Eq Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Integral Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Num Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Ord Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Real Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Show Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

IsString Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep Quantity :: Type -> Type #

Methods

from :: Quantity -> Rep Quantity x #

to :: Rep Quantity x -> Quantity #

ToJSON Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep Quantity Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep Quantity = D1 ('MetaData "Quantity" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'True) (C1 ('MetaCons "Quantity" 'PrefixI 'True) (S1 ('MetaSel ('Just "unQuantity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

data SyncActive Source #

An object with sync status data.

Constructors

SyncActive 

Fields

Instances

Instances details
Eq SyncActive Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Show SyncActive Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic SyncActive Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep SyncActive :: Type -> Type #

ToJSON SyncActive Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON SyncActive Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep SyncActive Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep SyncActive = D1 ('MetaData "SyncActive" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) (C1 ('MetaCons "SyncActive" 'PrefixI 'True) (S1 ('MetaSel ('Just "syncStartingBlock") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity) :*: (S1 ('MetaSel ('Just "syncCurrentBlock") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity) :*: S1 ('MetaSel ('Just "syncHighestBlock") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity))))

data SyncingState Source #

Sync state pulled by low-level call eth_syncing.

Instances

Instances details
Eq SyncingState Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Show SyncingState Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic SyncingState Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep SyncingState :: Type -> Type #

FromJSON SyncingState Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep SyncingState Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep SyncingState = D1 ('MetaData "SyncingState" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) (C1 ('MetaCons "Syncing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncActive)) :+: C1 ('MetaCons "NotSyncing" 'PrefixI 'False) (U1 :: Type -> Type))

data Change Source #

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

Constructors

Change 

Fields

Instances

Instances details
Eq Change Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

(==) :: Change -> Change -> Bool #

(/=) :: Change -> Change -> Bool #

Show Change Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic Change Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep Change :: Type -> Type #

Methods

from :: Change -> Rep Change x #

to :: Rep Change x -> Change #

ToJSON Change Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON Change Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep Change Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep Change = D1 ('MetaData "Change" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) (C1 ('MetaCons "Change" 'PrefixI 'True) (((S1 ('MetaSel ('Just "changeLogIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Quantity)) :*: S1 ('MetaSel ('Just "changeTransactionIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Quantity))) :*: (S1 ('MetaSel ('Just "changeTransactionHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString)) :*: S1 ('MetaSel ('Just "changeBlockHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString)))) :*: ((S1 ('MetaSel ('Just "changeBlockNumber") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Quantity)) :*: S1 ('MetaSel ('Just "changeAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Address)) :*: (S1 ('MetaSel ('Just "changeData") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "changeTopics") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [HexString])))))

data Call Source #

The contract call params.

Constructors

Call 

Fields

  • 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.

Instances

Instances details
Eq Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

(==) :: Call -> Call -> Bool #

(/=) :: Call -> Call -> Bool #

Show Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

showsPrec :: Int -> Call -> ShowS #

show :: Call -> String #

showList :: [Call] -> ShowS #

Generic Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep Call :: Type -> Type #

Methods

from :: Call -> Rep Call x #

to :: Rep Call x -> Call #

ToJSON Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Default Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

def :: Call #

type Rep Call Source # 
Instance details

Defined in Network.Ethereum.Api.Types

data DefaultBlock Source #

The state of blockchain for contract call.

Instances

Instances details
Eq DefaultBlock Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Ord DefaultBlock Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Show DefaultBlock Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic DefaultBlock Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep DefaultBlock :: Type -> Type #

ToJSON DefaultBlock Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep DefaultBlock Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep DefaultBlock = D1 ('MetaData "DefaultBlock" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) ((C1 ('MetaCons "BlockWithNumber" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quantity)) :+: C1 ('MetaCons "Earliest" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Latest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Pending" 'PrefixI 'False) (U1 :: Type -> Type)))

data Filter e Source #

Low-level event filter data structure.

Constructors

Filter 

Fields

  • 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.

Instances

Instances details
Eq (Filter e) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

(==) :: Filter e -> Filter e -> Bool #

(/=) :: Filter e -> Filter e -> Bool #

Show (Filter e) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

showsPrec :: Int -> Filter e -> ShowS #

show :: Filter e -> String #

showList :: [Filter e] -> ShowS #

Generic (Filter e) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep (Filter e) :: Type -> Type #

Methods

from :: Filter e -> Rep (Filter e) x #

to :: Rep (Filter e) x -> Filter e #

ToJSON (Filter e) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Default (Filter Transfer) Source # 
Instance details

Defined in Network.Ethereum.Ens.Registry

Methods

def :: Filter Transfer #

Default (Filter NewTTL) Source # 
Instance details

Defined in Network.Ethereum.Ens.Registry

Methods

def :: Filter NewTTL #

Default (Filter NewResolver) Source # 
Instance details

Defined in Network.Ethereum.Ens.Registry

Default (Filter NewOwner) Source # 
Instance details

Defined in Network.Ethereum.Ens.Registry

Methods

def :: Filter NewOwner #

Default (Filter PubkeyChanged) Source # 
Instance details

Defined in Network.Ethereum.Ens.PublicResolver

Default (Filter NameChanged) Source # 
Instance details

Defined in Network.Ethereum.Ens.PublicResolver

Default (Filter ContentChanged) Source # 
Instance details

Defined in Network.Ethereum.Ens.PublicResolver

Default (Filter AddrChanged) Source # 
Instance details

Defined in Network.Ethereum.Ens.PublicResolver

Default (Filter ABIChanged) Source # 
Instance details

Defined in Network.Ethereum.Ens.PublicResolver

type Rep (Filter e) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep (Filter e) = D1 ('MetaData "Filter" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) (C1 ('MetaCons "Filter" 'PrefixI 'True) ((S1 ('MetaSel ('Just "filterAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe [Address])) :*: S1 ('MetaSel ('Just "filterFromBlock") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DefaultBlock)) :*: (S1 ('MetaSel ('Just "filterToBlock") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DefaultBlock) :*: S1 ('MetaSel ('Just "filterTopics") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe [Maybe HexString])))))

data TxReceipt Source #

The Receipt of a Transaction

Constructors

TxReceipt 

Fields

Instances

Instances details
Show TxReceipt Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic TxReceipt Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep TxReceipt :: Type -> Type #

ToJSON TxReceipt Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON TxReceipt Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep TxReceipt Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep TxReceipt = D1 ('MetaData "TxReceipt" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) (C1 ('MetaCons "TxReceipt" 'PrefixI 'True) (((S1 ('MetaSel ('Just "receiptTransactionHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "receiptTransactionIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)) :*: (S1 ('MetaSel ('Just "receiptBlockHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString)) :*: (S1 ('MetaSel ('Just "receiptBlockNumber") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Quantity)) :*: S1 ('MetaSel ('Just "receiptCumulativeGasUsed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)))) :*: ((S1 ('MetaSel ('Just "receiptGasUsed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity) :*: S1 ('MetaSel ('Just "receiptContractAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Address))) :*: (S1 ('MetaSel ('Just "receiptLogs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Change]) :*: (S1 ('MetaSel ('Just "receiptLogsBloom") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "receiptStatus") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Quantity)))))))

data Transaction Source #

Transaction information.

Constructors

Transaction 

Fields

Instances

Instances details
Eq Transaction Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Show Transaction Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Generic Transaction Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep Transaction :: Type -> Type #

ToJSON Transaction Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON Transaction Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep Transaction Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Block = BlockT Transaction Source #

Block information with full transactions.

data BlockT tx Source #

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

Constructors

Block 

Fields

Instances

Instances details
Show tx => Show (BlockT tx) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Methods

showsPrec :: Int -> BlockT tx -> ShowS #

show :: BlockT tx -> String #

showList :: [BlockT tx] -> ShowS #

Generic (BlockT tx) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

Associated Types

type Rep (BlockT tx) :: Type -> Type #

Methods

from :: BlockT tx -> Rep (BlockT tx) x #

to :: Rep (BlockT tx) x -> BlockT tx #

ToJSON tx => ToJSON (BlockT tx) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

FromJSON tx => FromJSON (BlockT tx) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep (BlockT tx) Source # 
Instance details

Defined in Network.Ethereum.Api.Types

type Rep (BlockT tx) = D1 ('MetaData "BlockT" "Network.Ethereum.Api.Types" "web3-ethereum-1.0.0.0-HxuVhgnxVuK14o6C8AuVLE" 'False) (C1 ('MetaCons "Block" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "blockNumber") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Quantity)) :*: S1 ('MetaSel ('Just "blockHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString))) :*: (S1 ('MetaSel ('Just "blockParentHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "blockNonce") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString)))) :*: ((S1 ('MetaSel ('Just "blockSha3Uncles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "blockLogsBloom") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString))) :*: (S1 ('MetaSel ('Just "blockTransactionsRoot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: (S1 ('MetaSel ('Just "blockStateRoot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "blockReceiptsRoot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HexString)))))) :*: (((S1 ('MetaSel ('Just "blockMiner") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Address) :*: S1 ('MetaSel ('Just "blockDifficulty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)) :*: (S1 ('MetaSel ('Just "blockTotalDifficulty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity) :*: (S1 ('MetaSel ('Just "blockExtraData") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HexString) :*: S1 ('MetaSel ('Just "blockSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)))) :*: ((S1 ('MetaSel ('Just "blockGasLimit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity) :*: S1 ('MetaSel ('Just "blockGasUsed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity)) :*: (S1 ('MetaSel ('Just "blockTimestamp") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Quantity) :*: (S1 ('MetaSel ('Just "blockTransactions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [tx]) :*: S1 ('MetaSel ('Just "blockUncles") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [HexString])))))))