ISelfHostedApplicationFactory

Git Source

Functions

getAuthorityFactory

Get the factory used to deploy Authority contracts

function getAuthorityFactory() external view returns (IAuthorityFactory);

Returns

NameTypeDescription
<none>IAuthorityFactoryThe authority factory

getApplicationFactory

Get the factory used to deploy Application contracts

function getApplicationFactory() external view returns (IApplicationFactory);

Returns

NameTypeDescription
<none>IApplicationFactoryThe application factory

deployContracts

Deploy new application and authority contracts deterministically.

function deployContracts(address authorityOwner, address appOwner, bytes32 templateHash, bytes32 salt)
    external
    returns (Application, Authority);

Parameters

NameTypeDescription
authorityOwneraddressThe initial authority owner
appOwneraddressThe initial Application owner
templateHashbytes32The initial machine state hash
saltbytes32The salt used to deterministically generate the addresses

Returns

NameTypeDescription
<none>ApplicationThe application contract
<none>AuthorityThe authority contract

calculateAddresses

Calculate the addresses of the application and authority contracts to be deployed deterministically.

function calculateAddresses(address authorityOwner, address appOwner, bytes32 templateHash, bytes32 salt)
    external
    view
    returns (address, address);

Parameters

NameTypeDescription
authorityOwneraddressThe initial authority owner
appOwneraddressThe initial Application owner
templateHashbytes32The initial machine state hash
saltbytes32The salt used to deterministically generate the addresses

Returns

NameTypeDescription
<none>addressThe application address
<none>addressThe authority address