recommendRoute
InvokeAnalyse gas costs across the provided chains and return the cheapest route with timing guidance.
Input Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"chain_set": {
"description": "Candidate chains to evaluate.",
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"ethereum",
"base",
"arbitrum",
"bsc"
]
}
},
"calldata_size_bytes": {
"description": "Calldata size in bytes expected for the transaction.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"gas_units_est": {
"description": "Base gas estimate (without calldata) for the transaction.",
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"chain_set",
"calldata_size_bytes",
"gas_units_est"
],
"additionalProperties": false
}
Output Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"chain": {
"type": "string",
"enum": [
"ethereum",
"base",
"arbitrum",
"bsc"
]
},
"fee_native": {
"type": "number"
},
"fee_usd": {
"type": "number"
},
"busy_level": {
"type": "string",
"enum": [
"low",
"moderate",
"high"
]
},
"tip_hint": {
"type": "string"
},
"evaluated_at": {
"type": "number"
},
"alternatives": {
"type": "array",
"items": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"enum": [
"ethereum",
"base",
"arbitrum",
"bsc"
]
},
"fee_native": {
"type": "number"
},
"fee_usd": {
"type": "number"
},
"busy_level": {
"type": "string",
"enum": [
"low",
"moderate",
"high"
]
},
"tip_hint": {
"type": "string"
}
},
"required": [
"chain",
"fee_native",
"fee_usd",
"busy_level",
"tip_hint"
],
"additionalProperties": false
}
}
},
"required": [
"chain",
"fee_native",
"fee_usd",
"busy_level",
"tip_hint",
"evaluated_at"
],
"additionalProperties": false
}
Invoke with curl
curl -s -X POST \
'http://gasroute-oracle-production.up.railway.app/entrypoints/recommendRoute/invoke' \
-H 'Content-Type: application/json' \
-d '
{
"input": {
"chain_set": [
"ethereum"
],
"calldata_size_bytes": 0,
"gas_units_est": 0
}
}
'