Skip to content

Commit

Permalink
feat: add OETH Fixed Rate Dripper.
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-ux committed Jan 13, 2025
1 parent c77fe36 commit d88d411
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
14 changes: 14 additions & 0 deletions contracts/contracts/harvest/OETHFixedRateDripper.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { FixedRateDripper } from "./FixedRateDripper.sol";

/**
* @title OETH FixedRateDripper Contract
* @author Origin Protocol Inc
*/
contract OETHFixedRateDripper is FixedRateDripper {
constructor(address _vault, address _token)
FixedRateDripper(_vault, _token)
{}
}
7 changes: 7 additions & 0 deletions contracts/contracts/proxies/Proxies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,10 @@ contract MorphoGauntletPrimeUSDTStrategyProxy is
{

}

/**
* @notice OETHFixedRateDripperProxy delegates calls to a OETHFixedRateDripper implementation
*/
contract OETHFixedRateDripperProxy is InitializeGovernedUpgradeabilityProxy {

}
63 changes: 63 additions & 0 deletions contracts/deploy/mainnet/117_oeth_fixed_rate_dripper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
const addresses = require("../../utils/addresses");
const { deploymentWithGovernanceProposal } = require("../../utils/deploy");

module.exports = deploymentWithGovernanceProposal(
{
deployName: "117_oeth_fixed_rate_dripper",
forceDeploy: false,
//forceSkip: true,
reduceQueueTime: true,
deployerIsProposer: false,
proposalId: "",
},
async ({ deployWithConfirmation, withConfirmation }) => {
const cOETHVaultProxy = await ethers.getContractAt(
"VaultAdmin",
addresses.mainnet.OETHVaultProxy
);

// Deployer Actions
// ----------------
const { deployerAddr } = await getNamedAccounts();
const sDeployer = await ethers.provider.getSigner(deployerAddr);

// 1. Deploy the Fixed Rate Dripper Proxy
const dOETHFixedRateDripperProxy = await deployWithConfirmation(
"OETHFixedRateDripperProxy"
);

const cOETHFixedRateDripperProxy = await ethers.getContract(
"OETHFixedRateDripperProxy"
);

// 2. Deploy the OETH Fixed Rate Dripper implementation
const dOETHFixedRateDripper = await deployWithConfirmation(
"OETHFixedRateDripper",
[addresses.mainnet.OETHVaultProxy, addresses.mainnet.WETH]
);

// 3. Initialize the Fixed Rate Dripper Proxy
const initFunction = "initialize(address,address,bytes)";
await withConfirmation(
cOETHFixedRateDripperProxy.connect(sDeployer)[initFunction](
dOETHFixedRateDripper.address,
addresses.mainnet.Timelock, // governor
"0x" // no init data
)
);

// Governance Actions
// ----------------
return {
name: "",
actions: [
// Collect on the current OETH dripper
{
contract: cOETHVaultProxy,
signature: "setDripper(address)",
args: [dOETHFixedRateDripperProxy.address],
},
],
};
}
);

0 comments on commit d88d411

Please sign in to comment.