The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [testrpc]

Questions related to the test RPC client/simulator https://github.com/ethereumjs/testrpc

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Can't install `eth-tester` Python Package

I am trying to install [eth-tester][1] Python Package so that I can use it to load test ethereum in my account by using its get_balance() function. First when i installed this package using; pip ...
0
votes
2answers
25 views

Testrpc on ubuntu

I have a .php website on my ubuntu virtual machine. I want to start the testrpc in this machine, so I can interract with my smartcontract with this web interface. Is this possible?
1
vote
1answer
53 views

Request to http://localhost:8545 from https website

I am building a website that should interact (from the browser, not back-end) with custom Ethereum nodes, including local, something like MyEtherWallet. I can connect to ganache http://localhost:8545 ...
0
votes
1answer
23 views

Html interaction with smart contract via web3.js

I have a html code interacting with my smart contract via a local test rpc local host. I was just wondering if I deploy this contract to the main network instead of using test rpc, what should be the ...
0
votes
1answer
42 views

HTML interaction with blockchain

I'm collecting temperature data from user on-chain. However, since cant get exact (live) time through my html code connected via testrpc to the blockchain I do so. Where post click a button, html ...
0
votes
0answers
188 views

Error: The data field must be HEX encoded data

I am trying to make a simple dApp by using a tutorial. I am using the following command ; npm install ganache-cli web3 so that we can use web3 to get fake ethereum nodes/accounts by connecting it ...
0
votes
1answer
118 views

Can't connect to localhost:8545 while using ethereumjs-testrpc web3?

I am developing a simple Voting dApp by following a tutorial. In this tutorial we are using npm install ethereumjs-testrpc web3 so that we can get the fake nodes of Ethereum. For that i first ...
0
votes
1answer
21 views

Gas estimation failed when using web3 provider testrpc

