[英]I tried to deploy a smart contract with address argument in ropsten, but the account is complained to be invalid
const wallets = [accounts[2],accounts[3]]; const wallets = [accounts[2],accounts[3]]; const shares = [2,1]; const 份额 = [2,1];
return deployer
.then(() => {
return deployer.deploy(
Fund,
wallets,
shares
);
})
}; };
wallets and shares are arguments of the smart contract in the constructor: wallets 和 share 是构造函数中智能合约的参数:
constructor (address[] memory payees, uint256[] memory shares)构造函数(地址[] 内存收款人,uint256[] 内存份额)
I think it cannot identify the accounts[2],accounts[3], this has no problem in ganache, but it failed in ropsten.我认为它无法识别帐户[2],帐户[3],这在ganache中没有问题,但在ropsten中却失败了。
这在 ropsten 中不受支持,因此在我将它们更改为 address 后,它可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.