Fast Whitelist Creation
Skip manual entry and create your whitelist instantly
Or create manually
Manual Whitelist Creation
Input your protocol data for a fully customized whitelist
1. Whitelist Manager
Create the whitelist security layer
interface IWhitelist {
function usersWhitelisted(address user) external view returns (bool);
}
IWhitelist public whitelist;
constructor(address _whitelist) {
whitelist = IWhitelist(_whitelist);
betaAccessEnabled = true;
}
2. Modifier
Create the modifier to check if the user is whitelisted. You can also add a betaAccessEnabled
flag to control access.
modifier onlyWhitelisted() {
if (betaAccessEnabled && !whitelist.usersWhitelisted(msg.sender)) {
revert UserNotWhitelistedAndBetaAccessIsEnabled();
}
_;
}
Usage Example
function test() public view onlyWhitelisted {
// Your logic here
}
That's it! You now have Talaria-powered access control in your contract.
Need more details?
For full integration instructions and advanced features, visit our documentation.