Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
1
vote
0answers
11 views

eth_signTypedData does not exist [closed]

with any web3 or ethers provider I am getting this error. This is suddently startedoccuring. Noticed it when my hardhat test cases started failing. Is anyone else facing the same and has solution?? ...
0
votes
0answers
123 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
0answers
24 views

Invalid response at function call from time to time

I am continuously trying to fetch all pair addresses from a PancakeSwap contract but while doing so it always fails after some time saying: Error: invalid response - 0 at exports.XMLHttpRequest....
0
votes
0answers
17 views

I am receiving a internal error Json-rpc error

So i recently installed a "custom rpc" on metamask which is gochain, and it has been working fine, recently i tried to do a token swap of wrapped omi and did it wrong by sending omi to the ...
0
votes
0answers
36 views

how to decode JSON-RPC BSC output result

How to decode the JSON-RPC result of bsc-dataseed1.defibit.io? these are two examples of output: { "jsonrpc": "2.0", "id": 1, "result": { "...
5
votes
1answer
153 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
1answer
20 views

Web3 transaction execution is slow (5 secs)

I am trying to send a transaction to a contract through web3, with the following code: const c = new web3.eth.Contract(contractData.abi, address) console.log(new Date()) const x = await c.methods....
0
votes
1answer
56 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
0answers
7 views

How to parse trace output using ABI & web3?

I am pulling a trace from a Parity node using the JSONRPC API. It looks like this: print(trace) { 'action': { 'callType': 'staticcall', 'from': '0xXXXXXXXXXXXXXXXXXXXXXXXXXXXX', ...
0
votes
2answers
95 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 ...
3
votes
3answers
4k 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 ...
0
votes
1answer
54 views

Pending transactions not mined in private network

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

RPC connection fails

I launched my geth with those parameters : sudo geth --syncmode "light" --cache=2048 --datadir /mnt/ssd/ethereum --pprof.addr 0.0.0.0 --pprof It's running on a ubuntu server 20 on a ...
2
votes
1answer
40 views

Where can i find a documentation of all `wallet_` RPC calls?

Looked everywhere, and all I can find are a bunch of EIPs. Is there a document/repo somewhere listing all available RPC calls that interact with the wallet (wallet_...)? Specifically, I'd like to ...
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 ...
2
votes
2answers
897 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
67 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 ...
3
votes
1answer
216 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
110 views

Ganache Invalid JSON RPC response: “”

Trying to connect Ganache GUI running on port 7545 to web3.js. Getting the below error whenever trying to call any of the functions of web3 - > web3.eth.getBalance("...
0
votes
1answer
37 views

Json RPC eth_sendTransaction data parameter

I have a question concerning the data parameter of the json RPC method eth_sendTransaction. Is it possible to send any kind of data structure with this method to a smart contract? Is it possible to ...
1
vote
0answers
42 views

Cannot call function in openzepplin ERC1155 contract via web3/metamask

I am trying to call the balanceOf function in a pretty barebones openzepplin ERC1155 contract through metamask. I am using web3 only to generate the ABI, and metamask to actually send out the call. ...
1
vote
1answer
83 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
0answers
20 views

Connecting external server to Ethereum node via RPC failed “bind: cannot assign requested address”

I am trying to connect an external server to my Ethereum node. Considering I don't want to use --rpcaddr 0.0.0.0 (which it works)for security reasons, I am using the following command to start geth: ...
1
vote
1answer
139 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
0answers
46 views

Uniswap fork only fetches 14 times

I've forked uniswap V2 to xDai and deployed its interface & analytics. Interface seems to work well, but when you visit analytics, it never loads. Here's subgraph - https://thegraph.com/explorer/...
2
votes
1answer
40 views

405 Method Not Allowed with websocket geth RPC

curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: XXXXXXX" -H "Origin: https://XXXXXXX/" -H "Content-Type: application/json" -X ...
1
vote
1answer
527 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 ...
0
votes
1answer
90 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 ...
1
vote
1answer
36 views

how to call a function of a smart contract from a c program using JSON-RPC

Indeed, i installed ganache where i deployed a smart contract. I wanted to write a c program that would allow me to call the functions of my smart contract and read the messages. This program would ...
0
votes
1answer
266 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 ...
10
votes
3answers
5k 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 ...
1
vote
1answer
190 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
3answers
359 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 ...
2
votes
1answer
298 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)
0
votes
2answers
470 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 ...
0
votes
1answer
48 views

RPC call with web3

I am using extend on web3 to use the evm_unlockUnknownAccount on ganache whit this snippet const localWeb3 = new Web3(ganache.provider( {fork : web3ws.currentProvider} )); localWeb3.extend({ methods:...
0
votes
0answers
18 views

Metamask recovery

Hi there can i ask for help please? I installed metamask back in June 20 as a first time just to get used to it and trial some liquidity pooling. After about a few days I got frustrated and decided to ...
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
3answers
104 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,...
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 ...
0
votes
1answer
58 views

The method does not exist/is not available

web3py 5.15.0 i tried w3.geth.personal.new_account('pass-phrase') then get {'code': -32601, 'message': 'The method personal_newAccount does not exist/is not available'} then figured out that i need ...
2
votes
1answer
161 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 ...
2
votes
1answer
139 views

Do all Ethereum networks return the revert reasons as a “message” field?

I noticed that reverted transactions on Kovan don't include the revert reason. I'm getting the generic "Reverted"/ "VM execution error." Is Koval special in this regard? I know ...
1
vote
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 ...
0
votes
1answer
31 views

Dumping erc20 token transactions via rpc?

I'd like to do dump all transactions of an erc20-token via the json-rpc interface. I've got a full node running but I'm lost, since the ethereum blockchain is harder to navigate than bitcoin for some ...
0
votes
1answer
3k 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">&...
1
vote
1answer
445 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
538 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 ...
2
votes
1answer
765 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":"...
1
vote
1answer
814 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 ...

1
2 3 4 5
11