IFeeAdapterV2
Functions
newIntent
Creates a new intent with fees
function newIntent(
uint32[] memory _destinations,
bytes32 _receiver,
address _inputAsset,
bytes32 _outputAsset,
uint256 _amount,
uint256 _amountOutMin,
uint48 _ttl,
bytes calldata _data,
FeeParams calldata _feeParams
) external payable returns (bytes32, Intent memory);
Parameters
| Name | Type | Description |
|---|---|---|
_destinations | uint32[] | Array of destination domains, preference ordered |
_receiver | bytes32 | Address of the receiver on the destination chain |
_inputAsset | address | Address of the input asset |
_outputAsset | bytes32 | Address of the output asset |
_amount | uint256 | Amount of input asset to use for the intent |
_amountOutMin | uint256 | Amount expected in the outputAsset |
_ttl | uint48 | Time-to-live for the intent in seconds |
_data | bytes | Additional data for the intent |
_feeParams | FeeParams | Fee parameters including fee amount, deadline, and signature |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | _intentId The ID of the created intent |
<none> | Intent | _intent The created intent object |
Structs
FeeParams
struct FeeParams {
uint256 fee;
uint256 deadline;
bytes sig;
}
Intent
struct Intent {
bytes32 initiator;
bytes32 receiver;
bytes32 inputAsset;
bytes32 outputAsset;
uint32 origin;
uint64 nonce;
uint48 timestamp;
uint48 ttl;
uint256 amount;
uint256 amountOutMin;
uint32[] destinations;
bytes data;
}