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
2 changes: 1 addition & 1 deletion contracts/contracts/proxies/Proxies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ contract OUSDMorphoV2StrategyProxy is InitializeGovernedUpgradeabilityProxy {
}

/**
* @notice OETHSupernovaAMOProxy delegates calls to an OETHSupernovaAMOStrategy implementation
* @notice Legacy Supernova AMO proxy
*/
contract OETHSupernovaAMOProxy is InitializeGovernedUpgradeabilityProxy {

Expand Down

This file was deleted.

19 changes: 0 additions & 19 deletions contracts/contracts/strategies/algebra/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions contracts/deploy/deployActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,49 +857,6 @@ const deploySonicSwapXAMOStrategyImplementationAndInitialize = async () => {
return cSonicSwapXAMOStrategy;
};

const deployOETHSupernovaAMOStrategyImplementation = async () => {
const { deployerAddr } = await getNamedAccounts();
const sDeployer = await ethers.provider.getSigner(deployerAddr);

const cOETHSupernovaAMOStrategyProxy = await ethers.getContract(
"OETHSupernovaAMOProxy"
);
const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy");

// Deploy OETH Supernova AMO Strategy implementation that will serve
// OETH Supernova AMO
const dSupernovaAMOStrategy = await deployWithConfirmation(
"OETHSupernovaAMOStrategy",
[
[addresses.mainnet.SupernovaOETHWETH.pool, cOETHVaultProxy.address],
addresses.mainnet.SupernovaOETHWETH.gauge,
]
);

const cOETHSupernovaAMOStrategy = await ethers.getContractAt(
"OETHSupernovaAMOStrategy",
cOETHSupernovaAMOStrategyProxy.address
);

// Initialize OETH Supernova AMO Strategy implementation
const depositPriceRange = parseUnits("0.01", 18); // 1% or 100 basis points
const initData = cOETHSupernovaAMOStrategy.interface.encodeFunctionData(
"initialize(address[],uint256)",
[[addresses.mainnet.supernovaToken], depositPriceRange]
);
await withConfirmation(
// prettier-ignore
cOETHSupernovaAMOStrategyProxy
.connect(sDeployer)["initialize(address,address,bytes)"](
dSupernovaAMOStrategy.address,
addresses.mainnet.Timelock,
initData
)
);

return cOETHSupernovaAMOStrategy;
};

// Poll eth_getCode until bytecode appears at `addr`. Base's read replicas can
// lag the sequencer by several seconds, so a fresh deploy receipt does not
// guarantee that the next call's RPC node sees the contract yet.
Expand Down Expand Up @@ -1343,7 +1300,6 @@ module.exports = {
getPlumeContracts,
deploySonicSwapXAMOStrategyImplementation,
deploySonicSwapXAMOStrategyImplementationAndInitialize,
deployOETHSupernovaAMOStrategyImplementation,
deployOETHbHydrexAMOStrategyImplementation,
deployProxyWithCreateX,
deployCrossChainMasterStrategyImpl,
Expand Down
75 changes: 4 additions & 71 deletions contracts/deploy/mainnet/180_vault_upgrade_supernova_AMO.js
Original file line number Diff line number Diff line change
@@ -1,86 +1,19 @@
const addresses = require("../../utils/addresses");
const {
deploymentWithGovernanceProposal,
deployWithConfirmation,
} = require("../../utils/deploy");
const {
deployOETHSupernovaAMOStrategyImplementation,
} = require("../deployActions");
const { deploymentWithGovernanceProposal } = require("../../utils/deploy");

module.exports = deploymentWithGovernanceProposal(
{
deployName: "180_vault_upgrade_supernova_AMO",
forceDeploy: false,
forceSkip: true,
reduceQueueTime: true,
deployerIsProposer: false,
proposalId:
"16177445778432224472212272508299557275111595204509579362893638738519171283271",
},
async ({ ethers }) => {
// 1. Deploy new OETH Vault Core and Admin implementations
const dVaultAdmin = await deployWithConfirmation(
"OETHVault",
[addresses.mainnet.WETH],
undefined,
true
);

// 2. Connect to the OETH Vault as its governor via the proxy
const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy");
const cVault = await ethers.getContractAt(
"IVault",
cOETHVaultProxy.address
);

// 3. Connect to the Compounding Staking Strategy Proxy to set it as default strategy
const defaultStrategy = await ethers.getContract(
"CompoundingStakingSSVStrategyProxy"
);

// 4. Deploy Supernova AMO Strategy implementation
await deployWithConfirmation("OETHSupernovaAMOProxy");
const cOETHSupernovaAMOProxy = await ethers.getContract(
"OETHSupernovaAMOProxy"
);

// Deploy Supernova AMO Strategy implementation
const cSupernovaAMOStrategy =
await deployOETHSupernovaAMOStrategyImplementation();

async () => {
return {
name: "Upgrade OETH Vault to new Core and Admin implementations and deploy Supernova AMO Strategy",
actions: [
// 1. Upgrade the OETH Vault proxy to the new core vault implementation
{
contract: cOETHVaultProxy,
signature: "upgradeTo(address)",
args: [dVaultAdmin.address],
},
// 2. Set Compounding Staking Strategy as default strategy
{
contract: cVault,
signature: "setDefaultStrategy(address)",
args: [defaultStrategy.address],
},
// 3. Approve new strategy on the Vault
{
contract: cVault,
signature: "approveStrategy(address)",
args: [cOETHSupernovaAMOProxy.address],
},
// 4. Add strategy to mint whitelist
{
contract: cVault,
signature: "addStrategyToMintWhitelist(address)",
args: [cOETHSupernovaAMOProxy.address],
},
// 5. Set the Harvester on the Supernova AMO strategy
{
contract: cSupernovaAMOStrategy,
signature: "setHarvesterAddress(address)",
args: [addresses.multichainStrategist],
},
],
actions: [],
};
}
);
30 changes: 30 additions & 0 deletions contracts/deploy/mainnet/194_remove_oeth_supernova_amo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const { deploymentWithGovernanceProposal } = require("../../utils/deploy");

module.exports = deploymentWithGovernanceProposal(
{
deployName: "194_remove_oeth_supernova_amo",
forceDeploy: false,
reduceQueueTime: true,
deployerIsProposer: false,
proposalId: "35609681461618052145387081603214161093035331291961687423754678012941529359332",
},
async ({ ethers }) => {
// Current OETH Vault contracts
const cVaultProxy = await ethers.getContract("OETHVaultProxy");
const cVault = await ethers.getContractAt("IVault", cVaultProxy.address);
const cStrategyProxy = await ethers.getContract("OETHSupernovaAMOProxy");

// Governance Actions
// ----------------
return {
name: "Remove the Supernova AMO Strategy from the OETH Vault",
actions: [
{
contract: cVault,
signature: "removeStrategy(address)",
args: [cStrategyProxy.address],
},
],
};
}
);
Loading
Loading