Skip to content

Commit

Permalink
improve on fomo plugin and distingush it from pump.fun's plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Dec 17, 2024
1 parent 284f38a commit dac55c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
11 changes: 4 additions & 7 deletions packages/plugin-solana/src/actions/fomo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ const promptConfirmation = async (): Promise<boolean> => {
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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-solana/src/actions/pumpfun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-solana/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const solanaPlugin: Plugin = {
actions: [
executeSwap,
pumpfun,
fomo,
transferToken,
executeSwapForDAO,
take_order,
Expand Down

0 comments on commit dac55c5

Please sign in to comment.