Anyone know I receive this error when adding whitelist addresses through Etherscan

I deployed my test ERC721 contract to the Rinkeby Ethereum test net and was testing out adding a list of whitelisted addresses and I receive the error "Invalid parameters: must provide an Ethereum address".

The addresses I sent in are valid ethereum addresses and I've tried all the combinations of one address, multiple addresses, no list brackets, no quotes and it still gives me the same error.

Not that it would throw this error but I am also connected to Etherscan with the address that I deployed with on the Rinkeby network - so that is not an issue.

My function:

//Read in list of whitelist addresses and number they are allowed to mint 
    function setWhiteList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            whitelist[addresses[i]] = numAllowedToMint;
        }
    }

Error message:

I highly appreciate any help with this as its been stumping me for about a week now.

Just looking (New too), but you see the second argument in your function it is an unassigned integer uint8, it is not an address, it must be the number someone is allowed to mint, not the address.

To call this function (More so, to add an address to the whitelist with the number they can mint)

You would call this function using the correct arguments as they are defined, an address and a number.

setWhiteList("0xa6Fb1250E00a615257F3D1363aa83c87B191C534", 10); 

so i can mint ten of them myself :smiley:

I think you should remove double quotes, just use:

[0x008250fxxxx,0x87CC915xxx],
3
1 Like