IUsdWithdrawalOutputBuilderFactory
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
| Name | Type | Description |
|---|---|---|
token | IERC20 | The USD-like ERC-20 token |
salt | bytes32 | The salt used to deterministically generate the contract address |
Returns
| Name | Type | Description |
|---|---|---|
usdWithdrawalOutputBuilder | IUsdWithdrawalOutputBuilder | The 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
| Name | Type | Description |
|---|---|---|
token | IERC20 | The USD-like ERC-20 token |
salt | bytes32 | The salt used to deterministically generate the contract address |
Returns
| Name | Type | Description |
|---|---|---|
usdWithdrawalOutputBuilderAddress | address | The 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
| Name | Type | Description |
|---|---|---|
safeErc20Transfer | ISafeErc20Transfer | The 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
| Name | Type | Description |
|---|---|---|
usdWithdrawalOutputBuilder | IUsdWithdrawalOutputBuilder | The USD withdrawal output builder |