Questions tagged [json-rpc]
json-formatted remote procedure calls to communicate with ethereum clients
646
questions
0
votes
2
answers
24
views
How to optimally display over 500k EOA wallets' daily balances spanning three years back?
I would like to display over 500k EOA wallets' daily balances spanning three years back and wonder if there is a more efficient method than using eth_call and balanceOf 500k times per day for three ...
0
votes
0
answers
12
views
How to query or compute historical gas usage by address?
I'm trying to understand how services like fees.wtf calculate lifetime gas used by and address. Is there an JSON-RPC call or would I have to run a modified full node to index?
Similarly for top gas-...
0
votes
0
answers
11
views
API Mechanisms for Crypto Asset Transfer on Tron and BNB Blockchains
I have experience using the Bitcoin RPC API, which provides the capability to create applications that can communicate with the Bitcoin network. This includes the development of self-custody wallets, ...
0
votes
1
answer
29
views
"eth_estimateGas" throws execution reverted error
I was trying to use eth_estimateGas but It throws execution reverted, The error doesn't indicate anything.
This is my code :
final gas = await _web3Client.estimateGas(
sender: sender,
...
0
votes
0
answers
30
views
Can eth_estimateGas estimate gas for past blocks?
In my understanding, the eth_estimateGas json rpc method can currently only be used to estimate how much gas would be needed for a transaction based on the current/latest state of the blockchain.
...
2
votes
1
answer
40
views
Why are the params from the request object in reverse order between personal_sign and eth_sign?
Why are the params from the request object in reverse order between personal_sign and eth_sign?
For example, the personal_sign request object has the hex message in params[0]:
// Request
{
"id&...
0
votes
1
answer
34
views
Mismatch in `accessList` between Geth and Nethermind
Access Lists were introduced in https://eips.ethereum.org/EIPS/eip-2930, and one of the design decisions was to support duplicates "because it maximizes simplicity, avoiding questions of what to ...
1
vote
1
answer
358
views
How to set the timeout for provider http RPC requests in the ethers
I am using JsonRpcProvider in ethers V6. I am sending requests to node like getBlocknumber, getBalance ,sendTransaction etc through JsonRpcProvider. I want to set the response timeout for the requests ...
0
votes
1
answer
74
views
How to get consensus layer data for many blocks in a single RPC call?
You can get consensus related values such prevrandao and validator details with eth_getBlockByNumber or eth_getBlockByHash, but how can you get this data for many blocks without making thousands of ...
1
vote
2
answers
43
views
Error in reading properties of JsonRpcProvider Error: TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
This is the entire error message:
Error: TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
at interactWithContract (contractInteraction.js:6:1)
at handleAddProduct (...
0
votes
1
answer
653
views
jsonrpc":"2.0","error":"[ethjs-query] while formatting outputs from RPC '"transaction underpriced\"
I'm trying to deploy a BEP20 contract using Remix on Binance TestNet, but I keep getting this error:
creation of TToken errored: Returned error: {"jsonrpc":"2.0","error":&...
0
votes
0
answers
39
views
Creating address using Clef JSON-RPC without manual Confirmation on Clef
I am trying to create a new account using clef on my ETH node. I am using clef JSON-RPC
{"id": 1, "jsonrpc": "2.0", "method": "account_new", "...
1
vote
1
answer
19
views
Fetching an implementation contract using ethersjs
I'm attempting to get the implementation contract for a proxy using ethers (and testing it using the recently published Paypal USD: https://etherscan.io/address/...
0
votes
0
answers
13
views
"not logged in" when metamask gets locked by password
I have a pretty standard code used by logging in via MetaMask, something similar to this:
const connectWallet = async () => {
const provider = new ethers.providers.Web3Provider(window.ethereum)
...
0
votes
0
answers
159
views
Error HH604: Error running JSON-RPC server: Connect Timeout Error
I'm facing an error while running the command "yarn hardhat node"
ERROR:
Error HH604: Error running JSON-RPC server: Connect Timeout Error
For more info go to https://hardhat.org/HH604 or ...
0
votes
0
answers
31
views
Inaccurate result of `eth_EstimateGas` on `call`
I have the following contract which is used to execute a sequence of batched transactions using CALL
contract Test{
function executeBatch(address[] calldata dest, bytes[] calldata func) external {
...
0
votes
0
answers
21
views
What is the best way to store data from local eth full node to my DB
I would like to get the blockNumber and blockTimestamp for every new finalized block on ETH mainnet. I want to store this information as each new finalized block comes in. I need this data so that I ...
1
vote
0
answers
84
views
How to query the ethereum network to get Validator status, balance and validator reward history
Is there a way to query the ethereum network with a json rpc call to get the current balance, the status and the reward history of a validator?
thanks very much!
1
vote
1
answer
235
views
Flashbots on Mumbai/polygone
i'm trying to run a flashbot test on Mumbai. What is the flashbots RPC endpoint for Mumbai and Polygon network ?
1
vote
1
answer
24
views
Does chain_id exist in any smart contracts?
Is chainId something any smart contracts have knowledge of, or does it only exist externally to any given chain?
I see the eth_chainId function of the JSON-RPC. But are there any ABI queries against ...
0
votes
1
answer
27
views
Sign a transaction with Metamask which will be submitted later using a custom backend
Currently have a custom micro-service that sends & creates transactions depending on the use case which utilizes eth_sendRawTransaction meaning I'll need a web wallet to prompt the users to sign a ...
0
votes
0
answers
56
views
I can't create new account via rpc with personal_newAccount
I want to create new account via rpc
curl -X POST http://localhost:8545 -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"...
0
votes
0
answers
80
views
TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider') ? what to do next? even my ganache is running in bg
const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
const provider = new ethers.providers.JsonRpcProvider(
"HTTP://127.0.0.1:7545&...
0
votes
0
answers
94
views
EIP 1559 transaction structure
I am trying to develop a web3 library for deploying a contract, interct with the smart contract functions etc using the RPC methods in Golang. I know there is go-ethereum but doing it for my own ...
0
votes
1
answer
185
views
Can't clear pending transaction with current nonce getting an rpc error
Somehow my transaction was sent with extremely low gas fees from ETH mainnet to zkSync bridge. Is stays forever on pending
I saw this and tried to cancel it/speed it up but it did not work.
I tried to ...
0
votes
0
answers
21
views
Do ethereum-like chains share a JSON-RPC API?
For example, Polygon seems to have a similar JSON-RPC API, but I can't easily see whether it's actually the same API as the Ethereum spec.
Does anyone know whether the API specified here only applies ...
1
vote
1
answer
353
views
How to get internal transactions using JSON-RPC methods
In etherscan I noticed that there are transactions that have "internal transactions" inside of them, see this link: etherscan transaction.
Screenshot of the transaction:
My question is: how ...
0
votes
1
answer
74
views
How to detect if a transaction failed before Byzantium fork [duplicate]
In short:
I'd love to understand how to detect if a transaction failed before the Byzantium fork.
Explanation:
After the Byzantium fork it's easy to understand if a transaction failed or not, I just ...
3
votes
1
answer
481
views
What is the withdrawals field of the response of web3.eth.getBlock()?
I noticed that the withdrawal field has been added to the web3.eth.getBlock() response. Here is a small example:
{
<the usual fields>... ,
withdrawals: [
{
index: '0x3812d',
...
1
vote
3
answers
3k
views
How can I fix this JsonRpcProvider error?
TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
at main (D:\ethers-simple-storage\deploy.js:9:41)
at Object.<anonymous> (D:\ethers-simple-storage\deploy.js:26:...
0
votes
1
answer
187
views
HTTP requests limitation for an Ethereum Node
I have a fully synced Binance smart chain node with a proxy_pass to nginx for external request.
The problem that i have is the JSON-RPC return "null" if i process a large amount of requests.
...
0
votes
0
answers
84
views
debug_traceCall to get Events
Hello every body, i'm trying to understand how you make a debug_traceCall to get events
I found multiple example how to use debug_traceCall but no one explain how to get Events from a Txn
Can someone ...
1
vote
1
answer
91
views
Cannot get uncle block in my code but it exists in Etherscan
I'm following this very cool article on how to calculate rewards for a ETH miner and I'm stuck on the uncle rewards.
In the example they calculate the rewards on the ETH block with id 15349734, click ...
2
votes
3
answers
476
views
How to view the amount of storage a contract uses?
Is it possible to view the amount of storage a smart contract uses from an existing tool? Or if not is it possible to determine it by making json rpc calls?
There are a few similar questions such as ...
1
vote
1
answer
692
views
How to connect to my locally run Ethereum node using RPC endpoint?
I have an Ethereum full node running locally on my machine and wish to connect to it via an RPC endpoint. I have the node running with the command geth --http --http.api eth,net,engine,admin --authrpc....
1
vote
3
answers
599
views
The block number argument in ETH JSON-RPC function calls
Multiple JSON-RPC API functions take an optional block number argument:
eth_getBalance
eth_getCode
eth_getTransactionCount
eth_getStorageAt
eth_call
My questions is this: for historical blocks, is ...
0
votes
1
answer
31
views
Please help me with this events error with HttpProvider
I have encountered this error while trying to put my oracle online. Please, help!
0
votes
1
answer
127
views
How to get ERC-20 transfer events using curl?
I want to check whether my full node has historical logs correctly stored.
How can I query historical ERC-20 transfer events, or any historical Solidity events, using UNIX curl command?
11
votes
12
answers
19k
views
TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
const ethers = require("ethers");
const provider = new ethers.providers.JsonRpcProvider('https://mainnet.infura.io/v3/MYKEYISHERE')
web3.eth.getBlockNumber().then(console.log)
Error:
...
1
vote
0
answers
145
views
Error creating Uniswap V3 pool
Hi I have 2 ERC20 tokens deployed and I am trying to make a pool using Uniswap V3. When I deploy my createUniswapPool.js file I get an error. I have shared the error, createUniswapPool.js, and the ...
0
votes
1
answer
65
views
Get mapping value with JSON-RPC → eth_getStorageAt || eth_call
How do I get mapping values from my contract with JSON-RPC (without using web3.js)?
In my contract:
struct Data {
address key;
string value;
}
mapping(bytes32 => Data) public values;
I can't ...
0
votes
0
answers
213
views
How do I fetch the entire transaction-history of an address in the fastest way possible?
I just built myself a hardware full node at home. It's running geth and I'm accessing the on-chain data through the JSON RPC API. I'm using web3.py because of convenience.
I want to have a "...
0
votes
0
answers
22
views
How do I retrieve the account balances for proof of solvency?
I read Vitalik’s article “Having a safe CEX” and got curious about builting my own proof of solvency program. I understand how the merkle sum tree works in theory but I am having issues understanding ...
1
vote
2
answers
350
views
Communicating with the Ethereum network without node providers
I am learning about the Ethereum network and I think I have a general understanding of how things work. One thing I am unsure about is the precise mechanism by which an external user that is not part ...
0
votes
0
answers
62
views
Integrating non-EVM blockchains into an Ethereum Wallet like Metamask via custom RPC nodes
I'm trying to create a RPC bridge middle-ware for non-EVM compatible blockchains like Bitcoin and other L1's. I want to keep it very basic first and be able to pass in just an account balance via the ...
0
votes
2
answers
313
views
How can I parse an Ethereum block-level logsBloom?
I have been downloading blocks from EVM-based blockchains via the JSON-RPC API via eth_getBlockByNumber. In the block there is a logsBloom element which, if I understand this correctly, is an ...
0
votes
1
answer
151
views
How to get events pushed instead of polling in Ethereum?
I am trying to see how I can subscribe to an events on the Ethereum blockchain and I can only see polling mechanism and no push mechansim
I am look at the documentation for the JSON RPC endpoints here ...
1
vote
0
answers
62
views
eth_getProof for event logs?
Problem Brief
Hi, I've been looking for ways to prove to a light client that a log did get emitted on ethereum. I stumbled upon the eth_getProof RPC, but it's for getting the merkle proof for account ...
1
vote
1
answer
794
views
Missing value for required argument 0 - RPC
I am trying to send 2 transactions in one block using bnb48.club api. The problem is that I keep getting the error
{"jsonrpc":"2.0","id":48,"error":{"code&...
0
votes
1
answer
284
views
What is the standart for "params" in EIP-1193 (Ethereum Provider JS API)?
I am trying to build some low-level provider stuff and I am wondering what I should sign when I try to implement personal_signMessage and eth_sign.
Basically, every windows.ethereum.request() has a ...