Skip to content

Commit

Permalink
Deploy MorphoCompound PCV Depsosits, add addresses to mainnet address…
Browse files Browse the repository at this point in the history
… file, point vip14 solidity simulation to newly deployed smart contracts
  • Loading branch information
ElliotFriedman committed Oct 25, 2022
1 parent d2c285e commit 7fa0d40
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 41 deletions.
10 changes: 10 additions & 0 deletions contracts/test/integration/fixtures/MainnetAddresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ library MainnetAddresses {
address public constant COMPOUND_PCV_ROUTER =
0x6338Ec144279b1f05AF8C90216d90C5b54Fa4D8F;

// ---------- MORPHO ADDRESSES ----------
address public constant MORPHO_COMPOUND_PCV_ROUTER =
0x579C400eaCA4b1D84956E7bD284d97611f78BA4E;

address public constant MORPHO_COMPOUND_DAI_PCV_DEPOSIT =
0x7aB2f4A29048392EfE0B57FD17a3BedBcD0891DC;

address public constant MORPHO_COMPOUND_USDC_PCV_DEPOSIT =
0xF10d810De7F0Fbd455De30f8c43AbA56F253B73B;

// ---------- ORACLE ADDRESSES ----------
address public constant ORACLE_PASS_THROUGH =
0xe733985a92Bfd5BC676095561BacE90E04606E4a;
Expand Down
35 changes: 10 additions & 25 deletions contracts/test/integration/vip/vip14.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,16 @@ contract vip14 is DSTest, IVIP {
ITimelockSimulation.action[] private mainnetProposal;
ITimelockSimulation.action[] private arbitrumProposal;

CompoundPCVRouter public router;
MorphoCompoundPCVDeposit public daiDeposit;
MorphoCompoundPCVDeposit public usdcDeposit;
CompoundPCVRouter public router =
CompoundPCVRouter(MainnetAddresses.MORPHO_COMPOUND_PCV_ROUTER);
MorphoCompoundPCVDeposit public daiDeposit =
MorphoCompoundPCVDeposit(
MainnetAddresses.MORPHO_COMPOUND_DAI_PCV_DEPOSIT
);
MorphoCompoundPCVDeposit public usdcDeposit =
MorphoCompoundPCVDeposit(
MainnetAddresses.MORPHO_COMPOUND_USDC_PCV_DEPOSIT
);

PCVGuardian public immutable pcvGuardian =
PCVGuardian(MainnetAddresses.PCV_GUARDIAN);
Expand All @@ -66,28 +73,6 @@ contract vip14 is DSTest, IVIP {
constructor() {
if (block.chainid != 1) return; /// keep ci pipeline happy

daiDeposit = new MorphoCompoundPCVDeposit(
core,
MainnetAddresses.CDAI,
MainnetAddresses.DAI,
MainnetAddresses.MORPHO,
MainnetAddresses.MORPHO_LENS
);

usdcDeposit = new MorphoCompoundPCVDeposit(
core,
MainnetAddresses.CUSDC,
MainnetAddresses.USDC,
MainnetAddresses.MORPHO,
MainnetAddresses.MORPHO_LENS
);

router = new CompoundPCVRouter(
core,
PCVDeposit(address(daiDeposit)),
PCVDeposit(address(usdcDeposit))
);

address[] memory toWhitelist = new address[](2);
toWhitelist[0] = address(daiDeposit);
toWhitelist[1] = address(usdcDeposit);
Expand Down
52 changes: 36 additions & 16 deletions protocol-configuration/mainnetAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,54 @@ const MainnetAddresses: MainnetAddresses = {
category: AddressCategory.Core,
network: Network.Mainnet
},

daiMorphoCompoundPCVDeposit: {
address: '0x7aB2f4A29048392EfE0B57FD17a3BedBcD0891DC',
artifactName: 'MorphoCompoundPCVDeposit',
category: AddressCategory.PCV,
network: Network.Mainnet
},
usdcMorphoCompoundPCVDeposit: {
address: '0xF10d810De7F0Fbd455De30f8c43AbA56F253B73B',
artifactName: 'MorphoCompoundPCVDeposit',
category: AddressCategory.PCV,
network: Network.Mainnet
},
morphoCompoundPCVRouter: {
address: '0x579C400eaCA4b1D84956E7bD284d97611f78BA4E',
artifactName: 'CompoundPCVRouter',
category: AddressCategory.PCV,
network: Network.Mainnet
},
morphoCompound: {
address: '0x8888882f8f843896699869179fB6E4f7e3B58888',
artifactName: 'unknown',
category: AddressCategory.External,
network: Network.Mainnet
},
morphoCompoundLens: {
address: '0x930f1b46e1D081Ec1524efD95752bE3eCe51EF67',
artifactName: 'unknown',
category: AddressCategory.External,
network: Network.Mainnet
},

daiCompoundPCVDeposit: {
address: '0xE3cbfd618463B7198fa0743AbFA56170557cc880',
artifactName: 'ERC20CompoundPCVDeposit',
category: AddressCategory.PCV,
category: AddressCategory.Deprecated,
network: Network.Mainnet
},
feiCompoundPCVDeposit: {
address: '0x604556Bbc4aB70B3c73d7bb6c4867B6239511301',
artifactName: 'ERC20CompoundPCVDeposit',
category: AddressCategory.PCV,
category: AddressCategory.Deprecated,
network: Network.Mainnet
},
usdcCompoundPCVDeposit: {
address: '0x3B69e3073cf86099a9bbB650e8682D6FdCfb29db',
artifactName: 'ERC20CompoundPCVDeposit',
category: AddressCategory.PCV,
category: AddressCategory.Deprecated,
network: Network.Mainnet
},
feiPriceBoundPSM: {
Expand All @@ -130,22 +162,10 @@ const MainnetAddresses: MainnetAddresses = {
category: AddressCategory.PCV,
network: Network.Mainnet
},
morphoCompound: {
address: '0x8888882f8f843896699869179fB6E4f7e3B58888',
artifactName: 'unknown',
category: AddressCategory.External,
network: Network.Mainnet
},
morphoCompoundLens: {
address: '0x930f1b46e1D081Ec1524efD95752bE3eCe51EF67',
artifactName: 'unknown',
category: AddressCategory.External,
network: Network.Mainnet
},
compoundPCVRouter: {
address: '0x6338Ec144279b1f05AF8C90216d90C5b54Fa4D8F',
artifactName: 'CompoundPCVRouter',
category: AddressCategory.PCV,
category: AddressCategory.Deprecated,
network: Network.Mainnet
},
erc20Allocator: {
Expand Down

0 comments on commit 7fa0d40

Please sign in to comment.