Questions tagged [testrpc]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Modify storage in Ganache or BuidlerEVM?

I have an orchestrated contract with a function that can only be called by another contract. While struggling to find an elegant solution for writing a unit test, I realised that I could circumvent ...
0
votes
1answer
82 views

Dice2Win Truffle test fails with the message Returned error: VM Exception while processing transaction: invalid opcode

As I was going through the test for the Dice2Win smart contract, It was required to verify few tests, which failed throwing invalid opcode error. The following is the error after running the truffle ...
4
votes
2answers
187 views

How to enhance list of accounts for the Truffle tests to run against Ropsten testnet

I am working on the my contracts testing scripts. But I want to run tests not on the local TestRPC or Ganache but in the Ropsten testnet. How can I predefine a list of accounts (private keys and ...
4
votes
1answer
316 views

Alternatives for Truffle for running and writing tests

Truffle offers many conveniences for writing tests for Ethereum smart contracts. The benefits include no need for a separate chain process like Ganache, complex automation of linking and deploying of ...
2
votes
2answers
115 views

How to test chain reorganization with testrpc?

I am working on blockchain synchronization script. I need a way to make reorganization programmatically for testing purposes. Is there such functionality in some testrpc?
0
votes
1answer
180 views

Metamask TestRPC shows 0 Ether while connecting to Ganache- CLI

I've gone through various Q/A(s) of the problem of ganache-cli and metamask not linking but after trying all the solutions, still doesn't work for me. As soon as I type ganache-cli in windows cmd ...
1
vote
2answers
70 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?
2
votes
1answer
129 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
73 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 ...
1
vote
1answer
56 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
1answer
831 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
280 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
134 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
35 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
1answer
140 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
658 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 ...
1
vote
1answer
134 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
817 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
22 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 ...
1
vote
1answer
224 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
586 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
105 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 ...
1
vote
2answers
2k 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
182 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
50 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
790 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
240 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
803 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
588 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
319 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
137 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
603 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
3answers
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
22 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
3k 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
646 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
102 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 : ...
1
vote
1answer
1k 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
1k 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
323 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 ...
1
vote
1answer
72 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
3answers
680 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 ...
8
votes
4answers
8k 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
255 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
3k 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
419 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
173 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
715 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
404 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 ...

1
2 3 4 5
9