> For the complete documentation index, see [llms.txt](https://docs.altlayer.io/altlayer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altlayer.io/altlayer-documentation/wizard/custom-avs-specification/constructor-specification-requirements.md).

# Constructor specification requirements

To use WIZARD to deploy your custom contract code, the following convention must be met for WIZARD to support it.

## ECDSA based AVS

The `ECDSAServiceManagerBase` constructor is responsible for initializing key contract addresses and disabling initializers. The mandatory arguments are:

* **AVS Directory (`_avsDirectory`)**: Manages AVS-related data for registered operators.
* **Stake Registry (`_stakeRegistry`)**: Records registration and staking details.
* **Rewards Coordinator (`_rewardsCoordinator`)**: Handles reward distributions.
* **Delegation Manager (`_delegationManager`)**: Manages staker delegations to operators.

The code snippet below shows how these parameters are set:

[`eigenlayer-middleware/src/unaudited/ECDSAServiceManagerBase.sol`](https://github.com/Layr-Labs/eigenlayer-middleware/blob/74438b7915c35ca5a0d312654716160c2499169d/src/unaudited/ECDSAServiceManagerBase.sol)

```solidity
constructor(
    address _avsDirectory,
    address _stakeRegistry,
    address _rewardsCoordinator,
    address _delegationManager
) {
    avsDirectory = _avsDirectory;
    stakeRegistry = _stakeRegistry;
    rewardsCoordinator = _rewardsCoordinator;
    delegationManager = _delegationManager;
    _disableInitializers();
}
```

## BLS based AVS

The `ServiceManagerBase` constructor sets various immutable addresses.  The mandatory arguments are:

* **AVS Directory (`__avsDirectory`)**
* **Rewards Coordinator (`__rewardsCoordinator`)**
* **Registry Coordinator (`__registryCoordinator`)**
* **Stake Registry (`__stakeRegistry`)**

The constructor calls the base storage initializer and then disables further initializers.

[`eigenlayer-middleware/src/ServiceManagerBase.sol`](https://github.com/Layr-Labs/eigenlayer-middleware/blob/74438b7915c35ca5a0d312654716160c2499169d/src/ServiceManagerBase.sol)

```solidity
constructor(
    IAVSDirectory __avsDirectory,
    IRewardsCoordinator __rewardsCoordinator,
    IRegistryCoordinator __registryCoordinator,
    IStakeRegistry __stakeRegistry
)
    ServiceManagerBaseStorage(
        __avsDirectory,
        __rewardsCoordinator,
        __registryCoordinator,
        __stakeRegistry
    )
{
    _disableInitializers();
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.altlayer.io/altlayer-documentation/wizard/custom-avs-specification/constructor-specification-requirements.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
