MethodWhitelist
Managing and retrieving whitelisted method selectors
SENTINEL_SELECTOR
Special selector value threated as sentinel
_restrictedMethods
This is applied to all tokens in collection
Method selector to boolean if method whitelisting is restricted
_whitelistedMethods
This is applied per token
Token ID to array of whitelisted method selectors
_selectorToIndex
If index is bigger then sentinel index is threated as invalid value
setRestrictedMethods
Sets methods as restricted for whitelisting
Parameters
restricted
bytes4[]
Array of selectors
setWhitelistedMethods
Sets whitelisted methods for given token
Parameters
tokenId
uint256
Token identifier
whitelistParams
struct WhitelistedParams[]
getMethodRestricted
Returns if selector is restricted for whitelisting
Parameters
selector
bytes4
Method selector
Return Values
[0]
bool
Flag if method is restricted
getMethodWhitelisted
Returns if method is whitelisted
Parameters
tokenId
uint256
Token identifier
selector
bytes4
Method selector
Return Values
whitelisted
bool
Flag if method is whitelisted
getWhitelistedMethods
Returns all whitelisted methods as array of Whitelisted
structs
Parameters
tokenId
uint256
Token identifier
Return Values
whitelist
struct IMethodWhitelist.Whitelisted[]
Array of Whitelisted
methods
getSentinelIndex
Returns sentinel index for given tokenId
Parameters
tokenId
uint256
Token identifier
Return Values
[0]
uint256
Sentinel index
_incWhitelistedCallCount
Incements call count for given selector and token
Parameters
tokenId
uint256
Token identifier
selector
bytes4
Method selector
_resetWhitelistedCallCount
Resets call count for given token
Parameters
tokenId
uint256
Token identifier
__gap
Last updated