@@ -53,7 +53,9 @@ export class TokenProvider {
53
53
54
54
if ( ! response . ok ) {
55
55
throw new Error (
56
- `HTTP error! status: ${ response . status } , message: ${ await response . text ( ) } `
56
+ `HTTP error! status: ${
57
+ response . status
58
+ } , message: ${ await response . text ( ) } `
57
59
) ;
58
60
}
59
61
@@ -74,8 +76,9 @@ export class TokenProvider {
74
76
75
77
// TODO: Update to Starknet
76
78
async getTokensInWallet ( runtime : IAgentRuntime ) : Promise < Item [ ] > {
77
- const walletInfo =
78
- await this . walletProvider . fetchPortfolioValue ( runtime ) ;
79
+ const walletInfo = await this . walletProvider . fetchPortfolioValue (
80
+ runtime
81
+ ) ;
79
82
const items = walletInfo . items ;
80
83
return items ;
81
84
}
@@ -136,8 +139,8 @@ export class TokenProvider {
136
139
token === STRK
137
140
? "starknet"
138
141
: token === BTC
139
- ? "bitcoin"
140
- : "ethereum" ;
142
+ ? "bitcoin"
143
+ : "ethereum" ;
141
144
142
145
prices [ priceKey ] . usd = tokenInfo . market . currentPrice . toString ( ) ;
143
146
} ) ;
@@ -464,7 +467,9 @@ export class TokenProvider {
464
467
const limit = 1000 ;
465
468
let cursor ;
466
469
//HELIOUS_API_KEY needs to be added
467
- const url = `https://mainnet.helius-rpc.com/?api-key=${ settings . HELIUS_API_KEY || "" } ` ;
470
+ const url = `https://mainnet.helius-rpc.com/?api-key=${
471
+ settings . HELIUS_API_KEY || ""
472
+ } `;
468
473
console . log ( { url } ) ;
469
474
470
475
try {
@@ -505,7 +510,9 @@ export class TokenProvider {
505
510
data . result . token_accounts . length === 0
506
511
) {
507
512
console . log (
508
- `No more holders found. Total pages fetched: ${ page - 1 } `
513
+ `No more holders found. Total pages fetched: ${
514
+ page - 1
515
+ } `
509
516
) ;
510
517
break ;
511
518
}
@@ -619,8 +626,9 @@ export class TokenProvider {
619
626
console . log (
620
627
`Filtering high-value holders for token: ${ this . tokenAddress } `
621
628
) ;
622
- const highValueHolders =
623
- await this . filterHighValueHolders ( tradeData ) ;
629
+ const highValueHolders = await this . filterHighValueHolders (
630
+ tradeData
631
+ ) ;
624
632
625
633
console . log (
626
634
`Checking recent trades for token: ${ this . tokenAddress } `
@@ -632,8 +640,9 @@ export class TokenProvider {
632
640
console . log (
633
641
`Counting high-supply holders for token: ${ this . tokenAddress } `
634
642
) ;
635
- const highSupplyHoldersCount =
636
- await this . countHighSupplyHolders ( security ) ;
643
+ const highSupplyHoldersCount = await this . countHighSupplyHolders (
644
+ security
645
+ ) ;
637
646
638
647
console . log (
639
648
`Determining DexScreener listing status for token: ${ this . tokenAddress } `
@@ -748,25 +757,39 @@ export class TokenProvider {
748
757
output += `\n` ;
749
758
750
759
// Recent Trades
751
- output += `**Recent Trades (Last 24h):** ${ data . recentTrades ? "Yes" : "No" } \n\n` ;
760
+ output += `**Recent Trades (Last 24h):** ${
761
+ data . recentTrades ? "Yes" : "No"
762
+ } \n\n`;
752
763
753
764
// High-Supply Holders
754
765
output += `**Holders with >2% Supply:** ${ data . highSupplyHoldersCount } \n\n` ;
755
766
756
767
// DexScreener Status
757
- output += `**DexScreener Listing:** ${ data . isDexScreenerListed ? "Yes" : "No" } \n` ;
768
+ output += `**DexScreener Listing:** ${
769
+ data . isDexScreenerListed ? "Yes" : "No"
770
+ } \n`;
758
771
if ( data . isDexScreenerListed ) {
759
- output += `- Listing Type: ${ data . isDexScreenerPaid ? "Paid" : "Free" } \n` ;
772
+ output += `- Listing Type: ${
773
+ data . isDexScreenerPaid ? "Paid" : "Free"
774
+ } \n`;
760
775
output += `- Number of DexPairs: ${ data . dexScreenerData . pairs . length } \n\n` ;
761
776
output += `**DexScreener Pairs:**\n` ;
762
777
data . dexScreenerData . pairs . forEach ( ( pair , index ) => {
763
778
output += `\n**Pair ${ index + 1 } :**\n` ;
764
779
output += `- DEX: ${ pair . dexId } \n` ;
765
780
output += `- URL: ${ pair . url } \n` ;
766
- output += `- Price USD: $${ num . toBigInt ( pair . priceUsd ) . toString ( ) } \n` ;
767
- output += `- Volume (24h USD): $${ num . toBigInt ( pair . volume . h24 ) . toString ( ) } \n` ;
768
- output += `- Boosts Active: ${ pair . boosts && pair . boosts . active } \n` ;
769
- output += `- Liquidity USD: $${ num . toBigInt ( pair . liquidity . usd ) . toString ( ) } \n` ;
781
+ output += `- Price USD: $${ num
782
+ . toBigInt ( pair . priceUsd )
783
+ . toString ( ) } \n`;
784
+ output += `- Volume (24h USD): $${ num
785
+ . toBigInt ( pair . volume . h24 )
786
+ . toString ( ) } \n`;
787
+ output += `- Boosts Active: ${
788
+ pair . boosts && pair . boosts . active
789
+ } \n`;
790
+ output += `- Liquidity USD: $${ num
791
+ . toBigInt ( pair . liquidity . usd )
792
+ . toString ( ) } \n`;
770
793
} ) ;
771
794
}
772
795
output += `\n` ;
0 commit comments