Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
1
vote
2answers
700 views

Do all nodes communicate using the JSON RPC protocol?

I'm reading through the JSON RPC Doc now on Github here: https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version I assumed that this is the default communication protocol between any two nodes, ...
4
votes
2answers
2k views

Gas and “Gas Used By Transaction” and how to get both values through json-rpc

On testnet I am analyzing the following transaction https://testnet.etherscan.io/tx/0x7b111a37998b25116b1a6962d393253bf09613dd083b420ec24ffc9a28bc74b6 having this attributes: Gas: 90000 and Gas ...
1
vote
0answers
2k views

How do I send html form data as JSON content type with node js? [closed]

I have a smartcontract GovtContract that works fine when I use curl commands, $curl -X POST -H "Content-Type: application/json" localhost:3000/govtcontract/set -d '{"value":"5"}' | jq $curl -X GET -...
0
votes
1answer
161 views

API to get transactions between 2 blocks in Ethereum

Assuming that I have a starting block and an ending block and I want to retrieve all the transactions that have occurred between these two blocks, is there any API that can help me achieve this?
3
votes
1answer
367 views

Trace transaction with Go client

I need to call the RPC method debug_traceTransaction but it's not present within the Go client. I'd add a method that performs the call to the RPC endpoint but I'm wondering if there's a reason ...
2
votes
1answer
2k views

eth_blockNumber result is always 0x0

I am running geth/mist on windows 10. geth has been started with geth -rpc I've then waited for the sync to complete (some time) and can confirm the sync is finished with a call to eth_syncing ...
6
votes
2answers
869 views

Is there an iOS equivalent for the Android web3j (json-rpc) library?

This question (Ethereum library for iOS/Android?) showed me the way to web3j, but I also need a similar solution for iOS. Does anyone know of such a project?
5
votes
3answers
2k views

Subscription sample using websockets or IPC?

So I was using the web3 API from the NodeJS 'web3' module very happily and it works very well (it uses HTTP transport AFAIU). But now I want to receive events from the server (without polling), and ...
4
votes
0answers
460 views

eth_getTransactionReceipt returns null only sometimes and only on my node, tx is successfully mined in

