Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions contract-addresses/mainnetAddresses.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,111 @@
const MainnetAddresses = {
staticPcvDepositWrapper: {
artifactName: 'StaticPCVDepositWrapper',
address: '0x8B41DcEfAe6064E6bc2A9B3ae20141d23EFD6cbd'
},
ethReserveStabilizerWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xB24570Bc46efDf97b4Aa7f008B4268005Eb7A27E'
},
daiBondingCurveWrapper: { artifactName: 'PCVDepositWrapper', address: '0x2547d76E2447E67F29d6bFeE5d46FDd2183c88E4' },
raiBondingCurveWrapper: { artifactName: 'PCVDepositWrapper', address: '0xc42e155788f9f599Fd437C7455F63810A395a81f' },
dpiBondingCurveWrapper: { artifactName: 'PCVDepositWrapper', address: '0x60B63eF8f461355207fE1d8102dda938bbd8c3fB' },
rariPool19DpiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x9a774a1B1208C323EDeD05E6Daf592E6E59cAa55'
},
ethLidoPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xA271fF86426c7fdAaAE72603e6Ce68c892d69ED7'
},
compoundDaiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xfDe7077AAEcDaf2C4B85261Aa858c96A7E737a61'
},
compoundEthPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x0735e14D28eD395048d5Fa4a8dbe6e6EB9fc0470'
},
aaveRaiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x1267B39c93711Dd374DEAB15e0127e4adB259BE0'
},
aaveEthPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x43Ef03755991056681F01EE2182234eF6aF1f658'
},
rariPool9RaiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xCCe230c087F31032fc17621a2CF5E425A0b80C96'
},
creamFeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xFf419Bc27483edb94b7Ad5c97b7FaB5DB323c7E0'
},
rariPool8FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xD6598a23418c7FEf7c0Dc863265515B623B720F9'
},
rariPool9FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x96A657eE40A79A964c6b4eA551c895D98e885a75'
},
rariPool7FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xb13C755107301eBFeD6A93190aCdE09281b2f8A5'
},
rariPool6FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x7aA4b1558C3e219cFFFd6a356421C071F71966e7'
},
rariPool19FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x7e39bBA9D0d967Ee55524fAe9e54900B02d9889a'
},
rariPool24FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x508f6fbd78B6569C29E9D75986a51558dE9E5865'
},
rariPool25FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xB4FFD10C4C290Dc13E8e30BF186F1509001515fD'
},
rariPool26FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x82aebeE64a52180d8541eB601A8381e012A1eD04'
},
rariPool27FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0xe2e35097638F0Ff2EeCA2EF70F352Be37431945f'
},
rariPool18FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x07F2DD7E6A78D96c08D0a8212f4097dCC129d629'
},
rariPool28FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x4E119714f625B2E82e5fB5A7E297978f020Ea51E'
},
rariPool31FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x05E2e93CFb0B53D36A3151ee727Bb581D4B918Ce'
},
feiOATimelockWrapper: { artifactName: 'PCVDepositWrapper', address: '0x7Eb88140af813294aEDce981b6aC08fcd139d408' },
oneConstantOracle: { artifactName: 'ConstantOracle', address: '0x2374800337c6BE8B935f96AA6c10b33f9F12Bd40' },
zeroConstantOracle: { artifactName: 'ConstantOracle', address: '0x43b99923CF06D6D9101110b595234670f73A4934' },
collateralizationOracle: {
artifactName: 'CollateralizationOracle',
address: '0xFF6f59333cfD8f4Ebc14aD0a0E181a83e655d257'
},
collateralizationOracleWrapperImpl: {
artifactName: 'CollateralizationOracleWrapper',
address: '0x656aA9c9875eB089b11869d4730d6963D25E76ad'
},
collateralizationOracleWrapper: {
artifactName: 'CollateralizationOracleWrapper',
address: '0xd1866289B4Bd22D453fFF676760961e0898EE9BF'
},

