Helpful?
BipsLibrary
Git Source | Generated with forge doc
State Variables
BPS_DENOMINATOR
uint256 internal constant BPS_DENOMINATOR = 10_000;
Functions
calculatePortion
function calculatePortion(uint256 amount, uint256 bips) internal pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The total amount to calculate a percentage of |
bips | uint256 | The percentage to calculate, in bips |
Errors
InvalidBips
emitted when an invalid percentage is provided
error InvalidBips();