0
votes

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:

  • I have an infura api key
  • I am using truffle-wallet-provider provider, with just a private key (no mnemonic) to deploy
  • I am confused (due to the above), how my deploy script, can know multiple (10) wallets on deployment. Usually (in ganache) these are the 10 wallets ganache generates for you, but here, I am providing a private key, so it shouldn't be able to know 10 wallets, just one - the public key of the private key that is deploying the contract, no? (talking about here):

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 dont match my public key wallet at all, so I have no idea where they are coming from. And if they dont match, and it defaults to the owner being accounts[0], then that wallet may not be able to pay for the gas.... perhaps??

Thanks

1

1 Answers

1
votes

Rinkeby network id is 4, not 3.