Use registry address. Fix Provider verify. Fix WalletProvider verify.

This commit is contained in:
David Racero 2020-12-01 10:29:30 +01:00
parent 57ee9e0a7c
commit 7bd0e9afd1

View File

@ -18,6 +18,7 @@ import {
} from '../../helpers/contracts-getters';
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
import { verifyContract } from '../../helpers/etherscan-verification';
import { notFalsyOrZeroAddress } from '../../helpers/misc-utils';
import { eEthereumNetwork, ICommonConfiguration } from '../../helpers/types';
task('verify:general', 'Deploy oracles for dev enviroment')
@ -27,10 +28,18 @@ task('verify:general', 'Deploy oracles for dev enviroment')
await localDRE.run('set-DRE');
const network = localDRE.network.name as eEthereumNetwork;
const poolConfig = loadPoolConfig(pool);
const {ReserveAssets, ReservesConfig} = poolConfig as ICommonConfiguration;
const {
ReserveAssets,
ReservesConfig,
ProviderRegistry,
MarketId,
} = poolConfig as ICommonConfiguration;
const registryAddress = getParamPerNetwork(ProviderRegistry, network);
const addressesProvider = await getLendingPoolAddressesProvider();
const addressesProviderRegistry = await getLendingPoolAddressesProviderRegistry();
const addressesProviderRegistry = notFalsyOrZeroAddress(registryAddress)
? await getLendingPoolAddressesProviderRegistry(registryAddress)
: await getLendingPoolAddressesProviderRegistry();
const lendingPoolProxy = await getLendingPool();
const lendingPoolConfigurator = await getLendingPoolConfiguratorProxy();
const lendingPoolCollateralManager = await getLendingPoolCollateralManager();
@ -45,7 +54,7 @@ task('verify:general', 'Deploy oracles for dev enviroment')
// Address Provider
console.log('\n- Verifying address provider...\n');
await verifyContract(addressesProvider.address, []);
await verifyContract(addressesProvider.address, [MarketId]);
// Address Provider Registry
console.log('\n- Verifying address provider registry...\n');
@ -69,7 +78,7 @@ task('verify:general', 'Deploy oracles for dev enviroment')
// Wallet balance provider
console.log('\n- Verifying Wallet Balance Provider...\n');
await verifyContract(walletProvider.address, [addressesProvider.address]);
await verifyContract(walletProvider.address, []);
// WETHGateway
console.log('\n- Verifying WETHGateway...\n');