diff --git a/hardhat.config.ts b/hardhat.config.ts index 7398222d..76c6e3c9 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -23,7 +23,6 @@ const MNEMONIC = process.env.MNEMONIC || ''; // Prevent to load scripts before compilation and typechain if (!SKIP_LOAD) { - console.log('NOT SKPP'); ['misc', 'migrations', 'dev', 'full'].forEach((folder) => { const tasksPath = path.join(__dirname, 'tasks', folder); fs.readdirSync(tasksPath) diff --git a/helpers/configuration.ts b/helpers/configuration.ts index 8faea63f..74f0d027 100644 --- a/helpers/configuration.ts +++ b/helpers/configuration.ts @@ -87,11 +87,13 @@ export const getWethAddress = async (config: ICommonConfiguration) => { const currentNetwork = DRE.network.name; const wethAddress = getParamPerNetwork(config.WETH, currentNetwork); if (wethAddress) { + console.log('here', wethAddress); return wethAddress; } if (currentNetwork.includes('main')) { throw new Error('WETH not set at mainnet configuration.'); } const weth = await deployWETHMocked(); + console.log('here2'); return weth.address; }; diff --git a/helpers/contracts-deployments.ts b/helpers/contracts-deployments.ts index a8185ff3..daacfde4 100644 --- a/helpers/contracts-deployments.ts +++ b/helpers/contracts-deployments.ts @@ -52,12 +52,13 @@ import {withSaveAndVerify, registerContractInJsonDb, linkBytecode} from './contr import {StableAndVariableTokensHelperFactory} from '../types/StableAndVariableTokensHelperFactory'; import {MintableDelegationErc20} from '../types/MintableDelegationErc20'; import {readArtifact as buidlerReadArtifact} from '@nomiclabs/buidler/plugins'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const readArtifact = async (id: string) => { if (DRE.network.name === eEthereumNetwork.buidlerevm) { return buidlerReadArtifact(DRE.config.paths.artifacts, id); } - return DRE.artifacts.readArtifact(id); + return (DRE as HardhatRuntimeEnvironment).artifacts.readArtifact(id); }; export const deployLendingPoolAddressesProvider = async (verify?: boolean) => withSaveAndVerify( diff --git a/helpers/contracts-helpers.ts b/helpers/contracts-helpers.ts index d651080e..25624634 100644 --- a/helpers/contracts-helpers.ts +++ b/helpers/contracts-helpers.ts @@ -125,14 +125,14 @@ export const getParamPerNetwork = ( return coverage; case eEthereumNetwork.buidlerevm: return buidlerevm; + case eEthereumNetwork.hardhat: + return buidlerevm; case eEthereumNetwork.kovan: return kovan; case eEthereumNetwork.ropsten: return ropsten; case eEthereumNetwork.main: return main; - default: - return main; } };