Skip to main content
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

NameTypeDescription
amountuint256The total amount to calculate a percentage of
bipsuint256The percentage to calculate, in bips

Errors

InvalidBips

emitted when an invalid percentage is provided

error InvalidBips();
Helpful?