I have this piece of code from a solidity contract:
function loadMintIDs(uint256[MAX_TOKENS + 1] memory array) external onlyOwner {
require(array.length == MAX_TOKENS + 1, "List of IDs must be MAX_TOKENS + 1");
require(!IDsLoaded, "List of IDs is already loaded.");
IDs = array;
IDsLoaded = true;
}
How do I pass an array of numbers to the function in Etherscan? I tried [0, 61, 201, 31, 728 ...] (1001 values), but get this error back in Etherscan:
invalid BigNumber string (argument="value", value=" 61", code=INVALID_ARGUMENT, version=bignumber/5.1.1)
The error is the first value in the array after 0. I think 0 is always seen as an uint256, but how should the other numbers be formatted? I like passing an array with 'normal' numbers best, so maybe I need my array declaration in the function to not be uint256, but what then?