Say I have this smart contract that can be invoked only by a set of known users (a finite list of addresses).
The obvious method to implement this logic is simply by keeping track of these addresses in a List and validate the addresses whenever a function is invoked, though there are a few restrictions I need to consider:
- I cannot expose these addresses on the contract. So no address_list can be stored on the contract.
- I don't have a limit on the number of users I can whitelist. There could be a few million users whitelisted in this contract.
I cannot find a good solution for this problem which I think should be pretty common. I was thinking about doing a Token-based validation but not sure if this is doable in smart contracts. Any solution for this use-case?