Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

erc20_token_transfers

Retrieve and analyze ERC20 token transfers for any wallet address, including historical prices and transaction details across multiple blockchain networks.

Instructions

Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address. Required: chainName (blockchain network), walletAddress (wallet address). Optional: quoteCurrency for value conversion, contractAddress to filter by specific token, startingBlock/endingBlock to set range, pageSize (default 10) and pageNumber (default 0). Returns token transfer events with timestamps, values, and transaction details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
walletAddressYesThe wallet address to get ERC20 transfers for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.
quoteCurrencyNoCurrency to quote transfer values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.
contractAddressYesSpecific ERC20 token contract address to filter transfers. If null, returns transfers for all ERC20 tokens.
startingBlockNoStarting block number to begin search from. Use with endingBlock to define a range.
endingBlockNoEnding block number to search until. Use with startingBlock to define a range.
pageSizeNoNumber of transfers to return per page. Default is 10, maximum is 100.
pageNumberNoPage number for pagination, starting from 0. Default is 0.

Implementation Reference

  • The tool 'erc20_token_transfers' is defined and registered here within the 'addBalanceServiceTools' function. The handler uses the 'goldRushClient.BalanceService.getErc20TransfersForWalletAddressByPage' method to execute the logic.
    server.tool(
        "erc20_token_transfers",
        "Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address. " +
            "Required: chainName (blockchain network), walletAddress (wallet address). " +
            "Optional: quoteCurrency for value conversion, contractAddress to filter by specific token, " +
            "startingBlock/endingBlock to set range, pageSize (default 10) and pageNumber (default 0). " +
            "Returns token transfer events with timestamps, values, and transaction details.",
        {
            chainName: z
                .enum(Object.values(ChainName) as [string, ...string[]])
                .describe(
                    "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
                ),
            walletAddress: z
                .string()
                .describe(
                    "The wallet address to get ERC20 transfers for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically."
                ),
            quoteCurrency: z
                .enum(Object.values(validQuoteValues) as [string, ...string[]])
                .optional()
                .describe(
                    "Currency to quote transfer values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
                ),
            contractAddress: z
                .string()
                .nullable()
                .describe(
                    "Specific ERC20 token contract address to filter transfers. If null, returns transfers for all ERC20 tokens."
                ),
            startingBlock: z
                .number()
                .optional()
                .describe(
                    "Starting block number to begin search from. Use with endingBlock to define a range."
                ),
            endingBlock: z
                .number()
                .optional()
                .describe(
                    "Ending block number to search until. Use with startingBlock to define a range."
                ),
            pageSize: z
                .number()
                .optional()
                .default(10)
                .describe(
                    "Number of transfers to return per page. Default is 10, maximum is 100."
                ),
            pageNumber: z
                .number()
                .optional()
                .default(0)
                .describe(
                    "Page number for pagination, starting from 0. Default is 0."
                ),
        },
        async (params) => {
            try {
                const response =
                    await goldRushClient.BalanceService.getErc20TransfersForWalletAddressByPage(
                        params.chainName as Chain,
                        params.walletAddress,
                        {
                            quoteCurrency: params.quoteCurrency as Quote,
                            contractAddress: params.contractAddress,
                            startingBlock: params.startingBlock,
                            endingBlock: params.endingBlock,
                            pageSize: params.pageSize,
                            pageNumber: params.pageNumber,
                        }
                    );
                return {
                    content: [
                        {
                            type: "text",
                            text: stringifyWithBigInt(response.data),
                        },
                    ],
                };
            } catch (error) {
                return {
                    content: [{ type: "text", text: `Error: ${error}` }],
                    isError: true,
                };
            }
        }
    );

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