# Standard Registry

Focused, tree-shakable ABI fragments for Standard Registry.

## Import

```ts
import { standardRegistryV2SetResolverAbi } from "@ensforge/contracts/v2";
```

## Usage

:::code-group
```ts [contract.ts]
import { getContract } from "viem";

const contract = getContract({
  address,
  abi: standardRegistryV2SetResolverAbi,
  client: publicClient,
});
```

```ts [client.ts]
// [!include ~/snippets/contracts/client.ts]
```
:::

## Exports

| Export                             | Description                                             |
| ---------------------------------- | ------------------------------------------------------- |
| `standardRegistryV2SetResolverAbi` | Immutable ABI value with viem-compatible literal types. |

## Entrypoint

`@ensforge/contracts/v2`

Exports are immutable and can be passed directly to viem contract, log, encoding, and decoding
utilities.

## When to use

Use the smallest fragment that contains the function or event you need. Fragments include the
custom errors required to decode relevant reverts and can be composed with other fragments when one
call site needs several capabilities.

## Type Safety

Exports retain literal TypeScript types, so viem can infer valid function names, arguments, return
values, and event fields without a manual cast.

```ts
type Export = typeof standardRegistryV2SetResolverAbi;
```

## Compose fragments

```ts
const abi = [...standardRegistryV2SetResolverAbi, ...anotherFragment] as const;
```

Keep the composed value local to the call site so bundlers can remove unrelated contract surfaces.
