get_transaction_receipt
Retrieve transaction receipt details including status, gas used, and logs from multiple blockchains using Grove's MCP Server for Pocket Network.
Instructions
Get transaction receipt with status, gas used, and logs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockchain | Yes | Blockchain name | |
| txHash | Yes | Transaction hash | |
| network | No | Network type (defaults to mainnet) |
Implementation Reference
- Executes the get_transaction_receipt tool: extracts parameters, calls AdvancedBlockchainService.getTransactionReceipt, formats JSON response, and sets error flag.case 'get_transaction_receipt': { const blockchain = args?.blockchain as string; const txHash = args?.txHash as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await advancedBlockchain.getTransactionReceipt(blockchain, txHash, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
- Input schema defining parameters for get_transaction_receipt: blockchain, txHash (required), network (optional).inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, txHash: { type: 'string', description: 'Transaction hash', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'txHash'], },
- src/handlers/transaction-handlers.ts:39-61 (registration)Tool registration object defining name, description, and input schema for get_transaction_receipt.{ name: 'get_transaction_receipt', description: 'Get transaction receipt with status, gas used, and logs', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, txHash: { type: 'string', description: 'Transaction hash', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'txHash'], }, },
- Helper method that retrieves the blockchain service and calls the RPC method 'eth_getTransactionReceipt' with the transaction hash.async getTransactionReceipt( blockchain: string, txHash: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { const service = this.blockchainService.getServiceByBlockchain(blockchain, network); if (!service) { return { success: false, error: `Blockchain service not found: ${blockchain} (${network})`, }; } return this.blockchainService.callRPCMethod( service.id, 'eth_getTransactionReceipt', [txHash] ); }
- src/index.ts:88-101 (registration)Main registration where registerTransactionHandlers is called to include transaction tools (including get_transaction_receipt) in the server's tool list.const tools: Tool[] = [ ...registerBlockchainHandlers(server, blockchainService), ...registerDomainHandlers(server, domainResolver), ...registerTransactionHandlers(server, advancedBlockchain), ...registerTokenHandlers(server, advancedBlockchain), ...registerMultichainHandlers(server, advancedBlockchain), ...registerContractHandlers(server, advancedBlockchain), ...registerUtilityHandlers(server, advancedBlockchain), ...registerEndpointHandlers(server, endpointManager), ...registerSolanaHandlers(server, solanaService), ...registerCosmosHandlers(server, cosmosService), ...registerSuiHandlers(server, suiService), ...registerDocsHandlers(server, docsManager), ];