Questions tagged [json-rpc]
json-formatted remote procedure calls to communicate with ethereum clients
643
questions
0
votes
1
answer
19
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
93
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
40
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
22
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
317
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
19
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
14
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
12
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
65
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
21
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
17
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 ...
0
votes
0
answers
43
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
98
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
19
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
38
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
55
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
75
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
113
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
17
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
217
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
52
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
371
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
2k
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
132
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
65
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
72
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
345
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
480
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
458
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
30
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
97
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?
10
votes
11
answers
16k
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
122
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
50
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
164
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
20
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
250
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
53
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
253
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
115
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
54
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
588
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
221
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 ...
0
votes
1
answer
138
views
Log JSON-RPC calls using web3.js
In ethers.js you can log JSON-RPC calls like this:
ethers.provider.on("debug", (info) => {
if (info.request) {
console.log("Request:", info.request);
}
if (...
0
votes
1
answer
143
views
Alchemy api eth_getProof returns a wrong storage slot
I encountered a issue that eth_getProof returns wrong storage key and proof. This is a bash script which could reproduce the issue. And after some tests, I found increasing the interval between thoes ...
0
votes
0
answers
47
views
How to copy all account balances from main network to a private chain?
So I want to have a playground where all accounts have same balance as on mainnet, yet I do not have access to a fully synchronized node. All I want are account-balance pairs to be synchronized, no ...
0
votes
0
answers
86
views
How to deserialize Ethereum `DATA`?
How do I deserialize the result value, so that I can get a number? What is this type of data even called with 0x........ When getting the latest block on the geth node I get this for example 0x79c234.
...
2
votes
4
answers
652
views
What are the best online tools to easily make json rpc calls?
What are the best tools to make any of the Ethereum json rpc method requests online in addition to easily interacting with smart contracts?
0
votes
1
answer
27
views
MetaMask does not let me send transactions on private network
Metamask lets me deploy contracts on my private network and but it does not let me send transactions.
Its real network running on a few nodes with PoW, only thing different is that minimum gas fee is ...