External Whitelist Contract example
When configuring a permissioned Operator, we have the option to set an external whitelising contract to manage this whitelist. To work correctly with the SSV network contract, it must meet certain specifications.
What is a valid Whitelisting Contract?
The operators can choose to whitelist an external contract with custom logic to manage authorized addresses externally. To be used in SSV contracts, it needs to implement the ISSVWhitelistingContract interface, that requires to implement the isWhitelisted(address account, uint256 operatorId)
function. This function is called in the register validator process, that must return true/false
to indicate if the caller (msg.sender
) is whitelisted for the operator.
To check if a contract is a valid whitelisting contract, use the function in the SSVNetworkViews contract: isWhitelistingContract()
To check if an account is whitelisted in a whitelisting contract, use the function in the SSVNetworkViews contract: isAddressWhitelistedInWhitelistingContract()
Example contract:
Last updated