OpenPond
1Branch0Tags
GL
glucryptochore: bump opentool to v0.8.28 and add template p...
1ee7b423 days ago4Commits
typescript
import { store } from "opentool/store"; import type { ToolProfile } from "opentool"; import { readConfig, resolveProfileAssets, resolveScheduleConfig, SIGNAL_BOT_TEMPLATE_CONFIG, runSignalBot, } from "../src/signal-bot"; const config = readConfig(); export const profile: ToolProfile = { description: "EVM price signal bot with Aave + Relay/Uniswap settlement.", category: "strategy", templatePreview: { subtitle: "EVM signal strategy with lending and swap execution rails.", description: `Evaluates configured signals on a schedule across selected EVM assets. Routes execution through supported EVM venues such as Relay and Uniswap paths. Supports portfolio-aware budget and allocation controls per deployment config. Uses OpenTool shared sizing and validation utilities for consistent behavior. Designed for signal-driven entries while keeping execution settings configurable.`, }, schedule: resolveScheduleConfig(config), assets: resolveProfileAssets(config), templateConfig: SIGNAL_BOT_TEMPLATE_CONFIG, }; export async function GET(_req: Request) { const snapshot = readConfig(); try { const result = await runSignalBot(snapshot); await store({ source: "evm-signal-bot", ref: `evm-signal-bot-${Date.now()}`, status: result.ok ? "info" : "failed", action: "signal", metadata: result, }); return Response.json(result); } catch (error) { const message = error instanceof Error ? error.message : "unknown"; await store({ source: "evm-signal-bot", ref: `evm-signal-bot-${Date.now()}`, status: "failed", action: "signal", metadata: { ok: false, error: message }, }); return new Response(JSON.stringify({ ok: false, error: message }), { status: 400, headers: { "content-type": "application/json" }, }); } }