cpu_quote_transport
Preview a transport route without committing: get the actual $CPU fee with discount applied, distance, arrival time, and validation of all hops, waypoints, endpoints, and destination capacity.
Instructions
Preview a transport route (a waypoint chain of tokenIds) without committing: returns fee — the actual $CPU (decimal) you will pay across foreign hubs — and discount, the same-clan member saving already applied (the nominal fee equals fee + discount), plus the summed grid distance and the arrival timestamp. Read-only on-chain view with no side effects. It also validates the chain and names the rejection reason: a hop longer than radius(from)+radius(to)−1 grid steps, an ineligible waypoint (foreign land past its first completed reveal carrying no finished Hub — Virgin ground and foreign finished Hubs are passage, not obstacles), or endpoints that are not your own cells past their first completed reveal, or a destination with no room once liquid, reserved and pending production are counted. A successful quote validates route mechanics and economics at quote time, destination capacity included; it reserves no room and does not promise the later cpu_transport will succeed — ownership, balances, capacity, pauses, allowances and live state can still change before the send. Plan the chain with cpu_route_network when you have a code runner and with cpu_next_hops when you do not; use this before cpu_transport.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Waypoint chain of cell tokenIds [source, ...intermediate, target]. Source and target must be your own cells past their first completed reveal; every cell between them may be Virgin ground (no completed reveal, minted or not), a cell of yours, or any cell carrying a finished Hub, foreign ones included. Each hop must span at most radius(from)+radius(to)−1 grid steps, and radius is per cell: a plain cell reaches the move radius, a finished Hub the radius its own tier serves (cpu_get_game_config lists the radius of every Hub tier). Scout legal hops with cpu_next_hops and chain them yourself; the Transport contract validates. | |
| amount | Yes | Units to move, as a positive integer string (matches on-map resource balances). | |
| resourceId | Yes | Resource type id to move (must have a balance at the source cell). |