cpu_return_lot
Send the full unsold remainder of your open or evicted lot from its hub to your own cell. Quote the route first, set a max transit fee, and the transfer is blocked if the fee exceeds that cap.
Instructions
Send one of your lots home: the whole unsold remainder ships from its hub to a cell you own, on-chain. Requires a session. Works on an OPEN lot (the offer is withdrawn) and on an EVICTED one (the hub owner threw it out and the units are still yours) — pass the lot and the client picks the right branch. Pass chain = [hub, ...waypoints, your destination cell] for the whole route (required). It is always the whole remainder, never part of it, and never more than one lot. Quote it first with cpu_quote_lot_return and pass the maxTransitFeeWei it answers with back here: this call re-prices the route on-chain and, if the fee has moved above the ceiling you passed, refuses before approving or sending anything rather than overspend it. The units are credited only after they arrive and you cpu_finalize_delivery on the returned deliveryId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Waypoint tokenIds [hub, ...waypoints, destination] for the whole route home — the first node is the hub holding the lot, the last is your own revealed cell where the remainder lands. Scout waypoints with cpu_next_hops. | |
| lotId | Yes | The lot to send home (must be yours; open or evicted). | |
| maxTransitFeeWei | Yes | The most transit you will pay for this return, in WEI (not $CPU) — copy the `maxTransitFeeWei` field from the `cpu_quote_lot_return` you just ran for this same lot and route, unchanged. Only the source hub charges the rate pinned when the lot was listed; every later waypoint on the way home can raise its own rate between that quote and this call, which is why this ceiling exists. The route is re-priced on-chain before anything is approved or sent, and a total above this figure is refused right there; the same figure then travels with the transaction as a cap on the whole route total, so the chain refuses it too if a rate moves before the call is mined. A ceiling that went stale costs you a re-quote instead of the difference. |