-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ifxijg stuff * deploying the new strategy implementation
- Loading branch information
Showing
5 changed files
with
387 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
import { CONTRACTS_ADDRESSES, Interfaces } from '@angleprotocol/sdk'; | ||
import { BigNumber, Contract } from 'ethers'; | ||
import { AaveFlashloanStrategy__factory, PoolManager } from '../typechain'; | ||
|
||
const func: DeployFunction = async ({ deployments, ethers }) => { | ||
const { deploy } = deployments; | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
const governor = CONTRACTS_ADDRESSES[1].GovernanceMultiSig as string; | ||
const guardian = CONTRACTS_ADDRESSES[1].Guardian as string; | ||
const proxyAdmin = '0x1D941EF0D3Bba4ad67DBfBCeE5262F4CEE53A32b'; | ||
const flashMintLib = '0x169487a55dE79476125A56B07C36cA8dbF37a373'; // (await deployments.getOrNull('FlashMintLib')).address | ||
|
||
const collats: { [key: string]: { interestRateStrategyAddress: string } } = { | ||
DAI: { | ||
interestRateStrategyAddress: '0xfffE32106A68aA3eD39CcCE673B646423EEaB62a', | ||
}, | ||
// USDC: { | ||
// interestRateStrategyAddress: '0x8Cae0596bC1eD42dc3F04c4506cfe442b3E74e27', | ||
// }, | ||
}; | ||
|
||
const keeper = '0xcC617C6f9725eACC993ac626C7efC6B96476916E'; | ||
|
||
let strategyImplementation = await deployments.getOrNull('AaveFlashloanStrategy_NewImplementation'); | ||
|
||
if (!strategyImplementation) { | ||
strategyImplementation = await deploy('AaveFlashloanStrategy_NewImplementation', { | ||
contract: 'AaveFlashloanStrategy', | ||
from: deployer.address, | ||
args: [], | ||
libraries: { FlashMintLib: flashMintLib }, | ||
}); | ||
console.log('success: deployed strategy implementation', strategyImplementation.address); | ||
} else { | ||
console.log('strategy implementation already deployed: ', strategyImplementation.address); | ||
} | ||
}; | ||
|
||
func.tags = ['aave_flashloan_strategy_upgrade']; | ||
export default func; |
149 changes: 98 additions & 51 deletions
149
deployments/mainnet/AaveFlashloanStrategy_NewImplementation.json
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.