Skip to main content

Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
194 votes
2 answers
58k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
mKoeppelmann's user avatar
  • 7,626
57 votes
4 answers
56k views

How to call a contract method using the eth_call JSON-RPC API

Ok, so I'm trying to call a contract method using the methods provided by the Ethereum JSON RPC interface. The JSON RPC is running on an Ubuntu machine. Unfortunately, I can't really get a result back ...
MethDamon's user avatar
  • 803
56 votes
3 answers
25k views

How to reduce the chances of your Ethereum wallet getting hacked?

Summary The hack that occurred on May 12 2016 to steal 7,218 ethers from Patrick only affects miners where: Incoming RPC connections from the Internet on TCP port 8545 are forwarded to the machine ...
BokkyPooBah's user avatar
  • 40.3k
46 votes
1 answer
42k views

What does v, r, s in eth_getTransactionByHash mean?

In Ethereum JSON-RPC I found the return is: Returns Object - A transaction object, or null when no transaction was found: hash: DATA, 32 Bytes - hash of the transaction. nonce: QUANTITY - the number ...
jiebang's user avatar
  • 993
44 votes
1 answer
34k views

What are ipc and rpc?

The question is quite simple , I have only basic Idea of RPC but none of IPC. AFAIK, if I connect to ethereum node via ipc then the my geth should be running on same machine. and If I connect via ...
Prashant Prabhakar Singh's user avatar
43 votes
3 answers
21k views

What are the limitations to estimateGas and when would its estimate be considerably wrong?

web3.eth.estimateGas and JSON-RPC estimateGas can be used to see how much gas should be specified for a transaction, before crafting the transaction. Since it is an estimate, are there any ...
eth's user avatar
  • 85.9k
43 votes
6 answers
34k views

Create and sign OFFLINE raw transactions?

I'm looking to create a raw transaction, sign it, and broadcast it using the eth.sendRawTransaction RPC method. I would like to do this offline using code or an open-source library OR online but ...
Nico's user avatar
  • 807
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 ...
Juan Ignacio Pérez Sacristán's user avatar
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 ...
Broseph's user avatar
  • 695
29 votes
4 answers
34k views

How can I expose Geth's RPC server to external connections?

I want to set up a private network of applications which can connect to a single Geth node. What options do I have for exposing the RPC server? I'm running this: geth --rpc --testnet (sometimes I use ...
Karl Floersch's user avatar
29 votes
3 answers
22k views

How can I make new account by JSON-RPC?

I'd like to make new account by JSON-RPC.I've checked the wiki of Ethereum, however I could not find out how to do that. I've found call existed accounts, but it isn't what I want. eth_accounts ...
Toshi's user avatar
  • 2,357
28 votes
1 answer
3k views

Is searching data stored in event logs prohibitively slow?

Augur uses event logs to store data that never needs to be accessed on-contract, since it is about 10x cheaper than on-contract storage. However, I've noticed that retrieving event logs (e.g., using ...
tinybike's user avatar
  • 535
22 votes
4 answers
16k views

Error "no key for given address or file" when unlocking coinbase account

Using json-rpc eth_unlockAccount() method I can unlock everyone of my node accounts except coinbase. When trying to unlock coinbase account, geth responds with the message: no key for given address ...
Juan Ignacio Pérez Sacristán's user avatar
19 votes
2 answers
30k views

What is http://localhost:8545?

Why do some ethereum related websites (for example regis.nu, there are many others) tell me they cannot find a node running at http://localhost:8545 and what can I do about that? Regis.nu allowed me ...
Thomas Jay Rush's user avatar
18 votes
4 answers
27k views

web3.js import contract abi from .json file

