Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
1
vote
1answer
17 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":"...
0
votes
0answers
16 views

Geth Setup: enabling JSON RPC endpoint with --http

I'm a beginner with blockchain and only starting to read programming textbooks. So a newbie to computer science as well. Right now I'm playing around with my Windows desktop though will be switching ...
0
votes
0answers
23 views

uncaughtException : RangeError: Maximum call stack size exceeded

Facing an issue while working multi-http-provider. When I write var Web3 = require('web3'); require('multi-http-provider'); It throws an error uncaughtException : RangeError: Maximum call stack size ...
0
votes
1answer
243 views

Error: [ethjs-query] while formatting outputs from RPC: “message”:“invalid sender”

I'm using MetaMask with an app I'm developing, and previously working functions are now returning a quite ferocious error. This error has been duplicated on a number of functions in the platform, so I ...
1
vote
0answers
31 views

Understanding eth_estimateGas with regards to gas price, and current mempool

Does anyone have a detailed understanding of how eth_estimateGas works with regards to gasPrice and the current mempool state? I have historically seen some really odd behavior when using ...
0
votes
0answers
24 views

How to collect logs from Uniswap V2: Router 2?

I have a problem with collecting logs from Uniswap router contract. I use json_rpc eth_getlogs When I call the method I receive nothing. What I'm doing wrong? curl -X POST --data '{"jsonrpc":...
2
votes
1answer
194 views

Pending transactions logs issue

I am trying to get the pending transactions logs to identify specifics topics before the next block was mined (ERC20 transfers, Uniswap swaps, ..). I run a Geth (1.9.22) full node, mining is enabled (...
1
vote
1answer
32 views

Pass json of address to Contract

i am wanting to import an array of json data into my contract on construct. I want to pass it an array of address to be saved into an array in my contract. Is this possible? I have seen a few posts ...
0
votes
0answers
27 views

Properly Exposing Geth RPC in 2020

With the default allowed ["net", "web3", "eth"], I want to expose Geth 1.9.21-stable RPC to another machine. In config.html I set HTTPVirtualHosts = ["*"]. The ...
0
votes
1answer
59 views

How to construct a raw Ethereum transaction from transaction data

Let's say I have the following transaction information: { "jsonrpc":"2.0" "id":0 "result":{ "blockHash":"...
0
votes
1answer
47 views

Replaying Ethereum transactions, how could I extract the “from” account key from an existing transaction

I'm trying to replay transactions that exist in one chain on another. I can replicate all transaction arguments that are available through eth_getTransactionByHash, but now need to sign the ...
1
vote
1answer
177 views

How to get contract object using ABI json and address with web3j?

I worked with web3js(JavaScript) and used web3.eth.Contract with 2 params (json, address) and successfully got contract object. Now I started to work with web3j(Java) and don`t understand how I have ...
1
vote
0answers
13 views

Transaction from non-miner node is not getting mined sometimes

I have a private Ethereum network containing 2 nodes,NodeA and NodeB. When I initiate a sendTransaction from NodeA(non-mining node) to deploy Ethereum contract using JSON-RPC, the transaction hash is ...
0
votes
1answer
36 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 = ...
0
votes
0answers
24 views

Geth node with RPC - accounts created automatically, always same addresses “0xffa4658ff14e486a3a57cc7163c153724c9d1904”

I am testing a private ethereum network using Geth 1.9.x. On all instances serving RPC (universally enabled CORS), a series of 3 accounts are created (always the same 3 addresses): ...
0
votes
0answers
22 views

Can't unlock account with geth attached to parity on classic chain

I run parity 2.7.2 on Ubuntu with --jsonrpc-apis=all on the classic chain: #> parity --chain classic --light --jsonrpc-apis=all 2020-08-05 15:20:15 Starting Parity-Ethereum/v2.7.2-stable-2662d19-...
2
votes
0answers
17 views

Why does clef not implement ethereum's JSON-RPC

Assuming that the RPC standard still matches what is to be found today on the ethereum wiki, I was rather surprised to learn that the method calls provided by clef do not match the signer methods in ...
0
votes
2answers
65 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 ...
0
votes
0answers
19 views

How to find a specific event if it has no indexed params

I understand that I can filter for logs with indexed events like so: event Transfer(address indexed src, address indexed dst, uint wad); whereby, I can search for all Transfer events with src=...
0
votes
0answers
39 views

Web3 IPC provider connect?

I am using Infura web3 provider to connect etherum but I want to use IPC provider(more secure), How to use IPC provider in ethereum web3.
0
votes
0answers
41 views

{“jsonrpc”:“2.0”,“id”:83,“result”:“0x0”}

if my geth is syncing in fast mode and I try to query method eth_blockNumber, will it throw me an error, cause it is not, i tried curl in verbose mode and below is the result. * Trying 127.0.0.1... *...
0
votes
1answer
63 views

how to connect ethereum local provider https://localhost:8545? [closed]

I am using infura web3 provider in ethereum but I don't want to use third party providers in my project so I want to use localhost:8545? how to use this provider? Is it connect to the ethereum node? ...
0
votes
0answers
84 views

Specified HTTP/RPC port, yet Geth 1.9.15 will not map that port

I am trying to expose port 8545 on a local geth client for use with MetaMask on Chrome 83.0.4103.106 (x86_64), using a Windows host (10.0.18362.900). I store all my blockchain data on a separate drive,...
2
votes
2answers
70 views

Why field `data` in `eth_call` optional?

Based on https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call The data is optional, but it also says it contains hash of the method signature. In what scenario you can send a eth_call without ...
0
votes
2answers
544 views

How to debug a “rpc error with payload”

Debugging smart contract errors can be surprisingly hard. There is one particular kind of error that annoys me the most: the infamous rpc error with payload. For instance, just a few hours ago, while ...
1
vote
1answer
62 views

Is it possible to filter pendingTransactions?

To get a list of the pending transactions that my node is aware of I can easily call the eth_pendingTransactions jRPC call. This will give a big list of pending transactions, which all need parsing to ...
2
votes
0answers
70 views

Why does Ethereum use JSON-RPC and not gRPC?

I am fairly new to networking protocols especially JSON-RPC and gRPC as they are not nearly as common in web development as REST. I was reading around and seems like gRPC generally performs better. So ...
0
votes
1answer
54 views

json rpc hex string weird padding/encoding

When sending eth_call to get erc20 token WETH name and symbol I get hex response padded with bunch of zeros and a mysterious digit '2'. for symbol I get response: "...
0
votes
0answers
14 views

how to sync a node from specific node or ip

I would like to sync a ethereum node but I got a problem i'm trying to sync it as light client but: hub=trezor vendor=21324 failcount=3 err="failed to initialize libusb: libusb: unknown error [code -...
0
votes
0answers
123 views

How to config geth node to get ERC-20 tokens balances

I'm trying to tune my geth node to get ERC-20 tokens balances, but y API call always returns {'jsonrpc': '2.0', 'id': 1, 'result': '0x'} My geth node version: instance=Geth/v1.9.13-stable-cbc4ac26/...
1
vote
0answers
21 views

Simple way to balance web3j connections between nodes

Context: I have a client that can connect to 3 local-network nodes to distribute query-loads and be more resilient to network/software issues. I have managed to create a -simple- watch-dog with a ...
0
votes
0answers
54 views

sending request with curl returns that method does not exist

I try to make call with curl curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":67}' http://localhost:8545 and it returns this: {"...
0
votes
1answer
68 views

How can I tell if the node I am using is exposing the Parity trace methods?

What is the best way to tell if the node I am using is exposing the Parity trace methods? One way I know if is to call a contract on Kovan and look for a revert reason that says to expose the trace ...
1
vote
1answer
86 views

Will code utilising web3.js be compatible with Ethereum 2.0?

I'd like to start developing a solution targeting the Ethereum blockchain but I want to target the Ethereum 2.0 blockchain and I'm not so interested in 1.0 anymore. Can I already do the development ...
0
votes
2answers
38 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 ...
1
vote
0answers
36 views

Why does ethereum JSON RPC encode bytes as hex?

Why not use base64 since it would be more compact?
1
vote
1answer
69 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
2answers
32 views

ERROR: Provided address “6.963865902119903e+47” is invalid

Full error log: formatters.js:471 Uncaught Error: Provided address "6.963865902119903e+47" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be ...
0
votes
0answers
35 views

Unable to get the Ethereum accounts (eth_accounts) using the JSON RPC

I launched an Ethereum installation with the Amazon Blockchain Templates using the simplest installation, the docker-local with a private network (not connected to the public Ethereum network). ...
0
votes
0answers
15 views

Can I send JSON RPC request to Parity not from intranet? (e.g. from another external IP address)

Can I send JSON-RPC request not from a local network(192.168.xxx) ? so that I can re-use my existing ETH nodes. thanks
0
votes
2answers
58 views

Accessing Ethereum network via JSON RPC from wallet balance/transactions

sorry if the question is silly.... I am tying to build a simple app that checks ETH wallet addresses balances and transactions (for both ETH and Tokens). As far as my knowledge goes, I think that I ...
1
vote
1answer
114 views

Parity IPC direct connect

Before Parity I used Geth, and made requests like: echo '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' | nc -NU geth.ipc and It worked! In Parity v2.7.2 and ...
1
vote
1answer
25 views

Problem with contracts being deployed multiple times in Node.JS backend

I have a Javascript frontend that passes records in a JSON to the backend via Express to be deployed to the blockchain (currently using Rinkeby) with truffle-hdwallet-provider. This appears to work ...
1
vote
1answer
51 views

Difference between web3.eth.personal.getAccounts() with web3.eth.getAccounts()

What are the differences between web3.eth.personal.getAccounts() and web3.eth.getAccounts()? environment truffle: v5.1.7 using truffle console.
0
votes
1answer
21 views

Receiving unexpected JSONRPC requests on my website

I have a production website (nothing about blockchain or related) and I a received hundreds of POST request to "/" with these params. Obviously my server raise an error because it doesn't know how to ...
1
vote
1answer
152 views

Infura getLogs returns an empty result

I'm writing a crypto based system with PHP on Infura, and now I am coding a script to retrieve logs for a specific address. This is my code: $ch = curl_init($my_server_url); $data = array( '...
2
votes
0answers
24 views

Calculated blockhash of PoA block mismatches with actual blockhash returned by RPC

I set up a Demo PoA chain using Parity Etheruem. I sent some transactions to it and it started producing blocks. A block on my demo PoA chain was generated with block hash ...
1
vote
1answer
57 views

How to guarantee the order of transactions in MetaMask?

I create my transactions with ethers.js and push them into an array like this: const promises = []; promises.push(createTokenApprovalTx()); promises.push(createFooTx()); It's important that the ...
1
vote
1answer
70 views

transactions in rpc block response sometimes have chain null and sometimes correct chain

when doing e.g. a blockByNumber rpc request I am getting a result like this from parity: https://gist.github.com/ligi/fbc7061d93f087cf0eb0f4db83d1fced what is puzzling me that some transactions have: ...
0
votes
1answer
51 views

What is the client version?

I am using Infura and web3.py. When I connect to Infura the web3 object has a clientVersion property that reads this from JSON RPC "Geth/v1.8.15-omnibus-255989da/linux-amd64/go1.10.1" Can someone ...

1
2 3 4 5
10