-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c77fe36
commit d88d411
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | ||
}, | ||
], | ||
}; | ||
} | ||
); |