Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [testrpc]

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

2
votes
0answers
30 views

issue with persistence of blockchain data in ganache-cli

I am trying to use the persistence of blockchain data across invocations of ganache-cli. In summary, Invoke ganache with --db and -m flags like so: ganache-cli --db /xyz/ganachedata -m <same ...
0
votes
1answer
39 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
36 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 ...
0
votes
0answers
16 views

ETHER Not Received On My Account on Rinkeby Testnet [duplicate]

I started a local node connected to the Rinkeby testnet... geth --rinkeby --rpc --rpcapi='personal,eth,network,web3,net' ... and then attached the geth console: geth --datadir=%HOMEPATH%/.rinkeby ...
1
vote
1answer
21 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
84 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
50 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
122 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
265 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
0answers
20 views

Can't call contract functions from a separate contract deployed on same local testrpc (two separate Truffle projects)

I have two Truffle projects on my local machine and the contracts in them compile and deploy properly (no errors are raised and in my ganache-cli I get receipts with their addresses). I'm trying to ...
0
votes
1answer
85 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
44 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
0answers
17 views

Syncing ethereum upto a certain height and accessing information

I am using geth version:1.8.14-unstable. Is there a possible way to sync the Ethereum blockchain up to a particular height say 4 Million. Additionally, once geth-client is synced I would like to use ...
0
votes
1answer
183 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
981 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
16 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
444 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
188 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
58 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
167 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
0answers
488 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
180 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
136 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
0answers
65 views

Metamask with testrpc, transactions forever pending

I'm building my first dApp using truffle, and have no issues getting it to play with testrpc on localhost. I recently installed Metamask and have it pointing to my localhost. Now when I try to ...
0
votes
1answer
38 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 ...
0
votes
0answers
93 views

Error: VM Exception while processing transaction

I've got an errors while purchasing token with my test network, and the message is rpc error with payload, and an VM Exception while processing transaction. Is my contract wrong or my function wrong? ...
1
vote
1answer
144 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 ...
2
votes
1answer
1k 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":["...
1
vote
2answers
106 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 ...
0
votes
1answer
462 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
0answers
42 views

out of gas when deploying to test RPC and Rinkeby

I have a big contract, currently testRPC and Rinkeby deployable. But if I add an extra state variable mapping in the contract, local test will not deploy and gives an "out of gas error", also rinkeby ...
0
votes
1answer
111 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
90 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
241 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
113 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
48 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
145 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
117 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) ...
1
vote
0answers
176 views

Error on running any contract in online remix browser using Injected Web3 with Meta Mask

On running contract, I am getting error as shown below: creation of VFCToken pending... creation of VFCToken errored: Error: Error: [ethjs-rpc] rpc error with payload {"id":7746970824019,"jsonrpc":"2....
0
votes
0answers
20 views

opening port in Geth [duplicate]

How can a open a websocket port in geth that connects to private network not to the main or test net just like in testrpc or ganache? As Ganache doesn't support websocket i want to use geth just like ...
0
votes
2answers
78 views

Servers That Implement Ethereum RPC

Here is the documentation for Ethereum RPC. It looks straight forward enough, but I just need a list of servers that implement the RPC. https://ethereumbuilders.gitbooks.io/guide/content/en/...
3
votes
2answers
71 views

How to create more test account when using Mocha to test Solidity smart contract?

By default there are only 10 test accounts being created, how do I create more when using Mocha to test smart contract? I assume Mocha creates a testRPC instance somehow, there must be a way to ...
0
votes
0answers
71 views

Smart contract storage doen't work with ganache

I have this smart contract contract Ballot { struct Prop { uint votes; bytes32 data; address[] validators; } mapping (bytes32 => Prop) props; function ...
4
votes
3answers
236 views

Mocking blockchain for unit test quorum

Is there a way so that I can mock blockchain for unit test in quorum. I do not want to set up a test blockchain for unit testing. Is there any possibility.
0
votes
1answer
95 views

How can I check the provider status ? if testRPC connected or not?

I have a problem with using : web3.net.listening The case when I am connected to the testRPC is working and it returns me TRUE. But the case I am not connected it returns me INTERNAL SERVER ERROR. I ...
0
votes
0answers
24 views

How to run `testRPC` on an Android mobile?

I have a smart contract (solidity) along with a GUI written by JavaScript and HTML as follows: solidity code: pragma solidity ^0.4.15; // -----------------------------------------------------------...
0
votes
1answer
108 views

Why I do not get returned value of function of my smart contract using testRPC and a Graphical User Interface?

I have a smart contract that is tested with remix and it works well. Its code is as follows : contract Weechain: pragma solidity ^0.4.15; // --------------------------------------------------------...
0
votes
0answers
67 views

Problem of interacting with Smart Contract via HTML and JavaScript application

I followed and tested "Creating a Web UI for our Smart Contract" tutorial and it works well. However, when I do exactly what I did in the above tutorial for THIS SMART CONTRACT, I do not see the ...
3
votes
2answers
516 views

Solidity Error: Exceeds block gas limit

When I start ganache-cli in one terminal window and run ./node_modules/.bin/solidity-coverage (command from documentation) in another I get Error: Exceeds block gas limit at Object....
0
votes
0answers
27 views

How to get 100k ether in testrpc? [duplicate]

Id like to run some unit tests in truffle with huge sums of ether (over 30k ether), but my default accounts only seem to have 100 ether in them. Does anyone know how to increase this? Thanks