Once a token is whitelisted, it cannot be removed from the whitelist. This could be problematic if a token becomes undesirable or deprecated.
During contract initialization when a token is whitelisted, there’s no mechanism to remove it later. What if that token becomes obsolete, compromised, or became unwanted? This could pose risks to protocol and might be to the users as well.
Unwanted or obsolete tokens are of no use for the protocol and users.
Manual Testing.
Foundry.
First add a function to get the whitelist tokens, restricting it to onlyHost depends on the protocol and use case.
Then, add a privileged function that will be restricted to host to remove a token from the whitelist. None of the participants will be allowed to access this function, and any whitelisted token will be removed.
Below is a test function that shows that a participant (i.e. a non-host person) cannot remove the whitelist token. Proving that removeWhitelistedToken can only be accessed by host.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.