Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
0
votes
1answer
14 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 ...
0
votes
1answer
2k views

CONNECTION ERROR: Couldn't connect to node http://localhost:8545

I have started geth using below: geth --rpc --rpccorsdomain * --rpcport 8545 --rpcapi personal,web3,eth,net and this is my web3.js code: <script src="/bower_components/web3/dist/web3.min.js">&...
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 ...
2
votes
1answer
720 views

how to call web3.isAddress() via JSON-RPC?

web3.isAddress (and other web3 methods such as toWei) works fine in the geth console, but when called from RPC (or IPC), it always returns {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"...
4
votes
1answer
623 views

How to make geth log RPC calls?

I want to see the logs of the JSON-RPC calls to geth (with all the details if possible). How can I do that? In this page, I have found a command line option: --vmodule value Per-module ...
7
votes
2answers
2k views

Windows curl error with JSON-RPC

Using Windows, when I started Geth with: geth --rpc --rpcaddr 192.168.1.9 --rpcport 8545 --rpcapi "eth,net,web3,personal" --datadir C:\Users\BulldogBud\AppData\Roaming\Ethereum\testnet\chaindata --...
11
votes
1answer
1k 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....
4
votes
1answer
4k views

UTC/json wallet file: deleted -> recovered -> corrupted. 0.1 ETH REWARD

--EDIT-- I have advanced in my research. The UTC/JSON file in question is a 491 byte file. There are 256 random characters in the file with each 16 possible characters. Like a 256-number long ...
2
votes
2answers
1k views

web3 js eth.contract equivalent in PHP

var Web3 = require('web3'); var web3 = new Web3(); web3.setProvider(new web3.providers.HttpProvider("http://blahblah.com:8545")); var token = web3.eth.contract(ABI).at("x0x_contract_address") How ...
2
votes
1answer
867 views

Subscribe to events usign geth websocket

I'm trying to subscribe to geth using the websocket api. First step was to start geth: geth --ws --wsport=8456 --wsorigins="*" --fast --cache=512 --rpcport=8455 --rpc --rpcapi="personal,eth,network" ...
1
vote
1answer
23 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( '...
0
votes
2answers
1k views

JSON RPC get address balance

I'm trying to get the ether balance for any ethereum address. I've set up a node with the Ethereum daemon, but as far as I can tell, using eth_getBalance you can only get the balance of your own ...
1
vote
1answer
405 views

Ethereum Contract ABI - Encoding for functions with no arguments

I am using argument encoding from this page (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) to build data field for offline signing. I am using eth.sendRawTransaction to call a function ...
2
votes
1answer
543 views

Encode method signature and parameters using Go-Ethereum

Is there any way to use the Go-Ethereum library to get the string I have to send to JSON RPC to call a contract method. I mean, Go-Ethereum comes with a CLI, so there must be some built-in functions ...
2
votes
1answer
614 views

send a tx, json rpc, golang

I tried to send a tx via geth json rpc using the following code. But the geth rpc server response with "Invalid sender". I also tried HomesteadSigner. In that case there is no error received, but I ...
0
votes
1answer
494 views

web3.eth.sendTransaction sending to random address

I've been trying since near 2 weeks to make my users able to deposit and send ethereum on site. I use geth mostly, and more recently web3.js. I face a very weird issue. All seems well, transaction ...
7
votes
1answer
4k 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(...
0
votes
1answer
395 views

Web3.js unable to unlock account to call smart contract

I am using web3.js 0.20.6 and I want to unlock an account to execute a smart contract method on a private blockchain. The account is used to pay for the gas. I have used the following code to unlock ...
1
vote
1answer
631 views

web3.isConnected() returns false when connecting to geth with web3.js

I am totally new to cryptocurrency stuff. I have installed geth and web3. I want to build a web page showing account balance. I start geth with below command build/bin/geth --rpc --rpcaddr 127.0.0.1 ...
5
votes
1answer
282 views

Accessing custom JavaScript functions via RPC API on Geth

Geth allows me to define & load my own custom JavaScript functions with --preload flag or require() on Geth console. But is there way to access my functions via RPC interface? Like : curl -H "...
5
votes
3answers
3k views

Where can I get list of open Ethereum nodes so I can use the RPC calls?

In Bitcoin I can use the rpc calls to manage the node or broadcast transactions. How can this be done with Ethereum? Is there a list of public open nodes I can use? How can I do this in the browser ...
2
votes
4answers
212 views

Replacement for Infura site

I have been using Infura site for accessing main Ethereum network, but newly this site has changed its services and don't service send methods. I searched a little and found Quicknode site, but ...
2
votes
3answers
1k views

Error: Invalid number of arguments to Solidity function | when trying to pass in parameter from App.js to Solidity

I am trying to call a function in my Solidity file (Coder.sol), while passing through a parameter from my App.js file. My function in my App.js file looks like this: handleStartRequirement: function(...
0
votes
1answer
483 views

ethers.js connect to private net RPC

I'm trying to work on ethereum and currently I'm using ethers npm package and I was trying to connect it to my private net which I will be using it for testing. I've run my geth with this command. ...
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
2answers
2k 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 ...
0
votes
2answers
51 views

Is there any way to scale geth (or any client) API Layer to query a single node?

as title suggest, what I'm trying to do is to have multiple "app" that expose Json RPC endpoints, like get_balance, get_block / eth_getBlockByNumber / eth_getBlockByHash, so I need to read a full node,...
2
votes
0answers
13 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
28 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 ...
0
votes
1answer
84 views

CORS Issue when using RPC with 2 docker containers

I currently have a setup with two docker containers. The first container, peerA, has a private ethereum network running a single node. The second container, web-app, has a web application that uses ...
1
vote
1answer
49 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: ...
5
votes
4answers
2k views

Parity Trace Issue: TraceDB resync required

I am trying to use the trace functionality included in the parity node (https://github.com/paritytech/parity/wiki/JSONRPC-trace-module) but I am having trouble configuring my node. I have tried to ...
0
votes
1answer
16 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
60 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
24 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
78 views

How to get new transaction coming by address in my waller by json rpc

First !! sorry about english language. I'm newbies dev for ethereum json rpc. I'm hard to find and i don't understand how to use json rpc for check new transaction coming by my address.?? (i want to ...
4
votes
1answer
133 views

Receive deployed contract address by transaction hash with JSON-RPC request

I want to receive deployed contract address by transaction hash. Transcation example - 0x996a683acd59a2ad17461f76ce0f387a89a5ac257ec5d667556219c6acc7f45a. As you can see this contract was deployed by ...
2
votes
1answer
114 views

Getting the latest eth_call result from a cluster of nodes

What's the best way to know the block number associated with the result of an eth_call? Assume I have several nodes that i'm running and i'm making calls to all of them (for redundancy). My goal is ...
1
vote
1answer
18 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
1answer
17 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 ...
0
votes
2answers
72 views

What bad things could happens if Geth RPC is public?

Geth does not ship with RPC support. By default Geth enables modules ["net", "web3", "eth", "shh"]. In case the RPC get compromised, what kind of bad things could happens? Money lost will definitely ...
2
votes
2answers
786 views

Ether Historical Price Data

I am looking for historical ether prices. There was a thread already discussing this enter link description here, however, I would like to get not only the prices available for Ether on Poloniex but ...
0
votes
1answer
28 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
1answer
65 views

No shares accepted when connected to LAN farm node

I was mining for about 30 hours and nothing showed up at the pool. They never saw me connected. I was running geth on Ubuntu 16.04 and and mining on my windows PC connecting to geth on ubuntu box ...
0
votes
1answer
69 views

What is rpc and p2p code for Ethereum token? What to give as GitHub source code of an Ethereum token in exchange?

I’m new to Ethereum development. From ethereum token docs I came to know the process of deploying the token. But at some exchanges they ask for RPC and P2P port as well as the github source of the ...
0
votes
1answer
35 views

Pending transactions not mined in private network

I have created a node with the following genesis block: { "config":{ "chainId":9119, ...
0
votes
1answer
157 views

what is the 'QUANTITY|TAG' for in eth_call

How does that parameter affect eth_call? From the doc, this should specify a block? Does that mean it is as if the transaction were in the block?
0
votes
0answers
11 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
3answers
280 views

Unlocking Ethereum wallet using Geth JSON-RPC

When I use ETH with JSON-RPC I have error "message": "authentication needed: password or unlock» and If I manually unlock I have other error "message": "insufficient funds for gas * price + value" Any ...
1
vote
1answer
149 views

Documentation For Token Smart Contracts with JSON RPC

This is the documentation for the Ethereum Json RPC: https://github.com/ethereum/wiki/wiki/JSON-RPC Pretty straight forward, but where is the documentation for dealing with tokens via this protocol? ...