Skip to content
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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

dapp-whisperer
Copy link
Collaborator

No description provided.


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 {
Copy link
Member

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

Comment on lines 47 to 61
modifier onlyGuardianOrGovernance() {
require(msg.sender == guardian || msg.sender == owner(), "onlyGuardianOrGovernance");
_;
}

// ===== Pausing Functionality =====

function pause() external onlyGuardianOrGovernance {
_pause();
}

function unpause() external onlyGovernance {
_unpause();
}

Copy link
Member

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.

@@ -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");
Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why reduce 2 slots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants