mirror of
				https://github.com/Instadapp/aave-protocol-v2.git
				synced 2024-07-29 21:47:30 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { task } from 'hardhat/config';
 | |
| import {
 | |
|   deployLendingPoolAddressesProvider,
 | |
|   deployLendingPoolAddressesProviderRegistry,
 | |
| } from '../../helpers/contracts-deployments';
 | |
| import { getEthersSigners } from '../../helpers/contracts-helpers';
 | |
| import { waitForTx } from '../../helpers/misc-utils';
 | |
| import { AaveConfig } from '../../markets/aave';
 | |
| 
 | |
| task(
 | |
|   'dev:deploy-address-provider',
 | |
|   'Deploy address provider, registry and fee provider for dev enviroment'
 | |
| )
 | |
|   .addFlag('verify', 'Verify contracts at Etherscan')
 | |
|   .setAction(async ({ verify }, localBRE) => {
 | |
|     await localBRE.run('set-DRE');
 | |
| 
 | |
|     const admin = await (await getEthersSigners())[0].getAddress();
 | |
| 
 | |
|     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(
 | |
|       await addressesProviderRegistry.registerAddressesProvider(addressesProvider.address, 1)
 | |
|     );
 | |
|   });
 | 
