LSP23LinkedContractsFactory
Public Methods​
Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts.
When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally.
computeAddresses​
function computeAddresses(
ILSP23LinkedContractsFactory.PrimaryContractDeployment primaryContractDeployment,
ILSP23LinkedContractsFactory.SecondaryContractDeployment secondaryContractDeployment,
address postDeploymentModule,
bytes postDeploymentModuleCalldata
)
external
view
returns (address primaryContractAddress, address secondaryContractAddress);
Parameters​
Name | Type | Description |
---|
primaryContractDeployment | ILSP23LinkedContractsFactory.PrimaryContractDeployment | - |
secondaryContractDeployment | ILSP23LinkedContractsFactory.SecondaryContractDeployment | - |
postDeploymentModule | address | - |
postDeploymentModuleCalldata | bytes | - |
Returns​
Name | Type | Description |
---|
primaryContractAddress | address | - |
secondaryContractAddress | address | - |
computeERC1167Addresses​
- Specification details: LSP-23-LinkedContractsDeployment
- Solidity implementation:
LSP23LinkedContractsFactory.sol
- Function signature:
computeERC1167Addresses(ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit,ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit,address,bytes)
- Function selector:
0x8da85898
function computeERC1167Addresses(
ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit primaryContractDeploymentInit,
ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit secondaryContractDeploymentInit,
address postDeploymentModule,
bytes postDeploymentModuleCalldata
)
external
view
returns (address primaryContractAddress, address secondaryContractAddress);
Parameters​
Name | Type | Description |
---|
primaryContractDeploymentInit | ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit | - |
secondaryContractDeploymentInit | ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit | - |
postDeploymentModule | address | - |
postDeploymentModuleCalldata | bytes | - |
Returns​
Name | Type | Description |
---|
primaryContractAddress | address | - |
secondaryContractAddress | address | - |
deployContracts​
function deployContracts(
ILSP23LinkedContractsFactory.PrimaryContractDeployment primaryContractDeployment,
ILSP23LinkedContractsFactory.SecondaryContractDeployment secondaryContractDeployment,
address postDeploymentModule,
bytes postDeploymentModuleCalldata
)
external
payable
returns (address primaryContractAddress, address secondaryContractAddress);
Parameters​
Name | Type | Description |
---|
primaryContractDeployment | ILSP23LinkedContractsFactory.PrimaryContractDeployment | - |
secondaryContractDeployment | ILSP23LinkedContractsFactory.SecondaryContractDeployment | - |
postDeploymentModule | address | - |
postDeploymentModuleCalldata | bytes | - |
Returns​
Name | Type | Description |
---|
primaryContractAddress | address | - |
secondaryContractAddress | address | - |
deployERC1167Proxies​
- Specification details: LSP-23-LinkedContractsDeployment
- Solidity implementation:
LSP23LinkedContractsFactory.sol
- Function signature:
deployERC1167Proxies(ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit,ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit,address,bytes)
- Function selector:
0x17c042c4
function deployERC1167Proxies(
ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit primaryContractDeploymentInit,
ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit secondaryContractDeploymentInit,
address postDeploymentModule,
bytes postDeploymentModuleCalldata
)
external
payable
returns (address primaryContractAddress, address secondaryContractAddress);
Parameters​
Name | Type | Description |
---|
primaryContractDeploymentInit | ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit | - |
secondaryContractDeploymentInit | ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit | - |
postDeploymentModule | address | - |
postDeploymentModuleCalldata | bytes | - |
Returns​
Name | Type | Description |
---|
primaryContractAddress | address | - |
secondaryContractAddress | address | - |
Internal Methods​
Any method labeled as internal
serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs.
Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities.
_deployPrimaryContract​
function _deployPrimaryContract(struct ILSP23LinkedContractsFactory.PrimaryContractDeployment primaryContractDeployment, struct ILSP23LinkedContractsFactory.SecondaryContractDeployment secondaryContractDeployment, address postDeploymentModule, bytes postDeploymentModuleCalldata) internal nonpayable returns (address primaryContractAddress);
_deploySecondaryContract​
function _deploySecondaryContract(struct ILSP23LinkedContractsFactory.SecondaryContractDeployment secondaryContractDeployment, address primaryContractAddress) internal nonpayable returns (address secondaryContractAddress);
_deployAndInitializePrimaryContractProxy​
function _deployAndInitializePrimaryContractProxy(struct ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit primaryContractDeploymentInit, struct ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit secondaryContractDeploymentInit, address postDeploymentModule, bytes postDeploymentModuleCalldata) internal nonpayable returns (address primaryContractAddress);
_deployAndInitializeSecondaryContractProxy​
function _deployAndInitializeSecondaryContractProxy(struct ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit secondaryContractDeploymentInit, address primaryContractAddress) internal nonpayable returns (address secondaryContractAddress);
_generatePrimaryContractSalt​
function _generatePrimaryContractSalt(struct ILSP23LinkedContractsFactory.PrimaryContractDeployment primaryContractDeployment, struct ILSP23LinkedContractsFactory.SecondaryContractDeployment secondaryContractDeployment, address postDeploymentModule, bytes postDeploymentModuleCalldata) internal pure returns (bytes32 primaryContractGeneratedSalt);
_generatePrimaryContractProxySalt​
function _generatePrimaryContractProxySalt(struct ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit primaryContractDeploymentInit, struct ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit secondaryContractDeploymentInit, address postDeploymentModule, bytes postDeploymentModuleCalldata) internal pure returns (bytes32 primaryContractProxyGeneratedSalt);
DeployedContracts​
- Specification details: LSP-23-LinkedContractsDeployment
- Solidity implementation:
LSP23LinkedContractsFactory.sol
- Event signature:
DeployedContracts(address,address,ILSP23LinkedContractsFactory.PrimaryContractDeployment,ILSP23LinkedContractsFactory.SecondaryContractDeployment,address,bytes)
- Event topic hash:
0x1ea27dabd8fd1508e844ab51c2fd3d9081f2684346857f9187da6d4a1aa7d3e6
event DeployedContracts(address indexed primaryContract, address indexed secondaryContract, ILSP23LinkedContractsFactory.PrimaryContractDeployment primaryContractDeployment, ILSP23LinkedContractsFactory.SecondaryContractDeployment secondaryContractDeployment, address postDeploymentModule, bytes postDeploymentModuleCalldata);
Emitted when a primary and secondary contract are deployed.
Parameters​
Name | Type | Description |
---|
primaryContract indexed | address | Address of the deployed primary contract. |
secondaryContract indexed | address | Address of the deployed secondary contract. |
primaryContractDeployment | ILSP23LinkedContractsFactory.PrimaryContractDeployment | Parameters used for the primary contract deployment. |
secondaryContractDeployment | ILSP23LinkedContractsFactory.SecondaryContractDeployment | Parameters used for the secondary contract deployment. |
postDeploymentModule | address | Address of the post-deployment module. |
postDeploymentModuleCalldata | bytes | Calldata passed to the post-deployment module. |
DeployedERC1167Proxies​
- Specification details: LSP-23-LinkedContractsDeployment
- Solidity implementation:
LSP23LinkedContractsFactory.sol
- Event signature:
DeployedERC1167Proxies(address,address,ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit,ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit,address,bytes)
- Event topic hash:
0xb03dbe7a02c063899f863d542410b5b038c8f537045be3a26e7144e0074e1c7b
event DeployedERC1167Proxies(address indexed primaryContract, address indexed secondaryContract, ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit primaryContractDeploymentInit, ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit secondaryContractDeploymentInit, address postDeploymentModule, bytes postDeploymentModuleCalldata);
Emitted when proxies of a primary and secondary contract are deployed.
Parameters​
Name | Type | Description |
---|
primaryContract indexed | address | Address of the deployed primary contract proxy. |
secondaryContract indexed | address | Address of the deployed secondary contract proxy. |
primaryContractDeploymentInit | ILSP23LinkedContractsFactory.PrimaryContractDeploymentInit | Parameters used for the primary contract proxy deployment. |
secondaryContractDeploymentInit | ILSP23LinkedContractsFactory.SecondaryContractDeploymentInit | Parameters used for the secondary contract proxy deployment. |
postDeploymentModule | address | Address of the post-deployment module. |
postDeploymentModuleCalldata | bytes | Calldata passed to the post-deployment module. |
InvalidValueSum​
Invalid value sent.
Reverts when the msg.value
sent is not equal to the sum of value used for the deployment of the contract & its owner contract.
PrimaryContractProxyInitFailureError​
error PrimaryContractProxyInitFailureError(bytes errorData);
Failed to deploy & initialise the Primary Contract Proxy. Error: errorData
.
Reverts when the deployment & intialisation of the contract has failed.
Parameters​
Name | Type | Description |
---|
errorData | bytes | Potentially information about why the deployment & intialisation have failed. |
SecondaryContractProxyInitFailureError​
error SecondaryContractProxyInitFailureError(bytes errorData);
Failed to deploy & initialise the Secondary Contract Proxy. Error: errorData
.
Reverts when the deployment & intialisation of the secondary contract has failed.
Parameters​
Name | Type | Description |
---|
errorData | bytes | Potentially information about why the deployment & intialisation have failed. |