Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
0
votes
1answer
35 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
20 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
69 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
12 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
30 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
15 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
18 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
15 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
55 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
23 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
23 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
49 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
27 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
50 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
310 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
48 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
55 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
30 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
12 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
65 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
17 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
47 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
61 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
53 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
29 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
35 views

Why does ethereum JSON RPC encode bytes as hex?

Why not use base64 since it would be more compact?
1
vote
1answer
59 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
34 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
14 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
1answer
47 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
100 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
45 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
117 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
21 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
53 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
66 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
38 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
vote
0answers
116 views

Curl Request Java - How To

I am looking to use some of the management admin API's found here: https://github.com/ethereum/go-ethereum/wiki/Management-APIs but unfortunately, the web3j library does not support the calls that I ...
1
vote
1answer
52 views

TxPool on Ganache

I started using Ganache to run Ethereum and tried via cURL the following: curl -X POST -d '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}' http://ip:port But I got the message: ...
1
vote
1answer
28 views

eth_getStorageAt params names

I am calling geth rpc method eth_getStorageAt using json-rpc-cpp libarary. I need to know the parameters' names for the method. I can find parameters' names for eth_sendTransaction from here, which ...
0
votes
0answers
15 views

hwo to identifie error from transaction error object?

is it possible to know what is the reason of transaction error from "error" object (nonce, insufficient fund ..) is there status or something to test using it ? Geth error message is generic, I ...
0
votes
1answer
48 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
0answers
43 views

Calling a string from smart contract in go

all I want to do is call a string from a smart contract I've written using go. My smart contract is: pragma solidity ^0.4.24; contract String { string store = "abcdef"; function getStore() ...
0
votes
1answer
33 views

JSON-RPC: TheDao contract returning not null values for not existing methods in the contract

When using the geth JSON-RPC eth_call to retrieve some ERC20 token contracts symbol and name information, it comes up the case of TheDao contract. I was expecting to receive a null/empty string like ...
1
vote
0answers
32 views

Inconsistent responses with 'eth_getTransactionByHash' through RPC API. Can anyone help?

I have been using the requests library with python to query the geth/rpc api in order to get ETH transaction data. I connected to geth via "geth --rpc --unlock TESTINGADDRESSWITHNOVALUE --allow-...
0
votes
1answer
49 views

Pending transactions not mined in private network

I have created a node with the following genesis block: { "config":{ "chainId":9119, ...

1
2 3 4 5
10