debug_accountRange - Ethereum
The debug_accountRange method is part of the Ethereum JSON RPC Core API and retrieves a range of accounts stored in the state trie of the Ethereum node for debugging purposes.
Last updated
Was this helpful?
Was this helpful?
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "debug_accountRange",
"params": [
"0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7",
"0x0f",
0,
false,
false,
false
],
"id": "getblock.io"
}'wscat -c wss://go.getblock.io/<ACCESS-TOKEN>/
# wait for connection and send the request body
{"jsonrpc": "2.0",
"method": "debug_accountRange",
"params": ["0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7", "0x0f", 0, false, false, false],
"id": "getblock.io"}{
"result": "null",
"id": "getblock.io",
"status_code": 405,
"message": "Method not allowed"
}import requests
import json
# Define the API URL and access token
url = 'https://go.getblock.io/<ACCESS-TOKEN>/'
headers = {'Content-Type': 'application/json'}
# Prepare the request data
data = {
"jsonrpc": "2.0",
"method": "debug_accountRange",
"params": [
"0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7",
"0x0f",
0,
False,
False,
False
],
"id": "getblock.io"
}
# Send the POST request
response = requests.post(url, headers=headers, data=json.dumps(data))
# Parse the JSON response
response_data = response.json()
# Print the result
print(json.dumps(response_data, indent=4))import axios from 'axios';
const url = 'https://go.getblock.io/<ACCESS-TOKEN>/';
const data = {
jsonrpc: '2.0',
method: 'debug_accountRange',
params: [
"0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7",
"0x0f",
0,
false,
false,
false
],
id: 'getblock.io',
};
axios.post(url, data, {
headers: {
'Content-Type': 'application/json',
},
})
.then(response => {
console.log('Response:', response.data);
})
.catch(error => {
console.error('Error:', error);
});