Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity ^0.8.0;
import { MockCurveAbstractMetapool } from "./MockCurveAbstractMetapool.sol";
import "../MintableERC20.sol";

contract MockCurvealUSDMetapool is MockCurveAbstractMetapool {
contract MockCurveLUSDMetapool is MockCurveAbstractMetapool {
constructor(address[2] memory _coins)
ERC20("Curve.fi Factory USD Metapool: alUSD", "ALUSD3CRV-f")
ERC20("Curve.fi Factory USD Metapool: LUSD", "LUSD3CRV-f")
{
coins = _coins;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ pragma solidity ^0.8.0;

import "../MintableERC20.sol";

contract MockalUSD is MintableERC20 {
constructor() ERC20("alUSD", "alUSD Token") {}
contract MockLUSD is MintableERC20 {
constructor() ERC20("LUSD", "Liquity Token") {}
}
28 changes: 0 additions & 28 deletions contracts/contracts/proxies/Proxies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,6 @@ contract ConvexOUSDMetaStrategyProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice ConvexalUSDMetaStrategyProxy delegates calls to a ConvexalGeneralizedMetaStrategy implementation
*/
contract ConvexalUSDMetaStrategyProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice ConvexmUSDMetaStrategyProxy delegates calls to a ConvexalGeneralizedMetaStrategy implementation
*/
contract ConvexmUSDMetaStrategyProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice ConvexUSDDMetaStrategyProxy delegates calls to a ConvexalGeneralizedMetaStrategy implementation
*/
contract ConvexUSDDMetaStrategyProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice ConvexBUSDMetaStrategyProxy delegates calls to a ConvexalGeneralizedMetaStrategy implementation
*/
contract ConvexBUSDMetaStrategyProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice ConvexLUSDMetaStrategyProxy delegates calls to a ConvexalGeneralizedMetaStrategy implementation
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/deploy/000_mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const deployMocks = async ({ getNamedAccounts, deployments }) => {
args: [[dai.address, usdc.address, usdt.address], threePoolToken.address],
});

await deploy("MockalUSD", {
await deploy("MockLUSD", {
from: deployerAddr,
});

Expand Down
78 changes: 39 additions & 39 deletions contracts/deploy/001_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {
} = require("../utils/deploy");
const {
metapoolLPCRVPid,
alusdMetapoolLPCRVPid,
lusdMetapoolLPCRVPid,
} = require("../utils/constants");

/**
Expand Down Expand Up @@ -301,45 +301,45 @@ const deployConvexStrategy = async () => {
};

/**
* Deploys a Convex Generalized Meta Strategy with alUSD token configuration
* Deploys a Convex Generalized Meta Strategy with LUSD token configuration
*/
const deployConvexalUSDMetaStrategy = async () => {
const deployConvexLUSDMetaStrategy = async () => {
const assetAddresses = await getAssetAddresses(deployments);
const { deployerAddr, governorAddr } = await getNamedAccounts();
// Signers
const sDeployer = await ethers.provider.getSigner(deployerAddr);
const sGovernor = await ethers.provider.getSigner(governorAddr);

await deployWithConfirmation("ConvexalUSDMetaStrategyProxy");
const cConvexalUSDMetaStrategyProxy = await ethers.getContract(
"ConvexalUSDMetaStrategyProxy"
await deployWithConfirmation("ConvexLUSDMetaStrategyProxy");
const cConvexLUSDMetaStrategyProxy = await ethers.getContract(
"ConvexLUSDMetaStrategyProxy"
);

const dConvexalUSDMetaStrategy = await deployWithConfirmation(
const dConvexLUSDMetaStrategy = await deployWithConfirmation(
"ConvexGeneralizedMetaStrategy"
);
const cConvexalUSDMetaStrategy = await ethers.getContractAt(
const cConvexLUSDMetaStrategy = await ethers.getContractAt(
"ConvexGeneralizedMetaStrategy",
cConvexalUSDMetaStrategyProxy.address
cConvexLUSDMetaStrategyProxy.address
);

await withConfirmation(
cConvexalUSDMetaStrategyProxy["initialize(address,address,bytes)"](
dConvexalUSDMetaStrategy.address,
cConvexLUSDMetaStrategyProxy["initialize(address,address,bytes)"](
dConvexLUSDMetaStrategy.address,
deployerAddr,
[]
)
);
log("Initialized ConvexalUSDMetaStrategyProxy");
log("Initialized ConvexLUSDMetaStrategyProxy");

// Initialize Strategies
const cVaultProxy = await ethers.getContract("VaultProxy");
const mockBooster = await ethers.getContract("MockBooster");
const mockRewardPool = await ethers.getContract("MockRewardPool");

const alUsd = await ethers.getContract("MockalUSD");
const LUSD = await ethers.getContract("MockLUSD");
await withConfirmation(
cConvexalUSDMetaStrategy
cConvexLUSDMetaStrategy
.connect(sDeployer)
[
"initialize(address[],address[],address[],(address,address,address,address,address,address,address,uint256))"
Expand All @@ -355,32 +355,32 @@ const deployConvexalUSDMetaStrategy = async () => {
assetAddresses.ThreePool,
cVaultProxy.address,
mockBooster.address, // _cvxDepositorAddress,
assetAddresses.ThreePoolalUSDMetapool, // metapool address,
alUsd.address, // alUsd
assetAddresses.ThreePoolLUSDMetapool, // metapool address,
LUSD.address, // LUSD
mockRewardPool.address, // _cvxRewardStakerAddress,
assetAddresses.alUSDMetapoolToken, // metapoolLpToken
alusdMetapoolLPCRVPid, // _cvxDepositorPTokenId
assetAddresses.LUSDMetapoolToken, // metapoolLpToken
lusdMetapoolLPCRVPid, // _cvxDepositorPTokenId
]
)
);
log("Initialized ConvexalUSDMetaStrategy");
log("Initialized ConvexLUSDMetaStrategy");

await withConfirmation(
cConvexalUSDMetaStrategy.connect(sDeployer).transferGovernance(governorAddr)
cConvexLUSDMetaStrategy.connect(sDeployer).transferGovernance(governorAddr)
);
log(`ConvexalUSDMetaStrategy transferGovernance(${governorAddr}) called`);
log(`ConvexLUSDMetaStrategy transferGovernance(${governorAddr}) called`);
// On Mainnet the governance transfer gets executed separately, via the
// multi-sig wallet. On other networks, this migration script can claim
// governance by the governor.
if (!isMainnet) {
await withConfirmation(
cConvexalUSDMetaStrategy
cConvexLUSDMetaStrategy
.connect(sGovernor) // Claim governance with governor
.claimGovernance()
);
log("Claimed governance for ConvexalUSDMetaStrategy");
log("Claimed governance for ConvexLUSDMetaStrategy");
}
return cConvexalUSDMetaStrategy;
return cConvexLUSDMetaStrategy;
};

/**
Expand Down Expand Up @@ -614,17 +614,17 @@ const configureStrategies = async (harvesterProxy) => {
metaStrategy.connect(sGovernor).setHarvesterAddress(harvesterProxy.address)
);

const alUSDMetaStrategyProxy = await ethers.getContract(
"ConvexalUSDMetaStrategyProxy"
const LUSDMetaStrategyProxy = await ethers.getContract(
"ConvexLUSDMetaStrategyProxy"
);
const alUSDMetaStrategy = await ethers.getContractAt(
const LUSDMetaStrategy = await ethers.getContractAt(
"ConvexGeneralizedMetaStrategy",
alUSDMetaStrategyProxy.address
LUSDMetaStrategyProxy.address
);
await withConfirmation(
alUSDMetaStrategy
.connect(sGovernor)
.setHarvesterAddress(harvesterProxy.address)
LUSDMetaStrategy.connect(sGovernor).setHarvesterAddress(
harvesterProxy.address
)
);

const threePoolProxy = await ethers.getContract("ThreePoolStrategyProxy");
Expand Down Expand Up @@ -823,20 +823,20 @@ const deployCurveMetapoolMocks = async () => {
};

// deploy curve metapool mocks
const deployCurvealUSDMetapoolMocks = async () => {
const deployCurveLUSDMetapoolMocks = async () => {
const { deployerAddr } = await hre.getNamedAccounts();
const assetAddresses = await getAssetAddresses(deployments);

const alUsd = await ethers.getContract("MockalUSD");
const LUSD = await ethers.getContract("MockLUSD");

await hre.deployments.deploy("MockCurvealUSDMetapool", {
await hre.deployments.deploy("MockCurveLUSDMetapool", {
from: deployerAddr,
args: [[alUsd.address, assetAddresses.ThreePoolToken]],
args: [[LUSD.address, assetAddresses.ThreePoolToken]],
});

const alUSDMetapoolToken = await ethers.getContract("MockCurvealUSDMetapool");
const LUSDMetapoolToken = await ethers.getContract("MockCurveLUSDMetapool");
const mockBooster = await ethers.getContract("MockBooster");
await mockBooster.setPool(alusdMetapoolLPCRVPid, alUSDMetapoolToken.address);
await mockBooster.setPool(lusdMetapoolLPCRVPid, LUSDMetapoolToken.address);
};

// Deploy the Flipper trading contract
Expand Down Expand Up @@ -967,13 +967,13 @@ const main = async () => {
await deployOracles();
await deployCore();
await deployCurveMetapoolMocks();
await deployCurvealUSDMetapoolMocks();
await deployCurveLUSDMetapoolMocks();
await deployCompoundStrategy();
await deployAaveStrategy();
await deployThreePoolStrategy();
await deployConvexStrategy();
await deployConvexOUSDMetaStrategy();
await deployConvexalUSDMetaStrategy();
await deployConvexLUSDMetaStrategy();
const harvesterProxy = await deployHarvester();
await configureVault(harvesterProxy);
await configureStrategies(harvesterProxy);
Expand Down
2 changes: 1 addition & 1 deletion contracts/deploy/045_convex_lusd_meta_strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const { lusdMetapoolLPCRVPid } = require("../utils/constants");

module.exports = generalizedConvexStratDeployment({
deployName: "045_convex_lusd_meta_strategy",
forceDeploy: false,
mainTokenName: "Liquity USD",
mainTokenSymbol: "LUSD",
rewardTokenNames: ["CVX", "CRV"],
Expand All @@ -19,4 +18,5 @@ module.exports = generalizedConvexStratDeployment({
redeployVault: false,
deployStrategyImplementation: true,
skipMainnetDeploy: false,
proposalId: 41, // just set to false if no proposal id yet
});
22 changes: 0 additions & 22 deletions contracts/deploy/101_convex_alusd_meta_strategy.js

This file was deleted.

22 changes: 0 additions & 22 deletions contracts/deploy/102_convex_musd_meta_strategy.js

This file was deleted.

22 changes: 0 additions & 22 deletions contracts/deploy/103_convex_usdd_meta_strategy.js

This file was deleted.

22 changes: 0 additions & 22 deletions contracts/deploy/104_convex_busd_meta_strategy.js

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/tasks/governance.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function executeOnFork(taskArguments) {
? Number(taskArguments.gaslimit)
: null;
console.log("Enqueueing and executing proposal", proposalId);
await executeProposalOnFork(proposalId, gasLimit);
await executeProposalOnFork({ proposalId, executeGasLimit: gasLimit });
}

async function proposal(taskArguments, hre) {
Expand Down
Loading