all! I build a dAPP for a competition and only used to test it on testRPC. Now when I had submitted the app, the organisers wanted a running version for them to test. I tried deploying it on a server which had testRPC running, but when I did a transaction, it didn't work. I created the front end in ReactJS and contracts in Solidity. Deployed the contracts on testRPC and then was trying to do implement the transactions.

But our dAPP:

This is an information broadcasting app with four entities. It works like; a user signs up using conventional method (using MongoDB). We have four testRPC accounts through which we do all the transaction. In this way, the user doesn't need to have blockchain on his desktop. But transaction never happens. Suggestion is welcome.

This is very important to me, and I would be grateful if someone can help me in this regard.

  • What specifically didn't work when you tried to send a transaction? – Matthew Schmidt Apr 29 '17 at 17:02
  • @MatthewSchmidt we started test RPC and deployed the contracts on the server. Then with some other machine we went to the public IP of our app and tried to create a user. (The thing here is, to create a user we are using one of the accounts from testrpc.) when I click submit, the transaction never happens. Extra Info: I am running testrpc only on the server. If there is anything (deploying on ropsten/kovan) I can do to make the application work then that would also be fine. – 11t Apr 29 '17 at 19:07
  • I badly needs this application to work on a public IP. – 11t Apr 29 '17 at 19:08

I'm suspecting what you are experiencing is some kind of NAT problem: testrpc does not set up port forwarding automatically, and so whatever is port 8545 on the public IP has nothing to do with port 8545 on the computer that testrpc is running on. Thus, no connection.

The simplest way is to set up the router to do port forwarding, but that's beyond the scope of this specific stack exchange. superuser.com would probably be of more help.

Another option is, of course, to run it on Ropsten, either by installing a node on every user's computer, or, possibly, using infura.io. If you're using infura, you may have to rearchitect your application slightly, as it will not host private keys.

  • 1
    Thanks for the answer. I have found a simple way and will add the answer in a few hours. – 11t May 2 '17 at 17:58

I am using Ubuntu server to install testRPC and run it using putty in a VMware (virtual machine) and then I give it an internal IP address and external ip address for security reasons. To Access it, all you have to do is calling it through this function: web3.setProvider(new web3.providers.HttpProvider('Server Address'));

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.