Receipts
Statuses
| Status | Final | Meaning |
|---|---|---|
| Open | no | Intent recorded, no answer yet. |
| Acked | no | A GTC order rests on the book. The relayer posts an ack with its oid. |
| Filled | yes | The full size filled at or inside the limit. |
| Partial | yes | Part filled; the rest was cancelled (IOC) or cancelled at the deadline (GTC). |
| Dropped | yes | Nothing filled. The reason code says why. |
| Unanswered | yes | No receipt by deadline plus five minutes; set by expire(). |
Fields
struct Receipt {
Status status;
uint64 filledSz; // 8 decimals
uint64 avgPx; // 8 decimals, 0 when nothing filled
int64 fee; // 8 decimals in quote, negative is a rebate
uint64 oid; // HyperCore order id, 0 if never placed
uint64 coreTime; // HyperCore time of the final event, ms
uint8 reason; // Dropped reason, 0 otherwise
bytes32 fillHash; // hash of the HyperCore fill hashes
}Sizes and prices use 8 decimals, the precision HyperCore uses on the wire. Notional is sz * px / 1e8.
Client order id
Every HyperCore order carries a 128-bit client order id derived from the intent:
cloid = bytes16(keccak256(abi.encode(block.chainid, router, intentId)))
Anyone can look the order up on HyperCore with orderStatus by that cloid, so each HyperCore order traces back to exactly one intent.
Dropped reasons
| 1 | IOC could not match |
| 2 | ALO would have crossed |
| 3 | Cancelled at deadline |
| 4 | Insufficient balance |
| 5 | Below minimum order value |
| 6 | Rejected by HyperCore (other) |
Callbacks
The router calls onReceipt(intentId, receipt) on the consumer with the gas the intent asked for (callbackGas, at most 2,000,000). The receipt is stored before the call, so a reverting consumer never loses it. retryCallback(intentId) replays it; anyone can call it.
Callback gas is paid from the consumer owner's HYPE subscription. At request time the router reserves (callbackGas + 90,000) * gasPriceCap; at fulfil it pays the relayer for the gas actually used, capped by the reservation, and frees the rest. expire() frees the whole reservation.
Deadline guarantee
If no final receipt lands by deadline + 5 minutes, anyone calls expire(intentId). The consumer receives Unanswered, the reservation returns to the subscription, the relayer's capacity is freed and its bond pays a liveness penalty. None of this needs a keeper or the relayer.