{"uid":"cap_NuoJWTWdicLQO4zVU72xs","slug":"xerxes-ethereum-contract-logs-eth-getlogs-eb7dc9c1","name":"Xerxes Ethereum Contract Logs (eth_getLogs)","description":"Returns logs from a contract address, optionally filtered by event signature hash and block range. Inputs: address (contract address, 0x + 40 hex), topic0 (optional event signature hash, 0x + 64 hex), blocks (optional, last N blocks, 1-100, default 10). Output: array of log objects. Query: address (contract, 0x + 40 hex), topic0 (optional event signature hash, 0x + 64 hex), blocks (optional, last N blocks, 1-100 (default 10)).","url":"https://ari001.tailb4ac3a.ts.net/v1/ventures/ethereum_contract_abi_service/eth_getlogs?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"blocks":{"type":"string","pattern":"^[0-9]{1,3}$","description":"optional, last N blocks, 1-100 (default 10)"},"topic0":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"optional event signature hash, 0x + 64 hex"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"contract, 0x + 40 hex"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"chain":{"type":"string"},"error":{"type":"string","description":"present when ok is false"},"method":{"type":"string"},"result":{"type":"object","properties":{"logs":{"type":"array","maxItems":200},"count":{"type":"integer"},"to_block":{"type":"integer"},"truncated":{"type":"boolean"},"from_block":{"type":"integer"}}},"service":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fivleudf6Kyey6CQ1DWwZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns on-chain logs emitted by a specific Ethereum contract address, optionally filtered by event signature hash and a recent block range.","exampleAgentPrompt":"Pull the last 30 blocks of logs from Ethereum contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, filtering for Transfer events with topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.","exampleUseCases":[{"title":"Monitor DeFi pool activity","prompt":"Get the last 50 blocks of event logs from the Uniswap V2 USDC/ETH pool at 0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc — I want to see all Swap events using topic0 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822."},{"title":"Audit ERC-20 Transfer events","prompt":"Fetch the last 20 blocks of logs from the USDT contract at 0xdAC17F958D2ee523a2206206994597C13D831ec7, filtered to Transfer events with topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef, so I can audit recent token movements."},{"title":"Check recent contract events for debugging","prompt":"I need to debug a smart contract — can you pull all logs from the last 10 blocks for contract 0x6B175474E89094C44Da98b954EedeAC495271d0F without any topic filter so I can see every event it emitted?"}],"resultDescription":"Returns a JSON object with an array of up to 200 raw Ethereum event log entries emitted by the contract in the specified block range, along with the from_block and to_block scanned, the total count of logs found, and a truncated flag indicating if results were capped at the 200-log maximum.","failureModes":["Invalid contract address format returns a 400-level error","topic0 not matching the required 0x+64 hex pattern causes validation rejection","Requesting more than 100 blocks returns a validation error (max is 100)","Contract address valid but no logs found in range returns empty logs array with count 0","Network or RPC node unavailability causes a 5xx error with ok: false and an error message","Payment failure (x402) blocks access if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need raw on-chain event logs from an Ethereum contract, especially when filtering by a specific event signature (topic0) or limiting to a recent block window. It is ideal for monitoring DeFi activity, auditing ERC-20 transfers, or debugging smart contract events without running your own Ethereum node. Prefer over general Ethereum RPC providers when a paid, agent-friendly x402 micropayment interface is acceptable and you want a simple REST GET with query parameters rather than a full JSON-RPC call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:42:31.411Z","isFirstParty":false,"canonicalSlug":"xerxes-ethereum-contract-logs-eth-getlogs-eb7dc9c1"}