Solidity API

RelayPoolTimelock

Interface for initializing timelock contracts

Used to initialize cloned timelock instances with proper access control

initialize

function initialize(uint256 minDelay, address[] proposers, address[] executors, address admin) external

Initializes a timelock contract with the specified parameters

Parameters

NameTypeDescription
minDelayuint256The minimum delay in seconds for timelock operations
proposersaddress[]Array of addresses that can propose operations
executorsaddress[]Array of addresses that can execute operations
adminaddressThe admin address (use address(0) for no admin)

RelayPoolFactory

Factory contract for deploying RelayPool instances with associated timelocks

Deploys pools with timelock governance and tracks pools by asset

HYPERLANE_MAILBOX

address HYPERLANE_MAILBOX

The Hyperlane mailbox address used by all deployed pools

Immutable to ensure consistency across all pools

WETH

address WETH

The WETH contract address for native currency pools

Used when creating pools that handle native currency

TIMELOCK_TEMPLATE

address TIMELOCK_TEMPLATE

The timelock template contract to be cloned

Each pool gets its own timelock instance cloned from this template

MIN_TIMELOCK_DELAY

uint256 MIN_TIMELOCK_DELAY

The minimum timelock delay enforced for non-owner deployments

Owner can deploy with shorter delays for testing/special cases

poolsByAsset

mapping(address => address[]) poolsByAsset

Mapping from asset address to array of deployed pool addresses

Multiple pools can exist for the same asset

UnauthorizedCaller

error UnauthorizedCaller(address sender)

Error when unauthorized address attempts restricted operation

Parameters

NameTypeDescription
senderaddressThe address that attempted the unauthorized action

InsufficientInitialDeposit

error InsufficientInitialDeposit(uint256 deposit)

Error when initial deposit is insufficient

Parameters

NameTypeDescription
deposituint256The insufficient deposit amount provided

InsufficientTimelockDelay

error InsufficientTimelockDelay(uint256 delay)

Error when timelock delay is below minimum requirement

Parameters

NameTypeDescription
delayuint256The insufficient delay provided

PoolDeployed

event PoolDeployed(address pool, address creator, address asset, string name, string symbol, address thirdPartyPool, address timelock)

Emitted when a new pool is deployed

Parameters

NameTypeDescription
pooladdressThe address of the deployed RelayPool
creatoraddressThe address that deployed the pool
assetaddressThe underlying asset of the pool
namestringThe name of the pool’s share token
symbolstringThe symbol of the pool’s share token
thirdPartyPooladdressThe yield pool where assets will be deposited
timelockaddressThe timelock contract governing the pool

constructor

constructor(address hMailbox, address weth, address timelock, uint256 minTimelockDelay) public

Initializes the factory with required infrastructure addresses

Parameters

NameTypeDescription
hMailboxaddressThe Hyperlane mailbox contract address
wethaddressThe WETH contract address
timelockaddressThe timelock template to be cloned for each pool
minTimelockDelayuint256The minimum delay for timelock operations

deployPool

function deployPool(contract ERC20 asset, string name, string symbol, address thirdPartyPool, uint256 timelockDelay, uint256 initialDeposit, address curator) public returns (address)

Deploys a new RelayPool with associated timelock governance

Requires initial deposit to prevent inflation attacks, creates dedicated timelock

Parameters

NameTypeDescription
assetcontract ERC20The ERC20 asset for the pool
namestringThe name for the pool’s share token
symbolstringThe symbol for the pool’s share token
thirdPartyPooladdressThe yield pool where idle assets will be deposited
timelockDelayuint256The delay in seconds for timelock operations
initialDeposituint256The initial deposit amount (must be at least 1 unit of asset)
curatoraddressThe address that will control the pool through the timelock

Return Values

NameTypeDescription
[0]addressThe address of the newly deployed RelayPool