Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Foundry's Anvil localnode not prcessing transactions?

I've deployed smart contracts using the ContractFactory Objects provided by ethers.js 5.7 and they were working quite fine but today the contracts don't seem to be getting deployed; in fact any ...
Geek's user avatar
  • 21
0 votes
0 answers
8 views

Nethermind Execution Client RPC multiplicity

when running a nethermind-prism node can you route provider communications and local processes through IPC but also allow external HTTP RPC access?
Max.Koeg's user avatar
0 votes
0 answers
60 views

JsonRpcEngine: Response has no error or result for request:

I tried to deploy my smart contract on bsc testnet but it failed. Please explain where it went wrong.
alex's user avatar
  • 1
1 vote
0 answers
27 views

err="execution timeout" timeout when calling debug_trace transaction

I have one question. We have organized the ethereum en node as an archive. Since then, we have called large amounts of debug_traceTransaction to that node but err="execution timeout" ...
spark's user avatar
  • 11
0 votes
2 answers
31 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 ...
littlewatermeloncat's user avatar
0 votes
0 answers
18 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-...
casualprogrammer's user avatar
0 votes
0 answers
16 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, ...
sci9's user avatar
  • 101
0 votes
1 answer
211 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, ...
Reza Aslejeddian's user avatar
0 votes
0 answers
62 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. ...
MShakeG's user avatar
  • 1,613
2 votes
1 answer
44 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&...
jiamijiang's user avatar
0 votes
1 answer
40 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 ...
Lautaro Emanuel's user avatar
1 vote
1 answer
805 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 ...
imelon2's user avatar
  • 508
0 votes
1 answer
113 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 ...
user72364's user avatar
  • 135
1 vote
2 answers
100 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 (...
Dhananjay Joshi's user avatar
0 votes
1 answer
699 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":&...
mazagngy's user avatar
0 votes
0 answers
45 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", "...
michaelaberra's user avatar
1 vote
1 answer
30 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/...
Abraham P's user avatar
  • 103
1 vote
0 answers
16 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) ...
Camila326's user avatar
  • 115
1 vote
0 answers
283 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 ...
PsychoPunk_Sage's user avatar
0 votes
0 answers
46 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 { ...
johnhckuo's user avatar
  • 341
0 votes
0 answers
37 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 ...
zkrefai's user avatar
1 vote
0 answers
117 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!
mazi's user avatar
  • 11
1 vote
1 answer
439 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 ?
adam mr's user avatar
  • 71
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 ...
Sergio Gliesh's user avatar
0 votes
1 answer
35 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 ...
CoderMan's user avatar
0 votes
0 answers
86 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":"...
Madhan's user avatar
  • 1
0 votes
0 answers
99 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&...
Aditya Sinha's user avatar
0 votes
0 answers
109 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 ...
Anju Balakrishnan's user avatar
0 votes
1 answer
294 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 ...
Car Konto's user avatar
0 votes
0 answers
22 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 ...
Sergio Gliesh's user avatar
1 vote
1 answer
584 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 ...
Jacob's user avatar
  • 155
0 votes
1 answer
101 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 ...
Jacob's user avatar
  • 155
3 votes
1 answer
582 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', ...
Pierogi's user avatar
  • 203
1 vote
3 answers
4k 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:...
Hammadullah's user avatar
0 votes
1 answer
254 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. ...
Mohammed's user avatar
0 votes
0 answers
98 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 ...
forexmp45's user avatar
1 vote
1 answer
109 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 ...
Jacob's user avatar
  • 155
2 votes
3 answers
657 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 ...
MShakeG's user avatar
  • 1,613
1 vote
1 answer
1k 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....
Kakarot12's user avatar
2 votes
3 answers
738 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 ...
kfx's user avatar
  • 1,454
0 votes
1 answer
34 views

Please help me with this events error with HttpProvider

I have encountered this error while trying to put my oracle online. Please, help!
Vidhan Mangla's user avatar
0 votes
1 answer
179 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?
Mikko Ohtamaa's user avatar
11 votes
12 answers
23k 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: ...
dertobiaszwei's user avatar
1 vote
0 answers
174 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 ...
SideChain Labs's user avatar
0 votes
1 answer
74 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 ...
Alberto4543's user avatar
0 votes
0 answers
257 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 "...
PeepoXBT's user avatar
1 vote
2 answers
509 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 ...
Adham's user avatar
  • 181
0 votes
2 answers
399 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 ...
Michael C's user avatar
0 votes
1 answer
183 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 ...
Finlay Weber's user avatar
2 votes
0 answers
73 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 ...
Patrick's user avatar
  • 21

1
2 3 4 5
13