Skip to content

Commit 3dbeeed

Browse files
authored
Merge pull request #40 from konard/issue-39-f70900fd5864
fix(ton-trading-bot): add tests, fix lint warnings, register in README
2 parents 34a20f6 + 8869b45 commit 3dbeeed

3 files changed

Lines changed: 606 additions & 8 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# teleton-plugins
44

55
[![GitHub stars](https://img.shields.io/github/stars/TONresistor/teleton-plugins?style=flat&logo=github)](https://github.com/TONresistor/teleton-plugins/stargazers)
6-
[![Plugins](https://img.shields.io/badge/plugins-25-8B5CF6.svg)](#available-plugins)
7-
[![Tools](https://img.shields.io/badge/tools-183-E040FB.svg)](#available-plugins)
6+
[![Plugins](https://img.shields.io/badge/plugins-26-8B5CF6.svg)](#available-plugins)
7+
[![Tools](https://img.shields.io/badge/tools-189-E040FB.svg)](#available-plugins)
88
[![SDK](https://img.shields.io/badge/SDK-v1.0.0-00C896.svg)](#plugin-sdk)
99
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
1010
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
@@ -76,12 +76,13 @@ No build step. Just copy and go. Plugins with npm dependencies are auto-installe
7676

7777
## Available Plugins
7878

79-
> **25 plugins** · **183 tools** · [Browse the registry](registry.json)
79+
> **26 plugins** · **189 tools** · [Browse the registry](registry.json)
8080
8181
### DeFi & Trading
8282

8383
| Plugin | Description | Tools | Author |
8484
|--------|-------------|:-----:|--------|
85+
| [ton-trading-bot](plugins/ton-trading-bot/) | Atomic TON trading tools — market data, portfolio, risk validation, simulation, DEX swap | 6 | xlabtg |
8586
| [gaspump](plugins/gaspump/) | Launch, trade, and manage meme tokens on Gas111/TON | 13 | teleton |
8687
| [stormtrade](plugins/stormtrade/) | Perpetual futures — crypto, stocks, forex, commodities | 13 | teleton |
8788
| [evaa](plugins/evaa/) | EVAA Protocol — supply, borrow, withdraw, repay, liquidate | 11 | teleton |

plugins/ton-trading-bot/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const tools = (sdk) => [
101101
},
102102
required: ["from_asset", "to_asset", "amount"],
103103
},
104-
execute: async (params, context) => {
104+
execute: async (params, _context) => {
105105
const { from_asset, to_asset, amount } = params;
106106
try {
107107
const [tonPrice, dexQuote] = await Promise.all([
@@ -163,7 +163,7 @@ export const tools = (sdk) => [
163163
},
164164
},
165165
},
166-
execute: async (params, context) => {
166+
execute: async (params, _context) => {
167167
const limit = params.history_limit ?? 10;
168168
try {
169169
const [tonBalance, jettonBalances] = await Promise.all([
@@ -223,7 +223,7 @@ export const tools = (sdk) => [
223223
},
224224
required: ["mode", "amount_ton"],
225225
},
226-
execute: async (params, context) => {
226+
execute: async (params, _context) => {
227227
const { mode, amount_ton } = params;
228228
try {
229229
const balance =
@@ -310,7 +310,7 @@ export const tools = (sdk) => [
310310
},
311311
required: ["from_asset", "to_asset", "amount_in", "expected_amount_out"],
312312
},
313-
execute: async (params, context) => {
313+
execute: async (params, _context) => {
314314
const { from_asset, to_asset, amount_in, expected_amount_out, note } = params;
315315
try {
316316
const simBalance = getSimBalance(sdk);
@@ -508,7 +508,7 @@ export const tools = (sdk) => [
508508
},
509509
required: ["trade_id", "amount_out"],
510510
},
511-
execute: async (params, context) => {
511+
execute: async (params, _context) => {
512512
const { trade_id, amount_out, note } = params;
513513
try {
514514
const entry = sdk.db

0 commit comments

Comments
 (0)