{
  "$comment": "GENERATED FROM api/_tools/<slug>/route.mjs — do not edit by hand",
  "type": "https://eips.ethereum.org/EIPS/eip-8257#tool-manifest-v1",
  "name": "tx-decoder",
  "description": "Decode any Base transaction by hash. Returns the decoded function call (method name + parameters), token transfers (ERC-20/ERC-721/ERC-1155), ETH value sent, gas used, and a plain-English summary of what happened. Free. 60s cache.",
  "endpoint": "https://www.clawbots.org/api/tools/tx-decoder",
  "inputs": {
    "type": "object",
    "properties": {
      "hash": {
        "type": "string",
        "description": "Base transaction hash (0x + 64 hex chars)",
        "pattern": "^0x[0-9a-fA-F]{64}$"
      }
    },
    "required": [
      "hash"
    ],
    "additionalProperties": false
  },
  "outputs": {
    "type": "object",
    "properties": {
      "txHash": {
        "type": "string"
      },
      "status": {
        "type": "string",
        "enum": [
          "success",
          "reverted",
          "unknown"
        ]
      },
      "block": {
        "type": [
          "integer",
          "null"
        ]
      },
      "timestamp": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "from": {
        "type": [
          "string",
          "null"
        ]
      },
      "to": {
        "type": [
          "string",
          "null"
        ]
      },
      "isContract": {
        "type": "boolean"
      },
      "toLabel": {
        "type": [
          "string",
          "null"
        ]
      },
      "valueEth": {
        "type": "string"
      },
      "feeEth": {
        "type": "string"
      },
      "gasPriceGwei": {
        "type": [
          "number",
          "null"
        ]
      },
      "gasUsed": {
        "type": [
          "string",
          "null"
        ]
      },
      "gasLimit": {
        "type": [
          "string",
          "null"
        ]
      },
      "txType": {
        "type": [
          "integer",
          "null"
        ]
      },
      "txTypes": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "decodedInput": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "methodCall": {
            "type": "string"
          },
          "methodId": {
            "type": "string"
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type",
                "value"
              ]
            }
          }
        },
        "required": [
          "methodCall",
          "methodId",
          "parameters"
        ]
      },
      "tokenTransfers": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "from": {
              "type": [
                "string",
                "null"
              ]
            },
            "to": {
              "type": [
                "string",
                "null"
              ]
            },
            "token": {
              "type": [
                "string",
                "null"
              ]
            },
            "symbol": {
              "type": [
                "string",
                "null"
              ]
            },
            "decimals": {
              "type": [
                "integer",
                "null"
              ]
            },
            "amount": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "type"
          ]
        }
      },
      "summary": {
        "type": "string"
      },
      "chain": {
        "type": "string"
      },
      "fetchedAt": {
        "type": "string",
        "format": "date-time"
      }
    },
    "required": [
      "txHash",
      "status",
      "from",
      "to",
      "valueEth",
      "summary",
      "chain",
      "fetchedAt"
    ]
  },
  "creatorAddress": "0xef2cc7d15d3421629f93ffa39727f14179f31c75",
  "tags": [
    "base",
    "transaction",
    "decoder",
    "evm",
    "token-transfers",
    "debug"
  ],
  "pricing": [],
  "onChain": {
    "registry": "0x265BB2DBFC0A8165C9A1941Eb1372F349baD2cf1",
    "chainId": 8453,
    "toolId": 42
  }
}
