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
4 changes: 2 additions & 2 deletions proposals/dao/balancer_gauge_fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const deploy: DeployUpgradeFunc = async (deployAddress: string, addresses: Named
const balancerPool2LensFactory = await ethers.getContractFactory('BalancerPool2Lens');
const balancerLensBpt30Fei70Weth = await balancerPool2LensFactory.deploy(
gaugeLensBpt30Fei70WethGauge.address, // address _depositAddress
addresses.wethERC20, // address _token
addresses.weth, // address _token
'0x90291319f1d4ea3ad4db0dd8fe9e12baf749e845', // IWeightedPool _pool
addresses.chainlinkEthUsdOracleWrapper, // IOracle _reportedOracle
addresses.oneConstantOracle, // IOracle _otherOracle
Expand Down Expand Up @@ -112,7 +112,7 @@ const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts,
// check rewards can be claimed
await time.increase('86400');
const balBalanceBefore = await contracts.bal.balanceOf(addresses.balancerGaugeStaker);
await contracts.balancerGaugeStaker.mintGaugeRewards(addresses.balancerFeiWethPool);
await contracts.balancerGaugeStaker.mintGaugeRewards(addresses.bpt30Fei70Weth);
const balBalanceAfter = await contracts.bal.balanceOf(addresses.balancerGaugeStaker);
expect(balBalanceAfter.sub(balBalanceBefore)).to.be.at.least(`1${e18}`);

Expand Down
4 changes: 2 additions & 2 deletions proposals/dao/oa_cr_fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const deploy: DeployUpgradeFunc = async (deployAddress: string, addresses: Named
const balancerPool2LensFactory = await ethers.getContractFactory('BalancerPool2Lens');
const balancerLensBpt30Fei70Weth = await balancerPool2LensFactory.deploy(
addresses.gaugeLensBpt30Fei70WethGauge, // address _depositAddress
addresses.wethERC20, // address _token
addresses.balancerFeiWethPool, // IWeightedPool _pool
addresses.weth, // address _token
addresses.bpt30Fei70Weth, // IWeightedPool _pool
addresses.chainlinkEthUsdOracleWrapper, // IOracle _reportedOracle
addresses.oneConstantOracle, // IOracle _otherOracle
false, // bool _feiIsReportedIn
Expand Down
90 changes: 5 additions & 85 deletions protocol-configuration/mainnetAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { MainnetAddresses, AddressCategory } from '../types/types'; // imported

const MainnetAddresses: MainnetAddresses = {
core: {
artifactName: AddressCategory.Core,
artifactName: 'Core',
address: '0x8d5ED43dCa8C2F7dFB20CF7b53CC7E593635d7b9',
category: AddressCategory.Core
},
Expand Down Expand Up @@ -81,7 +81,7 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xd51dbA7a94e1adEa403553A8235C302cEbF41a3c',
category: AddressCategory.Governance
},
guardian: {
guardianMultisig: {
artifactName: 'unknown',
address: '0xB8f482539F2d3Ae2C9ea6076894df36D1f632775',
category: AddressCategory.Governance
Expand Down Expand Up @@ -226,16 +226,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xac38ee05c0204a1e119c625d0a560d6731478880',
category: AddressCategory.PCV_V1
},
indexCoopFusePoolDpiPCVDeposit: {
artifactName: 'ERC20CompoundPCVDeposit',
address: '0x3dD3d945C4253bAc5B4Cc326a001B7d3f9C4DD66',
category: AddressCategory.PCV_V1
},
indexCoopFusePoolFeiPCVDeposit: {
artifactName: 'ERC20CompoundPCVDeposit',
address: '0xD6960adba53212bBE96E54a7AFeDA2066437D000',
category: AddressCategory.PCV_V1
},
indexDelegator: {
artifactName: 'SnapshotDelegatorPCVDeposit',
address: '0x0ee81df08B20e4f9E0F534e50da437D24491c4ee',
Expand Down Expand Up @@ -356,11 +346,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x374628EBE7Ef6AcA0574e750B618097531A26Ff8',
category: AddressCategory.PCV
},
balancerFeiWethPool: {
artifactName: 'IWeightedPool',
address: '0x90291319F1D4eA3ad4dB0Dd8fe9E12BAF749E845',
category: AddressCategory.External
},
delayedPCVMoverWethUniToBal: {
artifactName: 'DelayedPCVMover',
address: '0x52B1D5BE5005002afD76193ADd3a827c18e2db99',
Expand Down Expand Up @@ -1343,11 +1328,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
category: AddressCategory.External
},
curve3Metapool: {
artifactName: 'IERC20',
address: '0x06cb22615BA53E60D67Bf6C341a0fD5E718E1655',
category: AddressCategory.External
},
curve3pool: {
artifactName: 'unknown',
address: '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7',
Expand All @@ -1358,9 +1338,9 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xBaaa1F5DbA42C3389bDbc2c9D2dE134F5cD0Dc89',
category: AddressCategory.External
},
curveMetapool: {
artifactName: 'unknown',
address: '0x06cb22615ba53e60d67bf6c341a0fd5e718e1655',
curveFei3crvMetapool: {
artifactName: 'IERC20',
address: '0x06cb22615BA53E60D67Bf6C341a0fD5E718E1655',
category: AddressCategory.External
},
cvx: {
Expand All @@ -1378,11 +1358,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b',
category: AddressCategory.External
},
fAAVE: {
artifactName: 'IERC20',
address: '0x4da27a545c0c5b758a6ba100e3a049001de870f5',
category: AddressCategory.External
},
feiEthPair: {
artifactName: 'IUniswapV2Pair',
address: '0x94B0A3d511b6EcDb17eBF877278Ab030acb0A878',
Expand Down Expand Up @@ -1458,16 +1433,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x0954906da0Bf32d5479e25f46056d22f08464cab',
category: AddressCategory.External
},
indexCoopFusePoolDpi: {
artifactName: 'CErc20Delegator',
address: '0xf06f65a6b7d2c401fcb8b3273d036d21fe2a5963',
category: AddressCategory.External
},
indexCoopFusePoolFei: {
artifactName: 'CErc20Delegator',
address: '0x04281F6715Dea6A8EbBCE143D86ea506FF326531',
category: AddressCategory.External
},
kashiFeiDPI: {
artifactName: 'IKashiPair',
address: '0xf352773f1d4d69deb4de8d0578e43b993ee76e5d',
Expand Down Expand Up @@ -1513,11 +1478,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x0B36b0F351ea8383506F596743a2DA7DCa204cc3',
category: AddressCategory.External
},
poolPartyFei: {
artifactName: 'CErc20Delegator',
address: '0x17b1A2E012cC4C31f83B90FF11d3942857664efc',
category: AddressCategory.External
},
rai: {
artifactName: 'IERC20',
address: '0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919',
Expand Down Expand Up @@ -1588,11 +1548,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x6c806eDDAd78A5505Fce27B18C6f859fc9739BEc',
category: AddressCategory.External
},
reflexerStableAssetFusePoolRai: {
artifactName: 'CErc20Delegator',
address: '0x752F119bD4Ee2342CE35E2351648d21962c7CAfE',
category: AddressCategory.External
},
rgt: {
artifactName: 'ERC20VotesComp',
address: '0xD291E7a03283640FDc51b121aC401383A46cC623',
Expand Down Expand Up @@ -1663,21 +1618,11 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
category: AddressCategory.External
},
wethERC20: {
artifactName: 'IERC20',
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
category: AddressCategory.External
},
aavePassthroughETH: {
artifactName: 'unknown', // AavePassthroughETH
address: '0x126AD2B5341A30D8115C443B3158E7661e4faD26',
category: AddressCategory.Deprecated
},
aaveTribeIncentivesControllerProxy: {
artifactName: 'TransparentUpgradeableProxy',
address: '0xDee5c1662bBfF8f80f7c572D8091BF251b3B0dAB',
category: AddressCategory.Deprecated
},
balDepositWrapper: {
artifactName: 'ERC20PCVDepositWrapper',
address: '0x7E28BA7a2D52Af88242E588d868E927119BA45dB',
Expand All @@ -1688,11 +1633,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xF56B0B80ea6E986364c50177d396b988C3e41094',
category: AddressCategory.Deprecated
},
coreV1: {
artifactName: 'ICoreV1',
address: '0x8d5ED43dCa8C2F7dFB20CF7b53CC7E593635d7b9',
category: AddressCategory.Deprecated
},
daiBondingCurve: {
artifactName: 'unknown', // BondingCurve
address: '0xC0afe0E649e32528666F993ce63822c3840e941a',
Expand Down Expand Up @@ -1808,11 +1748,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x4C895973334Af8E06fd6dA4f723Ac24A5f259e6B',
category: AddressCategory.Deprecated
},
multisig: {
artifactName: 'unknown',
address: '0xB8f482539F2d3Ae2C9ea6076894df36D1f632775',
category: AddressCategory.Deprecated
},
oldEthBondingCurve: {
artifactName: 'unknown', // EthBondingCurve
address: '0xe1578B4a32Eaefcd563a9E6d0dc02a4213f673B7',
Expand All @@ -1823,11 +1758,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xa08A721dFB595753FFf335636674D76C455B275C',
category: AddressCategory.Deprecated
},
poolPartyFeiPCVDeposit: {
artifactName: 'ERC20CompoundPCVDeposit',
address: '0x5A8CB4556e5D5935Af06beab8292905f48131479',
category: AddressCategory.Deprecated
},
ratioPCVController: {
artifactName: 'unknown', // RatioPCVController
address: '0xB1410aeCe2c65fE9e107c58b5aa32e91B18f0BC7',
Expand All @@ -1848,11 +1778,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0xc42e155788f9f599Fd437C7455F63810A395a81f',
category: AddressCategory.Deprecated
},
reflexerStableAssetFusePoolRaiPCVDeposit: {
artifactName: 'ERC20CompoundPCVDeposit',
address: '0x9aAdFfe00eAe6d8e59bB4F7787C6b99388A6960D',
category: AddressCategory.Deprecated
},
staticPcvDepositWrapper: {
artifactName: 'unknown', // StaticPCVDepositWrapper
address: '0x8B41DcEfAe6064E6bc2A9B3ae20141d23EFD6cbd',
Expand All @@ -1868,11 +1793,6 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x639572471f2f318464dc01066a56867130e45E25',
category: AddressCategory.TBD
},
tribalChiefOptimisticMultisig: {
artifactName: 'unknown',
address: '0x35ED000468f397AA943009bD60cc6d2d9a7d32fF',
category: AddressCategory.Deprecated
},
tribalChiefOptimisticTimelock: {
artifactName: 'Timelock',
address: '0x27Fae9E49AD955A24bB578B66Cdc962b5029fbA9',
Expand Down
2 changes: 1 addition & 1 deletion protocol-configuration/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const permissions = {
'lusdPSMFeiSkimmer',
'raiPCVDripController'
],
GUARDIAN_ROLE: ['multisig', 'pcvGuardianNew', 'pcvSentinel'],
GUARDIAN_ROLE: ['guardianMultisig', 'pcvGuardianNew', 'pcvSentinel'],
ORACLE_ADMIN_ROLE: [
'collateralizationOracleGuardian',
'optimisticTimelock',
Expand Down
2 changes: 1 addition & 1 deletion protocol-configuration/tribalchief.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TribalChiefConfig } from '../types/types';

const config: TribalChiefConfig = {
feiTribePair: { allocPoint: 1, unlocked: false }, // Uniswap-v2 FEI/TRIBE LP, 0 (poolId)
curve3Metapool: { allocPoint: 0, unlocked: false }, // Curve 3crv-FEI metapool LP, 1
curveFei3crvMetapool: { allocPoint: 0, unlocked: false }, // Curve 3crv-FEI metapool LP, 1
gUniFeiDaiLP: { allocPoint: 0, unlocked: true }, // G-UNI DAI/FEI 0.05% fee tier, 2
stakingTokenWrapperRari: { allocPoint: 0, unlocked: false }, // FeiRari: TRIBE, 3
stakingTokenWrapperGROLaaS: { allocPoint: 0, unlocked: false }, // LaaS: GRO, 4
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy/old/optimisticTimelock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { ethers } from 'hardhat';
const fourDays = 4 * 24 * 60 * 60;

const deploy: DeployUpgradeFunc = async (deployAddress, addresses, logging = false) => {
const { tribalChiefOptimisticMultisig, core } = addresses;
const { optimisticMultisig, core } = addresses;

if (!tribalChiefOptimisticMultisig || !core) {
if (!optimisticMultisig || !core) {
throw new Error('An environment variable contract address is not set');
}

const optimisticTimelock = await (
await ethers.getContractFactory('OptimisticTimelock')
).deploy(core, fourDays, [tribalChiefOptimisticMultisig], [tribalChiefOptimisticMultisig]);
).deploy(core, fourDays, [optimisticMultisig], [optimisticMultisig]);

logging && console.log('Optimistic Timelock deployed to: ', optimisticTimelock.address);
return {
Expand Down
20 changes: 10 additions & 10 deletions test/integration/tests/balancer-weightedpool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('balancer-weightedpool', function () {
expect(await balancerDepositTribeWeth.balance()).to.be.equal('0');
expect((await balancerDepositTribeWeth.resistantBalanceAndFei())[0]).to.be.equal('0');
expect((await balancerDepositTribeWeth.resistantBalanceAndFei())[1]).to.be.equal('0');
expect(await contracts.wethERC20.balanceOf(balancerDepositTribeWeth.address)).to.be.equal('0');
expect(await contracts.weth.balanceOf(balancerDepositTribeWeth.address)).to.be.equal('0');
expect(await contracts.tribe.balanceOf(balancerDepositTribeWeth.address)).to.be.equal('0');
});

Expand All @@ -149,12 +149,12 @@ describe('balancer-weightedpool', function () {
const tribeToAllocate = BNe18(Math.round(4 * tribePerEth * 10000)).div(10000); // rounding error < slippage tolerance
await contracts.aaveEthPCVDeposit.connect(daoSigner).withdraw(balancerDepositTribeWeth.address, BNe18('1'));
await contracts.core.connect(daoSigner).allocateTribe(balancerDepositTribeWeth.address, tribeToAllocate);
expect(await contracts.wethERC20.balanceOf(balancerDepositTribeWeth.address)).to.be.equal(BNe18('1'));
expect(await contracts.weth.balanceOf(balancerDepositTribeWeth.address)).to.be.equal(BNe18('1'));
expect(await contracts.tribe.balanceOf(balancerDepositTribeWeth.address)).to.be.equal(tribeToAllocate);

// deposit funds in the pool
await balancerDepositTribeWeth.deposit();
expect(await contracts.wethERC20.balanceOf(balancerDepositTribeWeth.address)).to.be.equal('0');
expect(await contracts.weth.balanceOf(balancerDepositTribeWeth.address)).to.be.equal('0');
expect(await contracts.tribe.balanceOf(balancerDepositTribeWeth.address)).to.be.equal('0');

const poolTokens = await contracts.balancerVault.getPoolTokens(await balancerDepositTribeWeth.poolId());
Expand Down Expand Up @@ -226,7 +226,7 @@ describe('balancer-weightedpool', function () {

// check the amount of tokens out after exitPool
const tribeBalanceAfterExit = (await contracts.tribe.balanceOf(balancerDepositTribeWeth.address)) / 1e18;
const wethBalanceAfterExit = (await contracts.wethERC20.balanceOf(balancerDepositTribeWeth.address)) / 1e18;
const wethBalanceAfterExit = (await contracts.weth.balanceOf(balancerDepositTribeWeth.address)) / 1e18;
expect(tribeBalanceAfterExit).to.be.at.least(4 * tribePerEth * 0.99);
expect(wethBalanceAfterExit).to.be.at.least(0.99);
});
Expand Down Expand Up @@ -358,24 +358,24 @@ describe('balancer-weightedpool', function () {
});

it('should be able to wrap and unwrap ETH', async function () {
expect(await contracts.wethERC20.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
expect(await contracts.weth.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
expect((await balance.current(balancerDepositFeiWeth.address)).toString()).to.be.equal('0');

await (
await ethers.getSigner(deployAddress)
).sendTransaction({ to: balancerDepositFeiWeth.address, value: toBN('1000') });

expect(await contracts.wethERC20.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
expect(await contracts.weth.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
expect((await balance.current(balancerDepositFeiWeth.address)).toString()).to.be.equal(toBN('1000'));

await balancerDepositFeiWeth.wrapETH();

expect(await contracts.wethERC20.balanceOf(balancerDepositFeiWeth.address)).to.be.equal(toBN('1000'));
expect(await contracts.weth.balanceOf(balancerDepositFeiWeth.address)).to.be.equal(toBN('1000'));
expect((await balance.current(balancerDepositFeiWeth.address)).toString()).to.be.equal('0');

await balancerDepositFeiWeth.connect(daoSigner).unwrapETH();

expect(await contracts.wethERC20.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
expect(await contracts.weth.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
expect((await balance.current(balancerDepositFeiWeth.address)).toString()).to.be.equal(toBN('1000'));
});

Expand All @@ -385,10 +385,10 @@ describe('balancer-weightedpool', function () {
const signer = await getImpersonatedSigner(WETH_HOLDER);
await forceEth(WETH_HOLDER);
const amount = '10000000000000000000000'; // 10k WETH (18 decimals)
await contracts.wethERC20.connect(signer).transfer(balancerDepositFeiWeth.address, amount);
await contracts.weth.connect(signer).transfer(balancerDepositFeiWeth.address, amount);

// check initial amounts and deposit
expect(await contracts.wethERC20.balanceOf(balancerDepositFeiWeth.address)).to.be.equal(amount);
expect(await contracts.weth.balanceOf(balancerDepositFeiWeth.address)).to.be.equal(amount);
expect(await contracts.fei.balanceOf(balancerDepositFeiWeth.address)).to.be.equal('0');
await balancerDepositFeiWeth.deposit();

Expand Down
Loading