1- import { parseEther } from ' ethers/lib/utils' ;
1+ import { parseEther } from " ethers/lib/utils" ;
22
3- import { HardhatRuntimeEnvironment } from ' hardhat/types' ;
4- import { DeployFunction } from ' hardhat-deploy/types' ;
3+ import { HardhatRuntimeEnvironment } from " hardhat/types" ;
4+ import { DeployFunction } from " hardhat-deploy/types" ;
55
66import getContractAddress from "../deploy-helpers/getContractAddress" ;
77
88const FOREIGN_CHAIN_IDS = [ 1 , 4 ] ;
99const paramsByChainId = {
1010 1 : {
11- claimDeposit : parseEther ( ' 0.1' ) ,
11+ claimDeposit : parseEther ( " 0.1" ) ,
1212 challengeDuration : 86400 , // 1 day
1313 homeChainId : 42161 ,
1414 } ,
1515 4 : {
16- claimDeposit : parseEther ( ' 0.1' ) ,
16+ claimDeposit : parseEther ( " 0.1" ) ,
1717 challengeDuration : 3600 , // 1 hour
1818 homeChainId : 421611 ,
1919 } ,
2020} ;
2121
22- const deployForeignGateway : DeployFunction = async function ( hre : HardhatRuntimeEnvironment ) {
23- const { ethers, deployments, getNamedAccounts, getChainId, config} = hre ;
24- const { deploy} = deployments ;
22+ const deployForeignGateway : DeployFunction = async ( hre : HardhatRuntimeEnvironment ) => {
23+ const { ethers, deployments, getNamedAccounts, getChainId, config } = hre ;
24+ const { deploy } = deployments ;
2525 const { providers, constants } = ethers ;
2626 const { hexZeroPad } = hre . ethers . utils ;
2727
28- const { deployer } = await getNamedAccounts ( ) ;
28+ const { deployer } = await getNamedAccounts ( ) ;
2929 const chainId = await getChainId ( ) ;
3030
3131 const homeNetworks = {
@@ -36,7 +36,7 @@ const deployForeignGateway: DeployFunction = async function (hre: HardhatRuntime
3636 const homeChainProvider = new providers . JsonRpcProvider ( url ) ;
3737 const nonce = await homeChainProvider . getTransactionCount ( deployer ) ;
3838
39- const { claimDeposit, challengeDuration, homeChainId} = paramsByChainId [ chainId ] ;
39+ const { claimDeposit, challengeDuration, homeChainId } = paramsByChainId [ chainId ] ;
4040
4141 // home Gateway deploy tx will the third tx after this on it's network,
4242 // so we add two to the current nonce.
@@ -46,13 +46,13 @@ const deployForeignGateway: DeployFunction = async function (hre: HardhatRuntime
4646 console . log ( nonce + 2 ) ;
4747 console . log ( homeGatewayAddress ) ;
4848
49- let fastBridgeReceiver = await deploy ( ' FastBridgeReceiver' , {
49+ const fastBridgeReceiver = await deploy ( " FastBridgeReceiver" , {
5050 from : deployer ,
5151 args : [ deployer , claimDeposit , challengeDuration ] ,
5252 log : true ,
5353 } ) ;
5454
55- let foreignGateway = await deploy ( ' ForeignGateway' , {
55+ const foreignGateway = await deploy ( " ForeignGateway" , {
5656 from : deployer ,
5757 args : [ deployer , fastBridgeReceiver . address , [ "1000" , "10000" ] , homeGatewayAddress , homeChainIdAsBytes32 ] ,
5858 log : true ,
0 commit comments