Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
0
votes
1answer
19 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/...
0
votes
1answer
18 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
13 views

How is the length of the message counted when calling eth_sign?

According to https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) +...
0
votes
0answers
19 views

invalid JSON RPC when using custom domain name

geth --testnet --networkid 3 --syncmode "fast" --datadir "." --cache=2048 --rpc --rpcport 8545 --rpcaddr example.ropsten.hk --rpcvhosts example.ropsten.hk --rpccorsdomain "*" --rpcapi="web3,miner,...
1
vote
2answers
32 views

“Gas estimation failed” on Ropsten with Invalid RPC JSON

I'm running into an issue going through a basic example in "Mastering Ethereum"... I have a Faucet contract (on Ropsten) per the book that looks like... pragma solidity ^0.5.1; //mastering ethereum ...
0
votes
1answer
46 views

How Do You Parse Web3 Retuned JSON Objects of Events?

I am using Web3 1.0 to listen to events from a contract like this: tokenContract.events.AddressList({ fromBlock: 6020474, toBlock: 'latest' }, (error, events) => { ...
1
vote
1answer
19 views

How to add a custom JSON-RPC endpoint to geth?

I'm building an Ethereum private network and I want to make a custom JSON-RPC endpoint. I've been customizing and adding some things in the go-ethereum source code but I don't know yet where to look ...
0
votes
0answers
13 views

Why is the filter ID different ganache-cli and geth

request {"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["0x100791de9f40bf2d56ffa6dc5597d2fd0b2703ea70bc7548cd74c04f5d215ab7"]}],"id":0} ganache-cli`s response {"jsonrpc"='2.0', "id"=...
1
vote
2answers
67 views

How to get the miner address of a block with infura Rinkeby endpoint?

I've read some docs online that to get the miner/sealer/signer address of a particular block that runs with the Ethereum PoA/Clique consensus (the Rinkeby testnet for example), I need to call the ...
0
votes
0answers
23 views

How to enable and use the accounting module?

I found the accounting module in this line and want to use them. i attached the accounting module to parameter --rpcapi accounting when run console node but could not found this module. run node: ....
1
vote
0answers
15 views

I want to make multi-node , not private network

I know how to make multi-node in private network, but I have a question how to make a multi-node with other machines. this picture shows independent two nodes, and you can see blank on admin.peers ...
0
votes
1answer
26 views

Uncaught TypeError: web3.eth.Contract is not a constructor

For whatever reason, when I attempt to set an instance of a contract in a javascript file, I get the following message in my console: Uncaught TypeError: web3.eth.Contract is not a constructor At ...
1
vote
1answer
63 views

Sending Tether USDT via RPC JSON API call

I'm trying to send Tether using JSON RPC API via 0xdac17f958d2ee523a2206206994597c13d831ec7 contract. I've tried to cases: From simple ETH wallet From ETH wallet, which has only USDT This is what ...
0
votes
1answer
27 views

JSON RPC-HTTP API have any sort of rate limiting or throttling?

Is there any sort of rate limiting on the RPC-HTTP API? Trying to track down why my node (private chain) can only handle ~40 requests per/second. I am only load testing it with eth_blockNumber so they ...
0
votes
1answer
24 views

Do smart-contracts work as APIs?

Is it possible to put a smart contract "behind" a restful API, i.e. expose my contract functions and properties through restuful API where I can make RPC to it? Or does it work as an API already, but ...
0
votes
0answers
52 views

sendRawTransaction insufficient funds while there is enough balance

Sorry I probably create a topic that was answered multiple times but unfortunately I couldn't find a solution. I'm trying to use RPC server of Geth to send a raw transaction. I've an address with a ...
0
votes
1answer
68 views

Infura Request Limitations

Are there any official information about request limitations? I know for example that there is a limit for the amount of results in getLogs: https://infura.io/docs/ethereum/json-rpc/eth_getLogs ...
2
votes
1answer
50 views

How to find the Bytecode of Ethereum Smart Contract by just it's address using JSON RPC

I am wondering that is there any way to find the byte-code of the Smart Contract which is published on a blockchain just by having only idea about it's contract address using JSON RPC running at 8545 ...
0
votes
0answers
47 views

“Method not found” when trying to parity_subscribe to eth_getFilterChanges

Parity Ethereum version: 2.5.1-beta, tested on 2.4.6 as well Operating system: Linux (Ubuntu) Installation: binary Fully synchronized: yes Network: ethereum Restarted: yes I'm using a websocket. I ...
0
votes
2answers
37 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,...
1
vote
1answer
47 views

How create transaction raw data for using “eth_sendRawTransaction” in C#

My IoT device connects to another computer via Wi-Fi on which Ethereum (Truffle/Ganache) is running which receive a RPC from the IoT. My task is to create raw transaction data on this IoT Device, so ...
1
vote
1answer
25 views

Fetching block template from node

The most famous opensource pool uses eth_getBlockByNumber method with parameter "pending" to get block template and generate jobs from it. But now, in parity, I found that this parameter is deprecated ...
0
votes
0answers
13 views

How to communicate with private geth chain using IPC?

There are many examples on how to send a transaction(in JSON) via http or ws to a geth node, how do you send a json transaction via IPC? I have not been able to find a single example that shows how to ...
0
votes
1answer
69 views

How can I create an array of objects of a specific smart contract in solidity?

I am developing a university management system using ethereum. So,for that I need an entity "Student" and I have created a smart contract with some basic functionalities. Here is my code snippet for ...
0
votes
0answers
27 views

Send ETH on Command Line with Parity

How do you send ETH on the command line with Parity? I am trying this on a node running Parity 2.4.5: curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"...
0
votes
1answer
44 views

how can i translate JSON RPC API for curl into a http://… address [closed]

I have access to a private chain Ethereum node that is accessible via http https://sustainability-chain.info (e.g. i can access it with metamask using special RPC and networkid 20030117 Based on ...
1
vote
0answers
63 views

How to use 'geth attach' with Infura?

I have a project in Infura and the project ID is 6f...3a. I'm having problem to start geth attach process with Infura. I tried all protocols (http, https, ws and wss) but all failed. Did I miss ...
0
votes
1answer
44 views

web3.js - cannot interact with smart contract

I want to write a simple js script. I follow many tutorial available from Youtube, forums and website but i seem that i cannot interact from the smart contract. i can interact it from remix. btw the ...
2
votes
3answers
124 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 ...
0
votes
0answers
13 views

Which kind of error does LOG15 in Ethereum-geth client is about? i always encounter it when When unmarshalling msg.data()

I marshal a struct locally, and then send the marshaled data to ethereum geth client. But when i unmarshal it in geth , i always meet a log15 error. I have explored it for a long time, but didn't ...
0
votes
1answer
143 views

“Normalized odd number of arguments by adding nil ” when unmarshalling data in geth client

I use json.marshal api encoding a struct and then send the marshalled data to geth. It's oK to unmarshal the data locally, but geth returns a error when unmarshalling it. I don't why, please give me ...
0
votes
0answers
27 views

How to create a signed ethereum transaction between two wallets using JSON rpc in a CURL command?

I am new to blockchain. I created 2 wallets using MyEtherWallet. When I use MyEtherWallet to create transactions to transfer Ether between these two wallets (on testnet), it works. I now want to ...
0
votes
1answer
20 views

Can transaction fail after being sent?

I wonder what would happen in following hyphotwtical scenario. Transaction is being sent with blockchain state A. In this state transaction consume 100_000 gas and sender has enough funds to pay for ...
0
votes
0answers
23 views

Is it dangerous for my geth node to accept connections from random IP addresses? [duplicate]

I am running a geth node with a number of RPC and WS options available. In looking at the logs, I am seeing attempted connections from random IP addresses. They look as follows: TRACE[02-17|22:19:32....
0
votes
2answers
63 views

Uncaught Error: Invalid number of arguments to Solidity function

function TriggerContract() { var account = getAccounts(); var test = web3.eth.defaultAccount; console.log(account); var q = document.getElementById("Quantity").value; var ...
0
votes
1answer
160 views

Is there any way to get all token transfers of a specific block number?

I am looking for a way to get all erc20 token transfers with specifying block number only. For ETH there is already a way exists here. I have done some search and found this method to find transfers ...
1
vote
0answers
22 views

How can I safely access management RPC calls on a remote server?

I read in many places that you should not expose the management APIs when running a geth node. If this is the case, how can I access these APIs if I must do so on a remote server? If the server is ...
0
votes
1answer
145 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
120 views

POA chain: intrinsic gas too low, contract deployment

I'm trying to deploy my smart contract to a private proof of authority chain with geth, but i always get the following error message intrinsic gas too low This is the JSON RPC request i'm sending. ...
3
votes
2answers
902 views

Difference between web3.eth.getCoinbase() and web3.eth.getAccounts()[0]

What is the difference between web3.eth.getCoinbase() and web3.eth.getAccounts()[0]. In both cases, I always get the value, which is the currently selected account in Metamask. Note: The question ...
0
votes
1answer
907 views

JSON RPC call from javascript with axios

I would like to call a geth method via JSON RPC from within a react component. I tried this but I always get the Error: 405 (Method Not Allowed) Here is my code: try { const response = await ...
0
votes
1answer
57 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
447 views

How to get list of all transactions on all accunts in parity wallet [duplicate]

I'm looking for simplest way how to get list of all transactions(incoming, outgoing, external, internal, confirmed, unconfirmed) on all accounts created in parity wallet. The listing should support ...
1
vote
0answers
37 views

Web3JS throws InvalidResponse without Ganache core ever receiving a request?

Versions: Ubuntu 18.04 LTS Node.JS: 8.3.0 WebJS: web3: ^1.0.0-beta.37 web3-utils: ^1.0.0-beta.36 npm: 5.6.0 Truffle version 5.x (latest) I have traced through the HttpProvider code in the Web3 ...
2
votes
1answer
175 views

How to configure truffle network with IPC provider?

How can I define in truffle the ipc connection to the node? Currently I am using in truffle.js host/port fields, which are used to create a HttpProvider. module.exports = { networks: { dev: { ...
2
votes
0answers
43 views

Unable to send large transactions on ethereum private chain

I have a small contract pragma solidity ^0.4.17; contract A10test{ mapping(uint=>string) public data; uint public revisionNo=0; function setdata(string _data) public { data[revisionNo] = ...
1
vote
2answers
61 views

How eth_getStorageAt works when block option is not “latest”?

For the block parameter of eth_getStorageAt call, we are given 4 options: HEX String - an integer block number String "earliest" for the earliest/genesis block String "latest" - for the latest ...
2
votes
0answers
67 views

parity json RPC eth_getBalance timeout on light mode

I have timeout problem with eth_getBalance on light mode enable on parity json-rpc. I have no problem with light mode disabled. Here my command on parity parity --chain ropsten --jsonrpc-apis all -...
2
votes
0answers
33 views

JSON RPC Data Structure

Is there a data structure that contains all the JSON RPC endpoints? Not the wiki, but a JSON or SQL file that I can use to programatically iterate over all the endpoints to generate code.
0
votes
1answer
248 views

How to correctly send RPC call using Golang to get smart-contract owner?

Update 12 November 2018 Someone shared a very close solution to what I was looking for here. Update 10 November 2018 Since I'm not able to achieve this using the approach in this question, I ...