A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
148
votes
2answers
29k 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 ...
27
votes
3answers
17k 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 ...
42
votes
3answers
35k 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 ...
40
votes
6answers
20k 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 ...
28
votes
3answers
12k 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 ...
50
votes
3answers
21k 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 ...
26
votes
3answers
20k 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 ...
10
votes
1answer
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 ...
24
votes
3answers
20k 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 ...
11
votes
3answers
4k 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 ...
10
votes
1answer
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 ...
15
votes
1answer
4k 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 ...
11
votes
5answers
14k 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 ...
22
votes
2answers
12k 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 ...
14
votes
1answer
4k 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 ...
16
votes
1answer
3k 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.
14
votes
3answers
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 ...
11
votes
2answers
4k 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 ...
13
votes
2answers
1k views

Can Solidity constant 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 constant functions. Are constant functions in any way ...
8
votes
2answers
4k views

Getting contract balance over JSON RPC

I'd like to read the contract balance (amount of unspend ETH on the contract) over Geth JSON-RPC API. E.g. the number displayed here: http://testnet.etherscan.io/address/...
5
votes
2answers
1k views

Is it possible to unlock a geth wallet through JSON RPC? [duplicate]

I'm currently developing an application on top of Ethereum's JSON RPC. I would like to be able to unlock and lock the wallet as needed, similar to how Bitcoin does it. However, it seems that at the ...
4
votes
6answers
2k views

Is there any software apart from Geth and Mist that offers the Javascript console? I want to use the console but I don't want to do all that syncing

Is there any software apart from Geth and Mist that offers the Javascript console? I want to use the console but I don't want to do all that syncing. Parity does not have a console as far as I know ...
4
votes
2answers
2k views

How to unlockAccount account using private key instead of password

I am working with https://github.com/ethereum/wiki/wiki/JSON-RPC api + curl . And implementing custom api using this php library: https://github.com/Achse/geth-jsonrpc-php-client below method is ...
8
votes
1answer
13k views

Error: Invalid JSON RPC response: undefined from node web3.js app

I'm getting Error: Invalid JSON RPC response: undefined from my node.js application when it tries to execute a function. My steps: ethereum wallet 0.5.1 to deploy a contract to the testnet. start the ...
5
votes
1answer
3k 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?
9
votes
1answer
1k 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 ...
13
votes
2answers
3k 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 ...
27
votes
1answer
12k 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 ...
26
votes
1answer
2k 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 ...
16
votes
1answer
17k 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 ...
9
votes
4answers
3k 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 ...
14
votes
4answers
18k 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 --...
4
votes
1answer
276 views

Why exposing the personal API is unsafe?

From what I am reading in various places such as here ,here or here, it is not safe to expose the personal api to the front-end Dapp via RPC. Hence asking the users to run geth --rpc --rpcapi "eth,...
12
votes
1answer
1k 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 ...
9
votes
1answer
2k 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 ...
18
votes
4answers
9k 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 ...
8
votes
1answer
608 views

Will I be able to get past contract events through rpc if I use geth --fast?

Or in other words, will geth --fast download the events logs?
2
votes
3answers
808 views

How to get token holders via json RPC

So I want to get the token holders of a token like this: https://ropsten.etherscan.io/token/0xfa68d281e7ff1a8e9393428ba0abe8961cf342cb#balances Via my Ethereum node. I tried: https://github.com/...
0
votes
3answers
1k views

Can I mine on my private blockchain using geth with rpc?

I am using the web3 api and want to try out mining using rpc. The usual miner.start() (which is used on terminal) does not work even after including the miner api when starting geth and I get the ...
3
votes
1answer
5k views

Generate new address in Etherum node using Json-RPC

Well, first of all, I am very new to Ethereum and maybe I am asking something stupid but my question is the following. I feel comfortable using json-rpc commands and I want to know how can I create a ...
4
votes
2answers
1k views

JSON RPC API id

I'm reading the JSON RPC API documentation but I cannot understand what is the id that should be specified in the request (and that is also returned in the answer). Is this simply a nonce that ...
3
votes
1answer
4k views

How to send Ethereum transaction with json RPC

I want to send transaction to account this is the command to use : curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{parms}],"id":1}' and this is the params to use : ...
3
votes
1answer
353 views

Why cannot catch events retrospectively using filter (eth_newFilter)?

I've put the same filter with eth_newFilter before and after a set of transactions. The one which is installed after transactions catched 0 events. Is it how events work? Is there any other way to ...
1
vote
2answers
616 views

how to customize my own commands in geth console?

How to customize my own commands in geth console? We know that in geth console, we can type eth.accounts and other commands. I found that there is a JavaScript parser/interpreter named Otto which ...
0
votes
1answer
27 views

DApp on Node2 accessing smart contract deployed by Node1

Node 1(Desktop) deployed a contract on private blockchain. From node2(Laptop),I want to interact with the contract. But I failed at 'web3.version.getNetwork(err, netId)' function.This function throws ...
32
votes
1answer
23k 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 ...
17
votes
2answers
6k 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 ...
9
votes
3answers
4k 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 ...
7
votes
1answer
3k 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 ...
12
votes
2answers
4k 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. ...