chain_events
Contract event log reader and decoder — Reads and decodes any contract event from chain logs on base|ethereum|arbitrum|optimism|polygon over the last N blocks. event= takes a Solidity-style signature such as Swap(address indexed sender,address indexed recipient,int256 amount0,int256 amount1,uint160 sqrtPriceX96,uint128 liquidity,int24 tick) or a known name (Transfer, Approval, ApprovalForAll, OwnershipTransferred, Deposit, Withdrawal, Upgraded). Computes topic0 (keccak), fetches matching logs and decodes indexed and data arguments (address, bool, intN/uintN, bytesN, string, bytes, T[]); if no parameter is marked indexed the layout is inferred from the logs. Params: chain (default base), contract, event, blocks (default 1000, max 5000), limit (default 25, max 100). Tuples and fixed-size arrays are not supported (400). No contract at the address returns 404 (not charged). Price: $0.004 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"contract": "<contract>",
"event": "<event>"
},
"name": "chain_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | base | |
| event | Yes | Approval | |
| contract | Yes | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |