@@ -13,16 +13,26 @@ const loserAppealPeriodMultiplier = 5000;
1313async function getHomeDeployments ( { companionNetworks, homeNetworkName, homeChainId } ) {
1414 let homeNetwork ;
1515 for await ( const [ key , network ] of Object . entries ( companionNetworks ) )
16- if ( key . startsWith ( "home" ) && String ( await network . getChainId ( ) ) === String ( homeChainId ) ) homeNetwork = network ;
16+ if ( key . startsWith ( "home" ) && String ( await network . getChainId ( ) ) === String ( homeChainId ) )
17+ homeNetwork = network ;
1718 if ( ! homeNetwork ) throw new Error ( `Home network ${ homeNetworkName } not configured correctly` ) ;
1819 return homeNetwork . deployments ;
1920}
2021
21- async function deployForeignProxy ( { deployments, getChainId, ethers, companionNetworks, config, network } ) {
22+ async function deployForeignProxy ( {
23+ deployments,
24+ getChainId,
25+ ethers,
26+ companionNetworks,
27+ config,
28+ network,
29+ } ) {
2230 const homeNetworkName = process . env . HOME_NETWORK ;
2331 if ( ! homeNetworkName ) throw new Error ( "HOME_NETWORK environment variable must be set" ) ;
2432 const proxyConfigs = [ arbitrumProxy , gnosisProxy , optimismProxy , polygonProxy , zksyncProxy ] ;
25- const proxyConfig = proxyConfigs . find ( ( config ) => config . supportedHomeChains . includes ( homeNetworkName ) ) ;
33+ const proxyConfig = proxyConfigs . find ( ( config ) =>
34+ config . supportedHomeChains . includes ( homeNetworkName )
35+ ) ;
2636 if ( ! proxyConfig ) {
2737 throw new Error ( `No foreign proxy configuration supports home network ${ homeNetworkName } ` ) ;
2838 }
@@ -37,7 +47,11 @@ async function deployForeignProxy({ deployments, getChainId, ethers, companionNe
3747 const parameters = proxyConfig . foreignParameters [ homeNetworkName ] ;
3848 const homeProxyName = proxyConfig . getHomeProxyName ( homeNetworkName ) ;
3949 const homeChainId = config . networks [ homeNetworkName ] . chainId ;
40- const homeDeployments = await getHomeDeployments ( { companionNetworks, homeNetworkName, homeChainId } ) ;
50+ const homeDeployments = await getHomeDeployments ( {
51+ companionNetworks,
52+ homeNetworkName,
53+ homeChainId,
54+ } ) ;
4155 const homeProxy = await homeDeployments . get ( homeProxyName ) . then ( ( homeProxy ) => homeProxy . address ) ;
4256
4357 const foreignProxy = await proxyConfig . deployForeignProxy ( {
@@ -56,6 +70,7 @@ async function deployForeignProxy({ deployments, getChainId, ethers, companionNe
5670}
5771
5872deployForeignProxy . tags = [ "ForeignChain" ] ;
59- deployForeignProxy . skip = async ( { getChainId } ) => ! FOREIGN_CHAIN_IDS . includes ( Number ( await getChainId ( ) ) ) ;
73+ deployForeignProxy . skip = async ( { getChainId } ) =>
74+ ! FOREIGN_CHAIN_IDS . includes ( Number ( await getChainId ( ) ) ) ;
6075
6176module . exports = deployForeignProxy ;
0 commit comments