SelfHostedApplicationFactory

Git Source

Inherits: ISelfHostedApplicationFactory

Allows anyone to reliably deploy a new Authority contract, along with an Application contract already linked to it.

State Variables

_authorityFactory

IAuthorityFactory immutable _authorityFactory;

_applicationFactory

IApplicationFactory immutable _applicationFactory;

Functions

constructor

constructor(IAuthorityFactory authorityFactory, IApplicationFactory applicationFactory);

Parameters

NameTypeDescription
authorityFactoryIAuthorityFactoryThe authority factory
applicationFactoryIApplicationFactoryThe application factory

getAuthorityFactory

function getAuthorityFactory() external view override returns (IAuthorityFactory);

getApplicationFactory

function getApplicationFactory() external view override returns (IApplicationFactory);

deployContracts

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

calculateAddresses

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