cpu_quote_transport
Preview transport costs and route validity before moving resources. Get actual $CPU fee, same-clan discount, distance, and arrival time; invalid routes return rejection reason.
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 route, surfacing the rejection reason if the chain is invalid (hop out of range, unrevealed or ineligible waypoint). Scout waypoints with cpu_next_hops; use this before cpu_transport.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Waypoint chain of cell tokenIds [source, ...intermediate, target]. Every waypoint must be revealed and eligible (your own cell, or a Hub); each hop must span at most radius(from)+radius(to)−1 grid steps (a plain cell reaches moveRadius, a Hub hubRadius — see get_game_config transport). 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). |