@@ -35,15 +35,15 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
35
35
console . log ( "Deploying to %s with deployer %s" , HomeChains [ chainId ] , deployer ) ;
36
36
37
37
if ( ! pnkByChain . get ( chainId ) ) {
38
- const erc20Address = await deployERC20 ( hre , deployer , "PNK" ) ;
38
+ const erc20Address = await deployERC20AndFaucet ( hre , deployer , "PNK" ) ;
39
39
pnkByChain . set ( HomeChains [ HomeChains [ chainId ] ] , erc20Address ) ;
40
40
}
41
41
if ( ! daiByChain . get ( chainId ) ) {
42
- const erc20Address = await deployERC20 ( hre , deployer , "DAI" ) ;
42
+ const erc20Address = await deployERC20AndFaucet ( hre , deployer , "DAI" ) ;
43
43
daiByChain . set ( HomeChains [ HomeChains [ chainId ] ] , erc20Address ) ;
44
44
}
45
45
if ( ! wethByChain . get ( chainId ) ) {
46
- const erc20Address = await deployERC20 ( hre , deployer , "WETH" ) ;
46
+ const erc20Address = await deployERC20AndFaucet ( hre , deployer , "WETH" ) ;
47
47
wethByChain . set ( HomeChains [ HomeChains [ chainId ] ] , erc20Address ) ;
48
48
}
49
49
@@ -134,14 +134,20 @@ deployArbitration.skip = async ({ getChainId }) => {
134
134
return ! HomeChains [ chainId ] ;
135
135
} ;
136
136
137
- const deployERC20 = async ( hre : HardhatRuntimeEnvironment , deployer : string , ticker : string ) => {
137
+ const deployERC20AndFaucet = async ( hre : HardhatRuntimeEnvironment , deployer : string , ticker : string ) => {
138
138
const { deploy } = hre . deployments ;
139
139
const erc20 = await deploy ( ticker , {
140
140
from : deployer ,
141
141
contract : "TestERC20" ,
142
142
args : [ ticker , ticker ] ,
143
143
log : true ,
144
144
} ) ;
145
+ await deploy ( `${ ticker } Faucet` , {
146
+ from : deployer ,
147
+ contract : "Faucet" ,
148
+ args : [ erc20 . address ] ,
149
+ log : true ,
150
+ } ) ;
145
151
console . log ( "Deployed %s at %s" , ticker , erc20 . address ) ;
146
152
return erc20 . address ;
147
153
} ;
0 commit comments