Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
2 votes
0 answers
22 views
+50

How to sign Ethereum message in C#

I`m trying to convert this code to c# const message = response.data.message; const jsonProvider = new ethers.providers.JsonRpcProvider(RPC_URL) const ethersSigner = new ethers.Wallet(privatekey, ...
36 votes
5 answers
34k views

How to explore all transactions for a given account?

After beeing able to check account balances, I am looking for a method to list all transactions for a given Ethereum account through json-rpc protocol. I haven't found any method suitable for that on ...
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 ...
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
3 answers
773 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 ...
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
1 answer
19 views

Fastest RPC Endpoint for Binance Smart Chain

What is the fastest RPC endpoint for accessing the Binance Smart Chain, and are there alternative methods of communication with this blockchain? Additionally, does the performance of these methods ...
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
2 answers
824 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 ...
0 votes
1 answer
487 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 ...
0 votes
1 answer
701 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

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
501 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
227 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
44 views

how can we control the logic behind ethersJs fallbackProvider's choices

I am trying to use ethersJs to handle multiple RPCs with a fallback mechanism, to ensure we always get a response. I tried the FallbackProvider . The probelm with it is that event if you set a quorum ...
1 vote
0 answers
4 views

SSZ serialization and JsonRPC usage

As I understand, the SSZ was introduced in Ethereum 2.0 for the serialization of data in different contexts. The previously used serialization is RLP and it is used when making a JSON-RPC request to ...
0 votes
0 answers
24 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
0 answers
22 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: ...
1 vote
0 answers
22 views

How to foundry test a function which uses 1Inch Swapping functionality?

I'm working on a protocol's Adapter contract. The Adapter contract have a function, which let users sell their PortalEnergy (assume tokens) to get ETH. They use 1Inch Swapping functionality to get ...
12 votes
15 answers
27k 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: ...
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
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....
1 vote
2 answers
681 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
733 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
102 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
629 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
5k 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
698 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
1 answer
405 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....
3 votes
1 answer
612 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
5 answers
47k 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
35 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
345 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
405 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
5k 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
402 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
21 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
20 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
8k 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
684 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 ...
6 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
431 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
316 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
388 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
45 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 ...

1
2 3 4 5
14