Copyright | Alexander Krupenkin 2016-2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
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 {}
- data Block = Block {
- blockNumber :: !(Maybe Quantity)
- blockHash :: !(Maybe HexString)
- blockParentHash :: !HexString
- blockNonce :: !(Maybe HexString)
- blockSha3Uncles :: !HexString
- blockLogsBloom :: !(Maybe HexString)
- blockTransactionsRoot :: !HexString
- blockStateRoot :: !HexString
- blockReceiptRoot :: !(Maybe HexString)
- blockMiner :: !Address
- blockDifficulty :: !Quantity
- blockTotalDifficulty :: !Quantity
- blockExtraData :: !HexString
- blockSize :: !Quantity
- blockGasLimit :: !Quantity
- blockGasUsed :: !Quantity
- blockTimestamp :: !Quantity
- blockTransactions :: ![Transaction]
- 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
Enum Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
Eq Quantity Source # | |
Integral Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
Num Quantity Source # | |
Ord Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
Real Quantity Source # | |
Defined in Network.Ethereum.Api.Types toRational :: Quantity -> Rational # | |
Show Quantity Source # | |
IsString Quantity Source # | |
Defined in Network.Ethereum.Api.Types fromString :: String -> Quantity # | |
Generic Quantity Source # | |
ToJSON Quantity Source # | |
Defined in Network.Ethereum.Api.Types | |
FromJSON Quantity Source # | |
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
Block information.
Block | |
|