Questions tagged [testrpc]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
235 views

Error in dapp developed using 'Truffle' framework -Smart contract function call won't get executed

I am developing a dapp using 'testrpc' and 'truffle'.I have also used ethereum-bridge for Oraclize.I have written a smart contract function which calls a url using 'OraclizeQuery'. The following is ...
1
vote
2answers
667 views

testrpc's addresses and checksum

When testrpc starts, it outputs the generated addresses, but all in lower case. What's a lightweight way to get their EIP55 checksummed format?
1
vote
1answer
8k 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 ...
1
vote
3answers
1k 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 ...
1
vote
1answer
237 views

Failed to pass ether from one account to another in truffle with testrpc

I have a sample contract with one function: pragma solidity ^0.4.0; contract Test { function sell(address transferTo) public { transferTo.transfer(1000); } } I use testrpc and ...
1
vote
1answer
978 views

Unlock contract deploy address in Truffle testing using TestRPC?

I'm trying to test a function in a contract that sends ether from itself to another contract address. However in my Truffle tests I keep getting Uncaught Error: Error: could not unlock signer account. ...
1
vote
2answers
1k views

One to Many relationship in Contract

If id(Eg:1) field in structure is not unique and different names are mapped with same id=1. Can all names mapped with id=1 could be fetched from blockchain? pragma solidity ^0.4.4; contract ...
1
vote
1answer
283 views

Different gas cost for same operation?

I'm running a smart contract locally on TestRPC and using MetaMask to interact with it. Repeatedly calling the same function with the same parameters seems to accumulate different gas consumption (...
1
vote
1answer
356 views

VM Exception while executing eth_estimateGas using for loop

Important: Using Solidity IDE with Web3 provider Test RPC and web3 installed Testing with 10 Ether accounts with enough Ether (100 ETH) per account. I am testing a simple contract that receives ...
1
vote
2answers
248 views

Testrpc and Raspberry

I have a Raspberry 3 where I should install an Ethereum node. My aim is ,substantially,demonstrate the ability to store data(some strings written in python on rpi) on blockchain. Since I had problems ...
1
vote
1answer
123 views

testrpc - Number of ethers are too low

I am testing few of my solidity contracts using testrpc. However, testrpc has only a few ethers. Is there any way I can increase this limit ( say 500 ethers in all accounts) .
1
vote
1answer
3k views

truffle test - TypeError : myFunction is not a function

I'm using truffle and testrpc to check whether my addMember function works or not. And here is my contract code. /*make Stakeholder*/ function addMember(bytes32 _name, uint256 _threshold, uint256 ...
1
vote
1answer
2k views

Sending test ether on Testrpc

I'm using Truffle Version 2.1 and I'm trying to send test ether to my contract using Testrpc. I run testrpc -u 0 -u 1 And the accounts shows a balance of 99351632199997083360 wei I'm trying to send ...
1
vote
1answer
224 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 ...
1
vote
1answer
1k views

Cannot send ether to a payable function in truffle unit test

I am debugging a bug happened on my truffle solidity test. I can narrow down the problem to an exception happened in the payable modifier. my contract code: import "zeppelin-solidity/contracts/token/...
1
vote
1answer
742 views

Truffle Metacoin Could not find artifacts for ConvertLib.sol from any sources

I've just unboxed the Metacoin example from Truffle http://truffleframework.com/boxes/metacoin When I run truffle test on it in VS Code I get the following error: 1) TestMetacoin "before all" hook: ...
1
vote
2answers
200 views

How to simulate the DAO attack with Truffle and testRPC [closed]

I want to simulate the DAO recursive attack. Can you please define the steps for simulating the attack with Truffle using the TestRPC.
1
vote
1answer
144 views

What kind of HD Wallet is used in test rpc?

EthereumJS TestRPC starts with a HD Wallet: HD Wallet ================== Mnemonic: behave differ train script wedding grant carbon buyer tape make wise soup Base HD Path: m/44'/60'/0'/0/{...
1
vote
1answer
281 views

Ethereum Bridge - WARN log with contract myid was triggered, but it was already seen before, skipping event

I am using ganache desktop application with nodejs where, I need to fetch values from API via ethereum-bridge. Following is contract code - pragma solidity ^0.4.4; import "./usingOraclize.sol"; ...
1
vote
2answers
4k views

How can i reset ether balances in truffle?

If you use truffle for a while, you gradually deplete all your ether from the default account. Now truffle is defunct. How do I top-up the ether? Note I think truffle uses testrpc in the default ...
1
vote
3answers
562 views

Petshop tutorial of Truffle doesn't work. Confused with ports 7545, 8545,& 0 eth on metamask

I am using testrpc, metamask and Truffle. I followed Petshop tutorial on Truffle. The Truffle framework had.default. 7545 as local host port in it.. But my system gave 8545 port. The Petshop app is ...
1
vote
1answer
2k views

web3js: web3.eth.defaultAccount method?

:) I am new to Ethereum technology. I am studying the web3js JavaScript library from the official documentation and I don't understand the web3.eth.defaultAccount. What is this for? Why I have to use ...
1
vote
1answer
638 views

Unable to deploy contract that uses Oraclize using Remix

I was trying to use Oraclize just for testing. I was facing problems deploying a sample contract from quick-start section of oraclize doc. I tried to use both testrpc and private network for ...
1
vote
2answers
3k views

How to get the private keys associated with the web3.eth.accounts from testrpc?

I know I should be able to get it, but does anyone know how to get the private keys associated with the web3.eth.accounts from the testrpc? Much thanks and upvotes to the wise sage with the answer.
1
vote
1answer
375 views

