File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
1
import fs from "node:fs"
2
- import type { Address } from "viem"
2
+ import { type Address , isAddressEqual } from "viem"
3
3
4
4
export type TokenListItem = {
5
5
addressInfo : Address
@@ -33,6 +33,27 @@ const cache: Record<number, TokenListItem[]> = {}
33
33
fs . readFileSync ( `${ dir } /${ file } ` ) . toString ( ) ,
34
34
) as TokenListItem [ ]
35
35
}
36
+
37
+ if (
38
+ ! cache [ 1923 ] . find ( ( t ) =>
39
+ isAddressEqual (
40
+ t . addressInfo ,
41
+ "0x9ab96A4668456896d45c301Bc3A15Cee76AA7B8D" ,
42
+ ) ,
43
+ )
44
+ ) {
45
+ // TODO add external tokens sources
46
+ cache [ 1923 ] . push ( {
47
+ addressInfo : "0x9ab96A4668456896d45c301Bc3A15Cee76AA7B8D" ,
48
+ chainId : 1923 ,
49
+ name : "rUSDC" ,
50
+ symbol : "rUSDC" ,
51
+ decimals : 6 ,
52
+ logoURI :
53
+ "https://assets.coingecko.com/coins/images/55061/standard/rUSDC-_200x200.png?1743524727" ,
54
+ meta : { } ,
55
+ } )
56
+ }
36
57
} ) ( )
37
58
38
59
export default function getTokenList ( chainId : number ) : TokenListItem [ ] {
You can’t perform that action at this time.
0 commit comments