Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion contracts/bondingcurve/BondingCurve.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract contract BondingCurve is IBondingCurve, OracleRef, PCVSplitter, Timed {
}

/// @notice sets the bonding curve price buffer
function setBuffer(uint256 _buffer) external override onlyGuardianOrGovernor {
function setBuffer(uint256 _buffer) external override onlyGovernor {
require(
_buffer < BUFFER_GRANULARITY,
"BondingCurve: Buffer exceeds or matches granularity"
Expand Down
2 changes: 1 addition & 1 deletion contracts/oracle/UniswapOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ contract UniswapOracle is IUniswapOracle, CoreRef {
}

/// @notice set a new duration for the TWAP window
function setDuration(uint256 _duration) external override onlyGuardianOrGovernor {
function setDuration(uint256 _duration) external override onlyGovernor {
duration = _duration;
emit DurationUpdate(_duration);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/pcv/EthUniswapPCVController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ contract EthUniswapPCVController is IUniswapPCVController, UniRef {
function setReweightMinDistance(uint256 basisPoints)
external
override
onlyGuardianOrGovernor
onlyGovernor
{
_minDistanceForReweight = Decimal.ratio(
basisPoints,
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/UniswapIncentive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ contract UniswapIncentive is IUniswapIncentive, UniRef {
function setTimeWeightGrowth(uint32 growthRate)
external
override
onlyGuardianOrGovernor
onlyGovernor
{
TimeWeightInfo memory tw = timeWeightInfo;
timeWeightInfo = TimeWeightInfo(
Expand Down
11 changes: 1 addition & 10 deletions test/bondingcurve/EthBondingCurve.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,17 +641,8 @@ describe('EthBondingCurve', function () {
await expectRevert(this.bondingCurve.setBuffer(10000, {from: governorAddress}), "BondingCurve: Buffer exceeds or matches granularity");
});

it('Guardian set succeeds', async function() {
expectEvent(
await this.bondingCurve.setBuffer(1000, {from: guardianAddress}),
'BufferUpdate',
{_buffer: new BN(1000)}
);
expect(await this.bondingCurve.buffer()).to.be.bignumber.equal(new BN(1000));
});

it('Non-governor set reverts', async function() {
await expectRevert(this.bondingCurve.setBuffer(1000, {from: userAddress}), "CoreRef: Caller is not a guardian or governor");
await expectRevert(this.bondingCurve.setBuffer(1000, {from: userAddress}), "CoreRef: Caller is not a governor");
});
});

Expand Down
11 changes: 1 addition & 10 deletions test/oracle/UniswapOracle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,8 @@ describe('UniswapOracle', function () {
expect(await this.oracle.duration()).to.be.bignumber.equal(new BN(1000));
});

it('Guardian set succeeds', async function() {
expectEvent(
await this.oracle.setDuration(1000, {from: guardianAddress}),
'DurationUpdate',
{ _duration: '1000' }
);
expect(await this.oracle.duration()).to.be.bignumber.equal(new BN(1000));
});

it('Non-governor set reverts', async function() {
await expectRevert(this.oracle.setDuration(1000, {from: userAddress}), "CoreRef: Caller is not a guardian or governor");
await expectRevert(this.oracle.setDuration(1000, {from: userAddress}), "CoreRef: Caller is not a governor");
});
});
});
Expand Down
11 changes: 1 addition & 10 deletions test/pcv/EthUniswapPCVController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,8 @@ describe('EthUniswapPCVController', function () {
expect((await this.pcvController.minDistanceForReweight())[0]).to.be.bignumber.equal('5000000000000000');
});

it('Guardian set succeeds', async function() {
expectEvent(
await this.pcvController.setReweightMinDistance(50, {from: guardianAddress}),
'ReweightMinDistanceUpdate',
{ _basisPoints: '50' }
);
expect((await this.pcvController.minDistanceForReweight())[0]).to.be.bignumber.equal('5000000000000000');
});

it('Non-governor set reverts', async function() {
await expectRevert(this.pcvController.setReweightMinDistance(50, {from: userAddress}), "CoreRef: Caller is not a guardian or governor");
await expectRevert(this.pcvController.setReweightMinDistance(50, {from: userAddress}), "CoreRef: Caller is not a governor");
});
});

Expand Down
11 changes: 1 addition & 10 deletions test/token/UniswapIncentive.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,17 +856,8 @@ describe('UniswapIncentive', function () {
expect(await this.incentive.getGrowthRate()).to.be.bignumber.equal(new BN(1000));
});

it('Guardian set succeeds', async function() {
expectEvent(
await this.incentive.setTimeWeightGrowth(1000, {from: guardianAddress}),
'GrowthRateUpdate',
{_growthRate: '1000'}
);
expect(await this.incentive.getGrowthRate()).to.be.bignumber.equal(new BN(1000));
});

it('Non-governor set reverts', async function() {
await expectRevert(this.incentive.setTimeWeightGrowth(1000, {from: userAddress}), "CoreRef: Caller is not a guardian or governor");
await expectRevert(this.incentive.setTimeWeightGrowth(1000, {from: userAddress}), "CoreRef: Caller is not a governor");
});
});

Expand Down