How to create conditional unit testing with truffle

I've been using truffle for unit testing and I can't find a way to execute two excludent tests. I mean, I'm creating an ICO contract and my tests depend on lower and upper cap limit, start and end ...
1
vote
1answer
1k views

TestRPC/Truffle - how to change accounts?

I deployed a contract under with Truffle. I am able to use my contract as user: web3.eth.accounts[0]. What if I wanted to use this deployed contract object as a different user, say: web3.eth.accounts[...
1
vote
1answer
299 views

constant and visibility specifier in solidity

I am trying to run this code but it throws the errors . Is this possible using visibility specifier and constant once ? pragma solidity ^0.4.0; contract C { function first(uint a) private ...
1
vote
3answers
684 views

How can I let TestRpc reveil the public key of a generated account

I suffer a steep learning curve at the beginning. My current goal is to set up a testing environment with TestRpc, Truffle and Web3j (wow). Web3j worked as expected and generated a Java wrapper for ...
1
vote
1answer
570 views

Error when installing testrpc / truffle on Ubuntu Subsystem on Windows 10

Node version 7.10.0 npm installed Ubuntu Subsystem on Windows 10 I try to install testrpc and truffle. When I install truffle via sudo npm install -g truffle I always get the following error: ...
1
vote
3answers
2k views

Solidity function not returning - keeps returning tx receipt

I try to call my Solidity function: function getVehicleDetails(string _vin) returns (string _vln, uint _year, string _make, string _model, string _colour) { Vehicle vehicle = vehicles[_vin]; ...
1
vote
1answer
2k views

Invalid JSON RPC response error when using truffle migrate + geth

I have been able to successfully deploy contracts on the ethereumjs testrpc with truffle without any issues. Now I wanted to do the same on a remote node running geth 1.6.1 but it gives me a JSON RPC ...
1
vote
2answers
179 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
539 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
88 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
1answer
634 views

address.send (msg.value) returning false but ethers got transfered

This is function I am using to transfer ethers from user account to contract account. function addEathersToContractAccount(address contractAddress)public payable returns(bool){ ...
1
vote
1answer
446 views

How to set web3 provider from external host?

I have installed testrpc in AWS and also started it with testrpc -h 'my address'. In remix ide when I choose web3 provider and set url to myaddress:8545 it shows 'Not possible to connect to the Web3 ...
1
vote
1answer
222 views

Where are keystore of testrpc?

I am puzzled that where are the keystor files of default 10 accounts testrpc provides? I start testrpc --db ./data I can see account default accounts: Available Accounts (0) ...
1
vote
2answers
839 views

Access ethereum client from remote machine

I need to access ethereum client setup on remote hosted machine (google cloud ). How can I access the client from the web browser of my local machine ? Current installations on my machine user@...
1
vote
1answer
405 views

How to unit test Quorum projects?

I'd like to build unit tests for a Quorum project including the Quorum specific part that is the privateFor attribute in the transactions. Is there a tool like testrpc specific to Quorum ?
1
vote
1answer
599 views

Truffle Tutorial pet-shop with test-rpc adopt button doesn't work

I have followed the tutorial exactly like they showed in their page: http://truffleframework.com/tutorials/pet-shop except the following changes because they use "ganache" (currently bugged and ...
1
vote
1answer
573 views

Run "truffle test" command with auto set custom balances

I know how to set custom balance accounts on testrpc. It could be like $ testrpc --account="0x627306090abab3a6e1400e9345bc60c78a8bef57,100000000000000000000". But I don't figure out how to do that ...
1
vote
1answer
678 views

Unable to transfer funds in contract

Inside Remix I'm using one address (addr1) to deploy the contract, and another (addr2) to call a function within the contract. The function is a simple transfer function. I'm transferring ...
1
vote
2answers
431 views

unable to use testrpc with ethereum wallet

i am trying to open ethereum wallet with testrpc to quickly test my code. 1) have opened the command prompt and entered cmd "testrpc" 2) opened another command prompt and entered cmd ""Ethereum ...
1
vote
1answer
933 views

Get seed and Password of testrpc accounts

I am working with solidity contracts in development and need to pass seed and password to load wallet. but by running testrpc with --gasLimit, I only get 10 accounts and geslimit. is there any way to ...
1
vote
1answer
731 views

How to mine my contract in testrpc

After learning to create and deploy my contract to my testrpc, now I can't figure out how to get my contract mined. I created my contract and my testrpc is up and running. But my solidity online ...
1
vote
1answer
721 views

Keep contract state after truffle test

I just figured out how to deploy smart contracts on a test RPC with truffle. This is great! But when I do my tests, I am wondering how to keep the state of a deployed contract for the following test. ...
1
vote
1answer
237 views

Connect pyethapp to testrpc - Is there an equivalent to `geth attach` in pyethapp?

I have an instance of testrpc running: testrpc -a 1000 when using geth, I'd do this: geth attach rpc:http://localhost:8545 to link to it. I have pyethapp installed and would like to do something ...
1
vote
1answer
313 views

Contract won't deploy (Truffle, React + Redux Box)

I am trying to develop a smart contract that would allow for multisig actions. So if I, for example, want to add admin to AdminStorage I will need consent of a number of admins. It's exactly like ...
1
vote
1answer
683 views

What is the proper use of inline assembly revert, and how do I retrieve returndata passed to it?

I stumbled on this EIP which describes the revert opcode that looks like it allows you to "throw" more specific errors by passing a memory pointer with the opcode (also described briefly in the docs). ...

1
3 4
5
6 7
9