Signature
IB20.sol
Description
Returns the policy ID stored forpolicyScope. If the scope has never been assigned, this returns 0, which is the ALWAYS_ALLOW built-in sentinel, every address is authorized.
Parameters
Returns
Theuint64 policy ID currently bound to the scope. 0 means ALWAYS_ALLOW.
Reverts
UnsupportedPolicyType(policyScope): whenpolicyScopeis not a slot this token supports.
Access Control
View function. No role required.Policy Scopes
The following scopes are recognized by a B20 token. Pass one of these aspolicyScope:
An unset scope reads as
0 (ALWAYS_ALLOW). To bind a different policy, the token admin calls updatePolicy(policyScope, newPolicyId).
Example
Usage Example