Skip to main content

IAuthorityFactory

The IAuthorityFactory interface defines the contract for deploying new IAuthority contracts.

Events

AuthorityCreated

event AuthorityCreated(IAuthority authority)

A new authority was deployed.

Parameters

NameTypeDescription
authorityIAuthorityThe authority

Functions

newAuthority()

function newAuthority(address authorityOwner, uint256 epochLength) external returns (IAuthority)

Deploy a new authority.

Parameters

NameTypeDescription
authorityOwneraddressThe initial authority owner
epochLengthuint256The epoch length

Return Values

NameTypeDescription
[0]IAuthorityThe authority

newAuthority() (with salt)

function newAuthority(address authorityOwner, uint256 epochLength, bytes32 salt) external returns (IAuthority)

Deploy a new authority deterministically.

Parameters

NameTypeDescription
authorityOwneraddressThe initial authority owner
epochLengthuint256The epoch length
saltbytes32The salt used to deterministically generate the authority address

Return Values

NameTypeDescription
[0]IAuthorityThe authority

calculateAuthorityAddress()

function calculateAuthorityAddress(
address authorityOwner,
uint256 epochLength,
bytes32 salt
) external view returns (address)

Calculate the address of an authority to be deployed deterministically.

Parameters

NameTypeDescription
authorityOwneraddressThe initial authority owner
epochLengthuint256The epoch length
saltbytes32The salt used to deterministically generate the authority address

Return Values

NameTypeDescription
[0]addressThe deterministic authority address

On this page

Useful resources to learn more

We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.