Skip to content

Commit

Permalink
Stable master upgrade (#31)
Browse files Browse the repository at this point in the history
* ifxijg stuff

* deploying the new strategy implementation
  • Loading branch information
sogipec authored May 16, 2022
1 parent 158c8b7 commit 62a1ba9
Show file tree
Hide file tree
Showing 5 changed files with 387 additions and 52 deletions.
42 changes: 42 additions & 0 deletions deploy/StrategyAaveFlashLoanImplementation.ts
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 deployments/mainnet/AaveFlashloanStrategy_NewImplementation.json

Large diffs are not rendered by default.

Loading

0 comments on commit 62a1ba9

Please sign in to comment.