Signature
IPolicyRegistry.sol
Description
Replaces a composite policy’s child-policy set in full withchildPolicyIds. There is no partial edit — the entire child set is replaced in one call.
The write takes effect on the next isAuthorized call that references policyId. Every token that stores this policy ID sees the new result without a second updatePolicy call on the token.
Parameters
Child Policy Inversion
A child ID may carry the invert flag (bit 63). The registry validates the base policy (the ID with bit 63 cleared) and stores the child ID with the invert bit set. At authorization time, the composite evaluates the inverted child as the logical NOT of its base result. Validity rules applied to each child:- The base (bit 63 cleared) must exist —
PolicyNotFoundif it does not. - The base must be a simple
ALLOWLISTorBLOCKLIST, not a composite or built-in sentinel —InvalidChildPolicyif it is not. PolicyNotFoundtakes precedence overInvalidChildPolicyacross the whole child set (two-pass validation).
Reverts
Events
EmitsCompositePolicyUpdated(policyId, updater, childPolicyIds) on success.
Access Control
Callable only by the current admin ofpolicyId. A composite whose admin has been renounced (via renounceAdmin) can never be updated.
Example
Usage Example