Load wallet approvals
{
"id": "approvals",
"kind": "fetch_transform",
"title": "Load wallet approvals",
"request": {
"params": {
"tokenAddress": "{{ $.input.tokenAddress }}",
"walletAddress": "{{ $.input.walletAddress }}",
"lookbackBlocks": 50000
},
"sourceId": "wallet_approval_surface",
"deliveryFormat": "json"
}
}
Load Base gas window
{
"id": "gas",
"kind": "fetch_transform",
"title": "Load Base gas window",
"request": {
"params": {
"windowBlocks": 12
},
"sourceId": "base_gas_window",
"deliveryFormat": "json"
}
}
Build wallet allowance cleanup plan
{
"id": "summarize",
"kind": "fetch_transform",
"title": "Build wallet allowance cleanup plan",
"request": {
"params": {
"input": {
"gas": "{{ $.stepsById.gas.output }}",
"approvals": "{{ $.stepsById.approvals.output }}",
"tokenAddress": "{{ $.input.tokenAddress }}",
"walletAddress": "{{ $.input.walletAddress }}"
},
"prompt": "Build a wallet allowance cleanup plan. Focus on the cleanup checklist, the riskiest spenders, and the next actions while considering the current gas context.",
"responseSchema": {
"type": "object",
"required": [
"walletAddress",
"riskLevel",
"summary",
"cleanupChecklist",
"riskySpenders",
"nextActions"
],
"properties": {
"summary": {
"type": "string"
},
"riskLevel": {
"enum": [
"medium",
"low",
"high"
],
"type": "string"
},
"nextActions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Suggested next actions."
},
"riskySpenders": {
"type": "array",
"items": {
"type": "object",
"required": [
"tokenSymbol",
"spenderAddress",
"riskLevel"
],
"properties": {
"riskLevel": {
"type": "string"
},
"tokenSymbol": {
"type": "string"
},
"spenderAddress": {
"type": "string"
}
},
"additionalProperties": false
}
},
"walletAddress": {
"type": "string"
},
"cleanupChecklist": {
"type": "array",
"items": {
"type": "object",
"required": [
"title",
"status",
"reason"
],
"properties": {
"title": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"enum": [
"do_now",
"watch",
"skip"
],
"type": "string"
}
},
"additionalProperties": false
},
"description": "Allowance cleanup checklist items."
}
},
"additionalProperties": false
},
"systemInstruction": "You are compressing allowance review into a short operator checklist. Stay grounded in the supplied approvals and gas context only."
},
"sourceId": "google_gemini_flash_structured",
"deliveryFormat": "json"
}
}