6

I'm using Remix and connecting to Testrpc via Metamask.

I can successfully launch contracts to testrpc, but then it hangs on the subsequent calls that Remix makes to the public methods (Remix says "9 pending transactions" which never go through).

The contract deploys fine on Rinkeby. I've tried this setup with multiple working contracts but Remix always leaves me with "x pending transactions" (not always the same number for each contract).

Here is my testrpc output:

  Transaction: 0xbf367579e3cb1b414343a4f333bd79388e4fbfe668a57ea59b830934e41512bf
  Contract created: 0x81d49759138f933491a4125ce22c7173e782af4d
  Gas usage: 3347223
  Block Number: 1

eth_getTransactionReceipt
eth_getTransactionByHash
eth_call
eth_call
eth_call
...(more eth_calls)
eth_call
eth_call
eth_call
eth_getBlockByNumber
eth_getBlockByNumber
eth_getBalance
eth_getTransactionCount
eth_getBalance
eth_getTransactionCount
eth_getBalance
eth_getTransactionCount
eth_getBalance
eth_getTransactionCount
eth_getBalance
eth_getTransactionCount
eth_getBalance
eth_getTransactionCount
eth_getBlockByNumber
eth_getBlockByNumber
...(more eth_getBlockByNumber)

What could the problem be?

  • You testrpc is running private net or testnet? – Aniket Nov 20 '17 at 12:29
  • @A.K. I thought it was only a testnet- how would I check? – will_durant Nov 21 '17 at 22:10
0

Can you call the public methods from a console attached to your testRPC net? That would be a step toward debugging the issue.

I have had problems with both the remix VM and testRPC. Thus, I recommend using a private network. I could not get the geth --dev flag working correctly, so I also recommend creating your own private blockchain with geth init. Follow this tutorial. http://www.ethdocs.org/en/latest/network/test-networks.html#id3
You will also need to unlock your accounts and mine transactions. This is not like main net mining, so you can do it on a laptop CPU. Feel free to ask me any questions. I recently struggled through similar hurdles.

0

I use this 2 commands line with testrpc :

  1. Read pending transactions

    web3.eth.getBlock("pending")

  2. Mining transactions

    web3.currentProvider.sendAsync({ jsonrpc:"2.0", method: "evm_mine" },function(err, result) { console.log(result); })

TestRPC allows you to auto-mine your block with command parameter -b or --blocktime. But this feature bugs (after few minutes of service, I get errors)

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.