Signature
Description
Replaces a composite policy’s entire child set withchildPolicyIds. No partial update or clear-the-list operation is supported.
The new child set must contain between MIN_COMPOSITE_CHILD_POLICIES (2) and MAX_COMPOSITE_CHILD_POLICIES (4) existing simple policies, subject to the same validation rules as createCompositePolicy. Authorization evaluates each child’s current membership live on every call — the update takes effect immediately.
Revert conditions
The canonical revert order is:PolicyNotFound—policyIddoes not exist.IncompatiblePolicyType—policyIdis a simple policy, not aUNIONorINTERSECTcomposite.Unauthorized— caller is not the current admin. A composite whose admin has been renounced (address(0)) can never be updated.ChildPoliciesOutsideOfRange—childPolicyIds.lengthis outside[2, 4].PolicyNotFound— a child policy ID does not exist.InvalidChildPolicy— a child policy is itself a composite or a built-in sentinel (ALWAYS_ALLOWorALWAYS_BLOCK).
Events emitted
Emits onlyCompositePolicyUpdated(policyId, updater, childPolicyIds). The admin does not change, so no PolicyAdminUpdated event is emitted.
Access control
Callable by the current policy admin for the target composite policy.Policy interaction
This is part of the singleton PolicyRegistry surface used by B20 policy scopes. A composite policy ID is passed to a B20 policy slot as an opaqueuint64, identical to a simple policy ID — no B20 contract changes are required.