Fix verification tasks

This commit is contained in:
David Racero 2020-12-02 09:28:55 +01:00
parent 86db408af5
commit f5d0ce14bb
2 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,11 @@
import { zeroAddress } from 'ethereumjs-util';
import { task } from 'hardhat/config';
import { loadPoolConfig, ConfigNames, getWethAddress } from '../../helpers/configuration';
import {
loadPoolConfig,
ConfigNames,
getWethAddress,
getTreasuryAddress,
} from '../../helpers/configuration';
import { ZERO_ADDRESS } from '../../helpers/constants';
import {
getAaveProtocolDataProvider,
@ -34,6 +39,7 @@ task('verify:general', 'Deploy oracles for dev enviroment')
ProviderRegistry,
MarketId,
} = poolConfig as ICommonConfiguration;
const treasuryAddress = await getTreasuryAddress(poolConfig);
const registryAddress = getParamPerNetwork(ProviderRegistry, network);
const addressesProvider = await getLendingPoolAddressesProvider();
@ -146,7 +152,7 @@ task('verify:general', 'Deploy oracles for dev enviroment')
await verifyContract(aDAI, [
lendingPoolProxy.address,
DAI,
ZERO_ADDRESS,
treasuryAddress,
'Aave interest bearing DAI',
'aDAI',
ZERO_ADDRESS,
@ -176,7 +182,7 @@ task('verify:general', 'Deploy oracles for dev enviroment')
await verifyContract(aUNI, [
lendingPoolProxy.address,
UNI,
ZERO_ADDRESS,
treasuryAddress,
'Aave interest bearing UNI',
'aUNI',
ZERO_ADDRESS,

View File

@ -1,5 +1,10 @@
import { task } from 'hardhat/config';
import { loadPoolConfig, ConfigNames, getWethAddress } from '../../helpers/configuration';
import {
loadPoolConfig,
ConfigNames,
getWethAddress,
getTreasuryAddress,
} from '../../helpers/configuration';
import { ZERO_ADDRESS } from '../../helpers/constants';
import {
getAddressById,
@ -18,6 +23,7 @@ task('verify:tokens', 'Deploy oracles for dev enviroment')
const network = localDRE.network.name as eEthereumNetwork;
const poolConfig = loadPoolConfig(pool);
const { ReserveAssets, ReservesConfig } = poolConfig as ICommonConfiguration;
const treasuryAddress = await getTreasuryAddress(poolConfig);
const addressesProvider = await getLendingPoolAddressesProvider();
const lendingPoolProxy = await getLendingPool();
@ -82,7 +88,7 @@ task('verify:tokens', 'Deploy oracles for dev enviroment')
await verifyContract(aToken, [
lendingPoolProxy.address,
tokenAddress,
ZERO_ADDRESS,
treasuryAddress,
`Aave interest bearing ${token}`,
`a${token}`,
ZERO_ADDRESS,