Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SelfHostedApplicationFactory

Git Source

Inherits: ISelfHostedApplicationFactory

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

State Variables

AUTHORITY_FACTORY

IAuthorityFactory immutable AUTHORITY_FACTORY

APPLICATION_FACTORY

IApplicationFactory immutable APPLICATION_FACTORY

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,
    uint256 epochLength,
    address appOwner,
    bytes32 templateHash,
    bytes calldata dataAvailability,
    bytes32 salt
) external returns (IApplication application, IAuthority authority);

calculateAddresses

function calculateAddresses(
    address authorityOwner,
    uint256 epochLength,
    address appOwner,
    bytes32 templateHash,
    bytes calldata dataAvailability,
    bytes32 salt
) external view returns (address application, address authority);