Skip to content
Open
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
3 changes: 3 additions & 0 deletions .env.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Project
TOKEN_SYMBOL=string

# Alchemy
ALCHEMY_WEBHOOK_SIGNING_KEY_SWAP=string
ALCHEMY_WEBHOOK_SIGNING_KEY_TRANSFER=string
Expand Down
2 changes: 1 addition & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const constants = {
// the decimals of the token you want to track
TOKEN_DECIMALS: 18,
// the symbol of the token you want to track
TOKEN_SYMBOL: "POINTS",
TOKEN_SYMBOL: process.env.TOKEN_SYMBOL || "POINTS",
// the address of the Uniswap V3 Pool you want to track (for swaps)
TOKEN_UNISWAP_POOL_ADDRESS: "0xa424817985051ccda51eff2dc7998b5d68079215",
};
4 changes: 2 additions & 2 deletions src/controllers/webhooks/swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export async function processPoolSwapEvent(

const text = `@${farcasterIdentity} swapped ${
amountIn === tokensAmount
? `${formattedTokensAmount} $POINTS`
? `${formattedTokensAmount} $${constants.TOKEN_SYMBOL}`
: `${formattedWethAmount} $WETH`
} for ${
amountOut === tokensAmount
? `${formattedTokensAmount} $POINTS`
? `${formattedTokensAmount} $${constants.TOKEN_SYMBOL}`
: `${formattedWethAmount} $WETH`
}`;

Expand Down
2 changes: 1 addition & 1 deletion src/jobs/farcaster-holders-leaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const publishFarcasterLeaderboard = async (topK = 10) => {
index: index + 1,
}));

const text1 = `top 10 $points 🐳 on farcaster\n\n🥇 @${leaderboard[0].name}: ${leaderboard[0].amount} ($${leaderboard[0].dollarsAmount})\n\n🥈 @${leaderboard[1].name}: ${leaderboard[1].amount} ($${leaderboard[1].dollarsAmount})\n\n🥉 @${leaderboard[2].name}: ${leaderboard[2].amount} ($${leaderboard[2].dollarsAmount})\n\ncontinues...👇`;
const text1 = `top 10 $${constants.TOKEN_SYMBOL.toLowerCase()} 🐳 on farcaster\n\n🥇 @${leaderboard[0].name}: ${leaderboard[0].amount} ($${leaderboard[0].dollarsAmount})\n\n🥈 @${leaderboard[1].name}: ${leaderboard[1].amount} ($${leaderboard[1].dollarsAmount})\n\n🥉 @${leaderboard[2].name}: ${leaderboard[2].amount} ($${leaderboard[2].dollarsAmount})\n\ncontinues...👇`;

const text2 = getTextForLeaderboard(
leaderboard.slice(3, 6),
Expand Down
2 changes: 1 addition & 1 deletion src/jobs/token-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const publishTokenStats = async (): Promise<void> => {
constants.TOKEN_UNISWAP_POOL_ADDRESS
);

const text = `📈 $points stats: \n\n- market cap -> $${(
const text = `📈 $${constants.TOKEN_SYMBOL.toLowerCase()} stats: \n\n- market cap -> $${(
tokenPriceInfo.price * tokenInfo.totalSupply
).toLocaleString()}\n\n- volume (last 24h) -> $${poolPriceInfo.volume24h.toLocaleString()}\n\n- holders -> ${
tokenInfo.holders
Expand Down