I'm having this strange problem and it may be related to the way my node is configured. I'm making calls to both infura and my own nodes like so: {'id': 123, 'jsonrpc': '2.0', 'method': '...
1
vote
1answer
162 views

How to get the progress of geth node syncing info via JSON RPC?

I install new geth nodes on remote servers pretty often and I'd like to have a script which can tell me info like this: Node1 is synced for 30%. Is it possible to get any progress of geth node ...
2
votes
0answers
365 views

Getting Json file from remix

I have been deploying contracts on rinkeby but we are almost done to go to mainnet. I have been comparing deployments with truffle and remix and there is a huge difference in gas uses, so I would ...
1
vote
0answers
72 views

Why is the transactionsRoot the same hash as “empty patricia merkle trie” root hash?

My setup is as follows: I am Using ganache-cli and metamask to send 1 ETH from account 1 to account 2. When I use JsonRPC to get the Information about Block 1 (the one with the transaction) the ...
0
votes
1answer
704 views

How secure is using port 8545 from the internet (aka via JSON), can someone steal my ether?

Just noticed I can access 8545 from localhost but fortunately not from the web/internet. Do I need this at all? e.q. I read about someone who had lost $20 million due to someone else sending a call ...
29
votes
3answers
18k 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 ...
1
vote
1answer
201 views

To transfer ERC20 tokens (using Web3js), is it necessary to implement web.eth.Contract?

I'm kind of new to Ethereum network. I used to implement Stellar before. I have successfully implemented my JavaScript app to transfer Eth already. Therefore, I want to expand my above app to accept/...
1
vote
0answers
433 views

eth_sendRawTransaction parameter formatting

we have a JSON RPC method eth_sendRawTransaction as specified here. how is the raw transaction data formatted? I can't seem to find this anywhere. I'm guessing it consists of a signed transaction ...
0
votes
0answers
494 views

Unable to connect to geth via web3.py

I'm launching geth with following command: geth --testnet --syncmode="full" --rpcaddr "0.0.0.0" --rpccorsdomain "localhost" --rpc But when I'm trying to interact with geth by this python code from ...
3
votes
0answers
529 views

JSON RPC transfer of ERC20 Tokens with Parity

How can I use Parity with JSON RPC to send and receive ERC20 tokens?
0
votes
1answer
192 views

Geth Curl parameter id [duplicate]

Whilst going through the documentation for using JSON RPC, 1 of the parameters hasn't been explained. What is the purpose of id? Is it specific to the type of RPC curl request being made? For e.g. ...
2
votes
1answer
793 views

How can I retrieve the number of decimals of a token with RPC?

There doesn't seem any obligation in the ERC20 standard to provide the number of decimals anywhere, yet etherscan and all other services can automatically determine the number of decimals of a token. ...
2
votes
1answer
1k views

Invalid JSON RPC response: “” Geth RPC on custom domain with nginx

in my geth.service file I have.. Description=Ethereum Go Client [Service] ExecStart=/usr/bin/geth --cache=1000 --datadir=/mnt/eth-blockchain --keystore=/mnt/eth-blockchain --rpc --rpcport=8882 --...
1
vote
1answer
269 views

debug_traceTransaction returns “insufficient balance to pay for gas”

At block 916647, tx hash 0xca879fcf2d0146fc4e214ed5d9747a2743b6a586b4f1de1541e52c2fe6be5bad debug_traceTransaction returns error: $ curl -X POST --data '{"jsonrpc":"2.0","method":"...
0
votes
1answer
379 views

Oraclize: callback contain no result Error

I have the following contract to get a random number from 1 to 6 from random.org: pragma solidity ^0.4.0; import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; contract RandomOrg is ...
1
vote
1answer
473 views

Geth account unlocked for 2 seconds

My question relates to a older question on this stackexchange. Details Patrick used the Ethereum Wallet to transfer 1 ether to test out buying TheDAO tokens on his mining computer. When (so far it ...
6
votes
1answer
413 views

How to detect if block was forked?

It's is possible to track by API, if block was forked/orphaned? Will be glad to see some example.
8
votes
1answer
6k views

How to connect Ethereum RPC Client to a remote server?

I have Ethereum node running the JSON RPC server on this IP example 136.10.164.134 . Then I want to use a client to push some data. I see this library to make the client. But I can't connect to my ...
0
votes
1answer
504 views

Loading External data (in Excel/CSV) to blockchain engine [closed]

I am new to solidity blockchain. I have transaction dataset in csv files. I want to load it automatically to blockchain using ethereum solidity. How can I do it? Is there any UI available? Any guide ...
4
votes
2answers
2k views

code“:-32602,”message“:”invalid argument 0: hex string has odd length"

Firstly, I wrote a contract with the source below: pragma solidity ^0.4.8; contract HelloWorld { address creator; string greeting; function HelloWorld(string _greeting) public { ...
0
votes
1answer
743 views

JSON RPC Get Tokens At Address

Getting a balance for a token from the JSON RPC is simple. This is all I need to get a Tronix balance. The "0xf230b790e05390fc8295f4d3f60332c93bed42e2" part is the contract address for Tronix. {"id":...
1
vote
3answers
2k views

Why web3 and not just call JSON RPC API

This might be a silly question. if one is able to call JSON RPC API methods such as eth_sendTransaction directly using Postman or any web client, albeit a little troublesome, why use web3? I have ...
8
votes
2answers
6k 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 ...
0
votes
1answer
45 views

What happens when a contract has overlapping function selectors? [duplicate]

The method to execute a function on a contract in Ethereum is to use the JSON RPC protocol to make a request which has the details of which function you want to call. https://github.com/ethereum/wiki/...
1
vote
1answer
2k views

What is the JSON-RPC method to call a contract's function?

I'm trying to figure out what exactly happens when a function of a smart contract gets called. Since all client communication is done through JSON-RPC I'm looking at their wiki to find which JSON-RPC ...
2
votes
1answer
1k views

How to send signed transaction to Ropsten through INFURA in Golang

I want to send and broadcast a signed transaction by sender to the Ropsten network through INFURA in Golang. I was able to send a signed transaction and recieved a response from INFURA as per below, ...
1
vote
0answers
411 views

JSON RPC Load Testing / Stress Testing Tool

I am trying to test my quorum setup by load testing it. Are there any JSON RPC Load Testing / Stress Testing Tools? Does Postman or SOAP UI supports JSON/RPC calls?
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 ...
1
vote
2answers
560 views

How to secure a private chain?

Recently I've setup a private chain on cloud (to be more accurate, it is a separate public chain), after a few days, I found that there are some strange transactions sending ether to the same account ...
2
votes
1answer
1k views

RPC authentication in Ethereum?

As far as I understand Ethereum uses JSON-RPC to communicate between clients. What is the authentication mechanism? That is, how does the network know that the RPC request is coming from a legit ...
3
votes
2answers
2k views

JSON RPC calls using Parity. Difference between Infura and Geth?

I began by trying to follow the article on front running bancor with Python. I thought it would be easy to send an api request to my full node then replicate the same request in Python--all ...
0
votes
1answer
401 views

How do I connect to MY full node using RPC

I have a full node(Parity) running at home. I know I can trust this node. How would I go about connecting to it from another computer?
2
votes
0answers
141 views

Is it possible to see the event log when using eth_call?

I want to perform a transaction locally (with the call method in web3 which perform a eth_call RPC call). It returns only the return value of the function called and I want to see the event log. I ...
1
vote
0answers
233 views

RPC call eth_getTransactionByHash fails against geth --syncmode=light --rpc

Will try without --syncmode=light (on a different PC) to see if that command line is the culprit; if it is, this question may be answered quite easily. Geth version Geth Version: 1.8.8-stable ...
3
votes
1answer
1k views

Is there a complete list of available values for the `--rpcapi` command line option of geth?

I known this page https://github.com/ethereum/wiki/wiki/JSON-RPC, but seems it doesn't contains all available apis, for example, it doesn't contain personal API.
0
votes
1answer
3k views

What do these geth --rpcapi parameters mean: db and net?

Many times in different guides I met the following string to start geth: geth --rpc --rpcapi="db,eth,net,web3,personal" Here we can find commands provided by admin, personal, eth options. But what ...
2
votes
0answers
72 views

Programmatically unlock certain accounts with Parity?

Using geth it is easy to send transactions from multiple accounts but I do not know how to do this with Parity. I do not want all accounts unlocked. I do not want any account unlocked when it is not ...
0
votes
1answer
245 views

How to transfer the information of the token when transmitting RPC communication [duplicate]

I have difficulties during the project and ask you questions. Please help me situation Create an ERC20-based token and try to create a transaction. Communication with geth is RPC communication. How ...
0
votes
2answers
2k views

Sending Transactions via RPC or IPC?

Recently i'm trying to comunicate to a private Ethereum blockchain via RPC/IPC to create a Transaction but what i'm seeing is that i cannot do it via RPC because: - i Always need to unlock my account ...
2
votes
0answers
319 views

Parity syncing status for smart contract events with warp

So I'm trying to find the fastest way to fully sync a parity node in order to get all smart contract events, not just account states. The problem I've found is that when parity has warp syncing ...
3
votes
0answers
294 views

eth.getTransaction returning null? Troubleshooting steps

Why am I getting null trying to query ANY transaction id? Any ideas to troubleshoot? Running in light mode. I can query last block number. I can query balances of addresses without issue. eth....
5
votes
1answer
3k views

Subscription using websocket through Geth

I am trying to build a dapp which will monitor a particular address balance, and update in case someone send fund (ether) to it. Instead of polling using call getBalance, I want to take advantage of ...

1
3 4
5
6 7
11