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

IUsdWithdrawalOutputBuilderFactory

Git Source

Inherits: IVersionGetter

Title: USD Withdrawal Output Builder Factory interface

For greater simplicity, this factory only supports deterministic deployments. Given that USD withdrawal output builders are stateless contracts, it should not matter whether you deploy one yourself or use an already deployed one with the same token.

Functions

newUsdWithdrawalOutputBuilder

Deploy a new USD withdrawal output builder deterministically.

function newUsdWithdrawalOutputBuilder(IERC20 token, bytes32 salt)
    external
    returns (IUsdWithdrawalOutputBuilder usdWithdrawalOutputBuilder);

Parameters

NameTypeDescription
tokenIERC20The USD-like ERC-20 token
saltbytes32The salt used to deterministically generate the contract address

Returns

NameTypeDescription
usdWithdrawalOutputBuilderIUsdWithdrawalOutputBuilderThe USD withdrawal output builder

calculateUsdWithdrawalOutputBuilderAddress

Calculate the address of a USD withdrawal output builder to be deployed deterministically.

function calculateUsdWithdrawalOutputBuilderAddress(IERC20 token, bytes32 salt)
    external
    view
    returns (address usdWithdrawalOutputBuilderAddress);

Parameters

NameTypeDescription
tokenIERC20The USD-like ERC-20 token
saltbytes32The salt used to deterministically generate the contract address

Returns

NameTypeDescription
usdWithdrawalOutputBuilderAddressaddressThe deterministic USD withdrawal output builder address

getSafeErc20Transfer

Get the safe ERC-20 transfer contract passed down to the USD withdrawal output builders. This contract is used as delegate-call voucher destination.

function getSafeErc20Transfer()
    external
    view
    returns (ISafeErc20Transfer safeErc20Transfer);

Returns

NameTypeDescription
safeErc20TransferISafeErc20TransferThe safe ERC-20 transfer contract

Events

UsdWithdrawalOutputBuilderCreated

A new USD withdrawal output builder was deployed.

MUST be triggered on a successful call to newUsdWithdrawalOutputBuilder.

event UsdWithdrawalOutputBuilderCreated(IUsdWithdrawalOutputBuilder usdWithdrawalOutputBuilder);

Parameters

NameTypeDescription
usdWithdrawalOutputBuilderIUsdWithdrawalOutputBuilderThe USD withdrawal output builder