deploymentethereumsolidityweb3jstruffle

issues deploying solidity smart contract to rinkeby test network


I'm using openZeppelin to make a crowdsale contract, all (30 of them) my tests pass with flying colours ;) and I can migrate on a locall ganache blockchain no problem.

  1. When I try to deploy to rinkeby I start having issues. My config in truffle.js is
rinkeby: {
  provider: rinkeybyProvider,
  network_id: 3,
  gas: 4712388,
  gasPrice: web3.utils.toWei("40", "gwei"),
  websockets: true,
  from: "0x9793371e69ed67284a1xxxx"
}

When I deploy on rinkeby I get:

"SplitWallet" hit a require or revert statement somewhere in its constructor. Try: * Verifying that your constructor params satisfy all require conditions. * Adding reason strings to your require statements.

I have gone through and put messages in every revert in the constructor hierachy, but I never see any of the messages. I thought it might be that my payees and shares were different lengths but, no, they are the same (only parameters that the constructor for a splitwallet take)

Things to note:

module.exports = async (
  deployer,
  network,
  [owner, purchaser, investor, organisation, ...accounts] //how does it know these??
)

This last point makes me wonder, because I printed out owner/purchaser and they don't match my public key wallet at all, so I have no idea where they are coming from. And if they don't match, and it defaults to the owner being accounts[0], then that wallet may not be able to pay for the gas... perhaps?


Solution

  • Rinkeby network id is 4, not 3.