aave: { artifactName: 'IERC20', address: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9' },
aaveEthPCVDeposit: { artifactName: 'AavePCVDeposit', address: '0x5B86887e171bAE0C2C826e87E34Df8D558C079B9' },
aaveEthPCVDripController: {
Expand Down
1 change: 1 addition & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'solidity-coverage';
import 'tsconfig-paths/register';

import * as dotenv from 'dotenv';
import { ethers } from 'ethers';

dotenv.config();

Expand Down
41 changes: 33 additions & 8 deletions proposals/dao/collateralizationOracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
optimisticTimelock
} = addresses;

// const { staticPcvDepositWrapper, ethReserveStabilizerWrapper} = addresses;

if (!core || !feiEthPair || !weth || !chainlinkEthUsdOracleWrapper || !compositeOracle) {
console.log(`core: ${core}`);
console.log(`feiEtiPair: ${feiEthPair}`);
Expand All @@ -133,6 +135,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
ethers.constants.WeiPerEther.mul(4_000_000), // 4M PCV for 100k INDEX @ ~$40
ethers.constants.WeiPerEther.mul(11_500_000) // 8.5M FEI in Kashi + 2.5M in Idle + .5M in BarnBridge
);
await staticPcvDepositWrapper.deployTransaction.wait();

logging && console.log('staticPcvDepositWrapper: ', staticPcvDepositWrapper.address);

Expand All @@ -143,24 +146,28 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
weth,
false
);
await ethReserveStabilizerWrapper.deployTransaction.wait();

logging && console.log('ethReserveStabilizerWrapper: ', ethReserveStabilizerWrapper.address);

// 3. Dai bonding curve wrapper
const daiBondingCurveWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const daiBondingCurveWrapper = await daiBondingCurveWrapperFactory.deploy(daiBondingCurve, dai, false);
await daiBondingCurveWrapper.deployTransaction.wait();

logging && console.log('daiBondingCurveWrapper: ', daiBondingCurveWrapper.address);

// 4. Rai bonding curve wrapper
const raiBondingCurveWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const raiBondingCurveWrapper = await raiBondingCurveWrapperFactory.deploy(raiBondingCurve, rai, false);
await raiBondingCurveWrapper.deployTransaction.wait();

logging && console.log('raiBondingCurveWrapper: ', raiBondingCurveWrapper.address);

// 5. Dpi bonding curve wrapper
const dpiBondingCurveWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const dpiBondingCurveWrapper = await dpiBondingCurveWrapperFactory.deploy(dpiBondingCurve, dpi, false);
await dpiBondingCurveWrapper.deployTransaction.wait();

logging && console.log('dpiBondingCurveWrapper: ', dpiBondingCurveWrapper.address);

Expand All @@ -171,23 +178,25 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
dpi,
false
);
await rariPool19DpiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool19DpiPCVDepositWrapper: ', rariPool19DpiPCVDepositWrapper.address);

// 7. Eth Lido PCV Deposit Wrapper
const ethLidoPCVDepositWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const ethLidoPCVDepositWrapper = await ethLidoPCVDepositWrapperFactory.deploy(ethLidoPCVDeposit, weth, false);
await ethLidoPCVDepositWrapper.deployTransaction.wait();

logging && console.log('ethLidoPCVDepositWrapper: ', ethLidoPCVDepositWrapper.address);

// 8. Compound dai PCV Deposit Wrapper
const compoundDaiPCVDepositWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');

const compoundDaiPCVDepositWrapper = await compoundDaiPCVDepositWrapperFactory.deploy(
compoundDaiPCVDeposit,
dai,
false
);
await compoundDaiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('compoundDaiPCVDepositWrapper: ', compoundDaiPCVDepositWrapper.address);

Expand All @@ -198,18 +207,21 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
weth,
false
);
await compoundEthPCVDepositWrapper.deployTransaction.wait();

logging && console.log('compoundEthPCVDepositWrapper: ', compoundEthPCVDepositWrapper.address);

// 10. Aave Rai PCV Deposit Wrapper
const aaveRaiPCVDepositWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const aaveRaiPCVDepositWrapper = await aaveRaiPCVDepositWrapperFactory.deploy(aaveRaiPCVDeposit, rai, false);
await aaveRaiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('aaveRaiPCVDeposit: ', aaveRaiPCVDepositWrapper.address);

// 11. Aave Eth PCV Deposit Wrapper
const aaveEthPCVDepositWrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const aaveEthPCVDepositWrapper = await aaveEthPCVDepositWrapperFactory.deploy(aaveEthPCVDeposit, weth, false);
await aaveEthPCVDepositWrapper.deployTransaction.wait();

logging && console.log('aaveEthPCVDepositWrapper: ', aaveEthPCVDepositWrapper.address);

Expand All @@ -220,6 +232,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
rai,
false
);
await rariPool9RaiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool9RaiPCVDepositWrapper: ', rariPool9RaiPCVDepositWrapper.address);

