11import type { Logger } from 'pino' ;
22
33import {
4- HypTokenRouterConfig ,
54 ChainMap ,
65 ChainMetadata ,
76 ChainName ,
7+ HypTokenRouterConfig ,
88 WarpCoreConfig ,
99 WarpRouteDeployConfig ,
10- isSyntheticTokenConfig ,
11- isSyntheticRebaseTokenConfig ,
1210} from '@hyperlane-xyz/sdk' ;
1311import { assert , objFilter , objLength } from '@hyperlane-xyz/utils' ;
12+ import { WARP_ROUTE_ID_REGEX } from '../consts.js' ;
1413import type {
1514 ChainAddresses ,
1615 MaybePromise ,
16+ UpdateChainParams ,
1717 WarpDeployConfigMap ,
1818 WarpRouteFilterParams ,
1919 WarpRouteId ,
20- UpdateChainParams ,
2120} from '../types.js' ;
2221import { WarpRouteConfigMap } from '../types.js' ;
2322import { stripLeadingSlash } from '../utils.js' ;
@@ -28,8 +27,7 @@ import type {
2827 RegistryType ,
2928} from './IRegistry.js' ;
3029import { MergedRegistry } from './MergedRegistry.js' ;
31- import { createWarpRouteConfigId , syntheticTokenStandards } from './warp-utils.js' ;
32- import { WARP_ROUTE_ID_REGEX } from '../consts.js' ;
30+ import { createWarpRouteConfigId } from './warp-utils.js' ;
3331
3432export abstract class BaseRegistry implements IRegistry {
3533 public abstract type : RegistryType ;
@@ -80,9 +78,7 @@ export abstract class BaseRegistry implements IRegistry {
8078 ) : WarpRouteId {
8179 assert ( config ?. tokens ?. length > 0 , 'Cannot generate ID for empty warp config' ) ;
8280
83- const syntheticTokens = config . tokens . filter ( ( token ) =>
84- syntheticTokenStandards . includes ( token . standard ) ,
85- ) ;
81+ const syntheticTokens = config . tokens . filter ( ( token ) => token . standard ?. includes ( 'Synthetic' ) ) ;
8682
8783 let warpRouteId ;
8884 if ( options && 'warpRouteId' in options ) {
@@ -138,10 +134,8 @@ export abstract class BaseRegistry implements IRegistry {
138134 static warpDeployConfigToId ( config : WarpRouteDeployConfig , options : AddWarpRouteConfigOptions ) {
139135 assert ( objLength ( config ) > 0 , 'Cannot generate ID for empty warp deploy config' ) ;
140136
141- const syntheticChains = objFilter (
142- config ,
143- ( _ , c ) : c is HypTokenRouterConfig =>
144- isSyntheticTokenConfig ( c ) || isSyntheticRebaseTokenConfig ( c ) ,
137+ const syntheticChains = objFilter ( config , ( _ , c ) : c is HypTokenRouterConfig =>
138+ c . type ?. includes ( 'synthetic' ) ,
145139 ) ;
146140 let warpRouteId ;
147141 if ( 'warpRouteId' in options ) {
0 commit comments