Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

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

Geth doesn't handle Large number of Requests

We have a privateblockchain setup in an ec2 instance, I am trying to send 300 requests in one minute from a node server to the privateblockchain using web3.js The blockchain server runs out of ...
user avatar
0 votes
0 answers
15 views

Getting error on my genesis block

Fatal: invalid genesis file: hex string of odd length on my genesis block { "nonce":"0x000000000000042", "difficulty":"0x4000", "alloc": {"...
user avatar
0 votes
0 answers
85 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 ...
user avatar
0 votes
0 answers
27 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 ...
user avatar
0 votes
1 answer
20 views

What format is the second parameter of eth_sign?

{"jsonrpc":"2.0","method":"eth_sign","params":["**", "0xdeadbeaf"],"id":1} Here is an example Ignoring the first ...
user avatar
0 votes
0 answers
35 views

eth_newPendingTransactionFilter filter fails but recovers

Context: Using json rpc calls and a quicknode endpoint I create an eth_newPendingTransactionFilter and then use the response id to get filter changes in the mempool. Every 100ms I trigger the ...
user avatar
  • 103
0 votes
0 answers
36 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....
user avatar
  • 62
0 votes
1 answer
28 views

Unlocking GETH RPC to the world

I have been trying to connect remotely to my node (I have created it purely for Querying the etherium network NO OPEN ACCOUNTS). I am starting geth like so: sudo geth --http --ws -syncmode light --...
user avatar
0 votes
0 answers
24 views

Deployment of a contract via the sendRawTransaction RPC-call avoiding EIP155 reverts

I want to send a contract deployment transaction just through the raw signed transaction data. Here is what i have done: import { ethers } from "hardhat"; import { Transaction } from '...
user avatar
  • 147
0 votes
0 answers
19 views

Is it possible to define a static jsonRPCProvider for evm chains?

I'd like to define a static rpc connecting to an EVM chain such as matic/harmony which disregards whatever network metamask is currently using. Most examples have set a provider to window.ethereum for ...
user avatar
0 votes
1 answer
20 views

Connecting to RPC for too long? "Invalid JSON RPC response"

I have a script that's "always" connected to the Fantom chain (EVM compatible) during the duration of execution. const web3 = new Web3("https://rpc.ftm.tools/", { reconnect: ...
user avatar
  • 101
0 votes
0 answers
14 views

Connecting to ethereum - JSONRPC providers vs injected providers

What are the prons and cons of using JSON RPC providers - like infura, alchemy vs injected providers like metamask? One thing i could think of is injected providers are platform specific - like ...
user avatar
0 votes
0 answers
12 views

Is there a good way to determine that client node is ready?

Before checking current balances and sending new transactions we need to verify that the node has up-to-date state. What we've tried so far: eth_syncing alone. This just doesn't work at least for ...
user avatar
0 votes
1 answer
56 views

Store data from .json to eth smart contract/solidity

is it possible to store data from .json file to blockchain via smart contract and if yes, how? I mean i have a json file with 4 total variables or a struct inside a struct, which i want to read, store ...
user avatar
0 votes
1 answer
20 views

I have a stakeTransaction, but i can't figure out why it wont let me input the amount of tokens i want to stake. not responding to input on frontend

const stakeTransaction = async () => { try { if (!ethereum) return alert("Please install MetaMask."); const { amount } = formData; const Contract = createEthereumContract(); ...
user avatar
0 votes
1 answer
238 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 ...
user avatar
0 votes
1 answer
86 views

How to specify priority fee and max fee per gas in Geth' JSON-RPC API?

A legacy transaction can be created with the following parameters through the eth_sendTransaction API: params: [{ "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to&...
user avatar
  • 31.3k
0 votes
0 answers
23 views

Connecting to a metamask wallet from remote application

I can connect to Metamask wallet from the same browser that runs the application (and send transaction to blockchain). Is it possible to connect to the same Metamask wallet but when the application is ...
user avatar
0 votes
0 answers
54 views

JavaScript how to create provider for any Ethereum RPC URL?

In my node.js application I'm trying to do some direct RPC calls rather than going through some abstraction such as web3.js. Are there any node modules that offer a HTTP provider similar to the one ...
user avatar
0 votes
0 answers
56 views

How can I pass a JSON object to a smart contract?

let's say I have a JSON object containing addresses and token balances as key pairs: {"0x0...":"10", "0x0...":50, "0x0...":200} I'm building a smart contract ...
user avatar
  • 21
0 votes
1 answer
147 views

How does eth_sendTransaction method of ETH JSON-RPC API work?

As I understand, this method sends a transaction to the network. But in order for nodes to verify this transaction, the transaction needs to be signed right? No where in the parameters of this method ...
user avatar
  • 5
0 votes
1 answer
557 views

Error: network does not support ENS

I am currently trying to build an NFT Marketplace and trying to establish a connection with alchemy-mumbai using JsonRpcProvider. I keep getting this error and can't figure out what i need to do: ...
user avatar
  • 1
1 vote
1 answer
92 views

`eth_getTransactionByHash` returns `null` for older transactions. Why? When?

I was looking into an issue with RPC calls with eth_getTransactionByHash and recognized for older transactions it returns null for geth full nodes: Tx 511 days ago: ...
user avatar
  • 487
0 votes
0 answers
45 views

Chainlink Job Request With Bridge: error making http request: Post "http://localhost:8080": dial tcp 127.0.0.1:8080: connect: connection refused

I am trying to run my chainlink external adapter with a job in my node. However, every time I get an error at "fetch bridge" task: error making http request: Post "http://localhost:8080&...
user avatar
  • 1
0 votes
0 answers
47 views

How do I listen to changes for an ethereum address using websockets + RPC eth_subscribe method + postman

I am trying to listen for changes in a wallet balance on the Kovan testnet , so I have connected to a Kovan node using a node provider's websocket endpoint, I have no errors connecting, and no errors ...
user avatar
0 votes
0 answers
24 views

Metamask & Remix can't connect to Digital ocean ethereum node

I'm encountering an issue to connect to a digital ocean ethereum node from metamask and remix. When using the same startnode.sh file in local everything works and remix and metamask can connect to ...
user avatar
  • 183
0 votes
0 answers
29 views

Getting 0x when retrieving total supply for older block numbers

I am trying to access Binance smart chain supply information for BUSD stable coin by using https://bsc-dataseed.binance.org/ RPC endpoint with the body: { "jsonrpc": "2.0", ...
user avatar
  • 101
0 votes
0 answers
113 views

How to add a custom JSON RPC endpoint to geth?

I would like to add custom RPC method to geth. I found this question: How to add a custom JSON-RPC endpoint to geth?. But it does not work... What I did: 1. https://github.com/ethereum/go-ethereum 2. ...
user avatar
  • 171
0 votes
1 answer
93 views

Getting count of Ethereum transactions per day

I’m trying to write a call to get count of eth transactions per day, without using a pro api subscription. Anyone has some ideas about how to achieve this, maybe using an infuria.io project api? ...
user avatar
1 vote
1 answer
834 views

How to get chainId currently selected in walletconnect?

I connected WalletConnect to my dApp, and it returned account address & chainId. After changing the chain on WalletConnect wallet, no event or function is called. How can I know at my dApp ...
user avatar
  • 11
0 votes
1 answer
234 views

Simulating a transaction's state change without writing to the blockchain

I'm trying to simulate a transaction to observe the state change and events that will be emitted, before sending the transaction to the blockchain. I'm interested in all the internal calls and state ...
user avatar
  • 1,790
1 vote
1 answer
182 views

How to gather historical events emitted by any contract

I am trying to gather all events of a specific type on the entire chain, regardless of what contract emitted them. When trying to find solutions online, I came across code like the following (source): ...
user avatar
  • 347
0 votes
0 answers
14 views

What are the shortcomings of running a light-node with Geth?

When handling JSON-RPC requests, which one will fail, or are not supported by a light-client. I am running a geth light-client. Thanks!
user avatar
0 votes
0 answers
128 views

Cannot connect geth via JSON RPC or WebSocket, only via IPC

I run the geth-cli with $ geth console --mainnet --syncmode "snap" --cache=8192 --datadir "~/.ethereum" --datadir.minfreedisk 30000 --http.corsdomain "*" --ws --http.api ...
user avatar
  • 147
1 vote
0 answers
27 views

Interacting with erc20 using web3js

I am trying to fetch the balance for a wallet with address WALLET_ADDRESS, in an ERC20 contract located at CONTRACT_ADDRESS with the following approach: let contractInstance = new web3.eth.Contract(...
user avatar
0 votes
1 answer
23 views

Why are failed transactions kept in node storage when querying eth_getTransaction...?

I'm querying an Alchemy node to get all the transactions from a single block. However, I see that it returns failed transactions. Why are these kept in the node's storage, and do they reflect only the ...
user avatar
  • 66
1 vote
1 answer
61 views

eth_accounts RPC method returns some unexpected accounts on the Fantom blockchain

What are the accounts that get returned by the eth_accounts RPC call on the Fantom blockchain? This doesn't seem to be the case on other blockchains and they (seemingly) always return an empty list. ...
user avatar
  • 121
0 votes
0 answers
104 views

Connect to Flashbot's JsonRPC Nethereum

I'm trying to connect to Flashbot's JsonRPC using c# and I can only manage to do that on TypeScript: const CHAIN_ID = 5; const provider = new providers.InfuraProvider(CHAIN_ID) const ...
user avatar
1 vote
2 answers
896 views

how do you parse json rpc errors on frontend?

How do you parse returned json rpc errors from a failed transaction to get the underying revert message if any? I'm on frontend. example: try { await contract.methods.someMethod().send({from: ...
user avatar
  • 35
0 votes
1 answer
86 views

Some json-rpc requests are not served by a possibly unsynced full node on localhost

I want to make some JSON RPC calls to my rinkeby node, which I have set up via: $ geth --rinkeby --http --http.api personal,eth,net,web3 --cache=4096 --http.port 3337 I seem to have problems ...
user avatar
  • 147
0 votes
1 answer
56 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)...
user avatar
  • 1
1 vote
1 answer
638 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 ...
user avatar
  • 11
1 vote
0 answers
133 views

Geth over HTTP RPC responding but doesn't return info to eth_blockNumber

I have a synced full node. When I run: # curl --location --request POST 'localhost:8545/' --header 'Content-Type: application/json' --data-raw '{ "jsonrpc":"2.0", &...
user avatar
  • 11
0 votes
0 answers
154 views

Invalid sender, insufficient funds, nonce too low when sending raw signed transaction on Rinkeby via JSON-RPC (Infura)

I am writing a C++ program to interact with Ethereum using JSON-RPC calls to an Infura node. I am trying to send a signed transaction using "eth_sendRawTransaction" on the Rinkeby network as ...
user avatar
  • 1
0 votes
0 answers
75 views

Contract deplyment using metamask?

I am trying to deploy a smart contract using Metamask for my web toy project. I want to implement such a web, that users can generate a token using only one click. I understood how to deploy smart ...
user avatar
  • 13
0 votes
0 answers
28 views

How to host JSON RPC API using cpp-ethereum

I installed the cpp-ethereum on my local using https://github.com/ethereum/aleth After launched the aleth on Ubuntu, RPC server is not working properly. When I tested the RPC API on Postman, it ...
user avatar
  • 123
0 votes
1 answer
216 views

How can signing and sending transactions take place within Meta Mask if the user is not running a local node?

I have been trying to wrap my head around this for a while to no avail, so please help me understand. I've created several dapps and smart contracts in the past using web3.js, ethers.js, web3.py, etc. ...
user avatar
  • 1
1 vote
1 answer
110 views

Why is eth_getTransactionCount nonce incorrect under load?

I'm calling eth_getTransactionCount via JSON RPC, and taking that value and trying to use it as nonce for a RawTransaction to send ETH. I'm running this against a ganache server. This happens in a ...
user avatar
0 votes
1 answer
82 views

How can I get returns in Truffle (using json-rpc)?

I am newbie at Truffle environment. I built a new smart contract. Now I am trying to test this in truffle environment. I digged web for solving this problem but couldn't find any solution :( Question ...
user avatar
  • 101
0 votes
0 answers
11 views

is there a way to connect a new network programatically with ethers, web3react? [duplicate]

I always use networks like. rinkey or ropsten. But now I have a custom RPC information, I know it can be added directly in MetaMask but I'd like to know a way to add it programmatically with ethersjs
user avatar

1
2 3 4 5
12