ITokenMessangerV2
Functions
depositForBurnWithHook
Deposits and burns tokens from sender to be minted on destination domain.
Emits a DepositForBurn event.
reverts if:
hookDatais zero-lengthburnTokenis not supporteddestinationDomainhas no TokenMessenger registered- transferFrom() reverts. For example, if sender's burnToken balance or approved allowance
to this contract is less than
amount. - burn() reverts. For example, if
amountis 0. - maxFee is greater than or equal to
amount. - MessageTransmitterV2#sendMessage reverts.
function depositForBurnWithHook(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller,
uint256 maxFee,
uint32 minFinalityThreshold,
bytes calldata hookData
) external;
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | amount of tokens to burn |
destinationDomain | uint32 | destination domain to receive message on |
mintRecipient | bytes32 | address of mint recipient on destination domain, as bytes32 |
burnToken | address | token to burn amount of, on local domain |
destinationCaller | bytes32 | authorized caller on the destination domain, as bytes32. If equal to bytes32(0), any address can broadcast the message. |
maxFee | uint256 | maximum fee to pay on the destination domain, specified in units of burnToken |
minFinalityThreshold | uint32 | |
hookData | bytes | hook data to append to burn message for interpretation on destination domain |