i am trying to make lottery contract, and expected applicants will be about 2~30,000.
i want to set those applicants by this code.
function setApplicants(address[] memory _applicants) public onlyRole(DEFAULT_ADMIN_ROLE) {
applicants = _applicants;
}
but it seems i can't store thousands of addresses at once, even the limit of array size is 2^256-1 in solidity.
so i am wondering if there is a way to set applicants about 30,000. it doesn't have to be set at once. but i wish the used gas be minimum.
any ideas?