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

add optimistic approval access for bonding curve #123

Merged
merged 1 commit into from
Aug 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions contracts/bondingcurve/BondingCurve.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ contract BondingCurve is IBondingCurve, OracleRef, PCVSplitter, Timed, Incentivi
}

/// @notice sets the bonding curve Scale target
function setScale(uint256 newScale) external override onlyGovernor {
function setScale(uint256 newScale) external override onlyGovernorOrAdmin {
_setScale(newScale);
}

/// @notice resets the totalPurchased
function reset() external override onlyGovernor {
function reset() external override onlyGovernorOrAdmin {
uint256 oldTotalPurchased = totalPurchased;
totalPurchased = 0;
emit Reset(oldTotalPurchased);
}

/// @notice sets the bonding curve price buffer
function setBuffer(uint256 newBuffer) external override onlyGovernor {
function setBuffer(uint256 newBuffer) external override onlyGovernorOrAdmin {
require(
newBuffer < BASIS_POINTS_GRANULARITY,
"BondingCurve: Buffer exceeds or matches granularity"
Expand All @@ -131,7 +131,7 @@ contract BondingCurve is IBondingCurve, OracleRef, PCVSplitter, Timed, Incentivi
}

/// @notice sets the bonding curve price discount
function setDiscount(uint256 newDiscount) external override onlyGovernor {
function setDiscount(uint256 newDiscount) external override onlyGovernorOrAdmin {
require(
newDiscount < BASIS_POINTS_GRANULARITY,
"BondingCurve: Buffer exceeds or matches granularity"
Expand All @@ -142,12 +142,12 @@ contract BondingCurve is IBondingCurve, OracleRef, PCVSplitter, Timed, Incentivi
}

/// @notice sets the allocate incentive frequency
function setIncentiveFrequency(uint256 _frequency) external override onlyGovernor {
function setIncentiveFrequency(uint256 _frequency) external override onlyGovernorOrAdmin {
_setDuration(_frequency);
}

/// @notice sets the mint cap for the bonding curve
function setMintCap(uint256 _mintCap) external override onlyGovernor {
function setMintCap(uint256 _mintCap) external override onlyGovernorOrAdmin {
_setMintCap(_mintCap);
}

Expand Down