Skip to main content
Glama

zetrix_test_transaction

Simulate and evaluate transaction fees before submitting to the Zetrix blockchain, enabling cost estimation without network execution.

Instructions

Evaluate transaction fees without blockchain submission

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesArray of test transaction items

Implementation Reference

  • The core handler function in ZetrixClient class that performs a POST request to /testTransaction endpoint on the Zetrix RPC server to evaluate transaction fees without submission.
    async testTransaction(items: any[]): Promise<ZetrixTestTransactionResult> { try { const response = await this.client.post("/testTransaction", { items }); if (response.data.error_code !== 0) { throw new Error( response.data.error_desc || `API Error: ${response.data.error_code}` ); } return response.data.result; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Failed to test transaction: ${error.message}`); } throw error; } }
  • src/index.ts:341-354 (registration)
    Tool registration in the tools array, defining name, description, and input schema.
    { name: "zetrix_test_transaction", description: "Evaluate transaction fees without blockchain submission", inputSchema: { type: "object", properties: { items: { type: "array", description: "Array of test transaction items", }, }, required: ["items"], }, },
  • src/index.ts:1042-1055 (registration)
    MCP server request handler switch case that invokes the ZetrixClient.testTransaction method.
    case "zetrix_test_transaction": { if (!args) { throw new Error("Missing arguments"); } const result = await zetrixClient.testTransaction(args.items as any[]); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • TypeScript interface defining the structure of the test transaction result returned by the Zetrix RPC API.
    export interface ZetrixTestTransactionResult { actual_fee: string; hash: string; logs: any; query_rets: any[]; stat: any; txs: any[]; }

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/Zetrix-Chain/zetrix-mcp-server'

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