Skip to main content

Signature

IB20.sol

Description

Returns the policy ID stored for policyScope. If the scope has never been assigned, this returns 0, which is the ALWAYS_ALLOW built-in sentinel, every address is authorized.

Parameters

Returns

The uint64 policy ID currently bound to the scope. 0 means ALWAYS_ALLOW.

Reverts

  • UnsupportedPolicyType(policyScope): when policyScope is 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 as policyScope: An unset scope reads as 0 (ALWAYS_ALLOW). To bind a different policy, the token admin calls updatePolicy(policyScope, newPolicyId).

Example

Usage Example