Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

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

Can't return address from JsonRpcSigner from wagmi to pass into parameter view function

Trying to pass the connected wallet address into one of my view functions, but cannot get the address from the JSON object is there something I am missing here? Using wagmi to get signer from the ...
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....
1 vote
2 answers
622 views

Efficient way to get timestamps for ETH logs

For some context, I'm writing software to index blockchain data for a dApp I'm creating. It basically uses ETH RPC calls to get eth logs, parses them, inserts into a DB, and updates checkpoints. I ...
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":&...
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 ...
1 vote
1 answer
616 views

How to parse trace output using ABI & web3?

I am pulling a trace from a Parity node using the JSONRPC API. It looks like this: print(trace) { 'action': { 'callType': 'staticcall', 'from': '0xXXXXXXXXXXXXXXXXXXXXXXXXXXXX', ...
1 vote
1 answer
4k views

message: 'invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.value of type *hexutil.Big'

I am using a JSON RPC request and source code is as follows: var options ={ url: "http://127.0.0.1:8545", method: "POST", headers: {"Content-Type":"...
2 votes
1 answer
692 views

Geth Reverse Proxy "Invalid Host Specified"

I am getting 403 "invalid host specified" Running geth this way: docker run --rm -p 8547:8547 -p 30303:30303 --name=geth -dti -v /data/geth:/data ethereum-node --datadir=/data --http --http....
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: ...
0 votes
1 answer
404 views

How to connect AWS node with Metamask?

Sorry its really primitive and silly question but I'm very low on information about this area but from the things I've heard and I've seen I managed to create a node from "https://eu-west-2....
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: ...
3 votes
1 answer
610 views

Getting the latest eth_call result from a cluster of nodes

What's the best way to know the block number associated with the result of an eth_call? Assume I have several nodes that i'm running and i'm making calls to all of them (for redundancy). My goal is ...
35 votes
6 answers
46k views

Is there a way to find an account's current transaction nonce?

I need to know my transaction nonce because I am doing fancy stuff with contract addresses (which are the keccak hash of my address + my transaction nonce). Is there a way to find this through the ...
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 ...
1 vote
1 answer
343 views

Documentation For Token Smart Contracts with JSON RPC

This is the documentation for the Ethereum Json RPC: https://github.com/ethereum/wiki/wiki/JSON-RPC Pretty straight forward, but where is the documentation for dealing with tokens via this protocol? ...
1 vote
1 answer
387 views

understanding hardhat JSON-RPC url - when is it used by DAPP?

I have a react.js app running using Portis wallet and I deployed one of my smart contracts using hardhat, using the url obtained from pokt.network and the other from default public url: https://rpc....
3 votes
2 answers
4k views

Get full transaction list of an ethereum address using JSON-RPC

I'm currently developing a Java application which communicates with Geth using JSON-RPC. I managed to implement something like @rustyx suggested on this thread using an HTTP connection, but it's too ...
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 ...
3 votes
2 answers
3k views

Fetch ERC20 Token Balance for given address using Web3 Python

I’m desperately looking for a method that allows me to retrieve all token owned by a wallet using python. I should insert the wallet address as I put and the code should return the list of the token ...
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 ...
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 ...
1 vote
2 answers
7k views

JSON RPC get address balance

I'm trying to get the ether balance for any ethereum address. I've set up a node with the Ethereum daemon, but as far as I can tell, using eth_getBalance you can only get the balance of your own ...
2 votes
1 answer
678 views

Ethereum Contract ABI - Encoding for functions with no arguments

I am using argument encoding from this page (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) to build data field for offline signing. I am using eth.sendRawTransaction to call a function ...
0 votes
2 answers
1k views

How to get array elements in JavaScript from contract call with JSON-RPC returning an array?

I have a function in my Solidity contract whose prototype is: function checkLastCustomerInvoices() public view returns (bytes32 [] memory) When I call it from the Truffle console it returns an array ...
4 votes
1 answer
5k views

UTC/json wallet file: deleted -> recovered -> corrupted. 0.1 ETH REWARD

--EDIT-- I have advanced in my research. The UTC/JSON file in question is a 491 byte file. There are 256 random characters in the file with each 16 possible characters. Like a 256-number long ...
5 votes
3 answers
1k views

Why do blockchain networks like Ethereum utilize JSON RPC calls and not REST APIs or graphQL?

I'm sorry. This might be a silly question but I am very much new to backends and networking protocols. I can write decent smart contracts but I don't know much about the backend. So... I wanted to ...
5 votes
1 answer
1k views

eth_getTransactionReceipt returns null only sometimes and only on my node, tx is successfully mined in

I'm having this strange problem and it may be related to the way my node is configured. I'm making calls to both infura and my own nodes like so: {'id': 123, 'jsonrpc': '2.0', 'method': '...
0 votes
1 answer
418 views

rlp: non-canonical integer (leading zero bytes) for uint64, decoding into (types.LegacyTx).Nonce

I have written a program to send raw transactions via JSON-RPC. It seems to work for existing wallets, but I get this error when I try to send the very first transaction of a new wallet (nonce is zero)...
2 votes
1 answer
312 views

Remix IDE Desktop + Geth node as test network

I'm trying to connect the Remix Desktop client to my local Geth node. as usual i added: geth --rpc --rpccorsdomain https://remix.ethereum.org while starting up the node. This obviously only works ...
0 votes
1 answer
863 views

web3.eth.sendTransaction sending to random address

I've been trying since near 2 weeks to make my users able to deposit and send ethereum on site. I use geth mostly, and more recently web3.js. I face a very weird issue. All seems well, transaction ...
9 votes
2 answers
386 views

Receive deployed contract address by transaction hash with JSON-RPC request

I want to receive deployed contract address by transaction hash. Transcation example - 0x996a683acd59a2ad17461f76ce0f387a89a5ac257ec5d667556219c6acc7f45a. As you can see this contract was deployed by ...
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 ...
3 votes
1 answer
903 views

send a tx, json rpc, golang

I tried to send a tx via geth json rpc using the following code. But the geth rpc server response with "Invalid sender". I also tried HomesteadSigner. In that case there is no error received, but I ...
5 votes
1 answer
549 views

Accessing custom JavaScript functions via RPC API on Geth

Geth allows me to define & load my own custom JavaScript functions with --preload flag or require() on Geth console. But is there way to access my functions via RPC interface? Like : curl -H "...
0 votes
1 answer
6k views

CONNECTION ERROR: Couldn't connect to node http://localhost:8545

I have started geth using below: geth --rpc --rpccorsdomain * --rpcport 8545 --rpcapi personal,web3,eth,net and this is my web3.js code: <script src="/bower_components/web3/dist/web3.min.js">&...
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?
1 vote
2 answers
2k views

Transaction Underpriced at gas price less than 10Gwei on Binance Testnet

I am working on BEP20 token which I eventually want to deploy on the Mainnet. I have currently deployed the token on the Testnet. I am using metamask as my wallet. When I interact with the contract ...
0 votes
1 answer
469 views

How can my geth listen to my domain,

i have setup my geth private node on my ubuntu server and sofar so good localhost running perfectly. and now i really want to use my domain http://rpc.example.com instead of http://localhost:8545. and ...
2 votes
3 answers
1k views

Error: Invalid number of arguments to Solidity function | when trying to pass in parameter from App.js to Solidity

I am trying to call a function in my Solidity file (Coder.sol), while passing through a parameter from my App.js file. My function in my App.js file looks like this: handleStartRequirement: function(...
0 votes
1 answer
694 views

sendTransaction returns Invalid JSON RPC response

I am trying to send a transaction to a Besu node that I have running locally. However, from the following code, when I run npx ts-node myFile.ts, I get Error: Invalid JSON RPC response: const Web3 = ...
3 votes
1 answer
2k views

Encode method signature and parameters using Go-Ethereum

Is there any way to use the Go-Ethereum library to get the string I have to send to JSON RPC to call a contract method. I mean, Go-Ethereum comes with a CLI, so there must be some built-in functions ...
3 votes
1 answer
2k views

Subscribe to events usign geth websocket

I'm trying to subscribe to geth using the websocket api. First step was to start geth: geth --ws --wsport=8456 --wsorigins="*" --fast --cache=512 --rpcport=8455 --rpc --rpcapi="personal,eth,network" ...
0 votes
1 answer
497 views

How a json-rpc client can tell that a transaction it's sent has been rejected?

Judging from https://github.com/ethereum/wiki/wiki/JSON-RPC the api client can synchronize on events such as: Transaction is received/pending: eth_gettransactionbyhash returns non-null with block ...
0 votes
1 answer
1k views

HardHat does not build artifacts when i compile the contract

I compile the contract but the json file and the debug file does not appear in the artifacts.i get this from the compiler: "Compiled 1 Solidity file successfully", i have the default hardhat ...
0 votes
2 answers
811 views

.json files for contracts are not created

I am really new in ethereum and solidity and I am having hard time to figure out how to get the .json equivalent for contracts. I have the Campaign.sol inside the contractsFolder. The Campaign.sol ...
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 ...
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" ...
4 votes
1 answer
826 views

JSON RPC Load Testing / Stress Testing Tool

I am trying to test my quorum setup by load testing it. Are there any JSON RPC Load Testing / Stress Testing Tools? Does Postman or SOAP UI supports JSON/RPC calls?
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.
3 votes
1 answer
12k views

Find out latest block hash in Ethereum using JSON-RPC

I am developing an ethereum block explorer in PHP and have established an JSON-RPC communication with my server geth node successfully. Nevertheless, I am kind of stuck when trying to find out the ...

1
2 3 4 5
14