0

I've got multiple large contracts. I've been able to deploy to Rinkeby with truffle fine after about 2 or 3 tries with 2 gwei.

I tried two times now to deploy to the mainnet. Each time I get invalid JSON rpc response. I have a feeling that if i just keep trying eventually it will get through, like it does with Rinkeby, but its kind of expensive.

The odd thing is that I can see that the transactions are "successful" on etherscan. However my ABI is screwed up because truffle never finished building it. I went in manually and changed the network id to "1" so that it matched the mainnet, but then when I used that ABI to talk to the contract it told me that some if its values were 0x000 even though they were supposed to be instantiated in the constructor.

Is there some way to tweak my ./build directory so that I can interact with the contracts? If the contract deploy was recorded as successful on etherscan does that mean the constructor executed? Is there some place I can read about ways to increase my chances of having a successful deploy?

Thanks!

  • Do you have a transaction id? – Ismael Feb 21 '18 at 5:34
0

If you just want to upload the smart contract to the blockchain you should use an IDE like Remix, when you build your folder with your frontend in it (I assume this is what you're trying to do) it doesn't affect the smart contract. To link your smart contract to your front end you'll want to use something like this var contractAdress = '0xMYDEPLOYEDADDRESSHASH'; and interact with it via that variable. Let me know if you're stuck.

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.