Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

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
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
blockHeightYesThe block number to get transactions from. Can be a block number or 'latest' for the most recent block.
pageYesPage number for pagination, starting from 0. Each page contains multiple transactions from the block.
quoteCurrencyNoCurrency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.
noLogsNoExclude 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."
            ),
    },
  • 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.",

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/covalenthq/goldrush-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server