> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-docs-sync-code-change-6bb10a4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# IPolicyRegistry.createPolicy

> Generated B20 reference for createPolicy(address,uint8).

## Signature

```solidity theme={null}
function createPolicy(address admin, PolicyType policyType) external returns (uint64 newPolicyId);
```

| Field               | Value                         |
| ------------------- | ----------------------------- |
| Selector            | `0xca5d55f6`                  |
| Canonical signature | `createPolicy(address,uint8)` |

## Description

Creates a new simple policy with no initial members. Permissionless.

Reverts with `ZeroAddress` when `admin` is `address(0)`.

Reverts with `IncompatiblePolicyType` when `policyType` is `UNION` or `INTERSECT`. Use `createCompositePolicy` to create composite policies.

## Parameters

| Parameter    | Type         | Description                                                                            |
| ------------ | ------------ | -------------------------------------------------------------------------------------- |
| `admin`      | `address`    | Initial admin authorized to modify membership and transfer or renounce administration. |
| `policyType` | `PolicyType` | Must be `BLOCKLIST` or `ALLOWLIST`.                                                    |

## Returns

| Name          | Type     | Description                   |
| ------------- | -------- | ----------------------------- |
| `newPolicyId` | `uint64` | The newly assigned policy ID. |

## Access control

Permissionless creation, but state-changing registry calls require the feature to be active.

## Policy interaction

This is part of the singleton PolicyRegistry surface used by B20 policy scopes.

## Example

```solidity theme={null}
uint64 policyId = StdPrecompiles.POLICY_REGISTRY.createPolicy(admin, IPolicyRegistry.PolicyType.ALLOWLIST);
```
