Settling Orders
To settle LI.FI intent orders, up to 2 transactions may be required:
- Submission of message validation
- Finalizing the order on the resource lock.
Oracle Validation
Section titled “Oracle Validation”For instructions on how to relay proof for oracle systems, please refer to their section in validation.
Finalizing Orders
Section titled “Finalizing Orders”Once the OutputProven
event has been observed, the output has been validated and finalise
can be called.
event OutputProven(uint256 chainid, bytes32 remoteIdentifier, bytes32 application, bytes32 payloadHash);
Depending on the settler used, you either have to call a finalise function with a different abi. InputSettlerCompact
uses a signature required finalise function where InputSettlerEscrow
does not.
For the InputSettlerCompact
submit the StandardOrder
, the attached signatures as bytes.concat(sponsor, allocator)
, the timestamps of the fills (which can be read from the OutputFilled
event), and the solver’s identifier. If there are multiple outputs, always index lists by their position in the order. Then, finalize can be called. The flow is the same for InputSettlerEscrow
except not signatures are provided.
// Compact Input Settlerfunction finalise( StandardOrder calldata order, bytes calldata signatures, uint32[] calldata timestamps, bytes32[] memory solvers, bytes32 destination, bytes calldata call) external;// Escrow Input Settlerfunction finalise( StandardOrder calldata order, uint32[] calldata timestamps, bytes32[] memory solvers, bytes32 destination, bytes calldata call) external;
:::noteIf an order contains multiple outputs and two solvers filled different outputs, then the solver of the 0'th (first) output is the canonical solver.:::