Skip to content

Commit

Permalink
Merge pull request #18 from RadicalxChange/92_division_rounding
Browse files Browse the repository at this point in the history
remove numerator denominator control
  • Loading branch information
St4rgarden authored May 7, 2024
2 parents 56617e2 + 21aac5f commit 1c4021c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion contracts/pco/PeriodicPCOParamsInternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract contract PeriodicPCOParamsInternal is IPeriodicPCOParamsInternal {
uint256 feeDenominator
) internal {
require(
feeDenominator > feeNumerator && feeDenominator < 10_001,
feeDenominator < 10_001,
'PeriodicPCOParamsInternal: invalid fee'
);

Expand Down
10 changes: 0 additions & 10 deletions test/pco/PeriodicPCOParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ describe('PeriodicPCOParams', function () {
).to.be.revertedWith('PeriodicPCOParamsInternal: invalid fee');
});

it('should not set numerator higher than denominator', async function () {
const factory = await ethers.getContractFactory('PeriodicPCOParamsFacet');
const instance = await factory.deploy();
await instance.deployed();

await expect(
instance['initializePCOParams(uint256,uint256,uint256)'](1, 5, 4),
).to.be.revertedWith('PeriodicPCOParamsInternal: invalid fee');
});

it('should revert if already initialized', async function () {
const factory = await ethers.getContractFactory('PeriodicPCOParamsFacet');
const instance = await factory.deploy();
Expand Down

0 comments on commit 1c4021c

Please sign in to comment.