Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
5
votes
1answer
149 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 ...
0
votes
2answers
38 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 ...
0
votes
1answer
225 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 ...
1
vote
1answer
16 views

message: 'invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.value of type *hexutil.Big'

I am using a JSON RPC request and source code is as follows: var options ={ url: "http://127.0.0.1:8545", method: "POST", headers: {"Content-Type":"...
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
2answers
58 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 ...
2
votes
2answers
832 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
0answers
16 views

Geth Setup: enabling JSON RPC endpoint with --http

I'm a beginner with blockchain and only starting to read programming textbooks. So a newbie to computer science as well. Right now I'm playing around with my Windows desktop though will be switching ...
0
votes
1answer
57 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
36 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 ...
3
votes
1answer
182 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 ...
0
votes
0answers
23 views

uncaughtException : RangeError: Maximum call stack size exceeded

Facing an issue while working multi-http-provider. When I write var Web3 = require('web3'); require('multi-http-provider'); It throws an error uncaughtException : RangeError: Maximum call stack size ...
1
vote
1answer
79 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 ...
1
vote
0answers
29 views

Understanding eth_estimateGas with regards to gas price, and current mempool

Does anyone have a detailed understanding of how eth_estimateGas works with regards to gasPrice and the current mempool state? I have historically seen some really odd behavior when using ...
0
votes
1answer
50 views

Pending transactions not mined in private network

I have created a node with the following genesis block: { "config":{ "chainId":9119, ...
0
votes
2answers
405 views

getTransaction returns null for some pendingTransactions subscribe results

I have subscribed to ETH pendingTransactions in mainnet. I am doing getTransaction for each received pendingTransaction like below. web3.eth.subscribe('pendingTransactions', function(error, txnid){ ...
1
vote
1answer
173 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
1answer
178 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
24 views

How to collect logs from Uniswap V2: Router 2?

I have a problem with collecting logs from Uniswap router contract. I use json_rpc eth_getlogs When I call the method I receive nothing. What I'm doing wrong? curl -X POST --data '{"jsonrpc":...
0
votes
3answers
341 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
173 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? ...
0
votes
1answer
255 views

Securing Quorum Geth Node

I have a dapp node which uses web3js to send transactions to quorum geth node. The html pages shows the http provider and the ports. In theory anyone can use these ip and public address in the html to ...
0
votes
2answers
389 views

How to get array elements in JavaScript from contract call with JSON-RPC returning an array?

I have a function in my Solidity contract whose prototype is: function checkLastCustomerInvoices() public view returns (bytes32 [] memory) When I call it from the Truffle console it returns an array ...
1
vote
1answer
186 views

Pending transactions logs issue

I am trying to get the pending transactions logs to identify specifics topics before the next block was mined (ERC20 transfers, Uniswap swaps, ..). I run a Geth (1.9.22) full node, mining is enabled (...
0
votes
1answer
71 views

Can I expose geth's rpc ONLY to Metamask connections?

I am building a private chain and rpcaddr is set to 0.0.0.0But recently I found out that this private chain has been attacked by a foreign IP, it kept trying to transfer those worthless ether out from ...
2
votes
1answer
269 views

Is there any limitation for the number of threads to service RPC calls?

Bitcoin has the config. How about ethereum? (geth) https://en.bitcoin.it/wiki/Running_Bitcoin -rpcthreads=<n> Set the number of threads to service RPC calls (default: 4)
150
votes
2answers
32k 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 ...
0
votes
0answers
24 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
1answer
47 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 ...
0
votes
1answer
39 views

Is it possible to use address you don't own while running ethereum RPC node (using geth)?

In other words, you start your own node and then somehow add accounts you don't own (aka - you don't have their private keys)? I'm asking because I wanted to make my own node exposed via RPC/...
1
vote
1answer
32 views

Pass json of address to Contract

i am wanting to import an array of json data into my contract on construct. I want to pass it an array of address to be saved into an array in my contract. Is this possible? I have seen a few posts ...
3
votes
3answers
4k views

Send erc20 tokens using the json-rpc api

I need to send ERC20 tokens (golem to be precise) in an automated manner, so I set up a geth json-rpc server with ./geth --fast --rpc So I can call the api just fine. The documentation for ...
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
1answer
157 views

Can't access swarm 8500 port from outside

I run local swarm node, so I can access it from localhost:8500. RPC request works fine locally. But when I try to send requests to swarm rpc from another server, it is not accessible. I see port 8500 ...
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 --...
0
votes
0answers
27 views

Properly Exposing Geth RPC in 2020

With the default allowed ["net", "web3", "eth"], I want to expose Geth 1.9.21-stable RPC to another machine. In config.html I set HTTPVirtualHosts = ["*"]. The ...
0
votes
1answer
36 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 = ...
1
vote
1answer
787 views

Event watcher gives [object Object] in Geth console

I compiled a contract source below: pragma solidity ^0.4.0; //////////////////////////////////////////////////////////// // This is an example contract hacked together at a meetup. // It is by far ...
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">&...
2
votes
1answer
756 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":"...
0
votes
1answer
526 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 ...
0
votes
2answers
2k 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 ...
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 ...
0
votes
1answer
59 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":"...
2
votes
1answer
1k 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
69 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 ...
1
vote
1answer
431 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 ...
0
votes
1answer
445 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 ...
2
votes
1answer
644 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 ...
2
votes
1answer
691 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 ...

1
2 3 4 5
10