-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
percentage premium for vrfv2plus with link discount #11644
Conversation
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
weiPerUnitGas | ||
); | ||
} | ||
|
||
function _calculatePaymentAmountNative( | ||
uint256 startGas, | ||
uint256 gasAfterPaymentCalculation, | ||
uint32 fulfillmentFlatFeePPM, | ||
uint256 weiPerUnitGas | ||
) internal view returns (uint96) { | ||
// Will return non-zero on chains that have this enabled | ||
uint256 l1CostWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data); | ||
// calculate the payment without the premium | ||
uint256 baseFeeWei = weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft()); | ||
// calculate the flat fee in wei |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: change comment
SonarQube Quality Gate |
uint8 nativePremiumPercentage; | ||
// Discount percentage for link payment. Cannot exceed nativePremiumPercentage value. If nativePremiumPercentage is 15 and | ||
// linkDiscountPercentage is 5, then the final premium is 10% premium of the total gas costs for link payment. | ||
uint8 linkDiscountPercentage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively can be linkPremiumPercentage
instead of discount percentage
No description provided.