> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# 结算订单

> LI.FI 意图简化了完成和结算，完成跨链订单的循环，并为您提供对整个生命周期的信心和控制。

要结算 LI.FI 意图订单，可能需要多达 2 个交易：

1. 提交消息验证
2. 在资源锁上完成订单。

## 预言机验证

有关如何为预言机系统中继证明的说明，请参阅其在[验证](/zh-Hans/lifi-intents/architecture/oracle-systems)中的部分。

## 完成订单

一旦观察到 `OutputProven` 事件，输出已被验证，可以调用 `finalise`。

```
event OutputProven(uint256 chainid, bytes32 remoteIdentifier, bytes32 application, bytes32 payloadHash);
```

根据使用的结算器，您必须使用不同的 abi 调用完成函数。`InputSettlerCompact` 使用需要签名的完成函数，而 `InputSettlerEscrow` 不需要。

对于 `InputSettlerCompact`，提交 `StandardOrder`、附加的签名作为 `bytes.concat(sponsor, allocator)`、填充的时间戳（可以从 `OutputFilled` 事件中读取）和求解器的标识符。如果有多个输出，始终按其在订单中的位置索引列表。然后，可以调用 finalize。`InputSettlerEscrow` 的流程相同，除了不提供签名。

```solidity theme={"system"}
struct SolveParams(
    uint32 timestamp;
    bytes32 solver;
)
// 对于 Compact 输入结算器
function finalise(
    StandardOrder calldata order,
    bytes calldata signatures,
    SolveParams[] calldata solveParams,
    bytes32 destination,
    bytes calldata call
) external;
// 或对于托管输入结算器
function finalise(
    StandardOrder calldata order,
    SolveParams[] calldata solveParams,
    bytes32 destination,
    bytes calldata call
) external;
```

<Note>
  如果订单包含多个输出，并且两个求解器填充了不同的输出，则第 0 个（第一个）输出的求解器是规范求解器。
</Note>