So I have a deployed contract with address0. I can easily interact with it using my index.html like so: import contract_artifacts from '../../build/contracts/contract.json' var contract0 = contract(...
porfavorite's user avatar
18 votes
3 answers
28k views

How to attach geth to a local Parity RPC port 8545?

I'm running parity with the --jsonrpc flag which listens on port 8545 by default. I'm trying to attach a geth instance, like described in the the docs: Attach a console to a running geth instance. By ...
q9f's user avatar
  • 32.9k
17 votes
2 answers
2k views

Can Solidity view/pure functions be arbitrarily complex?

Non-constant functions are limited in computational complexity by the block gas limit. I assume, but am not sure, that this does not apply to view/pure functions. Are view/pure functions in any way ...
SCBuergel's user avatar
  • 8,774
17 votes
2 answers
15k views

Canceling / overwriting a pending transaction using geth JSON RPC

This is a private network A transaction was sent to create a contract using the eth_sendTransaction RPC call. The transaction is "removed" marked "will be removed" because it ran out of gas but ...
Bruno Grieder's user avatar
16 votes
4 answers
13k views

are there "public" ethereum nodes? or any recommendations on hosting solutions?

I've always ran apps on Heroku. Just developed a smart contract and I need to check the blockchain from the app. Are there public nodes I can connect to to get the info I need to show on my app? If ...
Anto's user avatar
  • 311
16 votes
2 answers
8k views

How to get the transaction confirmations using the JSON RPC

How do I get the block confirmations for a specific transaction using the JSON RPC? This is information that would come inside the transaction JSON in bitcoin but it doesn't seem to come in ethereum. ...
Nico's user avatar
  • 807
16 votes
4 answers
29k views

unable to connect Ethereum node even RPC port: 8545 is open

I have created my private Ethereum blockchain network. From different servers I am able to connected and added into the network as peer without any problem. The way I run my server: geth --...
alper's user avatar
  • 8,394
16 votes
1 answer
4k views

How can I retrieve my account's Augur (REP) token balance via JSON-RPC?

How can I check the contract balance, like Augur (REP), on an address with JSON-RPC? There doesn't seem to be alot of documentation about this.
Julian's user avatar
  • 263
16 votes
1 answer
6k views

How can I create a listener for new transaction with Ethereum RPC calls?

I am trying to create mini-service which would allow me to subscribe for incoming Ethereum transactions (coinbase example). I thought that in Ethereum it could be done with eth_newFilter and ...
Andrey Samokhvalov's user avatar
15 votes
9 answers
78k 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 ...
The Renaissance's user avatar
15 votes
2 answers
17k views

Calling debug_traceTransaction from web3 API

I want to use debug.traceTransaction to get internal transactions from NodeJS using web3 API. I'm using web3 0.17 beta and I don't see any debug_traceTransaction on the code. Am I missing something or ...
Paul Exchange's user avatar
15 votes
1 answer
5k views

Deploying contract with constructor arguments via Geth RPC

How can I deploy a compiled contract with constructor arguments using geth rpc? I have tested my call deployed the compiled contract bytecode just fine, I just don't understand how I can pass ...
Samuel Barnes's user avatar
15 votes
2 answers
8k views

How do I set the nonce for raw transactions?

A few questions about rawTransactions: Are they documented anywhere? How exactly should I set the nonce of a rawTransaction? If I start geth, and submit nothing but rawTransactions to it, then the ...
tinybike's user avatar
  • 535
14 votes
3 answers
5k views

Can Mist be attached to a Geth node on a different computer over HTTP RPC?

I gather that Mist will automatically look for Geth on a local machine via IPC to save it maintaining its own blockchain. Is it possible to tell it to look for an instance of Geth on another machine ...
tallguin's user avatar
  • 143
14 votes
2 answers
6k views

How can I sign a transaction using c#?

I want to create a signed transaction using C#, which will later be used by Nethereum via JSON-RPC to call eth_sendRawTransaction. I have the raw transaction and the private key, now how do I sign ...
Ori Marron's user avatar
13 votes
1 answer
6k views

Why use filters - eth_getLogs vs eth_newFilter

It seems to me eth_getLogs is much simpler than eth_newFilter + eth_getFilterLogs. eth_getLogs has no need for installation, got same parameters, catches events retrospectively. What are use cases ...
takeshi's user avatar
  • 1,760
13 votes
6 answers
15k views

Error: etherbase address must be explicitly specified

When I make a RPC to geth running remotely, I cannot get the account list / balance of the account. It also says that the coinbase is not set. But as far as I know, isnt the coinbase supposed to be ...
radiopassive's user avatar
13 votes
1 answer
3k views

Out of gas during contract creation

A few days ago, several attempts at creating a contract failed with out of gas errors (confirmed by etherscan/ethercamp and getBalance API), however it is not clear to me what failed exactly, and how ...
fair glu's user avatar
  • 365
12 votes
16 answers
28k 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: ...
dertobiaszwei's user avatar
12 votes
3 answers
13k views

Geth response: invalid content type, only application/json is supported

I started geth on a remote server running on rinkeby with the parameters --rinkeby --fast --cache=128 --rpc --rpcaddr 0.0.0.0 When I try to test my access to geth using curl -X POST --data '{"...
Athena Wisdom's user avatar
12 votes
5 answers
18k views

Invalid JSON RPC response: "" In Browser-Solidity

I'd like to connect private geth node from browser-solidity, however it returned the error Invalid JSON RPC response: "". Please check the following picture for details. Could you tell me how to ...
Toshi's user avatar
  • 2,357
11 votes
1 answer
7k views

Error: personal_unlockAccount method not implemented

Using web3 under nodejs I suddenly want to unlock my account before calling a DAO contract function: var Web3 = require('./node_modules/web3/lib/web3'); // dont override global variable if (typeof ...
knocte's user avatar
  • 1,949
11 votes
1 answer
3k views

Can I unlock an account using JSON-RPC?

The only way I can work with ETH is through --rpc mode. Normally I would prefer to use the Python interface. But I found myself in a situation where the RPC is very limited. For example, I can't ...
yanik's user avatar
  • 473
11 votes
1 answer
5k views

Decode JSON RPC result

How do I convert the result returned from a JSON-RPC eth_call from my geth client? This is the call: curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"...
Jupiter's user avatar
  • 113
11 votes
1 answer
2k views

How to connect an Android App user to ethereum network?

I'm working on developing a decentralized application which requires every user of the Android app to have separate account containing his ether balance information and other user-specific information....
Satwik's user avatar
  • 213
10 votes
4 answers
5k views

Geth RPC connections securely

I have read everywhere that exposing personal over rpc is dangerous and is vulnerable. The question is HOW? Is it possible for anyone to send transactions to my geth console, if my ipaddress and port ...
Prashant Prabhakar Singh's user avatar
10 votes
1 answer
2k views

How can non-javascript applications communicate with Ethereum nodes?

Web3 implements the Ethereum JSON-RPC spec and seems to be the preferred method for communicating between a javascript applications and the Ethereum node. However there are situations where you might ...
JackWinters's user avatar
  • 3,423
9 votes
1 answer
12k views

What is the 0x I see around Ethereum? For example I see addresses that start with 0x

I see a number of things in Ethereum start with 0x, for example addresses. Other examples are in the Geth console, JSON-RPC, web3.js. What is the 0x and what is its purpose?
eth's user avatar
  • 85.9k
9 votes
1 answer
4k views

Is it possible to call debug_traceTransaction from nodejs?

Following answer (https://ethereum.stackexchange.com/a/9437/4575) [ 1 ] guide us to call debug_trace through using geth: As documented in debug.traceTransaction(...), you can only access this API ...
alper's user avatar
  • 8,394
9 votes
1 answer
2k views

Why is Ethereum json rpc using hexidecimal for numbers?

Playing around with geth jsonrpc. Sending the eth_sycing. {"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1} What is the design decision to use Hexidecimal for numbers? { "jsonrpc": "...
Yada's user avatar
  • 191
9 votes
3 answers
6k views

How could "ethereum block explorer" connect into geth that is already running on the main server securely?

I am working on private Ethereum Network. I run Ethereum boot-node and Ethereum Block Explorer app ( https://github.com/etherparty/explorer (A lightweight ethereum block explorer.) ) on the main ...
alper's user avatar
  • 8,394
9 votes
2 answers
1k views

geth: shh_newIdentity does not exists/is not available

I'm trying out whispers with web3 and geth on a private testnet. I'm just running the following code taken from Ethereum Whisper wiki. function sendWhisper() { var shh = web3.shh; var appName ...
Long Hoang's user avatar
9 votes
2 answers
6k views

Is JSON-RPC error behavior documented?

Running geth, it's easy to see what its implementation of JSON-RPC does on errors: $ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_compileSolidity","params":["contract test { function multiply(...
Steve Waldman's user avatar
9 votes
1 answer
3k views

RPC error "invalid or missing value for params" when calling contract constant void functions

My contract has a function defined like this: {"constant":true,"inputs":[],"name":"queryNumEscrows","outputs": [{"name":"","type":"uint256"}],"payable":false,"type":"function"} Having no inputs. Its ...
Juan Ignacio Pérez Sacristán's user avatar
9 votes
2 answers
8k views

Get smartcontract token balance via JSON RPC

Via Geth commandline I can get my smartcontract token balance with: var mytest = eth.contract([{interface}]).at(contract address); mytest.balanceOf(eth.accounts[0]) >998 I want to present the ...
Jeroen's user avatar
  • 191
9 votes
1 answer
844 views

Check if a contract implements specific ABI using JSON-RPC

In my Python web service, I'd like to confirm if a contract supports specific ABI (certain call methods). I am running get and communicating over JSON RPC. What are steps to for this? I am guessing ...
Mikko Ohtamaa's user avatar

1
2 3 4 5
14