ethora-wallet-erc20-transfer
Transfer ERC20 tokens between wallets on the Ethora platform by specifying the recipient address and the amount to send.
Instructions
Transfer ERC20 tokens to another wallet
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | amount for transfer | |
| toWallet | Yes | to address for transfer |
Implementation Reference
- src/tools.ts:312-337 (registration)Registers the 'ethora-wallet-erc20-transfer' tool with MCP server, including schema and inline handler function that calls the API helper.function walletERC20TransferTool(server: McpServer) { server.registerTool( 'ethora-wallet-erc20-transfer', { description: 'Transfer ERC20 tokens to another wallet', inputSchema: { toWallet: z.string().describe("to address for transfer"), amount: z.number().describe("amount for transfer"), } }, async function ({ toWallet, amount }) { try { let result = await walletERC20Transfer(toWallet, amount) let toolRes: CallToolResult = { content: [{ type: "text", text: JSON.stringify(result.data) }] } return toolRes } catch (error) { let toolRes: CallToolResult = { content: [{ type: "text", text: "error: network error" }] } return toolRes } } ) }
- src/apiClientDappros.ts:180-190 (helper)Core helper function that performs the ERC20 token transfer via POST request to the /tokens/transfer API endpoint.export function walletERC20Transfer(toWallet: string, amount: number) { return httpClientDappros.post( `/tokens/transfer`, { toWallet, amount, "tokenId": "ERC20", "tokenName": "Dappros Platform Token" } ) }
- src/tools.ts:339-352 (registration)Main entry point that calls walletERC20TransferTool to register the tool among others.export function registerTools(server: McpServer) { userLoginWithEmailTool(server); userRegisterWithEmailTool(server); appListTool(server); appCreateTool(server); appDeleteTool(server); appUpdateTool(server); appGetDefaultRoomsTool(server); craeteAppChatTool(server); appDeleteChatTool(server); getDefaultRoomsWithAppIdTool(server); walletGetBalanceTool(server); walletERC20TransferTool(server); }