'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 shares = [2,1];

    return deployer
        .then(() => {
            return deployer.deploy(
                Fund,
                wallets,
                shares
            );
        })
};

wallets and shares are arguments of the smart contract in the constructor:

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

I think it cannot identify the accounts[2], accounts[3]. This has no problem in ganache, but it failed in Ropsten.



Solution 1:[1]

This is not supported in ropsten, so after I changed them to address, it works.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Chan Austin