-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable rebaseOptIn by the governor #1961
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,39 @@ | ||
const { deploymentWithGovernanceProposal } = require("../utils/deploy"); | ||
|
||
module.exports = deploymentWithGovernanceProposal( | ||
{ | ||
deployName: "082_upgrade_oeth", | ||
forceDeploy: false, | ||
reduceQueueTime: true, | ||
deployerIsProposer: true, | ||
}, | ||
async ({ ethers, deployWithConfirmation }) => { | ||
const cOETHProxy = await ethers.getContract("OETHProxy"); | ||
const eigenLayerStrategyContract = | ||
"0xa4c637e0f704745d182e4d38cab7e7485321d059"; | ||
|
||
// Deploy new version of OETH contract | ||
const dOETHImpl = await deployWithConfirmation("OETH", []); | ||
|
||
const cOETH = await ethers.getContractAt("OETH", cOETHProxy.address); | ||
|
||
// Governance Actions | ||
// ---------------- | ||
return { | ||
name: "Upgrade the OETH AMO strategy with peg keeping functions.", | ||
actions: [ | ||
// Upgrade the OETH token proxy contract to the new implementation | ||
{ | ||
contract: cOETHProxy, | ||
signature: "upgradeTo(address)", | ||
args: [dOETHImpl.address], | ||
}, | ||
{ | ||
contract: cOETH, | ||
signature: "governanceRebaseOptIn(address)", | ||
args: [eigenLayerStrategyContract], | ||
}, | ||
], | ||
}; | ||
} | ||
); |
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,41 @@ | ||
const { expect } = require("chai"); | ||
|
||
const { loadDefaultFixture } = require("./../_fixture"); | ||
const { isCI } = require("./../helpers"); | ||
|
||
/** | ||
* Regarding hardcoded addresses: | ||
* The addresses are hardcoded in the test files (instead of | ||
* using them from addresses.js) intentionally. While importing and | ||
* using the variables from that file increases readability, it may | ||
* result in it being a single point of failure. Anyone can update | ||
* the addresses.js file and it may go unnoticed. | ||
* | ||
* Points against this: The on-chain data would still be correct, | ||
* making the tests to fail in case only addresses.js is updated. | ||
* | ||
* Still open to discussion. | ||
*/ | ||
|
||
describe("ForkTest: OETH", function () { | ||
this.timeout(0); | ||
|
||
// Retry up to 3 times on CI | ||
this.retries(isCI ? 3 : 0); | ||
|
||
let fixture; | ||
beforeEach(async () => { | ||
fixture = await loadDefaultFixture(); | ||
}); | ||
|
||
describe("verify state", () => { | ||
// These tests use a transaction to call a view function so the gas usage can be reported. | ||
it("Should get total value", async () => { | ||
const { oeth } = fixture; | ||
const eigenLayerStrategyContract = | ||
"0xa4c637e0f704745d182e4d38cab7e7485321d059"; | ||
// 2 equals OptIn | ||
expect(await oeth.rebaseState(eigenLayerStrategyContract)).to.be.equal(2); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd add EigenLayerStrategy to the addresses file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost the same comment I've left on one of @shahthepro's PRs but he made a great point, that when these addresses are immutable, it is safer to leave them hardcoded in the test files, so someone doesn't mistakingly change the address in the
addresses.js
and that could have unexpected consequences. This comment addresses it.I think Shah makes a great point, though I don't have strong conviction either way regarding this topic.