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

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

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

Last updated