ISelfHostedApplicationFactory
Functions
getAuthorityFactory
Get the factory used to deploy IAuthority contracts
function getAuthorityFactory() external view returns (IAuthorityFactory);
Returns
| Name | Type | Description |
|---|---|---|
<none> | IAuthorityFactory | The authority factory |
getApplicationFactory
Get the factory used to deploy IApplication contracts
function getApplicationFactory() external view returns (IApplicationFactory);
Returns
| Name | Type | Description |
|---|---|---|
<none> | IApplicationFactory | The application factory |
deployContracts
Deploy new application and authority contracts deterministically.
Reverts if the authority owner address is zero.
Reverts if the application owner address is zero.
Reverts if the epoch length is zero.
function deployContracts(
address authorityOwner,
uint256 epochLength,
address appOwner,
bytes32 templateHash,
bytes calldata dataAvailability,
bytes32 salt
) external returns (IApplication, IAuthority);
Parameters
| Name | Type | Description |
|---|---|---|
authorityOwner | address | The initial authority owner |
epochLength | uint256 | The epoch length |
appOwner | address | The initial application owner |
templateHash | bytes32 | The initial machine state hash |
dataAvailability | bytes | |
salt | bytes32 | The salt used to deterministically generate the addresses |
Returns
| Name | Type | Description |
|---|---|---|
<none> | IApplication | The application contract |
<none> | IAuthority | The authority contract |
calculateAddresses
Calculate the addresses of the application and authority contracts to be deployed deterministically.
function calculateAddresses(
address authorityOwner,
uint256 epochLength,
address appOwner,
bytes32 templateHash,
bytes calldata dataAvailability,
bytes32 salt
) external view returns (address, address);
Parameters
| Name | Type | Description |
|---|---|---|
authorityOwner | address | The initial authority owner |
epochLength | uint256 | The epoch length |
appOwner | address | The initial application owner |
templateHash | bytes32 | The initial machine state hash |
dataAvailability | bytes | |
salt | bytes32 | The salt used to deterministically generate the addresses |
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The application address |
<none> | address | The authority address |