Skip to main content

Rpc node Api reference

Djuno Support avatar
Written by Djuno Support
Updated this week

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_accounts","id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const estimate = await provider.listAccounts();
console.log(estimate);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_accounts",
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_accounts",
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_accounts",
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
provider = Web3.HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")
result = provider.make_request('eth_accounts', [])
print(result)

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_blobBaseFee","params":[],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_blobBaseFee",
"params": [],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_blobBaseFee',[]);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_blobBaseFee",
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_blobBaseFee",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_blobBaseFee",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
provider = Web3.HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")
result = provider.make_request('eth_blobBaseFee', [])
print(result)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.request({
method: 'eth_blobBaseFee',
params: []
}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const blockNum = await provider.getBlockNumber();
console.log(blockNum);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_blockNumber",
"params": [],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_blockNumber",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_blockNumber",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
provider = Web3.HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")
result = provider.make_request('eth_blobBaseFee', [])
print(result)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.request({
method: 'eth_blobBaseFee',
params: []
}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_call","params":[{"from": null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest", {"0x1111111111111111111111111111111111111111": {"balance": "0xFFFFFFFFFFFFFFFFFFFF"}}],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_call',[<params>]);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_call",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_call",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_call",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
abi = '[{"constant":True,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"}]'
myContract = w3.eth.contract(address="0x6B175474E89094C44Da98b954EedeAC495271d0F", abi=abi)
response = myContract.functions.balanceOf("0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE").call()

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client
.call({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
})
.then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{
"method":"eth_callMany",
"params": [
[
{
"transactions": [
{
"from": null,
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0xf4240",
"gasPrice": "0x7896e72a",
"data": "0xa9059cbb000000000000000000000000bc0E63965946815d105E7591407704e6e1964E590000000000000000000000000000000000000000000000000000000005f5e100"
},
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"gasPrice": "0x7896e72a",
"data": "0x70a08231000000000000000000000000bc0E63965946815d105E7591407704e6e1964E59"
}
],
"blockOverride": {
"blockNumber": "0xbb5fe9"
}
}
],
{
"blockNumber": "0xbb5fe9",
"transactionIndex": 132
}
]
"id":1,
"jsonrpc":"2.0"
}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_callMany",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const result = await provider.send("eth_callMany", <params>);
console.log(result);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_callMany",
"params": <params>,
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_callMany",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_call",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
payload = {
"jsonrpc": "2.0",
"method": "eth_callMany",
"id": 1,
"params": [<params>]
}
response = w3.manager.request_blocking(payload['method'], payload['params'])
print(response)

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const network = await provider.send('eth_chainId');
console.log(network);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_chainId",
"params": [],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_chainId",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_chainId",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
print (w3.eth.chain_id)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getChainId().then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_estimateGas","params":[{"from": "0x8D97689C9818892B700e27F316cc3E41e17fBeb9","to":"0xd3CdA913deB6f67967B99D67aCDFa1712C293601","value":"0x186a0"}],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const estimate = await provider.estimateGas(<params>);
console.log(estimate);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_estimateGas",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_estimateGas",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_estimateGas",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
estimate = w3.eth.estimate_gas(<params>)
print(estimate)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client
.estimateGas(<params>)
.then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_feeHistory',[<params>]);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_feeHistory",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_feeHistory",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_feeHistory",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
provider = Web3.HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")
result = provider.make_request('eth_feeHistory',[<params>])
print(result)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client
.getFeeHistory({
blockCount: 4,
rewardPercentiles: [25, 75]
})
.then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_gasPrice","params":[],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_gasPrice', []);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_gasPrice",
"params": [],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_gasPrice",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_gasPrice",
"params": [],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
print (w3.eth.gas_price)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getGasPrice().then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getAccount","params":["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "latest"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getAccount",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_getAccount',[<params>]);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getAccount",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getAccount",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getAccount",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
provider = Web3.HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")
result = provider.make_request('eth_getAccount',[<params>])
print(result)

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBalance","params":["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "latest"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.getBalance(<params>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getBalance",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getBalance",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getBalance",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
print (w3.eth.get_balance(<params>))

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getBalance({address: <address>}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBlockByHash","params":["0x3f07a9c83155594c000642e7d60e8a8a00038d03e9849171a05ed0e2d47acbb3",false],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.getBlock(<params>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getBlockByHash",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getBlockByHash",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getBlockByHash",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
print (w3.eth.get_block(<params>))

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getBlock({blockHash: <block-hash>}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBlockByNumber","params":["0xc5043f",false],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.getBlock(<params>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getBlockByNumber",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getBlockByNumber",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getBlockByNumber",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
print (w3.eth.get_block(<params>))

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getBlock({blockNumber: <block-number>}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBlockReceipts","params":["0xc5043f"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [<param>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_getBlockReceipts',<param>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getBlockReceipts",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getBlockReceipts",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getBlockReceipts",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
request = w3.provider.make_request('eth_getBlockReceipts', [param])
print(request)

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBlockTransactionCountByHash","params":["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": [<param>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_getBlockTransactionCountByHash',<param>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getBlockTransactionCountByHash",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getBlockTransactionCountByHash",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getBlockTransactionCountByHash",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
request = w3.eth.get_block_transaction_count(<hash>)
print(request)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getBlockTransactionCount({
blockHash: <block-hash>
}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getBlockTransactionCountByNumber","params":["0xc5043f"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": [<param>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_getBlockTransactionCountByNumber',<param>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getBlockTransactionCountByNumber",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getBlockTransactionCountByNumber",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getBlockTransactionCountByNumber",
"params": [<param>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
request = w3.eth.get_block_transaction_count(<block-number>)
print(request)

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

core.client.getBlockTransactionCount({
blockNumber: <block-number>
}).then(res => console.log(res))

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getCode","params":["0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889","latest"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [<params>],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const response = await provider.send('eth_getCode',<params>);
console.log(response);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getCode",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getCode",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getCode",
"params": [<params>],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
request = w3.eth.get_code(<params>)
print(request)

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/ \ 
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getFilterChanges","params":["YOUR_FILTER_ID"],"id":1,"jsonrpc":"2.0"}'

Eth.rb

require 'eth'
client = Eth::Client.create 'https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/'
payload = {
"jsonrpc": "2.0",
"method": "eth_getFilterChanges",
"params": ["YOUR_FILTER_ID"],
"id": "1"
}
response = client.send(payload.to_json)
puts response

Ethers.js

import { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/");
const logs = await provider.send('eth_getFilterChanges',"YOUR_FILTER_ID");
console.log(logs);
})();

JavaScript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_getFilterChanges",
"params": ["YOUR_FILTER_ID"],
"id": 1,
"jsonrpc": "2.0"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Python

import requests
import json

url = "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"

payload = json.dumps({
"method": "eth_getFilterChanges",
"params": ["YOUR_FILTER_ID"],
"id": 1,
"jsonrpc": "2.0"
})

headers = {
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_getFilterChanges",
"params": ["YOUR_FILTER_ID"],
"id": 1,
"jsonrpc": "2.0"
})

response = https.request(request)
puts response.read_body

Web3.py

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"))
put_filter = w3.eth.filter("YOUR_FILTER_ID")
print(w3.eth.get_filter_changes(put_filter.filter_id))

Djuno SDK

import { Core } from '@djuno/rpc-sdk'

const core = new Core({
endpointUrl: "https://ethereum-mainnet-nameless-capable.djuno.cloud/x/abc/"
})

/**
* Can listen for filter changes on filters created with the following functions
* createBlockFilter
* createContractEventFilter
* createEventFilter
* createPendingTransactionFilter
*/
async(() => {
const filter = await core.client.createBlockFilter()
const hashes = await core.client.getFilterChanges({ filter })
})()

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


Did this answer your question?