Skip to main content

AuthorityFactory

The AuthorityFactory contract allows anyone to reliably deploy new IAuthority contracts.

Functions

newAuthority()

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

Deploy a new authority contract.

Parameters

NameTypeDescription
authorityOwneraddressThe initial authority owner
epochLengthuint256The epoch length

Return Values

NameTypeDescription
[0]IAuthorityThe deployed authority contract

newAuthority() (with salt)

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

Deploy a new authority contract deterministically using CREATE2.

Parameters

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

Return Values

NameTypeDescription
[0]IAuthorityThe deployed authority contract

calculateAuthorityAddress()

function calculateAuthorityAddress(
address authorityOwner,
uint256 epochLength,
bytes32 salt
) external view override 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.