Gas estimation failed error while invoking a simple function pragma solidity ^0.5.9; contract sample{ uint number; function setNumber(uint _number) public{ number = _number; } ...
0
votes
0answers
23 views

Can't Connect Metamask to Ballot Dapp?

I want to connect Ballot Dapp to Metamask but it Shows "rpc error with payload" and "ALERT: Trying to call a function on a non-contract address".
0
votes
0answers
39 views

Manage accounts in Remix Web3 Provider env connected to a TestRPC client node

When I run the TestRPC client (ganache-cli), it provides me with 10 different accounts and private keys along with a local server at localhost:8545 Available Accounts (0) ...
0
votes
1answer
245 views

Can't even create a smart contract: Sender doesn't have enough funds to send tx

I wrote and deployed a basic smart contract on Remix Javascript VM Environment. It worked fine. Then I installed and started TestRPC (now ganachi-cli). Then, upon changing the environment to Web3 ...
0
votes
0answers
73 views

Getting an VM Exception while processing transaction: revert

Post trying to initialize a task using the initTask function, I keep getting a revert exception. I've tried to remove the condition (msg.value >= _rewardUnit*_rewardNum) from the function and ...
0
votes
0answers
68 views

Ganache-cli EADDRINUSE 127.0.0.1:8545 error?

when i start ganache-cli with command, it gives this error : ❯ ganache-cli Ganache CLI v6.4.1 (ganache-core: 2.5.3) Error: listen EADDRINUSE 127.0.0.1:8545 at Server.setupListenHandle [as ...
0
votes
1answer
328 views

Metamask not connecting to localhost “7545”

After following the pet shop tutorial i cant connect my localhost to the metamask wallet i'm still get 0eth in my wallet whereas it should be 99eth after connecting. The metamask is not showing it as ...
1
vote
0answers
21 views

Why is one of my transactions using more gas when both carry out the same function of sending ether?

Below are two functions that I have in a simple lease smart contract. I am running a TestRPC node with Remix on version 0.5.1. When I call the terminate function, it executes and terminates the ...
0
votes
0answers
184 views

CORS policy error while connect to test-rpc

I'm trying to build my first dapp using test-rpc and web3js. I deployed a smart contract (with remix ide) to the testrpc (on linux ubuntu), when executing the following line: web3 = new Web3(new Web3....
1
vote
1answer
149 views

In the Remix Web3 Provider IDE, how do you call a function in an ERC20 token contract from another contract without getting an estimateGas error?

I am building a very basic smart contract, 'CheckAllowance', on top of the 'FiatTokenV1' ERC20 token in the Remix Web3 Provider IDE. When I try to check an address's allowance in the 'FiatTokenV1' ...
0
votes
2answers
375 views

Retrieve specific account in truffle 5 console

I am following a truffle tutorial where the individual users web3.eth.accounts to retrieve all the accounts from Ganash. However that seemed depreciated and to duplicate his results I used web3.eth....
2
votes
0answers
74 views

issue with persistence of blockchain data in ganache-cli [duplicate]

a request for these users (Richard Horrocks, Achala Dissanayake, shane, flygoing ), please read the questions completely and understand them... then answer them if you actually know something about ...
0
votes
2answers
1k views

ALERT: [ethjs-rpc] rpc error with payload

I am trying to create transaction local blockchain using ganache on When i confirm the transaction i get the error as "{"id":4818399857527,"jsonrpc":"2.0","params":..", please refer screenshot for ...
0
votes
1answer
105 views

Problem with running web3.py code

I am trying to run this code from web3 import Web3, HTTPProvider import json import pprint import requests from random import randint # Debug flags debug_transaction = False debug_CALL_transactions ...
1
vote
2answers
37 views

What are contract Variables and how are they different from normal varables declaration

pragma solidity ^0.4.2; import DappToken; contract DappTokenSale { address admin; DappToken public tokenContract; function DappTokeSale(DappToken _tokenContract) public { ...
0
votes
2answers
451 views

command Testrpc is not working

I installed Geth to work with Web3 and used npm install -g ethereumjs-testrpc but when i run testrpc the following error shows testrpc is not recognized as an internal or external command,operable ...
0
votes
1answer
192 views

How to read previous blocks data?

I'm new to block chain technology. I'm trying to store and read blocks using testRPC along web3.js. I'm able to get the latest block data but not able to fetch previous blocks data. Please some one ...
3
votes
1answer
526 views

ganache-cli doesn't have enough funds to send tx – number increases proportionally to however much I initialize a wallet with

I'm trying to write a simple function to send a transaction using web3 and ethereumjs-tx that empties the wallet of an account (call this account A) into another account (account B). However, no ...
6
votes
2answers
488 views

Is it possible to use “Oraclize” on a testnets such as “Ropsten” or “Kovan” or “Rinkeby” or even local blockchain such as “TestRPC”?

Is it possible to use Oraclize on a testnet such as "Ropsten" or "Kovan" or "Rinkeby" or even local blockchain such as "TestRPC" ?
0
votes
1answer
213 views

Transaction taking too long on Ropsten testnet

I checked the syncing status, it returns false. I submitted transaction with a very high gas value but it takes long time to get completed. This is my local ropsten node: INFO [08-06|13:16:45.473] ...
0
votes
1answer
117 views

Invalid Address error when call setFoo() function

my remix pragma solidity ^0.4.24; contract Foo { bytes32 foo; function setFoo(bytes32 _foo) public { foo = _foo; } function getFoo() public constant returns (bytes32) { ...
0
votes
2answers
335 views

Metamask won't display correct balance after creating customrpc for ganache accounts

I made a customrpc network on metamask using the correct server and imported a private key from ganache, which worked but the eth balance is displaying 0 when I expected it to display 100. According ...
2
votes
2answers
2k views

Unable to execute web3.eth.accounts[0]

I'm following along with this short tutorial and ran into a few problems. I'm running testrpc in my console. However, every time I run my index.html I get an error. My index.html file is the following:...
-1
votes
1answer
18 views

Unable to transact funds in testrpc

I'm running a simple smart contract on testrpc using remix: Contract Testing{ address [] public adds; uint [] public amounts; function bet() public payable{ adds.push(msg.sender);...
0
votes
1answer
2k views

How to be sure about “MetaMask web3 Provider” connection?

Note: This question is related to this : "Updated :" How to see "output" of "web3.personal.sign" in "browser"? ("Method personal_sign not supported") ...
0
votes
1answer
457 views

“Updated :” How to see “output” of “web3.personal.sign” in “browser”? (“Method personal_sign not supported”)

Note: I updated the html / JavaScript code according to the answer and I used THIS META MASK sample code for web3 provider. However, I receive the same error. I eventually did not understand that do I ...
0
votes
0answers
86 views

How to be sure “ethereumjs” is installed?

I installed ethereumjs library using following command: npm i ethereumjs-testrpc And here is the output: And then I tried to run an html example which uses ethereumjs-vm. The example is here : ...
0
votes
1answer
664 views

MetaMask cannot connect to “localhost 8545”

When I choose localhost 8545 in MetaMask, apparently it is not able to connect. Please see screen shot: I tried with several internet connection, however the same result. Whereas, I can easily ...
0
votes
1answer
1k views

“UPDATED : ” “VM Exception while processing transaction: revert”

I tested signature verification of the code presented HERE as follows: running testRPC : root@ubuntu:/home/s# testrpc EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2) Available Accounts =============...
0
votes
2answers
833 views

“The transaction execution will likely fail. Do you want to force sending? VM Exception while processing transaction: out of gas”

When I want to deploy a contract using testRPC and remix, I receive the following error message: Gas estimation errored with the following message (see below). The transaction execution will ...
0
votes
1answer
272 views

Problem of deploying contract with “testRPC” and “remix” : “creation of contract pending …”

When I try to deploy a contract using testRPC and remix, I receive: creation of contract pending ... I tried even the default contract of http://remix.ethereum.org. Steps: First I open cmd. Then ...
0
votes
1answer
50 views

Do we have to compile and deploy our contract to ethereum each time we start a test rpc?

I'm trying to develop a voting application, I have successfully compiled the app and also deployed it to ethereum blockchain. Now I've closed the test rpc and node console, and when I restarted node ...
1
vote
2answers
487 views

web3.setProvider is not a function

I am trying to learn about web3.js I install npm install ethereumjs-testrpc and npm install web3 // version 0.20.6 npm install ganache-cli // version 6.0.3 then i using the following code var ...
4
votes
2answers
4k views

Error: Error: [ethjs-rpc] rpc error with payload {“id”:6223335088050,“jsonrpc”:“2.0”,“params”:

I have deployed a smart contract in Remix IDE using MetaMask and test rpc. I got the below error: Error: Error: [ethjs-rpc] rpc error with payload {"id":6223335088050,"jsonrpc":"2.0","params":["...
2
votes
2answers
192 views

web3.isConnected() returns nothing when connecting to geth with web3.js(Version 0.19.0)

web3.isConnected() has issue. When connecting to an IPC node I think it is waiting for something because when i starting my nodejs program nothing happens, I am running ethereum node and try to ...
2
votes
1answer
2k views

How to convert getBalance output to ether in web3 1.0

I tried web3.js 1.0.0-beta. I found in document method web3.utils.fromWei(value, 'ether') convert the wei to ether. In new version getBalance method work as asynchronous. how can I get the value from ...
0
votes
1answer
340 views

Truffle test not working when I add migration.js

I have written javascript tests that run fine with truffle test ./test/Token.js However, when I have the following: var UTO = artifacts.require("./uto.sol"); module.exports = function(deployer) { ...
1
vote
1answer
149 views

Is there a difference between the terms TestRPC and Testnet?

From what I understand, a testnet is just a local (or private) blockchain for developers to experiment on, and TestRPC is/was a specific implementation of a testnet for the Ethereum blockchain? (I ...
3
votes
2answers
510 views

Want a large number of Test Ethers. How to get them?

I have made a proof of concept that works on Ropsten Test Network. Now for users to use it I need a large number of Test Ethers in my account. As far as I know, we can get only one ether with one IP ...
0
votes
1answer
222 views

ERC20 TestToken code returns 0 for allowance after approval [duplicate]

I have the following code in my testtoken.js and am wondering why the assertion fails with "AssertionError: allowance wasn't set to 30: expected '0' to equal 30". it("Approve an allowance of 30 ...
0
votes
0answers
62 views

Why account balance can decrease when gasPrice is 0 and msg.value is 0?

It also spends pretty large amount, which doesn't seem to be related to gasUsed Contract: pragma solidity ^0.4.24; contract Test { bool i; function hello() public { i = true; } }...
1
vote
0answers
178 views

How can I watch my contract using Ganache testRPC?

I want to get the transaction hash + contract address ... using Ganache testRPC. since I don't have the option of using etherscan because testrpc of ganache use everything locally.
0
votes
0answers
169 views

Ganache cli transaction hash collision

I am making couple of forwarding transactions (i.e. to contract address that just receives funds and proxifying it to main contract) locally on Ganache CLI running (old testrpc does the same result) ...