Expand All @@ -238,6 +251,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool8FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool8FeiPCVDepositWrapper: ', rariPool8FeiPCVDepositWrapper.address);

Expand All @@ -248,6 +262,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool9FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool9FeiPCVDepositWrapper: ', rariPool9FeiPCVDepositWrapper.address);

Expand All @@ -258,6 +273,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool7FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool7FeiPCVDepositWrapper: ', rariPool7FeiPCVDepositWrapper.address);

Expand All @@ -268,6 +284,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool6FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool6FeiPCVDepositWrapper: ', rariPool6FeiPCVDepositWrapper.address);

Expand All @@ -278,6 +295,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool19FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool19FeiPCVDepositWrapper: ', rariPool19FeiPCVDepositWrapper.address);

Expand All @@ -288,6 +306,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool24FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool24FeiPCVDepositWrapper: ', rariPool24FeiPCVDepositWrapper.address);

Expand All @@ -298,6 +317,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool25FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool25FeiPCVDepositWrapper: ', rariPool25FeiPCVDepositWrapper.address);

Expand All @@ -308,6 +328,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool26FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool26FeiPCVDepositWrapper: ', rariPool26FeiPCVDepositWrapper.address);

Expand All @@ -318,6 +339,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool27FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool27FeiPCVDepositWrapper: ', rariPool27FeiPCVDepositWrapper.address);

Expand All @@ -328,6 +350,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool18FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool18FeiPCVDepositWrapper: ', rariPool18FeiPCVDepositWrapper.address);

Expand All @@ -338,6 +361,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool28FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool28FeiPCVDepositWrapper: ', rariPool28FeiPCVDepositWrapper.address);

Expand All @@ -348,29 +372,28 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
fei,
true
);
await rariPool31FeiPCVDepositWrapper.deployTransaction.wait();

logging && console.log('rariPool31FeiPCVDepositWrapper: ', rariPool31FeiPCVDepositWrapper.address);

// 26. ERC20 PCV Deposit Wrapper
const erc20PCVDepositWrapperFactory = await ethers.getContractFactory('ERC20PCVDepositWrapper');
const feiOATimelockWrapper = await erc20PCVDepositWrapperFactory.deploy(
optimisticTimelock,
fei,
true
);
const feiOATimelockWrapper = await erc20PCVDepositWrapperFactory.deploy(optimisticTimelock, fei, true);
await feiOATimelockWrapper.deployTransaction.wait();

logging && console.log('feiOATimelockWrapper: ', feiOATimelockWrapper.address);

// ----------- Collateralization Contracts ---------------

// 27. One Constant Oracle
const constantOracleFactory = await ethers.getContractFactory('ConstantOracle');

const oneConstantOracle = await constantOracleFactory.deploy(core, 10000);
await oneConstantOracle.deployTransaction.wait();
logging && console.log('oneConstantOracle: ', oneConstantOracle.address);

// 28. Zero Constant Oracle
const zeroConstantOracle = await constantOracleFactory.deploy(core, 0);
await zeroConstantOracle.deployTransaction.wait();
logging && console.log('zeroConstantOracle: ', zeroConstantOracle.address);

// 29. Collateralization Ratio Oracle
Expand Down Expand Up @@ -418,6 +441,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
oneConstantOracle.address
]
);
await collateralizationOracle.deployTransaction.wait();

logging && console.log('Collateralization Oracle: ', collateralizationOracle.address);

Expand All @@ -427,6 +451,7 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
core,
1 // not used
);
await collateralizationOracleWrapperImpl.deployTransaction.wait();

logging && console.log('Collateralization Oracle Wrapper Impl: ', collateralizationOracleWrapperImpl.address);

Expand All @@ -440,9 +465,9 @@ export const deploy: DeployUpgradeFunc = async (deployAddress, addresses, loggin
CR_WRAPPER_DURATION,
CR_WRAPPER_DEVIATION_BPS
]);

const ProxyFactory = await ethers.getContractFactory('TransparentUpgradeableProxy');
const proxy = await ProxyFactory.deploy(collateralizationOracleWrapperImpl.address, proxyAdmin, calldata);
await proxy.deployTransaction.wait();

const collateralizationOracleWrapper = await ethers.getContractAt('CollateralizationOracleWrapper', proxy.address);

Expand Down
7 changes: 1 addition & 6 deletions test/integration/proposals_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
{
"collateralizationOracle" : {
"deploy" : true,
"skipDAO" : true
}
}
{}