> ## 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.compositePolicyChildIds

> Returns the child-policy set of a composite policy.

## Signature

```solidity theme={null}
function compositePolicyChildIds(uint64 policyId) external view returns (uint64[] memory);
```

| Field               | Value                             |
| ------------------- | --------------------------------- |
| Selector            | `0x7c40df74`                      |
| Canonical signature | `compositePolicyChildIds(uint64)` |

## Description

Returns the child-policy IDs stored for `policyId` in the order they were last written. The registry preserves caller ordering verbatim and does not sort or deduplicate entries.

Returns an empty array for simple policies, built-in sentinels (`ALWAYS_ALLOW`, `ALWAYS_BLOCK`), unknown IDs, and malformed IDs. Never reverts. An empty return unambiguously means "not a composite."

## Parameters

| Name       | Type     | Description      |
| ---------- | -------- | ---------------- |
| `policyId` | `uint64` | Policy to query. |

## Returns

| Type              | Description                                                           |
| ----------------- | --------------------------------------------------------------------- |
| `uint64[] memory` | Child policy IDs, or an empty array if `policyId` is not a composite. |

## Behavior notes

* Evaluation is live. Each `isAuthorized` call on a composite reads the child IDs returned by this function at call time — not a snapshot from creation or the last `updateComposite`.
* Child IDs are packed four per 256-bit slot. The two-to-four-child constraint means each composite occupies one element slot in the `children` mapping.
* Duplicate child IDs are preserved; the registry does not deduplicate them.

## Access control

Read-only. No caller restrictions.

## Policy interaction

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

## Example

```solidity Title Query composite children theme={null}
uint64[] memory children = IPolicyRegistry(target).compositePolicyChildIds(policyId);
// Returns empty array if policyId is not a composite.
```
