@@ -46,6 +46,8 @@ export const chainIdMapping: Record<string, number> = {
4646 zora : 7777777 ,
4747 monad : 143 ,
4848 hyperevm : 999 ,
49+ tempo : 4217 ,
50+ megaeth : 4326 ,
4951} ;
5052
5153// Response type from the Across Indexer API
@@ -285,29 +287,12 @@ const constructParams = (chain: string) => {
285287 } ;
286288} ;
287289
288- const adapter : BridgeAdapter = {
289- ethereum : constructParams ( "ethereum" ) ,
290- optimism : constructParams ( "optimism" ) ,
291- polygon : constructParams ( "polygon" ) ,
292- "zksync era" : constructParams ( "zksync era" ) ,
293- lisk : constructParams ( "lisk" ) ,
294- unichain : constructParams ( "unichain" ) ,
295- base : constructParams ( "base" ) ,
296- mode : constructParams ( "mode" ) ,
297- arbitrum : constructParams ( "arbitrum" ) ,
298- linea : constructParams ( "linea" ) ,
299- blast : constructParams ( "blast" ) ,
300- scroll : constructParams ( "scroll" ) ,
301- soneium : constructParams ( "soneium" ) ,
302- "world chain" : constructParams ( "world chain" ) ,
303- ink : constructParams ( "ink" ) ,
304- zora : constructParams ( "zora" ) ,
305- redstone : constructParams ( "redstone" ) ,
306- monad : constructParams ( "monad" ) ,
307- boba : constructParams ( "boba" ) ,
308- plasma : constructParams ( "plasma" ) ,
309- solana : constructParams ( "solana" ) ,
310- hyperevm : constructParams ( "hyperevm" ) ,
311- } ;
290+ export const chainIdToSlug : Record < number , string > = Object . fromEntries (
291+ Object . entries ( chainIdMapping ) . map ( ( [ slug , id ] ) => [ id , slug ] )
292+ ) as Record < number , string > ;
293+
294+ const adapter : BridgeAdapter = Object . fromEntries (
295+ Object . keys ( chainIdMapping ) . map ( ( chain ) => [ chain , constructParams ( chain ) ] )
296+ ) ;
312297
313298export default adapter ;
0 commit comments