Signature
Description
Creates a new composite policy that combines existing simple policies under a logic gate. Dev: Child policies must be simple policies (ALLOWLIST or BLOCKLIST), never another composite. The child-policy set is capped at 4. Dev: Reverts withIncompatiblePolicyType when policyType is not UNION or INTERSECT.
Dev: Reverts with ZeroAddress when admin is address(0).
Dev: Reverts with ChildPoliciesOutsideOfRange(2, 4) when childPolicyIds.length is not in [2, 4].
Dev: Reverts with PolicyNotFound when any child policy does not exist.
Dev: Reverts with InvalidChildPolicy when any child policy is not a simple policy or a built-in policy.
Dev: Panics with arithmetic overflow (Panic 0x11) when the policy counter has reached its maximum value.
Param: admin Initial admin authorized to update child policies and transfer or renounce
administration.
Param: policyType UNION or INTERSECT.
Param: childPolicyIds Existing simple policy IDs to combine.
Return: newPolicyId The newly assigned composite policy ID.