@@ -373,7 +373,7 @@ export async function runWarpRouteApply(
373373 params : WarpApplyParams ,
374374) : Promise < void > {
375375 const { warpDeployConfig, warpCoreConfig, context } = params ;
376- const { chainMetadata, skipConfirmation } = context ;
376+ const { chainMetadata, skipConfirmation, multiProvider } = context ;
377377
378378 WarpRouteDeployConfigSchema . parse ( warpDeployConfig ) ;
379379 WarpCoreConfigSchema . parse ( warpCoreConfig ) ;
@@ -394,10 +394,18 @@ export async function runWarpRouteApply(
394394 // temporarily configure deployer as owner so that warp update after extension
395395 // can leverage JSON RPC submitter on new chains
396396 const intermediateOwnerConfig = await promiseObjAll (
397- objMap ( params . warpDeployConfig , async ( chain , config ) => ( {
398- ...config ,
399- owner : await multiProtocolSigner . getSignerAddress ( chain ) ,
400- } ) ) ,
397+ objMap ( params . warpDeployConfig , async ( chain , config ) => {
398+ const protocolType = multiProvider . getProtocol ( chain ) ;
399+
400+ if ( ! COMPATIBLE_PROTOCOLS . includes ( protocolType ) ) {
401+ return config ;
402+ }
403+
404+ return {
405+ ...config ,
406+ owner : await multiProtocolSigner . getSignerAddress ( chain ) ,
407+ } ;
408+ } ) ,
401409 ) ;
402410
403411 // Extend the warp route and get the updated configs
@@ -636,14 +644,20 @@ async function updateExistingWarpRoute(
636644 await promiseObjAll (
637645 objMap ( expandedWarpDeployConfig , async ( chain , config ) => {
638646 await retryAsync ( async ( ) => {
647+ const protocolType = multiProvider . getProtocol ( chain ) ;
648+ if ( ! COMPATIBLE_PROTOCOLS . includes ( protocolType ) ) {
649+ logBlue ( `Skipping non-compatible chain ${ chain } ` ) ;
650+ return ;
651+ }
652+
639653 const deployedTokenRoute = deployedRoutersAddresses [ chain ] ;
640654 assert ( deployedTokenRoute , `Missing artifacts for ${ chain } .` ) ;
641655 const configWithMailbox = {
642656 ...config ,
643657 mailbox : registryAddresses [ chain ] . mailbox ,
644658 } ;
645659
646- switch ( multiProvider . getProtocol ( chain ) ) {
660+ switch ( protocolType ) {
647661 case ProtocolType . Ethereum : {
648662 const evmERC20WarpModule = new EvmERC20WarpModule (
649663 multiProvider ,
@@ -683,10 +697,6 @@ async function updateExistingWarpRoute(
683697 updateTransactions [ chain ] = transactions ;
684698 break ;
685699 }
686- default : {
687- logBlue ( `Skipping non-compatible chain ${ chain } ` ) ;
688- return ;
689- }
690700 }
691701 } ) ;
692702 } ) ,
0 commit comments