Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

How to broadcast a transaction directly to a centralised sequencer (Arbitrum/Optimism/others)

Most layer two chains have their centralised sequencer which operates first-come-first-server, or so-called fair sequencing manner. If you use the centralised sequencer, there are no Malicious ...
Mikko Ohtamaa's user avatar
1 vote
1 answer
31 views

`eth_estimateGas` with `stateDiff` on a counterfactual smart contract

I have a counterfactual Safe ( v 1.3.0 ) , where funds have been already sent (ERC-20 token). I want to relay a transaction where Safe is being deployed funds are moved out of it Transaction will be ...
70ny's user avatar
  • 231
0 votes
0 answers
12 views

Trying to setup Astar zkEVM Mainnet Permissionless RPC Node but failed

I am trying to setup Astar zkEVM Mainnet Permissionless RPC Node following these docs, but it's not working for me. Looks like the container zkevm-rpc is not functioning. curl -H "Content-Type: ...
Tapas Jana's user avatar
0 votes
0 answers
16 views

JSON-RPC Connection Pool Implementation

I am using go-Ethereum ethclient and rpc packages to interact with block chain nodes to communicate via JSON-RPC. I usually code below two lines to get connection to the node and then use any of the ...
SriVani B's user avatar
0 votes
1 answer
18 views

Looking for BSC RPC Provider with Log Monitoring

I'm in search of a reliable RPC provider for accessing the Binance Smart Chain (BSC) network, preferably with log monitoring capabilities similar to Alchemy. Any recommendations or insights would be ...
adam mr's user avatar
  • 101
0 votes
0 answers
37 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
11 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
163 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
45 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
34 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
20 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
17 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
371 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
83 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,603
2 votes
1 answer
47 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
43 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
969 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
  • 528
0 votes
1 answer
131 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
136 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
720 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
55 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
32 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
18 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
352 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
53 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
38 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
2 votes
0 answers
126 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
  • 21
1 vote
1 answer
498 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
  • 101
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
41 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
92 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
103 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
114 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
364 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
689 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
112 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
624 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
275 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
1 vote
1 answer
115 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
3 votes
3 answers
698 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,603
1 vote
2 answers
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
823 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,516
0 votes
1 answer
35 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
194 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
12 votes
14 answers
25k 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
184 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
79 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
275 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
2 3 4 5
14