Skip to main content

Signature

IPolicyRegistry.sol

Description

Creates a new simple policy with no initial members. Permissionless. The registry assigns a new policy ID and returns it. The member set starts empty.

Parameters

Returns

Revert Conditions

Access Control

Permissionless. Any caller may create a policy.

Behavior

Emits PolicyCreated and PolicyAdminUpdated(newPolicyId, address(0), admin). After the call, policyAdmin(newPolicyId) returns admin and policyExists(newPolicyId) returns true. To seed members in the same call, use createPolicyWithAccounts. To create a composite policy, use createCompositePolicy. A policy ID returned here is a plain (non-inverted) ID. To obtain the inverted form, call invertedPolicyId(newPolicyId), which toggles bit 63. The inverted ID shares the same member set and does not require a separate creation step.

Example

Usage Example