我试图在ropsten中部署一个带有地址参数的智能合约,但该帐户被投诉无效


const wallets = [accounts[2],accounts[3]];
const shares = [2,1];
return deployer
.then(() => {
return deployer.deploy(
Fund,
wallets,
shares
);
})
};

walletsshares是构造函数中智能合约的自变量:

constructor (address[] memory payees, uint256[] memory shares)

我认为它无法识别账户[2]、账户[3]。这在ganache中没有问题,但在Ropsten中失败了。

ropsten不支持这一点,所以在我将它们更改为address后,它就可以工作了。

最新更新