feat: Refactor actions to use tool functions for improved code clarity and maintainability

This commit is contained in:
Fahri Bilici
2024-12-28 16:24:57 +01:00
parent 9326da25b1
commit 378fea201d
30 changed files with 118 additions and 654 deletions

View File

@@ -2,6 +2,7 @@ import { Action } from "../types/action";
import { SolanaAgentKit } from "../agent";
import { z } from "zod";
import { PublicKey } from "@solana/web3.js";
import { getOwnedDomainsForTLD } from "../tools";
const getOwnedDomainsForTLDAction: Action = {
name: "solana_get_owned_domains_for_tld",
@@ -40,7 +41,7 @@ const getOwnedDomainsForTLDAction: Action = {
const tld = input.tld.toLowerCase();
// Get owned domains for TLD
const domains = await agent.getOwnedDomainsForTLD(tld);
const domains = await getOwnedDomainsForTLD(agent, tld);
return {
status: "success",