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

percentage premium for vrfv2plus with link discount #11644

Closed
wants to merge 1 commit into from

Conversation

jinhoonbang
Copy link
Contributor

No description provided.

Copy link
Contributor

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: change comment

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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;
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant