Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
0
votes
0answers
27 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. ...
0
votes
0answers
18 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 ...
0
votes
1answer
26 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 ...
0
votes
0answers
10 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
0
votes
0answers
25 views

how to cache responses of rpc api calls in DApps

Issue: JSON RPC Queries When interacting with an ethereum rpc interface for building DApps with JS or TS, the huge amount of communication round trips becomes a huge burden. The UI just takes a couple ...
0
votes
0answers
15 views

What is Metamask procedure to consider a transaction complete

It's unclear what Metamask is looking at in the receipt to consider a transaction completed. Once the transaction submitted. It's waiting for the next interval to fetch the block number. If there is a ...
1
vote
0answers
19 views

eth_getTransactionReceipt with null block hash

I am getting receipts with null for blockHash and blockNumber. That means I am somehow getting a receipt before the block is mined. Is this an expected result? If so, what is the use of it?
0
votes
0answers
27 views

How to open Geth for Docker connection?

I'm trying to install 0x-api (https://github.com/0xProject/0x-api). When Im using Infura JSON RPC URL as a provider in .env, API works great. One of the Docker containers uses this ETHEREUM_RPC_URL. I ...
0
votes
0answers
27 views

Custom Node JS RPC for Metamask

Does anyone have information on the metamask handshake to the RPC endpoint? When you add a new RPC in metamask. It try to confirm the chain id returned by the RPC. Metamask is posting this to the RPC. ...
0
votes
1answer
102 views

Start API Network timeout

I am trying to start local 0x-api(https://github.com/0xProject/0x-api). I first tried starting the api setting Infura Rpc Url in .env . Everything worked great. But I want to use my Local Ethereum ...
0
votes
1answer
40 views

Why can I listen to JSON-RPC events even though my node working under HTTP?

eth_subscribe method of JSON-RPC API requires a full duplex connection, such as WebSocket, hence subscribing to events is impossible via a HTTP connection. I use Ganache as an ethereum node and ...
0
votes
0answers
366 views

Error: [ethjs-query] while formatting outputs from RPC, when trying to deploy Contract from remix

I get the following error when i try to deploy my smart contract on remix onto the polygon chain: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"...
0
votes
1answer
171 views

Why am I getting "Error: unknown account" when trying to send ETH using eth.sendTransaction?

I have an ETH testnet set up using this docker-compose.yml file. When I try to send 1 wei from the "buffer" account 0x411167FeFecAD12Da17F9063143706C39528aa28 to the test account ...
0
votes
0answers
35 views

How to eth_getBalance from a Token not from account

i am trying to get the balance from a token and not from my account but it is not working. I can get balance from my account, but not from token. My code bellow. async function getProvider() { const ...
1
vote
0answers
42 views

Rinkeby/Infura Block Gas Limit Issues

I am trying to deploy a contract with a gasLimit of around 8,000,000 on the Rinkeby testnet using an Infura provider. Basically something like this: await MyContract.deploy({ gasLimit: 8000000 }); ...
0
votes
0answers
66 views

How to decode input for tx sent to zero address (contract creation tx)

Decoding transaction input data requires providing ABI. How can I decode transaction input from a transaction issued to "zero" address? This special address is used for creating new ...
0
votes
1answer
20 views

Does "eth_getCode" return the init bytecode or the deployed bytecode?

The Ethereum JSON-PRC spec contains an eth_getCode method, but it is not specified what is being retrieved: Init bytecode (including constructor) Deployed bytecode (without constructor) Which one is ...
0
votes
0answers
40 views

txtpool_content actual response output

we are extending cpp-ethereum/aleth to add new endpoints such as txpool_content but we are confuse on what is the actual output response of the endpoint, infura and alchemy seems it does not support ...
0
votes
0answers
15 views

calculate average from APi in solidity

I want to create a code that can calculate the average of numbers. the numbers should come from an API or IPFS in the JSON format file. Can anyone help me?
0
votes
0answers
43 views

Sending Polygon via Metamask

I'm converting my DAPP to Polygon from Ethereum. And currently we have a frontend system that lets users pay us for our services. We are doing this using the Metamask RPC API. But because we are no ...
0
votes
1answer
238 views

Getting current base fee from json rpc

I'm looking for a way to fetch current base fee using JSON RPC (and go-ethereum ethclient.Client as client) I'm aware of new JSON RPC eth_maxPriorityFeePerGas which gives me second parameter - but ...
1
vote
0answers
78 views

Hardhat and Ethers.js Mint Slow with 25 RPC Requests Per Minted Token

We've successfully deployed an ERC-721 contract to testnet and mainnet BSC, but when calling our Mint function, followed by a contract.tokenURI(tokenId) call, the request times are quite long, and we ...
0
votes
0answers
71 views

Insufficient funds for intrinsic transaction "response" "jsonrpc 2.0 method=sendTransaction

I have a problem, when i try to buy a token with my sniper bot have this error. I have > funds of gas require. this is my script (i use BNB) const ethers = require('ethers'); const prompt = ...
0
votes
2answers
36 views

ABI derived JSON in the "data" parameter of a raw transaction

This is what I have so far, please correct me if I'm wrong: The data parameter of a transaction is where we tell a deployed smart contract how we want to interact with it. It contains a hexed JSON ...
0
votes
1answer
31 views

JSON-RPC ERC20 transfer

I'm using JSON-RPC sendTransaction, I want to transfer the ERC20 token this way, the code above works fine, but surprisingly, instead of calling transfer(), a contract is deployed for me!!It's really ...
0
votes
0answers
23 views

Replacing Infura in dApp?

If I wish to use a network other than infura, can I just replace all the infura URLs and it will work ?
0
votes
0answers
62 views

How to find out the block reward?

I have node ETH. How to find out the block reward? I looked at all the possible JSON RPC API requests. But nowhere is there any information on the reward for the mined block. Do I need to download all ...
0
votes
0answers
18 views

Is it possible to connect to infura using a standalone executable?

New to eth dev here, so trying to figure out what's currently possible. Can an HTTP response contain the wallet information required to run a contract on the ethereum blockchain? I am making a ...
2
votes
1answer
873 views

Binance Smart Chain RPC Rate Limit

In the BSC documentation, it says that we can make 10K/5mins RPC requests to their servers. Do you guys know if it's 10K per app or user?
0
votes
0answers
16 views

eth_pendingTransaction is no longer found in RPC definition, what happened and how to?

from the list of RPC definitions, we can no longer find 'eth_pendingTransactions' from the list, https://eth.wiki/json-rpc/API What replaced this API? i see that web3 still has web3.eth....
1
vote
0answers
91 views

Getting nonce too high on RPC debug_traceTransaction call

i am trying to get the transaction trace (similar to the one found as Geth trace_2 on etherscan) and to do so i try to use the debug_traceTransaction but each time with any transaction hash i am ...
0
votes
0answers
589 views

JSON RPC Error code -32000 when deploying on BSCTESTNET with Remix IDE using Metamask

So I wrote a contract here: https://github.com/connova/CareBuds-Finance/blob/main/contracts/Buds.sol When deploying this using the injected web3 on the binance testnet (network name BSC Testnet) using ...
0
votes
1answer
351 views

Fetch all tokens (ERC20, ERC721, ERC1155) owned by a specified address

I am building an app and I need to fetch all tokens (ERC20, ERC721, ERC1155) owned by a specified address. I've seen some services for fetching ERC20 (ETHplorer) or ERC721 (Etherscan, OpenSea) tokens ...
0
votes
0answers
36 views

I can't create new account via rpc with personal_newAccount method

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
1answer
77 views

Error: Invalid JSON RPC response: ""

I'm trying to get some info from an array using web3, when I try this async componentDidMount() { const product = await store.methods.storeProducts(0).call(); console.log(product); ...
0
votes
0answers
411 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 ...
1
vote
0answers
164 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....
1
vote
0answers
119 views

Listening to smart contract events RPC, using web3, on aleth node

bakcground, I am working on an ethereum based fork of cpp-ethereum/aleth node and not using the official golang client (geth), unfortunately from what I read, websocket support has been 'ditched' in ...
0
votes
0answers
20 views

How to connect running node on aws server remotely as a rpc endpoint?

I have a full sync node running on an aws server, I am able to connect and interact with the node at 8545 locally. But I am not able to connect to it from remote computer. The code as follow. from ...
1
vote
1answer
27 views

How can I grab a list of all txHashes from the current/previous block with JSON-RPC

I would like to grab the list of txHashes in the current block or the previous block. I would like to grab this from a json-rpc api. Is this possible? All I found was grabbing info about the block not ...
1
vote
0answers
75 views

What Standard RPC Errors Should I Handle?

Is there documentation that lists ALL the types of web3 exceptions that can be thrown by an RPC endpoint? eg. gas price too low, tx already known, etc.? Taking it a step further than that, is there ...
0
votes
1answer
98 views

How to set params for eth_getLogs in order to query ERC721 burn event?

I want to query this data using curl. https://rinkeby.etherscan.io/tx/0x0819826eb519a33b5d856fd8566a902b7da3e30dd8635c90b75ccf70cf5cac9b#eventlog I tried this command but get an empty return. Is there ...
1
vote
1answer
208 views

Trying to switch dapp to MATIC

I'm trying to switch a dapp to MATIC/Polygon. I get this strange error: Something went wrong: Error: Internal JSON-RPC error. { "details": "Unauthorized method: net_listening.", &...
1
vote
1answer
47 views

Query ethereum chain without owning a node

When I want to query the ethereum blockchain I use infura server with a curl command like this: curl https://mainnet.infura.io/v3/2a8c33bac50647a6be2638a92f9d4a4c -X POST -H "Content-Type: ...
0
votes
0answers
38 views

sendTransaction timeout

Sometimes my node just stop sending transactions, I can use most of the commands, but sendTransaction just timeout. eth.syncing return false eth.blockNumber return the latest block htop shows my ...
0
votes
0answers
16 views

RPC returns 0x0 after sync

binance smart chain v1.0.7 When new node complete syncing, RPC returns 0x0 values few hours.Can I fix that? Please help me
1
vote
1answer
94 views

Retrieving the default token symbol of an Ethereum network via json-rpc

How can I retrieve the default token symbol of an Ethereum network via json-rpc? Ethereum would return "ETH" Ethereum classic would return "ETC"
1
vote
1answer
119 views

Custom bytecode logs data but doesn't return it on eth_call, why not?

I'm creating custom bytecode for a project 0x4160005260206000a0 // OP-Codes // COINBASE // PUSH1 0x00 // MSTORE // PUSH1 0x20 // PUSH1 0x20 // LOG0 when the above is created, the transaction receipt ...
1
vote
0answers
131 views

eth_signTypedData does not exist [closed]

with any web3 or ethers provider I am getting this error. This is suddently startedoccuring. Noticed it when my hardhat test cases started failing. Is anyone else facing the same and has solution?? ...
0
votes
0answers
135 views

Invalid response at function call from time to time

I am continuously trying to fetch all pair addresses from a PancakeSwap contract but while doing so it always fails after some time saying: Error: invalid response - 0 at exports.XMLHttpRequest....

1
2 3 4 5
12