fix: local dev deployment

This commit is contained in:
David Racero 2021-05-10 10:47:24 +02:00
parent e41a18c33a
commit a89598671f
3 changed files with 13 additions and 6 deletions

View File

@ -18,6 +18,7 @@ task(
const addressesProvider = await deployLendingPoolAddressesProvider(AaveConfig.MarketId, verify);
await waitForTx(await addressesProvider.setPoolAdmin(admin));
await waitForTx(await addressesProvider.setEmergencyAdmin(admin));
const addressesProviderRegistry = await deployLendingPoolAddressesProviderRegistry(verify);
await waitForTx(

View File

@ -4,7 +4,6 @@ import {
deployMockFlashLoanReceiver,
deployWalletBalancerProvider,
deployAaveProtocolDataProvider,
deployWETHGateway,
authorizeWETHGateway,
} from '../../helpers/contracts-deployments';
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
@ -13,18 +12,18 @@ import {
ConfigNames,
getReservesConfigByPool,
getTreasuryAddress,
getWethAddress,
loadPoolConfig,
} from '../../helpers/configuration';
import { tEthereumAddress, AavePools, eContractid } from '../../helpers/types';
import { waitForTx, filterMapBy } from '../../helpers/misc-utils';
import { waitForTx, filterMapBy, notFalsyOrZeroAddress } from '../../helpers/misc-utils';
import { configureReservesByHelper, initReservesByHelper } from '../../helpers/init-helpers';
import { getAllTokenAddresses } from '../../helpers/mock-helpers';
import { ZERO_ADDRESS } from '../../helpers/constants';
import {
getAllMockedTokens,
getLendingPoolAddressesProvider,
getWETHGateway,
} from '../../helpers/contracts-getters';
import { insertContractAddressInDb } from '../../helpers/contracts-helpers';
@ -92,6 +91,10 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.')
await insertContractAddressInDb(eContractid.AaveProtocolDataProvider, testHelpers.address);
const lendingPoolAddress = await addressesProvider.getLendingPool();
const gateWay = await getParamPerNetwork(WethGateway, network);
await authorizeWETHGateway(gateWay, lendingPoolAddress);
let gateway = getParamPerNetwork(WethGateway, network);
if (!notFalsyOrZeroAddress(gateway)) {
gateway = (await getWETHGateway()).address;
}
await authorizeWETHGateway(gateway, lendingPoolAddress);
});

View File

@ -29,7 +29,10 @@ task('aave:dev', 'Deploy development enviroment')
console.log('4. Deploy oracles');
await localBRE.run('dev:deploy-oracles', { verify, pool: POOL_NAME });
console.log('5. Initialize lending pool');
console.log('5. Deploy WETH Gateway');
await localBRE.run('full-deploy-weth-gateway', { verify, pool: POOL_NAME });
console.log('6. Initialize lending pool');
await localBRE.run('dev:initialize-lending-pool', { verify, pool: POOL_NAME });
console.log('\nFinished migration');