@@ -35,15 +35,15 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
3535 console . log ( "Deploying to %s with deployer %s" , HomeChains [ chainId ] , deployer ) ;
3636
3737 if ( ! pnkByChain . get ( chainId ) ) {
38- const erc20Address = await deployERC20 ( hre , deployer , "PNK" ) ;
38+ const erc20Address = await deployERC20AndFaucet ( hre , deployer , "PNK" ) ;
3939 pnkByChain . set ( HomeChains [ HomeChains [ chainId ] ] , erc20Address ) ;
4040 }
4141 if ( ! daiByChain . get ( chainId ) ) {
42- const erc20Address = await deployERC20 ( hre , deployer , "DAI" ) ;
42+ const erc20Address = await deployERC20AndFaucet ( hre , deployer , "DAI" ) ;
4343 daiByChain . set ( HomeChains [ HomeChains [ chainId ] ] , erc20Address ) ;
4444 }
4545 if ( ! wethByChain . get ( chainId ) ) {
46- const erc20Address = await deployERC20 ( hre , deployer , "WETH" ) ;
46+ const erc20Address = await deployERC20AndFaucet ( hre , deployer , "WETH" ) ;
4747 wethByChain . set ( HomeChains [ HomeChains [ chainId ] ] , erc20Address ) ;
4848 }
4949
@@ -134,14 +134,20 @@ deployArbitration.skip = async ({ getChainId }) => {
134134 return ! HomeChains [ chainId ] ;
135135} ;
136136
137- const deployERC20 = async ( hre : HardhatRuntimeEnvironment , deployer : string , ticker : string ) => {
137+ const deployERC20AndFaucet = async ( hre : HardhatRuntimeEnvironment , deployer : string , ticker : string ) => {
138138 const { deploy } = hre . deployments ;
139139 const erc20 = await deploy ( ticker , {
140140 from : deployer ,
141141 contract : "TestERC20" ,
142142 args : [ ticker , ticker ] ,
143143 log : true ,
144144 } ) ;
145+ await deploy ( `${ ticker } Faucet` , {
146+ from : deployer ,
147+ contract : "Faucet" ,
148+ args : [ erc20 . address ] ,
149+ log : true ,
150+ } ) ;
145151 console . log ( "Deployed %s at %s" , ticker , erc20 . address ) ;
146152 return erc20 . address ;
147153} ;
0 commit comments