Skip to content

Commit

Permalink
trustscore updates
Browse files Browse the repository at this point in the history
Signed-off-by: MarcoMandar <malicemandar@gmail.com>
  • Loading branch information
MarcoMandar committed Nov 25, 2024
1 parent 5877e42 commit 2d93baa
Show file tree
Hide file tree
Showing 2 changed files with 303 additions and 92 deletions.
9 changes: 6 additions & 3 deletions packages/plugin-solana/src/providers/trustScoreProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ export class TrustScoreManager {
rapidDump: isRapidDump,
suspiciousVolume: suspiciousVolume,
validationTrust: validationTrustScore,
balance: balance,
initialMarketCap:
processedData.dexScreenerData.pairs[0]?.marketCap || 0,
lastUpdated: new Date(),
},
recommenderMetrics: {
Expand Down Expand Up @@ -396,7 +399,7 @@ export class TrustScoreManager {
initialMarketCap:
processedData.dexScreenerData.pairs[0]?.marketCap || 0,
initialLiquidity:
processedData.dexScreenerData.pairs[0]?.liquidity || 0,
processedData.dexScreenerData.pairs[0]?.liquidity?.usd || 0,
initialPrice: processedData.tradeData.price,
};
this.trustScoreDb.addTokenRecommendation(tokenRecommendation);
Expand Down Expand Up @@ -431,7 +434,7 @@ export class TrustScoreManager {
const hash = Math.random().toString(36).substring(7);
const transaction = {
tokenAddress: tokenAddress,
type: "buy",
type: "buy" as "buy" | "sell",
transactionHash: hash,
amount: data.buy_amount,
price: processedData.tradeData.price,
Expand Down Expand Up @@ -575,7 +578,7 @@ export class TrustScoreManager {
const hash = Math.random().toString(36).substring(7);
const transaction = {
tokenAddress: tokenAddress,
type: "sell",
type: "sell" as "buy" | "sell",
transactionHash: hash,
amount: sellDetails.sell_amount,
price: processedData.tradeData.price,
Expand Down
Loading

0 comments on commit 2d93baa

Please sign in to comment.