0

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) 0x6b499615fb839b33ffd9cea1380727a7ee0c39b1

...

(9) 0x8ff593ecc3f4068ff15bffe4481ec627e7cd8247

Private Keys

(0) cb7eba4cef5a7a1ad16b30e7b380b38a1d23fc52aaebed77d5c53d4b7133cd6c

...

(9) 9a64d0bbadbf1873657ecf02b7c0b926cef1fdde34283478ef7973473f339537

HD Wallet

Mnemonic: ordinary husband nation coast above benefit hamster kitchen fantasy check notice hobby Base HD Path: m/44'/60'/0'/0/{account_index}

Listening on localhost:8545

Now, in Remix when I change the environment to Web3 Provider and connect to localhost:8545, the box Account gets emptied and I'm forced to create a new account assigning a passphrase to it. It does not let me choose any of the above accounts created automatically by TestRPC.

enter image description here

The problem is that this new account created by Remix has a balance of 0 so it doesn't let me deploy a smart contract or do anything else.

How can I pick in Remix one from the 10 accounts created by TestRPC or how can I transfer some ether from one of these accounts to the account created by Remix in order to deploy a smart contract and make other transactions?

Thanks in advance.

  • This normally just works, populating the "Account" dropdown with the existing accounts. (I just tried it now.) What version of ganache-cli are you running? And you said "localhost:8545", but you're using an HTTP URL, right? E.g. "localhost:8545" – user19510 Apr 16 at 21:29
  • Any errors in the JavaScript console? – user19510 Apr 16 at 21:30
  • @smarx I should mention that I installed Ethereumjs-testrpc (npm install -g ethereumjs-testrpc) instead of ganache-cli (I'm new at this and didn't know TestRPC is being deprecated). Do you think that contributed to the problem?... Version: EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2). The endpoint I'm connecting to is http : // localhost:8545, although when I go to that localhost through a chrome browser it only shows "400 Bad Request", is this normal?... The error that throws the JS console is "Error: sender doesn't have enough funds to send tx. The upfront cost is: 278786 and the send.." – andres_v Apr 16 at 23:09
  • I would definitely start by uninstalling that old version and installing the latest ganache-cli instead. My guess is that the problem will just go away. – user19510 Apr 16 at 23:15
  • @smarx thanks for the suggestion. It worked. If you want you can post it as an answer and I will mark it. – andres_v Apr 18 at 23:04

Your Answer

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

Browse other questions tagged or ask your own question.