transactions_for_block
Fetch all transactions and decoded log events from a specific blockchain block to analyze transaction data and identify notable wallets or activities.
Instructions
Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions. Required: chainName (blockchain network), blockHeight (block number or latest). Optional: quoteCurrency, noLogs (exclude event logs). Returns all transactions from the specified block.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainName | Yes | The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet'). | |
| blockHeight | Yes | The block number to get transactions from. Can be a block number or 'latest' for the most recent block. | |
| page | Yes | Page number for pagination, starting from 0. Each page contains multiple transactions from the block. | |
| quoteCurrency | No | Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency. | |
| noLogs | No | Exclude event logs from transactions for faster performance. Default varies by implementation. |
Implementation Reference
- The handler function for 'transactions_for_block', which uses GoldRushClient to fetch paginated transactions for a given block.
async (params) => { try { const response = await goldRushClient.TransactionService.getTransactionsForBlockByPage( params.chainName as Chain, params.blockHeight, params.page, { quoteCurrency: params.quoteCurrency as Quote, noLogs: params.noLogs, } ); return { content: [ { type: "text", text: stringifyWithBigInt(response.data), }, ], }; } catch (err) { return { content: [{ type: "text", text: `Error: ${err}` }], isError: true, }; } } ); - Zod schema defining the input parameters for 'transactions_for_block'.
{ chainName: z .enum(Object.values(ChainName) as [string, ...string[]]) .describe( "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')." ), blockHeight: z .union([z.string(), z.number(), z.literal("latest")]) .describe( "The block number to get transactions from. Can be a block number or 'latest' for the most recent block." ), page: z .number() .describe( "Page number for pagination, starting from 0. Each page contains multiple transactions from the block." ), quoteCurrency: z .enum(Object.values(validQuoteValues) as [string, ...string[]]) .optional() .describe( "Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency." ), noLogs: z .boolean() .optional() .describe( "Exclude event logs from transactions for faster performance. Default varies by implementation." ), }, - src/services/TransactionService.ts:243-248 (registration)Tool registration for 'transactions_for_block' within the McpServer.
server.tool( "transactions_for_block", "Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.\n" + "Required: chainName (blockchain network), blockHeight (block number or latest).\n" + "Optional: quoteCurrency, noLogs (exclude event logs).\n" + "Returns all transactions from the specified block.",