-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feat/feature flags #22
base: main
Are you sure you want to change the base?
Feat/feature flags #22
Conversation
… only using renWBTC pool
contracts/peaks/BadgerSettPeak.sol
Outdated
|
||
import {ISwap} from "../interfaces/ISwap.sol"; | ||
import {ICore} from "../interfaces/ICore.sol"; | ||
import {ISett} from "../interfaces/ISett.sol"; | ||
import {IBadgerSettPeak} from "../interfaces/IPeak.sol"; | ||
|
||
contract BadgerSettPeak is AccessControlDefended, IBadgerSettPeak { | ||
contract BadgerSettPeak is AccessControlDefended, Pausable, IBadgerSettPeak { |
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.
Need to use PausableSlot.sol
contracts/peaks/BadgerSettPeak.sol
Outdated
modifier onlyGuardianOrGovernance() { | ||
require(msg.sender == guardian || msg.sender == owner(), "onlyGuardianOrGovernance"); | ||
_; | ||
} | ||
|
||
// ===== Pausing Functionality ===== | ||
|
||
function pause() external onlyGuardianOrGovernance { | ||
_pause(); | ||
} | ||
|
||
function unpause() external onlyGovernance { | ||
_unpause(); | ||
} | ||
|
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.
Would prefer these be moved to AccessControlDefended
to avoid code duplication across peaks.
contracts/peaks/BadgerSettPeak.sol
Outdated
@@ -186,6 +206,10 @@ contract BadgerSettPeak is AccessControlDefended, IBadgerSettPeak { | |||
onlyGovernance | |||
{ | |||
CurvePool memory pool; | |||
|
|||
// We only will support one asset per peak going forward. While somewhat hacky, this allows us to preserve the interface and existing code. | |||
require(_pools.length <= 1, "maximum of one whitelisted pool"); |
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.
Discussed on DM, that this doesn't solve anything.
@@ -32,7 +32,7 @@ contract AccessControlDefendedBase { | |||
} | |||
|
|||
contract AccessControlDefended is GovernableProxy, AccessControlDefendedBase { | |||
uint256[50] private __gap; | |||
uint256[48] private __gap; |
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.
Why reduce 2 slots?
No description provided.