const wallets = [accounts[2],accounts[3]];
const shares = [2,1];
return deployer
.then(() => {
return deployer.deploy(
Fund,
wallets,
shares
);
})
};
wallets
和shares
是构造函数中智能合约的自变量:
constructor (address[] memory payees, uint256[] memory shares)
我认为它无法识别账户[2]、账户[3]。这在ganache中没有问题,但在Ropsten中失败了。
ropsten不支持这一点,所以在我将它们更改为address后,它就可以工作了。