Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve fomo integration #1147

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading