File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ import {
6
6
ACCOUNTANT_CONTRACT_ADDRESS ,
7
7
AccountEntry ,
8
8
assertEnvironmentVariable ,
9
+ isTokenDenylisted ,
9
10
TokenMetaDatum ,
10
11
} from '@wormhole-foundation/wormhole-monitor-common' ;
12
+ import { toChain , toChainId } from '@wormhole-foundation/sdk-base' ;
11
13
12
14
const WORMCHAIN_URLS : string [ ] = [
13
15
'https://gateway.mainnet.xlabs.xyz' ,
@@ -115,6 +117,11 @@ async function populateMaps() {
115
117
const metaData : TokenMetaDatum [ ] = await getTokenMetadata ( ) ;
116
118
console . log ( `Got ${ metaData . length } token metadata entries` ) ;
117
119
for ( const md of metaData ) {
120
+ try {
121
+ if ( isTokenDenylisted ( toChainId ( toChain ( md . token_chain ) ) , md . native_address ) ) continue ;
122
+ } catch ( e ) {
123
+ // The metadata table has a chain that the SDK doesn't know about, yet. Don't want to fail or skip the token.
124
+ }
118
125
const key = `${ md . token_chain } /${ md . token_address } ` ;
119
126
// wormhole supports a maximum of 8 decimals
120
127
if ( md . decimals > 8 ) {
You can’t perform that action at this time.
0 commit comments