IDeployManager
Inherits: IERC165
Author: Solidity Univesity
This interface defines the functions, errors and events for the DeployManager contract.
Functions
deploy
Deploys a new utility contract
Emits NewDeployment event
function deploy(address _utilityContract, bytes calldata _initData) external payable returns (address);
Parameters
Name | Type | Description |
---|---|---|
_utilityContract | address | The address of the utility contract template |
_initData | bytes | The initialization data for the utility contract |
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the deployed utility contract |
addNewContract
function addNewContract(address _contractAddress, uint256 _fee, bool _isActive) external;
updateFee
function updateFee(address _contractAddress, uint256 _newFee) external;
deactivateContract
function deactivateContract(address _contractAddress) external;
activateContract
function activateContract(address _contractAddress) external;
Events
NewContractAdded
Emitted when a new utility contract template is registered.
event NewContractAdded(address indexed _contractAddress, uint256 _fee, bool _isActive, uint256 _timestamp);
Parameters
Name | Type | Description |
---|---|---|
_contractAddress | address | Address of the registered utility contract template. |
_fee | uint256 | Fee (in wei) required to deploy a clone of this contract. |
_isActive | bool | Whether the contract is active and deployable. |
_timestamp | uint256 | Timestamp when the contract was added. |
ContractFeeUpdated
event ContractFeeUpdated(address indexed _contractAddress, uint256 _oldFee, uint256 _newFee, uint256 _timestamp);
ContractStatusUpdated
event ContractStatusUpdated(address indexed _contractAddress, bool _isActive, uint256 _timestamp);
NewDeployment
event NewDeployment(address indexed _deployer, address indexed _contractAddress, uint256 _fee, uint256 _timestamp);
Errors
ContractNotActive
Reverts if the contract is not active
error ContractNotActive();
NotEnoughtFunds
Not enough funds to deploy the contract
error NotEnoughtFunds();
ContractDoesNotRegistered
Reverts if the contract is not registered
error ContractDoesNotRegistered();
InitializationFailed
Reverts if the .initialize() function fails
error InitializationFailed();
ContractIsNotUtilityContract
Reverts if the contract is not a utility contract
error ContractIsNotUtilityContract();