Core API
1. Ethereum JSON-RPC API
eth_accounts
Returns an array of addresses owned by the client. Since QuickNode does not store private keys, this will always return an empty response. The API credit value for this method is 20.
Please note that this JSON-RPC method will always return an empty response.
Parameters:
This method does not accept any parameters
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
eth_blobBaseFee
Returns the expected base fee for blobs in the next block. The API credit value for this method is 20.
Parameters:
This method does not accept any parameters
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3bff12fd"
}
eth_blockNumber
Returns the latest block number of the blockchain. The API credit value for this method is 20.
Parameters:
This method does not accept any parameters
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15536ee"
}
result:
An integer value of the latest block number encoded as hexadecimal
eth_call
Executes a new message call immediately without creating a transaction on the blockchain. The API credit value for this method is 20.
Parameters:
1. transaction object
| The transaction call object which contains the following fields: 1.1 from string The address from which the transaction is sent 1.2 to string REQUIRED The address to which the transaction is addressed 1.3 gas integer The integer of gas provided for the transaction execution 1.4 gasPrice integer The integer of gasPrice used for each paid gas encoded as hexadecimal 1.5 value integer The integer of value sent with this transaction encoded as hexadecimal 1.6 data string The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation |
2. blockNumber string REQUIRED | The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation. ex: latest |
3. Object object | The State Override Set option allows you to change the state of a contract before executing the call, which means you can modify the values of variables stored in the contract, such as balances and approvals for that call without actually modifying the contract. Each address maps to an object containing: 3.1 balance string The fake balance to set for the account before executing the call 3.2 nonce string The fake nonce to set for the account before executing the call 3.3 code string The fake EVM bytecode to inject into the account before executing the call 3.4 state object The fake key-value mapping to override all slots in the account storage before executing the call 3.5 stateDiff integer The fake key-value mapping to override individual slots in the account storage before executing the call |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000858898f93629000"
}
data:
The return value of the executed contract method
eth_callMany
Executes a list of bundles (a bundle is a collection of transactions), without creating transactions on the blockchain. The API credit value for this method is 20.
Parameters:
1. array array An array with the following fields: | 1.1 transaction object The transaction call object which contains the following fields: . from string The address from which the transaction is sent to string REQUIRED The address to which the transaction is addressed . gas integer The integer of gas provided for the transaction execution . gasPrice integer The integer of gasPrice used for each paid gas encoded as hexadecimal . value integer The integer of value sent with this transaction encoded as hexadecimal . data string The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation
1.2 blockOverride object (Optional) The overrides of the execution context block header . blockNumber string The block number. Defaults to the block number of the first simulated block . blockHash object A dictionary that maps blockNumber to a user-defined hash. It could be queried from the solidity opcode BLOCKHASH . coinbase address The address of miner. Defaults to the original miner of the first simulated block. . timestamp integer The timestamp of the current block. Defaults to the timestamp of the first simulated block. Each following block increments its timestamp by 1. . difficulty integer The difficulty of the current block. Defaults to the difficulty of the first simulated block. . gasLimit integer The gas limit of the current block. Defaults to the difficulty of the first simulated block. . baseFee integer The base fee of the current block. Defaults to the base fee of the first simulated block. |
2. SIMULATION_CONTEXT object (Optional) The simulation context | 2.1 blockNumber or Tag string The Tag 'latest', 'earliest', 'pending', 'safe' or 'finalized', or a hexadecimal block number 2.2 transactionIndex integer The transaction index of the simulated transactions. Default value of the transaction index is -1, which would place the simulated transactions after the entire block. |
3. STATE_OVERRIDE object (Optional) The State Override Set option allows you to change the state of a contract before executing the call, which means you can modify the values of variables stored in the contract, such as balances and approvals for that call without actually modifying the contract. Each address maps to an object containing: | 3.1 balance string The fake balance to set for the account before executing the call 3.2 nonce string The fake nonce to set for the account before executing the call 3.3 code string The fake EVM bytecode to inject into the account before executing the call 3.4 state object The fake key-value mapping to override all slots in the account storage before executing the call 3.5 stateDiff integer The fake key-value mapping to override individual slots in the account storage before executing the call |
4. timeout integer The upper limit running time for the simulations in milliseconds. Defaults to 5000 milliseconds. |
|
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
[
{
"value": "0000000000000000000...000000000000000000000001"
},
{
"value": ""
}
]
]
}
array array
An array with the following fields:
value string
The value if the transaction was successful
error string
(Optional) The error if the transaction failed
eth_chainId
Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155. The API credit value for this method is 20.
Parameters:
This method does not accept any parameters
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
chain ID:
It returns a hexadecimal value in string format, which represents an integer of the chain ID
eth_estimateGas
Returns an estimation of gas for a given transaction. The API credit value for this method is 20.
Parameters:
1. transaction object
| The transaction call object: 1.1 from string The address from which the transaction is sent
1.2 to string REQUIRED The address to which the transaction is addressed
1.3 gas integer The integer of gas provided for the transaction execution
1.4 gasPrice integer The integer of gasPrice used for each paid gas encoded as hexadecimal
1.5 value integer The integer of value sent with this transaction encoded as hexadecimal
1.6 data string The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation |
2. blockNumber string | The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized |
3. Object object | The state override set with address-to-state mapping where each address maps to an object containing 3.1 balance string The fake balance to set for the account before executing the call
3.2 nonce string The fake nonce to set for the account before executing the call
3.3 code string The fake EVM bytecode to inject into the account before executing the call
3.4 state object The fake key-value mapping to override all slots in the account storage before executing the call
3.5 stateDiff integer The fake key-value mapping to override individual slots in the account storage before executing the call |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
quantity:
The estimated amount of gas used
eth_feeHistory
Returns the collection of historical gas information. The API credit value for this method is 20.
Parameters:
1. blockCount string/integer REQUIRED
| The number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. It will return less than the requested range if not all blocks are available
ex: 4 |
2. newestBlock string REQUIRED | The highest number block of the requested range in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain
ex: latest |
3. rewardPercentiles integer REQUIRED | A list of percentile values with a monotonic increase in value. The transactions will be ranked by effective tip per gas for each block in the requested range, and the corresponding effective tip for the percentile will be calculated while taking gas consumption into consideration
ex: 25, 75 |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x1554ec2",
"reward": [
[
"0x4b571c0",
"0x2f23c46c"
],
[
"0x396c1b9",
"0x4d579d50"
],
[
"0x77359400",
"0x77359400"
],
[
"0x2faf080",
"0x3b9aca00"
]
],
"baseFeePerGas": [
"0x3af6c9f1",
"0x3b19496d",
"0x36647614",
"0x302c838b",
"0x359f85b3"
],
"gasUsedRatio": [
0.5091416944444445,
0.18145872222222223,
0.04269041059401201,
0.952465203785614836
],
"baseFeePerBlobGas": [
"0x320b8540d",
"0x384cf5f4e",
"0x3f5694c1f",
"0x44831ac79",
"0x3f5694c1f"
],
"blobGasUsedRatio": [
1,
1,
0.8333333333333334,
0.1666666666666666649
]
}
}
oldestBlock:
The lowest number block of the returned range encoded in hexadecimal format
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 fees per gas data points from a single block. All zeroes are returned if the block is empty
eth_gasPrice
Returns the current gas price on the network in wei. The API credit value for this method is 20.
Parameters:
This method does not accept any parameters
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x198542e9"
}
result
The hexadecimal value of the current gas price in wei
eth_getAccount
Retrieve account details by specifying an address and a block number/tag. The API credit value for this method is 20.
Parameters:
1. address string REQUIRED
| The account address for which the information is to be retrieved
ex: 0x8D97689C9818892B700e27F316cc3E41e17fBeb9 |
2. blockReference string REQUIRED | The block number in either hexadecimal or integer format, or utilize tags for convenience. Available tags include 'latest' for the latest mined block, 'pending' for the pending state/transactions, and 'safe' or 'finalized' to indicate different degrees of block confirmation
ex: latest |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"codeHash": "0xc5d2460186f7233c9...3b7bfad8045d85a470",
"storageRoot": "0x56e81f171bcc55a6ff8345...cadc001622fb5e363b421",
"balance": "0xba862b54effa",
"nonce": "0x23"
}
}
result object | A result object which contains the following fields: codeHash string A 32 byte hash of the code of the account
storageRoot string The hash of the account's storage data
balance string The current balance of the account in wei
nonce string The transaction count of an account |
eth_getBalance
Returns the balance of given account address in wei. The API credit value for this method is 20.
Parameters:
1. address string REQUIRED
| The address (20 bytes) to check for balance
ex: 0x8D97689C9818892B700e27F316cc3E41e17fBeb9 |
2. blockNumber string REQUIRED | The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation
ex: latest |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xba862b54effa"
}
result
The ETH balance of the specified address in hexadecimal value, measured in wei
eth_getBlockByHash
Returns information of the block matching the given block hash. The API credit value for this method is 20.
Parameters:
1. hash string REQUIRED
| The hash (32 bytes) of the block
ex: 0x3f07a9c83155594c000642e7d60e8a8a00038d03e9849171a05ed0e2d47acbb3 |
2. transaction_detail_flag boolean REQUIRED | It returns the full transaction objects when it is true otherwise it returns only the hashes of the transactions
ex: false |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0xa9c1a2812",
"difficulty": "0x0",
"extraData": "0x546974616e202...465722e78797a29",
"gasLimit": "0x1c9c380",
"gasUsed": "0xa43ff7",
"hash": "0x3f07a9c83155594...171a05ed0e2d47acbb3",
"logsBloom": "0x4661734261c4...440a0c4c4332312425",
"miner": "0x4675c7e5baafb...58becba61ef3b0a263",
"mixHash": "0x1ae62e0fb48592...a355e4a78c64e9fa",
"nonce": "0x0000000000000000",
"number": "0x10c582e",
"parentHash": "0x5d5ccd7726eeca...b6b68afd835e4",
"receiptsRoot": "0x5e407b2a8177a6cff4e...c49f55e6108b2de66",
"sha3Uncles": "0x1dcc4de8dec75d7aa...f0a142fd40d49347",
"size": "0xed40",
"stateRoot": "0xc2bba9851341223b1...518b446d221df",
"timestamp": "0x649db4c3",
"transactions": [
"0xde670a91aae6a8...17c697f8434e1a2w93a188",
"0x8e56e1c506958a...df24624c6a6fw8cab438fb",
"0x83f7109e25bd7...2b66c738fd942513a23075d",
"0x87cddb42f59ec1...7c9c3b792ffb6dd6c48e2d"
],
"transactionsRoot": "0x454271da3c01194...aee78edd5f4cc12af",
"uncles": [],
"withdrawals": [
{
"index": "0x8698af",
"validatorIndex": "0x96f2f",
"address": "0xb92b4a201f4...834bdaa95c9",
"amount": "0xd6de21"
},
...
],
"withdrawalsRoot": "0x18653ee7f94eedf77354...03370b7fd63d05e"
}
}
object
A block object, or null when no block was found
baseFeePerGas | A string of the base fee encoded in hexadecimal format. Please note that this response field will not be included in a block requested before the EIP-1559 upgrade |
difficulty | The integer of the difficulty for this block encoded as a hexadecimal |
extraData | The “extra data” field of this block |
gasLimit | The maximum gas allowed in this block encoded as a hexadecimal |
gasUsed | The total used gas by all transactions in this block encoded as a hexadecimal |
hash | The block hash of the requested block. null if pending |
logsBloom | The bloom filter for the logs of the block. null if pending |
miner | The address of the beneficiary to whom the mining rewards were given |
mixHash | A string of a 256-bit hash encoded as a hexadecimal |
nonce | The hash of the generated proof-of-work. null if pending |
number | The block number of the requested block encoded as a hexadecimal. null if pending |
parentHash | The hash of the parent block |
receiptsRoot | The root of the receipts trie of the block |
sha3Uncles | The SHA3 of the uncles data in the block |
size | The size of this block in bytes as an Integer value encoded as hexadecimal |
stateRoot | The root of the final state trie of the block |
timestamp | The unix timestamp for when the block was collated |
transactions | An array of transaction objects - please see eth_getTransactionByHash for exact shape |
transactionsRoot | The root of the transaction trie of the block |
uncles | An array of uncle hashes |
withdrawals | A withdrawals object contains information about withdrawals made by validators. Please note that this field will not be included in a block requested before the EIP-4895 upgrade index The index of the withdrawal to uniquely identify each withdrawal
validatorIndex The index of the validator who initiated the withdrawal
address The address to which the withdrawn amount is sent
amount The amount of ether, provided in hexadecimal format, corresponding to a certain value in gwei |
withdrawalsRoot | The Merkle root of withdrawal data. Also, please note that this field will not be included in a block requested before the EIP-4895 upgrade |
eth_getBlockByNumber
Returns information of the block matching the given block number. The API credit value for this method is 20.
Parameters:
1. blockNumber string REQUIRED
| The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized
ex: 0xc5043f |
2. transaction_detail_flag boolean REQUIRED | The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions
ex: false |
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0xa9c1a2812",
"difficulty": "0x0",
"extraData": "0x546974616e202...465722e78797a29",
"gasLimit": "0x1c9c380",
"gasUsed": "0xa43ff7",
"hash": "0x3f07a9c83155594...171a05ed0e2d47acbb3",
"logsBloom": "0x4661734261c4...440a0c4c4332312425",
"miner": "0x4675c7e5baafb...58becba61ef3b0a263",
"mixHash": "0x1ae62e0fb48592...a355e4a78c64e9fa",
"nonce": "0x0000000000000000",
"number": "0x10c582e",
"parentHash": "0x5d5ccd7726eeca...b6b68afd835e4",
"receiptsRoot": "0x5e407b2a8177a6cff4e...c49f55e6108b2de66",
"sha3Uncles": "0x1dcc4de8dec75d7aa...f0a142fd40d49347",
"size": "0xed40",
"stateRoot": "0xc2bba9851341223b1...518b446d221df",
"timestamp": "0x649db4c3",
"transactions": [
"0xde670a91aae6a8...17c697f8434e1a2w93a188",
"0x8e56e1c506958a...df24624c6a6fw8cab438fb",
"0x83f7109e25bd7...2b66c738fd942513a23075d",
"0x87cddb42f59ec1...7c9c3b792ffb6dd6c48e2d"
],
"transactionsRoot": "0x454271da3c01194...aee78edd5f4cc12af",
"uncles": [
"0xd3946359c70281162c...008715cb1fad93b9cecaf9f7d8
],
}
}
object
A block object, or null when no block was found. The block object contains the following fields:
baseFeePerGas | A string of the base fee encoded in hexadecimal format. Please note that this response field will not be included in a block requested before the EIP-1559 upgrade |
difficulty | The integer of the difficulty for this block encoded as a hexadecimal |
extraData | The “extra data” field of this block |
gasLimit | The maximum gas allowed in this block encoded as a hexadecimal |
gasUsed | The total used gas by all transactions in this block encoded as a hexadecimal |
hash | The block hash of the requested block. null if pending |
logsBloom | The bloom filter for the logs of the block. null if pending |
miner | The address of the beneficiary to whom the mining rewards were given |
mixHash | A string of a 256-bit hash encoded as a hexadecimal |
nonce | The hash of the generated proof-of-work. null if pending |
number | The block number of the requested block encoded as a hexadecimal. null if pending |
parentHash | The hash of the parent block |
receiptsRoot | The root of the receipts trie of the block |
sha3Uncles | The SHA3 of the uncles data in the block |
size | The size of this block in bytes as an Integer value encoded as hexadecimal |
stateRoot | The root of the final state trie of the block |
timestamp | The unix timestamp for when the block was collated |
transactions | An array of transaction objects - please see eth_getTransactionByHash for exact shape |
transactionsRoot | The root of the transaction trie of the block |
uncles | An array of uncle hashes |
eth_getBlockReceipts
Returns all transaction receipts for a given block. The API credit value for this method is 20.
Parameters:
1. blockNumber string REQUIRED
| The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum and Arbitrum Nova), see the default block parameter description in the official Ethereum documentation
ex: 0xc5043f |
Code
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"blockHash": "0x97b49e43632ac70...9f3448d46ca9085576",
"blockNumber": "0xc5043f",
"contractAddress": null,
"cumulativeGasUsed": "0x21000",
"effectiveGasPrice": "0x4a817c800",
"from": "0x8894e0a0c96...421c95949be2d4e3",
"gasUsed": "0x21000",
"logs": [
{
"address": "0x6b175474e89094c...eac495271d0f",
"topics": [
"0xddf252ad1be2c...11628f55a4df523b3ef",
"0x000000000000000...1c95949be2d4e3",
"0x0000000000000000...17f5f36e2170330"
],
"data": "0x0000000000000...0000058d15e176280000",
"blockNumber": "0xc5043f",
"transactionHash": "0xf79d96d5f3d5c8208...0041133b69b49162866",
"transactionIndex": "0x0",
"blockHash": "0x97b49e43632a...29f3448d46ca9085576",
"logIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x0000000000000000000000000...00000000000000000000",
"status": "0x1",
"to": "0x6b175474e89094...c495271d0f",
"transactionHash": "0xf79d96d5f3d5...221e30041133b69b49162866",
"transactionIndex": "0x0",
"type": "0x0"
},
...
]
}
result
An array of objects:
blockHash | The hash of the block. null when pending |
blockNumber | The block number |
contractAddress | The contract address created if the transaction was a contract creation, otherwise null |
cumulativeGasUsed | The total amount of gas used when this transaction was executed in the block |
effectiveGasPrice | The actual value per gas deducted from the sender account |
from | The address of the sender |
gasUsed | The amount of gas used by this specific transaction alone |
logs | An array of log objects that generated this transaction address An address from which this log originated
topics An array of zero to four 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 It contains one or more 32 Bytes non-indexed arguments of the log
blockNumber The block number where this log was in. null when its a pending log
transactionHash The hash of the transactions this log was created from. null when its a pending log
transactionIndex The integer of the transaction's index position that the log was created from. null when it's a pending log
blockHash The hash of the block where this log was in. null when its a pending log
logIndex The integer of the log index position in the block. null when its a pending log
removed It is true when the log was removed due to a chain reorganization, and false if it's a valid log
|
logsBloom | The bloom filter for light clients to quickly retrieve related logs |
status | It is either 1 (success) or 0 (failure) encoded as a hexadecimal |
to | The address of the receiver. null when it's a contract creation transaction |
transactionHash | The hash of the transaction |
transactionIndex | An index of the transaction in the block |
type | The value type |
eth_getBlockTransactionCountByHash
Returns the number of transactions for the block matching the given block hash. The API credit value for this method is 20.
Parameters:
1. hash string REQUIRED
| The hash of the block
ex: 0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b |
Code
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7b"
}
result
The number of transactions associated with a specific block, in hexadecimal value
eth_getBlockTransactionCountByNumber
Returns the number of transactions for the block matching the given block number. The API credit value for this method is 20.
Parameters:
1. blockNumber string REQUIRED
| The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain
ex: 0xc5043f |
Code
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xcc"
}
result
The number of transactions in a specific block represented in hexadecimal format
eth_getCode
Returns the compiled bytecode of a smart contract. The API credit value for this method is 20.
Parameters:
1. address string REQUIRED
| The address of the smart contract from which the bytecode will be obtained
ex: 0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889 |
2. blockNumber string REQUIRED | The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain
ex: latest |
Code
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x6080604052...asd45fg...d5e964736f6c63430005110032"
}
result
The bytecode from a given address returned as a string
eth_getFilterChanges
Polling method for a filter, which returns an array of events that have occurred since the last poll. The API credit value for this method is 20.
Parameters:
1. filterID string REQUIRED
| The filter id that is returned from eth_newFilter, eth_newBlockFilter or eth_newPendingTransactionFilter |
Code
Type | Code |
Curl | curl https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/ \ |
Eth.rb | require 'eth' |
Ethers.js | import { ethers } from "ethers"; |
JavaScript | var myHeaders = new Headers(); |
Python | import requests |
Ruby | require "uri" |
Web3.py | from web3 import Web3, HTTPProvider |
Djuno SDK | import { Core } from '@djuno/rpc-sdk' |
Returns
response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0x6b175474e89094...c495271d0f",
"blockHash": "0x97b49e43632ac70c...617bd29f3448d46ca9085576",
"blockNumber": "0xc5043f",
"data": "0x0000000000000000...0000058d15e176280000",
"logIndex": "0x0",
"removed": false,
"topics": [
"0xddf252ad1be2c8sde3...3c4a11628f55c3b3ef",
"0x000000000000000000...b723c197649be2d4e3",
"0x00000000000000002c...22f17f5f36e2170330"
],
"transactionHash": "0xf79d96d5f3d5c820...41133b69b49162866",
"transactionIndex": "0x0"
},
...
]
}
array
An array of one of the following, depending on the filter type, or empty if there were no changes since the last poll:
eth_newBlockFilter | blockHash The 32 byte hash of a block that meets your filter requirements |
eth_newPendingTransactionFilter | transactionHash The 32 byte hash of a transaction that meets your filter requirements |
eth_newFilter | The 32 byte hash of a transaction that meets your filter requirements address An address from which this log originated
topics An array of zero to four 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 It contains one or more 32 Bytes non-indexed arguments of the log
blockNumber The block number where this log was in. null when its a pending log
transactionHash The hash of the transactions this log was created from. null when its a pending log
transactionIndex The integer of the transaction's index position that the log was created from. null when it's a pending log
blockHash The hash of the block where this log was in. null when its a pending log
logIndex The integer of the log index position in the block. null when it's a pending log
removed It is true when the log was removed due to a chain reorganization, and false if it's a valid log |