This section lists the Axon JSON-RPC API endpoints.
Axon JSON-RPC allow you to interact with a local or remote axon node using HTTP, IPC or WebSocket.
- Axon JSON-RPC Protocols
- JSONRPC Deprecation Process
- Table of Contents
- RPC Methods
- Gossip-Methods
- History-Methods
- Method
eth_getBlockByHash
- Method
eth_getTransactionByHash
- Method
eth_getBlockTransactionCountByNumber
- Method
eth_getTransactionReceipt
- Method
eth_feeHistory
- Method
eth_getBlockTransactionCountByHash
- Method
eth_getTransactionByBlockHashAndIndex
- Method
eth_getTransactionByBlockNumberAndIndex
- Method
eth_getBlockByNumber
- Method
- State-Methods
- Method
eth_getTransactionCount
- Method
eth_getBalance
- Method
eth_chainId
- Method
net_version
- Method
eth_call
- Method
eth_estimateGas
- Method
eth_getCode
- Method
eth_gasPrice
- Method
net_listening
- Method
eth_mining
- Method
net_peerCount
- Method
eth_syncing
- Method
eth_getLogs
- Method
web3_clientVersion
- Method
eth_accounts
- Method
web3_sha3
- Method
eth_getStorageAt
- Method
eth_coinbase
- Method
eth_hashrate
- Method
axon_getCurrentMetadata
- Method
axon_getHardforkInfo
- Method
- RPC Types
- Type
Web3Filter
- Type
Web3Log
- Type
Web3SyncStatus
- Type
Web3CallRequest
- Type
AccessList
- Type
AccessListItem
- Type
BlockView
- Type
Web3FeeHistory
- Type
Web3Receipt
- Type
Web3ReceiptLog
- Type
BlockId
- Type
H256
- Type
H160
- Type
Hex
- Type
Hash
- Type
String
- Type
bool
- Type
f64
- Type
Bloom
- Type
U64
- Type
U256
- Type
TransactionView
- Type
These methods track the head of the chain. This is how transactions make their way around the network, find their way into blocks, and how clients find out about new blocks.
Submits a pre-signed transaction for broadcast to the Axon network.
data
- The signed transaction data.
TRANSACTION HASH - 32 Bytes - the transaction hash.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
]
}
Response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
eth_blockNumber()
- result:
U256
Returns the current "latest" block number.
- None
BLOCK NUMBER - a hex code of an integer representing the current block number the client is on.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x3466",
"id": 2
}
Used for submitting a proof-of-work solution. Since the axon does not use it, so returns true forever.
nc
- 8 Bytes - The nonce found (64 bits)hash
- 32 Bytes - The header's pow-hash (256 bits)summary
- 32 Bytes - The mix digest (256 bits)
Boolean - returns true if the provided solution is valid, otherwise false.Since the axon does not use it, so return true forever.
Request
{
"jsonrpc": "2.0",
"method": "eth_submitWork",
"params": [
"0x0000000000000001",
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"
],
"id": 64
}
Response
{
"id":64,
"jsonrpc":"2.0",
"result": true
}
Used for submitting mining hashrate. This method always returns true.
hash_rate
- Hashrate, a hexadecimal string representation (32 bytes) of the hash rateclient_id
- ID, String - A random hexadecimal(32 bytes) ID identifying the client
Boolean - returns true if submitting went through successfully and false otherwise.
Request
{
"jsonrpc": "2.0",
"method": "eth_submitHashrate",
"params": [
"0x0000000000000000000000000000000000000000000000000000000000500000", "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"
],
"id": 64
}
Response
{
"id":64,
"jsonrpc":"2.0",
"result": true
}
Fetches historical records of every block back to genesis. This is like one large append-only file, and includes all block headers, block bodies, uncle blocks, and transaction receipts.
Returns information about a block by hash.
block_hash
- DATA, 32 Bytes - Hash of a block.show_rich_tx
- Boolean, If true it returns the full transaction objects, if false only the hashes of the transactions.
The RPC returns the block details by block hash.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
true
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"hash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"parentHash": "0xd619791daa02617ae2825a4ad7f2eb1379a069ac7b96b1628e75e1e654d5163c",
"sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
"author": "0xf4cc1652dcec2e5de9ce6fb1b6f9fa9456e957f1",
"miner": "0xf4cc1652dcec2e5de9ce6fb1b6f9fa9456e957f1",
"stateRoot": "0xbd8e37758ba2c1d73f0c1dc3ea255f5b7c037f0e8e1ee9feb012461d58be236d",
"transactionsRoot": "0x30fe4f21201c335b4501d517872d4d26bec39d350f987ee94e46e27bf7c48aae",
"receiptsRoot": "0x77f8178b9f5a0e4aa59ee10d3d96cacfd0d6137fd3728cc01b5e5d6d74f6813f",
"number": "0x1b4",
"gasUsed": "0xc665442",
"gasLimit": "0x1c9c380",
"extraData": "0x",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x62e00014",
"difficulty": "0x1",
"totalDifficulty": null,
"sealFields": [],
"baseFeePerGas": "0x539",
"uncles": [],
"transactions": [{
"type": "0x2",
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"hash": "0xde3e1e12fb3f1a5b6ca32f580f0e7f170195f7a5233eb7d7095c53d7f5c519f5",
"nonce": "0x2",
"transactionIndex": "0x1b71",
"from": "0x92df69a492c93d22c90247434b8d80944daa38fa",
"to": "0xef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca",
"value": "0x0",
"gas": "0x0",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x539",
"maxPriorityFeePerGas": "0x77359400",
"raw": "0x02f8af05028477359400847735940082ea6094ef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca80b844a9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000c080a07bf93b22eb0b40a85d0f8044d1b0201750ee1d8c27d558ae683509b13d8282e6a033e17c1e2b01fed2d742a37704530cd902754d726b96d41e24b5adc7be4dcdd3",
"input": "0xa9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000",
"publicKey": "0x1113b46c2c52050fb9fd29cf88d4a9f8d253e17515dc142f72d8bb2cd18fdb3e45098e11811bcdd1487bafb7b24bf35c174cf6ede558059e23ad60d355f97070",
"accessList": [],
"chainId": "0x5",
"v": "0x0",
"r": "0x7bf93b22eb0b40a85d0f8044d1b0201750ee1d8c27d558ae683509b13d8282e6",
"s": "0x33e17c1e2b01fed2d742a37704530cd902754d726b96d41e24b5adc7be4dcdd3"
}],
"size": "0x28f",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0"
},
"id": 2
}
eth_getTransactionByHash(blockHash)
blockHash
:H256
- result:
TransactionView
Returns the information about a transaction requested by transaction hash.
blockHash
- Hash of a transaction.
Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
- blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
- from: DATA, 20 Bytes - address of the sender.
- gas: QUANTITY - gas provided by the sender.
- gasPrice: QUANTITY - gas price provided by the sender in Wei.
- hash: DATA, 32 Bytes - hash of the transaction.
- input: DATA - the data send along with the transaction.
- nonce: QUANTITY - the number of transactions made by the sender prior to this one.
- to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: QUANTITY - ECDSA signature r
- s: QUANTITY - ECDSA signature s
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65"
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"hash": "0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65",
"nonce": "0x1",
"transactionIndex": "0x1b70",
"from": "0x92df69a492c93d22c90247434b8d80944daa38fa",
"to": "0xef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca",
"value": "0x0",
"gas": "0x73a9",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x539",
"maxPriorityFeePerGas": "0x77359400",
"raw": "0x02f8af05018477359400847735940082ea6094ef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca80b844a9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000c080a0fa9bc76185d06c6e3178c66c40c195f374e80a78179392a84c1db731ce4d2d3da06079373330aa2c6d420267d83d8cd685db20638c7935f02a26fdf99dd010bfa2",
"input": "0xa9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000",
"publicKey": "0x1113b46c2c52050fb9fd29cf88d4a9f8d253e17515dc142f72d8bb2cd18fdb3e45098e11811bcdd1487bafb7b24bf35c174cf6ede558059e23ad60d456798989",
"accessList": [],
"chainId": "0x5",
"v": "0x0",
"r": "0xfa9bc76185d06c6e3178c66c40c195f374e80a78179392a84c1db731ce4d2d3d",
"s": "0x6079373330aa2c6d420267d83d8cd685db20638c7935f02a26fdf99dd010bfa2"
},
"id": 2
}
Returns the number of transactions in a block matching the given block number.
number
- A block number.
Integer of the number of transactions in this block.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": [
"0xe90"
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x1bb6",
"id": 2
}
eth_getTransactionReceipt(hash)
hash
:H256
- result:
Web3Receipt
Returns the receipt of a transaction by transaction hash.
Note: That the receipt is not available for pending transactions.
hash
- 32 Bytes - hash of a transaction.
- Object - A transaction receipt object, or null when no receipt was found.
- transactionHash : DATA, 32 Bytes - hash of the transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block.
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in.
- blockNumber: QUANTITY - block number where this transaction was in.
- from: DATA, 20 Bytes - address of the sender.
- to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
- cumulativeGasUsed : QUANTITY - The total amount of gas used when this transaction was executed in the block.
- gasUsed : QUANTITY - The amount of gas used by this specific transaction alone.
- contractAddress : DATA, 20 Bytes - The contract address created, if the transaction was a * contract creation, otherwise null.
- logs: Array - Array of log objects, which this transaction generated.
- logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. It also returns either :
- root : DATA 32 bytes of post-transaction stateroot (pre Byzantium)
- status: QUANTITY either 1 (success) or 0 (failure)
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65"
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"contractAddress": null,
"cumulativeGasUsed": "0x73a9",
"effectiveGasPrice": "0x73a9",
"from": "0x92df69a492c93d22c90247434b8d80944daa38fa",
"gasUsed": "0x73a9",
"logs": [{
"address": "0xef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x00000000000000000000000092df69a492c93d22c90247434b8d80944daa38fa", "0x0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e8915"],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"transactionHash": "0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65",
"transactionIndex": "0x1b70",
"logIndex": "0x0",
"removed": false
}],
"logsBloom": "0x20000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000002008000000000000000000000000000000002000000000000000008000000000000000000040000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000",
"root": "0xbd8e37758ba2c1d73f0c1dc3ea255f5b7c037f0e8e1ee9feb012461d58be236d",
"status": "0x1",
"to": "0xef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca",
"transactionHash": "0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65",
"transactionIndex": "0x1b70",
"type": "0x2"
},
"id": 2
}
eth_feeHistory(block_count,newest_block,reward_percentiles)
- result:
Web3FeeHistory
Returns base fee per gas and transaction effective priority fee per gas history for the requested block range if available. The range between headBlock-4 and headBlock is guaranteed to be available while retrieving data from the pending block and older history are optional to support. For pre-EIP-1559 blocks, the gas prices are returned as rewards and zeroes are returned for the base fee per gas. blockCount and newestBlock are both required parameters
block_count
- 256-bit unsigned integer.newest_block
- A block number.reward_percentiles
- (optional) A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used.
- oldestBlock - Lowest number block of the returned range expressed as a hexidecimal number.
- baseFeePerGas - An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
- gasUsedRatio - An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.
- reward - An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": [
"0x1",
"latest"
[20, 30],
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"oldestBlock": "0x0",
"baseFeePerGas": ["0x539","0x539"],
"gasUsedRatio": [0.0],
"reward": [["0x0"]]
},
"id": 2
}
Returns the number of transactions in a block from a block matching the given block hash.
hash
- 32 Bytes - hash of a block
Integer of the number of transactions in this block.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": [
"0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65"
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x1b72",
"id": 2
}
eth_getTransactionByBlockHashAndIndex(hash,position)
- result:
TransactionView
Returns information about a transaction by block hash and transaction index position.
hash
- 32 Bytes - hash of a blockposition
- integer of the transaction index position.
- Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
- blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
- from: DATA, 20 Bytes - address of the sender.
- gas: QUANTITY - gas provided by the sender.
- gasPrice: QUANTITY - gas price provided by the sender in Wei.
- hash: DATA, 32 Bytes - hash of the transaction.
- input: DATA - the data send along with the transaction.
- nonce: QUANTITY - the number of transactions made by the sender prior to this one.
- to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: QUANTITY - ECDSA signature r
- s: QUANTITY - ECDSA signature s
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": [
"0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65",
"0x8"
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"hash": "0x0f7c17ba06dcb8106dd6956bfdb131cd48cfeaf2dfa21b4f16384d0a872441a2",
"nonce": "0x8",
"transactionIndex": "0x8",
"from": "0xae32a32bdad774608ab473d7ca1993e9921b6a7a",
"to": "0x057ef64e23666f000b34ae31332854acbd1c8544",
"value": "0x0",
"gas": "0x73a9",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x539",
"maxPriorityFeePerGas": "0x77359400",
"raw": "0x02f8af05088477359400847735940082ea6094057ef64e23666f000b34ae31332854acbd1c854480b844a9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000c080a0bd71f0ff2689b002dd58512713d91321266f23dcb0900e2b20f33e2be2222627a051f87230181b70d4736f907defbe505b2a3048e50113881c2254814c3f4ccb47",
"input": "0xa9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000",
"publicKey": "0x5651add842f3f79235ca3958f6fafa300d9c54b0632d9bbfb5d8eb926caabdf08a78e3492537223efb295324aae4080348c86bffaa4235867f10766f12345678",
"accessList": [],
"chainId": "0x5",
"v": "0x0",
"r": "0xbd71f0ff2689b002dd58512713d91321266f23dcb0900e2b20f33e2be2222627",
"s": "0x51f87230181b70d4736f907defbe505b2a3048e50113881c2254814c3f4ccb47"
},
"id": 2
}
eth_getTransactionByBlockNumberAndIndex(number,position)
- result:
TransactionView
Returns information about a transaction by block number and transaction index position.
number
- A block number.position
- integer of the transaction index position.
- Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
- blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
- from: DATA, 20 Bytes - address of the sender.
- gas: QUANTITY - gas provided by the sender.
- gasPrice: QUANTITY - gas price provided by the sender in Wei.
- hash: DATA, 32 Bytes - hash of the transaction.
- input: DATA - the data send along with the transaction.
- nonce: QUANTITY - the number of transactions made by the sender prior to this one.
- to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
- transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: QUANTITY - ECDSA signature r
- s: QUANTITY - ECDSA signature s
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": [
"0xb14",
"0x8"
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"blockNumber": "0xb14",
"blockHash": "0xcaca33a66b32c99d157af1a9f1940c878e37dab6a95c0496a44852c91218658a",
"hash": "0x401ee5194c6628800c3437618fe47645d065fae5dcf43c540ebe7d76aa7d4be0",
"nonce": "0x123",
"transactionIndex": "0x8",
"from": "0x12247217ada7661c30a92425b62c756f54bfb5fc",
"to": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
"value": "0x0",
"gas": "0x73a9",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x539",
"maxPriorityFeePerGas": "0x77359400",
"raw": "0x02f8b1058201238477359400847735940082ea60945fbdb2315678afecb367f032d93f642f64180aa380b844a9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000c080a0df97bdb5395f8a6a78133ea75b2dfa1fe0edd54710efe1af5766478b472b2719a036d810b450963968711e03c7b7032a1ca9d4cd5f507dbcd6a5299ab46042871d",
"input": "0xa9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000",
"publicKey": "0x5d29609b19fc299039853e319d7be4a153c4c464beca159bef943bef4d50c6fc1180058d25a56d824a32725040d394bb4251c935e834ae2bc7174361fff4dc86",
"accessList": [],
"chainId": "0x5",
"v": "0x0",
"r": "0xdf97bdb5395f8a6a78133ea75b2dfa1fe0edd54710efe1af5766478b472b2719",
"s": "0x36d810b450963968711e03c7b7032a1ca9d4cd5f507dbcd6a5299ab46042871d"
},
"id": 2
}
eth_getBlockByNumber(number,show_rich_tx)
- result:
BlockView
Returns information about a block by block number.
number
- A block number.show_rich_tx
- Boolean,If true it returns the full transaction objects, if false only the hashes of the transactions.
The RPC returns the block details.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"0x1b4",
true
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"hash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"parentHash": "0xd619791daa02617ae2825a4ad7f2eb1379a069ac7b96b1628e75e1e654d5163c",
"sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
"author": "0xf4cc1652dcec2e5de9ce6fb1b6f9fa9456e957f1",
"miner": "0xf4cc1652dcec2e5de9ce6fb1b6f9fa9456e957f1",
"stateRoot": "0xbd8e37758ba2c1d73f0c1dc3ea255f5b7c037f0e8e1ee9feb012461d58be236d",
"transactionsRoot": "0x30fe4f21201c335b4501d517872d4d26bec39d350f987ee94e46e27bf7c48aae",
"receiptsRoot": "0x77f8178b9f5a0e4aa59ee10d3d96cacfd0d6137fd3728cc01b5e5d6d74f6813f",
"number": "0x1b4",
"gasUsed": "0xc665442",
"gasLimit": "0x1c9c380",
"extraData": "0x",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x62e00014",
"difficulty": "0x1",
"totalDifficulty": null,
"sealFields": [],
"baseFeePerGas": "0x539",
"uncles": [],
"transactions": [{
"type": "0x2",
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"hash": "0xde3e1e12fb3f1a5b6ca32f580f0e7f170195f7a5233eb7d7095c53d7f5c519f5",
"nonce": "0x2",
"transactionIndex": "0x1b71",
"from": "0x92df69a492c93d22c90247434b8d80944daa38fa",
"to": "0xef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca",
"value": "0x0",
"gas": "0x0",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x539",
"maxPriorityFeePerGas": "0x77359400",
"raw": "0x02f8af05028477359400847735940082ea6094ef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca80b844a9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000c080a07bf93b22eb0b40a85d0f8044d1b0201750ee1d8c27d558ae683509b13d8282e6a033e17c1e2b01fed2d742a37704530cd902754d726b96d41e24b5adc7be4dcdd3",
"input": "0xa9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000",
"publicKey": "0x1113b46c2c52050fb9fd29cf88d4a9f8d253e17515dc142f72d8bb2cd18fdb3e45098e11811bcdd1487bafb7b24bf35c174cf6ede558059e23ad60d355f97070",
"accessList": [],
"chainId": "0x5",
"v": "0x0",
"r": "0x7bf93b22eb0b40a85d0f8044d1b0201750ee1d8c27d558ae683509b13d8282e6",
"s": "0x33e17c1e2b01fed2d742a37704530cd902754d726b96d41e24b5adc7be4dcdd3"
}],
"size": "0x28f",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0"
},
"id": 2
}
Methods that report the current state of all the data stored. The "state" is like one big shared piece of RAM, and includes account balances, contract data, and gas estimations.
Returns the number of transactions sent from an address.
address
- 20 Bytes - address.number
- Integer block number
integer of the number of transactions send from this address.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0x92df69a492c93d22c90247434b8d80944daa38fa"
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x12c",
"id": 2
}
Returns the balance of the account of given address.
address
- 20 Bytes - address to check for balance.block_number
- A block number.
Integer of the current balance in wei.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x92df69a492c93d22c90247434b8d80944daa38fa"
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x8459515c8443cde72e000",
"id": 2
}
eth_chainId()
- result:
U256
Returns the chain_id of axon network.
- None
Current chain id.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x5",
"id": 2
}
net_version()
- result:
U256
Returns the current network id.
- None
String - The current network id.
Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "net_version",
"params": [
]
}
Response
{
"jsonrpc": "2.0",
"result": "0x5",
"id": 2
}
eth_call(req,number)
req
:Web3CallRequest
number
:BlockId
- result:
Hex
Executes a new message call immediately without creating a transaction on the block chain.
-
req
- The transaction call object- from: DATA, 20 Bytes - (optional) The address the transaction is sent from.
- to: DATA, 20 Bytes - The address the transaction is directed to.
- gas: QUANTITY - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
- gasPrice: QUANTITY - (optional) Integer of the gasPrice used for each paid gas
- value: QUANTITY - (optional) Integer of the value sent with this transaction
- data: DATA - (optional) Hash of the method signature and encoded parameters.
-
number
- A block number.
DATA - the return value of executed contract.
Request
{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{
see above
}],
"id": 1
}
Response
{
"id":1,
"jsonrpc": "2.0",
"result": "0x"
}
eth_estimateGas(req,number)
req
:Web3CallRequest
number
:BlockId
- result:
U256
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
-
req
- The transaction call object. Expect all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.- from: DATA, 20 Bytes - (optional) The address the transaction is sent from.
- to: DATA, 20 Bytes - The address the transaction is directed to.
- gas: QUANTITY - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
- gasPrice: QUANTITY - (optional) Integer of the gasPrice used for each paid gas
- value: QUANTITY - (optional) Integer of the value sent with this transaction
- data: DATA - (optional) Hash of the method signature and encoded parameters.
-
number
- A block number.
The amount of gas used.
Request
{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{
see above
}],
"id": 1
}
Response
{
"id":1,
"jsonrpc": "2.0",
"result": "0x5208" // 21000
}
Returns code at a given address.
address
- DATA, 20 Bytes - address.block_number
-A block number.
The code from the given address.
Request
{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [{
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2",
}],
"id": 1
}
Response
{
"id":1,
"jsonrpc": "2.0",
"result": "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
}
-
eth_gasPrice()
-
result:
U256
Returns the current price per gas in wei.
- None
Integer of the current gas price in wei.
Request
{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 2
}
Response
{
"jsonrpc": "2.0",
"result": "0x8",
"id": 2
}
-
net_listening()
-
result:
bool
Returns true if client is actively listening for network connections. Always return true in Axon network.
- None
Boolean - true when listening, otherwise false.
Request
{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 2
}
Response
{
"jsonrpc": "2.0",
"result": true,
"id": 2
}
-
eth_mining()
-
result:
bool
Returns true if client is actively mining new blocks.
Note: Always return false in Axon network.
- None
Boolean - returns true of the client is mining, otherwise false. Always return false in Axon network.
Request
{
"jsonrpc": "2.0",
"method": "eth_mining",
"params": [],
"id": 2
}
Response
{
"jsonrpc": "2.0",
"result": false,
"id": 2
}
-
net_peerCount()
-
result:
U256
Returns number of peers currently connected to the client.
- None
Integer of the number of connected peers.
Request
{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 2
}
Response
{
"jsonrpc": "2.0",
"result": "0x7",
"id": 2
}
-
eth_syncing()
-
result:
Web3SyncStatus
|
false
Returns an object with data about the sync status or false.
- None
- Object|Boolean, An object with sync status data or FALSE, when not syncing:
- startingBlock: QUANTITY - The block at which the import started (will only be reset, after the sync reached his head)
- currentBlock: QUANTITY - The current block, same as eth_blockNumber
- highestBlock: QUANTITY - The estimated highest block
Request
{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 2
}
Response
{
"id":1,
"jsonrpc": "2.0",
"result": {
startingBlock: '0x384',
currentBlock: '0x386',
highestBlock: '0x454'
}
}
Or when not syncing
{
"id":1,
"jsonrpc": "2.0",
"result": false
}
eth_getLogs(filter)
filter
:Web3Filter
- result:
Arrary
Web3Log
Returns an array of all logs matching a given filter object.
- Object - The filter options:
- fromBlock: QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- toBlock: QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
- address: DATA|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.
- topics: 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.
- blockhash: DATA, 32 Bytes - (optional, future) With the addition of EIP-234, blockHash will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in in the filter criteria, then neither fromBlock nor toBlock are allowed.
- Object An object with web3 log data. See
Web3Log
.
Request
{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
topics: [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
],
},
],
"id": 2
}
Response
{
"jsonrpc": "2.0",
"result": [{
"address": "0xf44bb5018bfa4a65165595f5e41f4c7456cd3575",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000f44bb5018bfa4a65165595f5e41f4c7456cd3575", "0x0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e8915"],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xfbda8b37d5d004653dc18623db2467836b64b24d4880ba4e49ba18a1668f440e",
"blockNumber": "0x5d54",
"transactionHash": "0x12f6f4c0cbf388f87ef3d54e8e9a4988746edd9cf773895997cd355f74e2f635",
"transactionIndex": "0x0",
"logIndex": "0x0",
"removed": false
}, {
"address": "0xf44bb5018bfa4a65165595f5e41f4c7456cd3575",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000f44bb5018bfa4a65165595f5e41f4c7456cd3575", "0x0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e8915"],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xfbda8b37d5d004653dc18623db2467836b64b24d4880ba4e49ba18a1668f440e",
"blockNumber": "0x5d54",
"transactionHash": "0x5829bfbd0a1752441c5eaca366506757684b99071402448c39c9ae8c1f48b104",
"transactionIndex": "0x1",
"logIndex": "0x0",
"removed": false
}],
"id": 2
}
web3_clientVersion()
- result:
String
Returns the current client version.
- None
String - The current client version
Request
{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 2
}
Response
{
"jsonrpc": "2.0",
"result": "0.1.0",
"id": 2
}
eth_accounts()
- result:
Array<
Hex
>
Returns a list of addresses owned by client.
- None
Array of DATA, 20 Bytes - addresses owned by the client.
Request
{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 2
}
Response
{
"id":1,
"jsonrpc": "2.0",
"result": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1"]
}
Returns Keccak-256 (not the standardized SHA3-256) of the given data.
data
- the data to convert into a SHA3 hash
DATA - The SHA3 result of the given string.
Request
{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0x68656c6c6f20776f726c64"],
"id": 64
}
Response
{
"jsonrpc": "2.0",
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
"id": 2
}
Returns the value from a storage position at a given address.
address
- 20 Bytes - address of the storage.position
- integer of the position in the storage.number
- A block number.
The value at this storage position.
Request
{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": [
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
],
"id": 64
}
Response
{
"jsonrpc": "2.0",
"result": "0x0000000000000000000000000000000000000000000000000000000000000000",
"id": 2
}
eth_coinbase()
- result:
H160
Returns the client coinbase address.
- None
DATA, 20 bytes - the current coinbase address.
Request
{
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [
],
"id": 64
}
Response
{
"id":64,
"jsonrpc": "2.0",
"result": "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
}
eth_hashrate()
- result:
U256
Returns the number of hashes per second that the node is mining with.
Note: Always return 1 in Axon network.
- None
QUANTITY - number of hashes per second.
Request
{
"jsonrpc": "2.0",
"method": "eth_hashrate",
"params": [
],
"id": 64
}
Response
{
"id":64,
"jsonrpc": "2.0",
"result": "0x38a"
}
axon_getCurrentMetadata()
- result:
Metadata
Returns axon current metadata info.
- None
Returns axon current metadata info.
Request
{
"jsonrpc": "2.0",
"method": "axon_getCurrentMetadata",
"params": [
],
"id": 64
}
Response
{
"jsonrpc": "2.0",
"result": {
"version": {
"start": "0x1",
"end": "0x5f5e100"
},
"epoch": "0x0",
"verifier_list": [{
"bls_pub_key": "0xa26e3fe1cf51bd4822072c61bdc315ac32e3d3c2e2484bb92942666399e863b4bf56cf2926383cc706ffc15dfebc85c6",
"pub_key": "0x031ddc35212b7fc7ff6685b17d91f77c972535aee5c7ae5684d3e72b986f08834b",
"address": "0x8ab0cf264df99d83525e9e11c7e4db01558ae1b1",
"propose_weight": "0x1",
"vote_weight": "0x1"
}],
"propose_counter": [{
"address": "0x8ab0cf264df99d83525e9e11c7e4db01558ae1b1",
"count": "0xb4"
}],
"consensus_config": {
"gas_limit": "0x3e7fffffc18",
"interval": "0xbb8",
"propose_ratio": "0xf",
"prevote_ratio": "0xa",
"precommit_ratio": "0xa",
"brake_ratio": "0xa",
"tx_num_limit": "0x4e20",
"max_tx_size": "0x186a0000",
"max_contract_limit": "0x8000"
}
},
"id": 73
}
axon_getHardforkInfo()
- result:
HardforkInfos
Returns axon current hardfork infos.
- None
Returns axon current hardfork infos.
Request
{
"jsonrpc": "2.0",
"method": "axon_getHardforkInfo",
"params": [
],
"id": 64
}
Response
{
"jsonrpc": "2.0",
"result": {
"Andromeda":"enabled"
},
"id": 73
}
The Web3Filter objects.
Web3Filter
is a JSON object with the following fields.
-
from_block
:BlockId
- [optional, default is "latest"]hexadecimal block number, or the string "latest", "earliest" or "pending"
-
to_block
:BlockId
- [optional, default is "latest"]hexadecimal block number, or the string "latest", "earliest" or "pending"
-
block_hash
:H256
- [optional] With the addition of EIP-234, blockHash restricts the logs returned to the single block with the 32-byte hash blockHash.UsingblockHash is equivalent to.
-
address
:H256
- [optional] - a string representing the address (20 bytes) to check for balancenull when its pending.
null when its pending log.
-
topics
:Array<
Hash
>
- [optional] - Array of 32 Bytes DATA topics.Topics are order-dependent.
The Web3Log log objects.
Web3Log
is a JSON object with the following fields.
-
address
:H160
- Hex encoded 20 Bytes - address from which this log originated. -
topics
:Array<
H256
>
- Array of 0 to 4 32 Bytes of indexed log arguments.In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.
-
data
:Hex
- contains one or more 32 Bytes non-indexed arguments of the log. -
block_hash
:H256
- [optional] With the addition of EIP-234, blockHash restricts the logs returned to the single block with the 32-byte hash blockHash.UsingblockHash is equivalent to.
-
block_number
:U256
- the block number where this log was in.null when its pending.
null when its pending log.
-
transaction_hash
:H256
- Hex encoded 32 Bytes, hash of the transactions this log was created from. null when its pending log.. -
transaction_index
:U256
- hexadecimal of the transactions index position log was created from.null when its pending log.
-
log_index
:U256
- hexadecimal of the log index position in the block.null when its pending log.
-
removed
:bool
- true when the log was removed, due to a chain reorganization. false if it's a valid log.
The Web3SyncStatus objects.
Web3SyncStatus
is a JSON object with the following fields.
-
starting_block
:U256
- QUANTITY - The block at which the import started (will only be reset, after the sync reached his head) -
current_block
:U256
- QUANTITY - The current block, same as eth_blockNumber. -
highest_block
:U256
-QUANTITY - The estimated highest block.
The Web3CallRequest objects.
Web3CallRequest
is a JSON object with the following fields.
-
transaction_type
:U64
- 64-bit integer that represents the type of the transaction. Axon has evolved to support 3 types of transactions: Legacy is 0x0, Eip2930 is 0x1 and Eip1559 is 0x2. -
from
:H160
- Hex encoded 20 Bytes - The address the transaction is sent from. -
to
:H160
- Hex encoded 20 Bytes - The address the transaction is directed to. -
gas_price
:U256
- [optional] hexadecimal value of the gasPrice used for each paid gas. -
max_fee_per_gas
:U256
- [optional] Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. -
gas
:U256
- [optional] hexadecimal value of the gas provided for the transaction execution.eth_call consumes zero gas, but this parameter may be needed by some executions.
-
value
:U256
- [optional] hexadecimal value of the value sent with this transaction. -
data
:Hex
- [optional] Hash of the method signature and encoded parameters. -
nonce
:U256
- Nonce is a sequence number, issued by the originating externally owned account, used to prevent message replay. -
access_list
:Array<
AccessList
>
- The accessList specifies a list of addresses and storage keys; these addresses and storage keys are added into the accessed_addresses and accessed_storage_keys global sets. -
max_priority_fee_per_gas
:U256
- QUANTITY - (optional) determined by the user, and is paid directly to miners.
The AccessList objects.
AccessList
is a JSON object with the following fields.
AccessList
:Arrar<
[AccessListItem
]>
(#type-AccessListItem) - A list of addresses and storage keys.
The AccessListItem objects.
AccessListItem
is a JSON object with the following fields.
-
address
:H160
- DATA, Hex encoded 20 Bytes - The addresses is added into the accessed_addresses global sets. -
storage_keys
:Arrar<
[H256
]>
(#type-H256) - DATA, Hex encoded 32 Bytes - The storage keys is added into the accessed_storage_keys global sets.
The BlockView objects.
BlockView
is a JSON object with the following fields.
-
hash
:H256
- DATA, Hex encoded 32 Bytes - hash of the block. null when its pending block. -
parent_hash
:H256
- DATA, Hex encoded 32 Bytes - hash of the parent block. -
sha3_uncles
:H256
- DATA, Hex encoded 32 Bytes - SHA3 of the uncles data in the block. -
author
:H169
- Hex encoded 20 Bytes - the creator of the block. -
miner
:H160
- DATA, Hex encoded 20 Bytes - the address of the beneficiary to whom the mining rewards were given. -
state_root
:H256
- DATA, Hex encoded 32 Bytes - the root of the final state trie of the block. -
transactions_root
:H256
- DATA, Hex encoded 32 Bytes - the root of the transaction trie of the block. -
receipts_root
:H256
- DATA, Hex encoded 32 Bytes - the root of the receipts trie of the block. -
number
:U256
- QUANTITY - the block number. null when its pending block. -
gas_used
:U256
- QUANTITY - the total used gas by all transactions in this block. -
gas_limit
:U256
- QUANTITY - the maximum gas allowed in this block. -
extra_data
:Hex
- DATA - the "extra data" field of this block. -
logs_bloom
:Boolom
- DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block. -
timestamp
:U256
- QUANTITY - the unix timestamp for when the block was collated. -
difficulty
:U256
- QUANTITY - integer of the difficulty for this block. -
total_difficulty
:U256
- QUANTITY - integer of the total difficulty of the chain until this block. -
base_fee_per_gas
:U256
- he minimum fee per gas required for a transaction to be included in the block. -
uncles
:Array<
U256
>
- Array - Array of uncle hashes. -
transactions
:Array<
RichTransactionOrHash
>
- The transactions in the block body. -
size
:U256
- QUANTITY - integer the size of this block in bytes. -
mix_hash
:H256
- Hex encoded 32 Bytes - a unique identifier for that block. -
nonce
:U256
- DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block.
The Web3FeeHistory objects.
Web3FeeHistory
is a JSON object with the following fields.
-
oldest_block
:U256
- Lowest number block of the returned range. -
reward
:Arrary<
U256
>
- (Optional) An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty. -
base_fee_per_gas
:Arrary<
U256
>
- An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks. -
gas_used_ratio
:Arrary<
U256
>
- An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.
The Web3Receipt objects.
Web3Receipt
is a JSON object with the following fields.
-
block_number
:U256
- QUANTITY - block number where this transaction was in. -
block_hash
:H256
- DATA, Hex encoded 32 Bytes - hash of the block where this transaction was in. -
contract_address
:H160
- DATA, Hex encoded 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null. -
cumulative_gas_used
:U256
- QUANTITY - The total amount of gas used when this transaction was executed in the block. -
effective_gas_price
:U256
- QUANTITY - the price per gas at the time of your transaction, so the total gas cost of your transaction is effectiveGasPrice * gasUsed -
from
:H160
- DATA, Hex encoded 20 Bytes - address of the sender. -
gas_used
:U256
- QUANTITY - The amount of gas used by this specific transaction alone. -
logs
:Arrary<
Web3ReceiptLog
>
- Array - Array of log objects, which this transaction generated. -
logs_bloom
:Bloom
- DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. -
state_root
:Hash
- DATA 32 bytes of post-transaction stateroot (pre Byzantium) -
status
:U256
- QUANTITY either 1 (success) or 0 (failure) -
to
:H160
- DATA, Hex encoded 20 Bytes - address of the receiver. null when its a contract creation transaction. -
transaction_hash
:Hash
- DATA, Hex encoded 32 Bytes - hash of the transaction. -
transaction_index
:U256
- QUANTITY - integer of the transactions index position in the block. -
transaction_type
:U64
- 64-bit integer that represents the type of the transaction. Axon has evolved to support 3 types of transactions: Legacy is 0x0, Eip2930 is 0x1 and Eip1559 is 0x2.
The Web3ReceiptLog objects.
Web3ReceiptLog
is a JSON object with the following fields.
-
address
:H160
- DATA, Hex encoded 20 Bytes - address from which this log originated. -
topics
:Arrary<
H256
>
- rray of DATA - Array of 0 to 4 Hex encode 32 Bytes DATA of indexed log arguments.- In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
-
data
:Hex
>
- DATA - contains one or more 32 Bytes non-indexed arguments of the log. -
block_number
:U256
- QUANTITY - the block number where this log was in. null when its pending. null when its pending log. -
block_hash
:Hash
- DATA, Hex encode 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log. -
transaction_hash
:Hash
>
- DATA, Hex encoded 32 Bytes - hash of the transactions this log was created from. null when its pending log. -
transaction_index
:U256
- QUANTITY - integer of the transactions index position log was created from. null when its pending log. -
log_index
:U256
>
- QUANTITY - integer of the log index position in the block. null when its pending log. -
removed
:bool
- TAG - true when the log was removed, due to a chain reorganization. false if its a valid log.
Default block parameters can be one of the following:
-
Number|BN|BigNumber: A block number starting from 0.This is a 64-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON.
-
"earliest" - String: The genesis block
-
"latest" - String: The latest block (current head of the blockchain)
-
"pending" - String: The currently mined block (including pending transactions)
The Hex encoded 32-bytes fixed-length binary data.
The name comes from the number of bits in the data.
0x696447c51fdb84d0e59850b26bc431425a74daaac070f2b14f5602fbb469912a
Fixed-size uninterpreted hash type with hex encoded 20 bytes (160 bits) size.
0x92df69a492c93d22c90247434b8d80944daa38fa
0x-prefixed string in JSON.
0x0 // Decimal Value is 0
0x10 // Decimal Value is 16
10 // Invalid, 0x is required
The 32-byte fixed-length binary data.In JSONRPC, it is Hex encoded as a 0x-prefixed hex string.
0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65
A UTF-8–encoded, growable string.
The String type is the most common string type that has ownership over the contents of the string. It has a close relationship with its borrowed counterpart, the primitive str.
"0.1.0"
The boolean type.
The bool represents a value, which could only be either true or false. If you cast a bool into an integer, true will be 1 and false will be 0.
true
or
1
A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008).
This type is very similar to f32, but has increased precision by using twice as many bits. Please see the documentation for f32 or Wikipedia on double precision values for more information.
Bloom hash type with 256 bytes (2048 bits) size.
Unsigned 64-bit integer.
Little-endian large integer type 256-bit unsigned integer.
The TransactionView objects.
TransactionView
is a JSON object with the following fields.
-
type_
:U64
- 64-bit integer that represents the type of the transaction. Axon has evolved to support 3 types of transactions: Legacy is 0x0, Eip2930 is 0x1 and Eip1559 is 0x2. -
block_number
:U256
- QUANTITY - block number where this transaction was in. null when it's pending. -
block_hash
:H256
- DATA, Hex encoded 32 Bytes - hash of the block where this transaction was in. null when its pending. -
hash
:Hash
- DATA, Hex encoded 32 Bytes - hash of the transaction. -
nonce
:U256
- QUANTITY - the number of transactions made by the sender prior to this one. -
from
:H160
- DATA, Hex encoded 20 Bytes - address of the sender. -
to
:H160
- DATA, Hex encoded 20 Bytes - address of the receiver. null when it's a contract creation transaction. -
value
:U256
- QUANTITY - value transferred in Wei. -
gas
:U256
- QUANTITY - gas provided by the sender. -
gas_price
:U256
- QUANTITY - gas price provided by the sender in Wei. -
max_fee_per_gas
:U256
- QUANTITY - the absolute maximum you are willing to pay per unit of gas to get your transaction included in a block. For brevity and clarity, we will refer to this as the Max Fee. -
max_priority_fee_per_gas
:U256
- QUANTITY - (optional) determined by the user, and is paid directly to miners. -
raw
:Hex
- The raw is the signed transaction in Recursive Length Prefix (RLP) encoded form -
input
:Hex
- DATA - The input of the transaction. -
public_key
:Input
- The public key of the transaction sender. -
access_list
:AccessList
- A list of addresses and storage keys; these addresses and storage keys are added into the accessed_addresses and accessed_storage_keys global sets. -
chain_id
:U256
- QUANTITY - The id of the chain. -
v
:U256
- QUANTITY - ECDSA recovery id. -
r
:U256
- DATA, 32 Bytes - ECDSA signature r. -
s
:U256
- DATA, 32 Bytes - ECDSA signature s.
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"blockNumber": "0x1b4",
"blockHash": "0x9a13208ce76c32638f509064545765c8341db9178b77b4f47b458a66325494fd",
"hash": "0x41e946c6f4dd97ad2828c056af973087b53044bf567caf0ea870ab45460afd65",
"nonce": "0x1",
"transactionIndex": "0x1b70",
"from": "0x92df69a492c93d22c90247434b8d80944daa38fa",
"to": "0xef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca",
"value": "0x0",
"gas": "0x73a9",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x539",
"maxPriorityFeePerGas": "0x77359400",
"raw": "0x02f8af05018477359400847735940082ea6094ef11d1c2aa48826d4c41e54ab82d1ff5ad8a64ca80b844a9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000c080a0fa9bc76185d06c6e3178c66c40c195f374e80a78179392a84c1db731ce4d2d3da06079373330aa2c6d420267d83d8cd685db20638c7935f02a26fdf99dd010bfa2",
"input": "0xa9059cbb0000000000000000000000005cf83df52a32165a7f392168ac009b168c9e89150000000000000000000000000000000000000000000000000000000000000000",
"publicKey": "0x1113b46c2c52050fb9fd29cf88d4a9f8d253e17515dc142f72d8bb2cd18fdb3e45098e11811bcdd1487bafb7b24bf35c174cf6ede558059e23ad60d312345678",
"accessList": [],
"chainId": "0x5",
"v": "0x0",
"r": "0xfa9bc76185d06c6e3178c66c40c195f374e80a78179392a84c1db731ce4d2d3d",
"s": "0x6079373330aa2c6d420267d83d8cd685db20638c7935f02a26fdf99dd010bfa2"
},
"id": 2
}