Skip to main content

IContractDeployer

Methods​

deployInstance​

function deployInstance(address publisher, bytes contractBytecode, bytes constructorArgs, bytes32 salt, uint256 value, string publishMetadataUri) external nonpayable returns (address deployedAddress)

Deploys an instance of a published contract directly.

Parameters​

NameTypeDescription
publisheraddressThe address of the publisher.
contractBytecodebytesThe bytecode of the contract to deploy.
constructorArgsbytesThe encoded constructor args to deploy the contract with.
saltbytes32The salt to use in the CREATE2 contract deployment.
valueuint256The native token value to pass to the contract on deployment.
publishMetadataUristringThe publish metadata URI for the contract to deploy.

Returns​

NameTypeDescription
deployedAddressaddressThe address of the contract deployed.

deployInstanceProxy​

function deployInstanceProxy(address publisher, address implementation, bytes initializeData, bytes32 salt, uint256 value, string publishMetadataUri) external nonpayable returns (address deployedAddress)

Deploys a clone pointing to an implementation of a published contract.

Parameters​

NameTypeDescription
publisheraddressThe address of the publisher.
implementationaddressThe contract implementation for the clone to point to.
initializeDatabytesThe encoded function call to initialize the contract with.
saltbytes32The salt to use in the CREATE2 contract deployment.
valueuint256The native token value to pass to the contract on deployment.
publishMetadataUristringThe publish metadata URI and for the contract to deploy.

Returns​

NameTypeDescription
deployedAddressaddressThe address of the contract deployed.

getContractDeployer​

function getContractDeployer(address _contract) external view returns (address)

Parameters​

NameTypeDescription
_contractaddressundefined

Returns​

NameTypeDescription
_0addressundefined

Events​

ContractDeployed​

event ContractDeployed(address indexed deployer, address indexed publisher, address deployedContract)

Emitted when a contract is deployed.

Parameters​

NameTypeDescription
deployer indexedaddressundefined
publisher indexedaddressundefined
deployedContractaddressundefined

Paused​

event Paused(bool isPaused)

Emitted when the registry is paused.

Parameters​

NameTypeDescription
isPausedboolundefined