[英]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. 我正在使用openZeppelin进行众包合同,所有(其中30个)我的测试都通过了测试;)并且我可以毫无问题地在本地ganache区块链上进行迁移。
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: 当我在rinkeby上部署时,我得到:
"SplitWallet" hit a require or revert statement somewhere in its constructor. “ SplitWallet”在其构造函数中的某处命中了require或revert语句。 Try: * Verifying that your constructor params satisfy all require conditions. 尝试:*验证您的构造函数参数是否满足所有要求条件。 * Adding reason strings to your require statements. *在您的require语句中添加原因字符串。
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) 我以为我的收款人和股票的长度可能不同,但是不,它们是相同的(只有splitwallet的构造函数采用的参数)
Things to note: 注意事项:
truffle-wallet-provider
provider, with just a private key (no mnemonic) to deploy 我使用的是truffle-wallet-provider
程序,只有一个私钥(没有助记符)进行部署 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?? 如果它们不匹配,并且默认为所有者为account [0],则该钱包可能无法支付汽油费用。
Thanks 谢谢
Rinkeby的网络ID是4,而不是3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.