Skip to content

fix(contracts): AlignedLayerServiceManager contract does not check that an address is not equal to address(0) during constructor or initialization #1002

Description

@PatStiles

Overview:

The AlignedLayerServiceManager
contract does not check that an address is not equal to address(0) in the constructor or during the initialization
process.

Mitigation

Add a check to ensure that the addresses are not equal to address(0) during the deployment or the initialization process.

 constructor(
IAVSDirectory __avsDirectory,
IRewardsCoordinator __rewardsCoordinator,
IRegistryCoordinator __registryCoordinator,
IStakeRegistry __stakeRegistry
)
BLSSignatureChecker(__registryCoordinator)
ServiceManagerBase(
__avsDirectory,
__rewardsCoordinator,
__registryCoordinator,
__stakeRegistry
)
{
require(address(__avsDirectory) != address(0), "AlignedLayerServiceManager: avsDirectory is the zero address");
require(address(__rewardsCoordinator) != address(0), "AlignedLayerServiceManager: rewardsCoordinator is the zero address");
require(address(__registryCoordinator) != address(0), "AlignedLayerServiceManager: registryCoordinator is the zero address");
require(address(__stakeRegistry) != address(0), "AlignedLayerServiceManager: stakeRegistry is the zero address");
_disableInitializers();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions