Skip to content

Commit

Permalink
Allow fulfillmentFlatFeeLinkDiscountPPM to be equal to fulfillmentFla…
Browse files Browse the repository at this point in the history
…tFeeNativePPM
  • Loading branch information
kidambisrinivas committed Mar 11, 2024
1 parent 2593243 commit 25672b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus {
if (fallbackWeiPerUnitLink <= 0) {
revert InvalidLinkWeiPrice(fallbackWeiPerUnitLink);
}
if (
fulfillmentFlatFeeLinkDiscountPPM >= fulfillmentFlatFeeNativePPM &&
!(fulfillmentFlatFeeNativePPM == 0 && fulfillmentFlatFeeLinkDiscountPPM == 0)
) {
if (fulfillmentFlatFeeLinkDiscountPPM > fulfillmentFlatFeeNativePPM) {
revert LinkDiscountTooHigh(fulfillmentFlatFeeLinkDiscountPPM, fulfillmentFlatFeeNativePPM);
}
// After payment, there is at least one SLOAD and one SSTORE
Expand Down
Loading

0 comments on commit 25672b5

Please sign in to comment.