Copyright | Aleksandr Krupenkin 2016-2024 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Ethereum generic JSON-RPC types.
Synopsis
- newtype Quantity = Quantity {}
- data SyncActive = SyncActive {}
- data SyncingState
- data Change = Change {
- changeLogIndex :: !(Maybe Quantity)
- changeTransactionIndex :: !(Maybe Quantity)
- changeTransactionHash :: !(Maybe HexString)
- changeBlockHash :: !(Maybe HexString)
- changeBlockNumber :: !(Maybe Quantity)
- changeAddress :: !Address
- changeData :: !HexString
- changeTopics :: ![HexString]
- data Call = Call {}
- data DefaultBlock
- data Filter e = Filter {
- filterAddress :: !(Maybe [Address])
- filterFromBlock :: !DefaultBlock
- filterToBlock :: !DefaultBlock
- filterTopics :: !(Maybe [Maybe HexString])
- data TxReceipt = TxReceipt {
- receiptTransactionHash :: !HexString
- receiptTransactionIndex :: !Quantity
- receiptBlockHash :: !(Maybe HexString)
- receiptBlockNumber :: !(Maybe Quantity)
- receiptCumulativeGasUsed :: !Quantity
- receiptGasUsed :: !Quantity
- receiptContractAddress :: !(Maybe Address)
- receiptLogs :: ![Change]
- receiptLogsBloom :: !HexString
- receiptStatus :: !(Maybe Quantity)
- data Transaction = Transaction {}
- type Block = BlockT Transaction
- data BlockT tx = Block {
- blockNumber :: !(Maybe Quantity)
- blockHash :: !(Maybe HexString)
- blockParentHash :: !HexString
- blockNonce :: !(Maybe HexString)
- blockSha3Uncles :: !HexString
- blockLogsBloom :: !(Maybe HexString)
- blockTransactionsRoot :: !HexString
- blockStateRoot :: !HexString
- blockReceiptsRoot :: !(Maybe HexString)
- blockMiner :: !Address
- blockDifficulty :: !Quantity
- blockTotalDifficulty :: !Quantity
- blockExtraData :: !HexString
- blockSize :: !Quantity
- blockGasLimit :: !Quantity
- blockGasUsed :: !Quantity
- blockTimestamp :: !Quantity
- blockTransactions :: ![tx]
- blockUncles :: ![HexString]
Documentation
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)
Instances
FromJSON Quantity Source # | |
ToJSON Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
IsString Quantity Source # | |
Defined in Network.Ethereum.Api.Types fromString :: String -> Quantity # | |
Enum Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
Generic Quantity Source # | |
Num Quantity Source # | |
Integral Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
Real Quantity Source # | |
Defined in Network.Ethereum.Api.Types toRational :: Quantity -> Rational # | |
Show Quantity Source # | |
Eq Quantity Source # | |
Ord Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
type Rep Quantity Source # | |
Defined in Network.Ethereum.Api.Types |
data SyncActive Source #
An object with sync status data.
SyncActive | |
|
Instances
data SyncingState Source #
Sync state pulled by low-level call eth_syncing
.
Instances
Changes pulled by low-level call eth_getFilterChanges
, eth_getLogs
,
and eth_getFilterLogs
Change | |
|
Instances
The contract call params.
Call | |
|
Instances
data DefaultBlock Source #
The state of blockchain for contract call.
Instances
Low-level event filter data structure.
Filter | |
|
Instances
The Receipt of a Transaction
TxReceipt | |
|
Instances
data Transaction Source #
Transaction information.
Transaction | |
|
Instances
type Block = BlockT Transaction Source #
Block information with full transactions.
Block information. It is parameterized by the type of transactions stored in the block because sometimes only TX hashes may be stored.
Block | |
|