Skip to content

Commit

Permalink
add it back into tweet
Browse files Browse the repository at this point in the history
  • Loading branch information
monilpat committed Feb 5, 2025
1 parent 65cdebe commit bca9a14
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/client-coinbase/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class CoinbaseClient implements Client {
}
}

private async generateTweetContent(event: WebhookEvent, amountInCurrency: number, pnl: string, formattedTimestamp: string, state: State, address:string, hash: string | null): Promise<string> {
private async generateTweetContent(event: WebhookEvent, amountInCurrency: number, pnl: string, formattedTimestamp: string, state: State, hash: string | null): Promise<string> {
try {
const tradeTweetTemplate = `
# Task
Expand All @@ -167,6 +167,7 @@ Trade specifics:
- Price at trade: $${Number(event.price).toFixed(2)}
- Timestamp: ${formattedTimestamp}
- Txn: ${blockExplorerBaseTxUrl(hash)}
- PNL: ${pnl}
Guidelines:
1. Keep it under 180 characters
2. Include 1-2 relevant emojis
Expand All @@ -177,12 +178,12 @@ Guidelines:
7. Ensure key details are present: action, amount, ticker, and price
Sample buy tweets:
"πŸ“ˆ Added $${amountInCurrency.toFixed(2)} of ${event.ticker} at $${Number(event.price).toFixed(2)}. Txn: ${blockExplorerBaseTxUrl(hash)}"
"🎯 Strategic ${event.ticker} buy: $${amountInCurrency.toFixed(2)} at $${Number(event.price).toFixed(2)}. Txn: ${blockExplorerBaseTxUrl(hash)}"
"πŸ“ˆ Added $${amountInCurrency.toFixed(2)} of ${event.ticker} at $${Number(event.price).toFixed(2)}. Overall PNL: ${pnl} ${blockExplorerBaseTxUrl(hash)}"
"🎯 Strategic ${event.ticker} buy: $${amountInCurrency.toFixed(2)} at $${Number(event.price).toFixed(2)}. Overall PNL: ${pnl} ${blockExplorerBaseTxUrl(hash)}"
Sample sell tweets:
"πŸ’« Sold ${event.ticker}: $${amountInCurrency.toFixed(2)} at $${Number(event.price).toFixed(2)}. Txn: ${blockExplorerBaseTxUrl(hash)}"
"πŸ“Š Sold $${amountInCurrency.toFixed(2)} of ${event.ticker} at $${Number(event.price).toFixed(2)}. Txn: ${blockExplorerBaseTxUrl(hash)}"
"πŸ’« Sold ${event.ticker}: $${amountInCurrency.toFixed(2)} at $${Number(event.price).toFixed(2)}. Overall PNL: ${pnl} ${blockExplorerBaseTxUrl(hash)}"
"πŸ“Š Sold $${amountInCurrency.toFixed(2)} of ${event.ticker} at $${Number(event.price).toFixed(2)}. Overall PNL: ${pnl} ${blockExplorerBaseTxUrl(hash)}"
Generate only the tweet text, no commentary or markdown.`;
const context = composeContext({
Expand Down Expand Up @@ -313,7 +314,6 @@ Generate only the tweet text, no commentary or markdown.`;
pnl,
formattedTimestamp,
state,
this.runtime.getSetting('WALLET_PUBLIC_KEY'),
txHash
);
elizaLogger.info("Generated tweet content:", tweetContent);
Expand Down

0 comments on commit bca9a14

Please sign in to comment.