import 'hardhat-watcher' ; import 'hardhat-deploy' ; import '@nomiclabs/hardhat-etherscan' ; import '@typechain/hardhat' ; import { HardhatUserConfig } from 'hardhat/config' ; import { getPrivateKeyWithEth } from '@statechannels/devtools' ; const infuraToken = process . env . INFURA_TOKEN ; const rinkebyDeployerPK = process . env . RINKEBY_DEPLOYER_PK ; const mainnetDeployerPK = process . env . MAINNET_DEPLOYER_PK ; if ( ! infuraToken ) { console . warn ( `Invalid infura token ${ infuraToken }` ) ; } if ( ! rinkebyDeployerPK ) { console . warn ( `Invalid rinkeby deploy private key ${ rinkebyDeployerPK }` ) ; } if ( ! mainnetDeployerPK ) { console . warn ( `Invalid mainnet deploy private key ${ mainnetDeployerPK }` ) ; } const config = { solidity : { compilers : [ { version : '0.7.4' , settings : { optimizer : { enabled : true , runs : 200 , } , } , } , ] , overrides : { 'contracts/examples/EmbeddedApplication.sol' : { version : '0.7.4' , settings : { optimizer : { enabled : false } , } , } , } , } , namedAccounts : { deployer : { default : 0 , rinkeby : 0 , } , } , paths : { sources : 'contracts' , deploy : 'hardhat-deploy' , deployments : 'hardhat-deployments' , } , watcher : { compilation : { tasks : [ 'compile' ] , verbose : true , } , } , networks : { rinkeby : { url : infuraToken ? 'https://rinkeby.infura.io/v3/' + infuraToken : '' , accounts : rinkebyDeployerPK ? [ rinkebyDeployerPK ] : undefined , chainId : 4 , } , mainnet : { url : infuraToken ? 'https://mainnet.infura.io/v3/' + infuraToken : '' , accounts : mainnetDeployerPK ? [ mainnetDeployerPK ] : undefined , chainId : 1 , } , arbitrum_testnet_v4 : { url : 'https://kovan4.arbitrum.io/rpc' , accounts : [ getPrivateKeyWithEth ( ) ] , chainId : 212984383488152 , } , hardhat : { hardfork : 'london' , } , } , etherscan : { apiKey : process . env . ETHERSCAN_API_KEY , } , } ; export default config ;