From dac55c5e4a59d6129fc7aa094f7e7555f8036df2 Mon Sep 17 00:00:00 2001 From: odilitime Date: Tue, 17 Dec 2024 01:54:21 +0000 Subject: [PATCH] improve on fomo plugin and distingush it from pump.fun's plugin --- packages/plugin-solana/src/actions/fomo.ts | 11 ++++------- packages/plugin-solana/src/actions/pumpfun.ts | 4 ++-- packages/plugin-solana/src/index.ts | 1 + 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/plugin-solana/src/actions/fomo.ts b/packages/plugin-solana/src/actions/fomo.ts index c9fd60d1c9..068ae5f88a 100644 --- a/packages/plugin-solana/src/actions/fomo.ts +++ b/packages/plugin-solana/src/actions/fomo.ts @@ -362,10 +362,6 @@ const promptConfirmation = async (): Promise => { return true; }; -// Save the base64 data to a file -// import * as fs from "fs"; -// import * as path from "path"; - const fomoTemplate = `Respond with a JSON markdown block containing only the extracted values. Use null for any values that cannot be determined. Example response: @@ -482,6 +478,7 @@ export default { formData.append("symbol", tokenMetadata.symbol); formData.append("description", tokenMetadata.description); + // FIXME: does fomo.fund have an ipfs call? const metadataResponse = await fetch("https://pump.fun/api/ipfs", { method: "POST", body: formData, @@ -554,7 +551,7 @@ export default { if (callback) { if (result.success) { callback({ - text: `Token ${tokenMetadata.name} (${tokenMetadata.symbol}) created successfully!\nContract Address: ${result.ca}\nCreator: ${result.creator}\nView at: https://pump.fun/${result.ca}`, + text: `Token ${tokenMetadata.name} (${tokenMetadata.symbol}) created successfully!\nContract Address: ${result.ca}\nCreator: ${result.creator}\nView at: https://fomo.fund/token/${result.ca}`, content: { tokenInfo: { symbol: tokenMetadata.symbol, @@ -604,13 +601,13 @@ export default { { user: "{{user1}}", content: { - text: "Create a new token called GLITCHIZA with symbol GLITCHIZA and generate a description about it. Also come up with a description for it to use for image generation .buy 0.00069 SOL worth.", + text: "Create a new token called GLITCHIZA with symbol GLITCHIZA and generate a description about it on fomo.fund. Also come up with a description for it to use for image generation .buy 0.00069 SOL worth.", }, }, { user: "{{user2}}", content: { - text: "Token GLITCHIZA (GLITCHIZA) created successfully!\nContract Address: 3kD5DN4bbA3nykb1abjS66VF7cYZkKdirX8bZ6ShJjBB\nCreator: 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa\nView at: https://pump.fun/EugPwuZ8oUMWsYHeBGERWvELfLGFmA1taDtmY8uMeX6r", + text: "Token GLITCHIZA (GLITCHIZA) created successfully on fomo.fund!\nContract Address: 3kD5DN4bbA3nykb1abjS66VF7cYZkKdirX8bZ6ShJjBB\nCreator: 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa\nView at: https://fomo.fund/EugPwuZ8oUMWsYHeBGERWvELfLGFmA1taDtmY8uMeX6r", action: "CREATE_AND_BUY_TOKEN", content: { tokenInfo: { diff --git a/packages/plugin-solana/src/actions/pumpfun.ts b/packages/plugin-solana/src/actions/pumpfun.ts index 1299c0cb35..10a591fe17 100644 --- a/packages/plugin-solana/src/actions/pumpfun.ts +++ b/packages/plugin-solana/src/actions/pumpfun.ts @@ -487,13 +487,13 @@ export default { { user: "{{user1}}", content: { - text: "Create a new token called GLITCHIZA with symbol GLITCHIZA and generate a description about it. Also come up with a description for it to use for image generation .buy 0.00069 SOL worth.", + text: "Create a new token called GLITCHIZA with symbol GLITCHIZA and generate a description about it on pump.fun. Also come up with a description for it to use for image generation .buy 0.00069 SOL worth.", }, }, { user: "{{user2}}", content: { - text: "Token GLITCHIZA (GLITCHIZA) created successfully!\nContract Address: 3kD5DN4bbA3nykb1abjS66VF7cYZkKdirX8bZ6ShJjBB\nCreator: 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa\nView at: https://pump.fun/EugPwuZ8oUMWsYHeBGERWvELfLGFmA1taDtmY8uMeX6r", + text: "Token GLITCHIZA (GLITCHIZA) created successfully on pump.fun!\nContract Address: 3kD5DN4bbA3nykb1abjS66VF7cYZkKdirX8bZ6ShJjBB\nCreator: 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa\nView at: https://pump.fun/EugPwuZ8oUMWsYHeBGERWvELfLGFmA1taDtmY8uMeX6r", action: "CREATE_AND_BUY_TOKEN", content: { tokenInfo: { diff --git a/packages/plugin-solana/src/index.ts b/packages/plugin-solana/src/index.ts index bf7222648a..ad145ff812 100644 --- a/packages/plugin-solana/src/index.ts +++ b/packages/plugin-solana/src/index.ts @@ -24,6 +24,7 @@ export const solanaPlugin: Plugin = { actions: [ executeSwap, pumpfun, + fomo, transferToken, executeSwapForDAO, take_order,