mirror of
				https://github.com/Instadapp/aave-protocol-v2.git
				synced 2024-07-29 21:47:30 +00:00 
			
		
		
		
	feat: curve treasury script add AaveCollector from config
This commit is contained in:
		
							parent
							
								
									53dc34abd7
								
							
						
					
					
						commit
						3a452e9aef
					
				|  | @ -1,4 +1,5 @@ | |||
| import { task } from 'hardhat/config'; | ||||
| import { loadPoolConfig } from '../../helpers/configuration'; | ||||
| import { CRV_TOKEN, CURVE_CONFIG, ZERO_ADDRESS } from '../../helpers/constants'; | ||||
| import { | ||||
|   deployCurveTreasury, | ||||
|  | @ -9,23 +10,31 @@ import { waitForTx } from '../../helpers/misc-utils'; | |||
| task(`deploy-curve-treasury`, `Deploys the CurveTreasury contract`) | ||||
|   .addParam('proxyAdmin') | ||||
|   .addParam('treasuryAdmin') | ||||
|   .addParam('pool') | ||||
|   .addFlag('verify', `Verify contract via Etherscan API.`) | ||||
|   .setAction(async ({ verify, proxyAdmin, treasuryAdmin }, localBRE) => { | ||||
|   .setAction(async ({ verify, proxyAdmin, treasuryAdmin, pool }, localBRE) => { | ||||
|     await localBRE.run('set-DRE'); | ||||
|     const poolConfig = loadPoolConfig(pool); | ||||
| 
 | ||||
|     const net = localBRE.network.name; | ||||
|     console.log(`\n- Curve Treasury deployment`); | ||||
| 
 | ||||
|     // Deploy implementation
 | ||||
|     const implementation = await deployCurveTreasury( | ||||
|       CURVE_CONFIG.votingEscrow[net], | ||||
|       CRV_TOKEN[net], | ||||
|       CURVE_CONFIG.curveFeeDistributor[net], | ||||
|       CURVE_CONFIG.gaugeController[net], | ||||
|       ZERO_ADDRESS, | ||||
|       poolConfig.ReserveFactorTreasuryAddress[net], | ||||
|       verify | ||||
|     ); | ||||
| 
 | ||||
|     // Freeze implementatation
 | ||||
|     await waitForTx(await implementation.initialize(ZERO_ADDRESS, [], [], [])); | ||||
| 
 | ||||
|     // Deploy proxy
 | ||||
|     const proxy = await deployInitializableAdminUpgradeabilityProxy(verify); | ||||
| 
 | ||||
|     const encoded = implementation.interface.encodeFunctionData('initialize', [ | ||||
|       treasuryAdmin, | ||||
|       [], | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 David Racero
						David Racero