1

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 running, but nothing is proceeding. And metamask is shows 0eth..it should be 99. I need some help to understand all this

  • Is your blockchain server running? – TMOTTM Jan 16 '18 at 6:18
  • Yeah it is. On 8545 . And. I got the Petshop on my browser too. But I am not able to do next sequences. And metamask shows 0 eth – Rakesh Jan 16 '18 at 6:24
  • Can you add your truffle.js? – TMOTTM Jan 16 '18 at 6:26
  • module.exports = { // See <truffleframework.com/docs/advanced/configuration> // for more about customizing your Truffle configuration! networks: { development: { host: "127.0.0.1", port: 8545, network_id: "*" // Match any network id } } }; – Rakesh Jan 16 '18 at 6:29
  • module.exports = { networks: { development: { host: "127.0.0.1", port: 8545, network_id: "*" // Match any network id } } }; – Rakesh Jan 16 '18 at 6:31
0

Looks like your metamask is not connected to local host 8545. From the drop down option in metamask select local host 8545 and you should view test accounts and their respective balances.

  • I selected 8545 and I got a account with 0 eth – Rakesh Jan 17 '18 at 10:16
  • I selected 8545 and I got a account with 0 eth... And my Petshop from Trufflle/tutorial don't work – Rakesh Jan 17 '18 at 10:26
  • 1
    testrpc accounts will not come by default. After you run testrpc, simply go to Metamask and click Add account. Metamask will add one of the account generated by testrpc command and 100 Ether default. Metamask on its own does not store information to identify which account belongs to which network. – tanmay Jan 17 '18 at 11:30
  • refer response given in this question ethereum.stackexchange.com/questions/20953/… – tanmay Jan 17 '18 at 11:34
  • Thanx got it... – Rakesh Jan 17 '18 at 14:23
1

You might want to try the following steps: 1. Select Custom RPC under Networks in the Metamask 2. Type http://localhost:7545 under New RPC URL, then save. 3. You just added a new private network to select from (http://localhost:7545 )

enter image description here

0

Make sure that you run testrpc on separate terminal. Port 8545 corresponds to testrpc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.