โฉ๏ธIZNSCurvePricer
IZNSCurvePricer
CurvePriceConfig
Struct for each configurable variable for price and fee calculations.
struct CurvePriceConfig {
uint256 maxPrice;
uint256 curveMultiplier;
uint256 maxLength;
uint256 baseLength;
uint256 precisionMultiplier;
uint256 feePercentage;
}
InvalidPrecisionMultiplierPassed
error InvalidPrecisionMultiplierPassed()
Reverted when multiplier passed by the domain owner is equal to 0 or more than 10^18, which is too large.
MaxLengthSmallerThanBaseLength
error MaxLengthSmallerThanBaseLength()
Reverted when maxLength
smaller than baseLength
.
DivisionByZero
error DivisionByZero()
Reverted when curveMultiplier
AND baseLength
are 0.
PrecisionMultiplierTooLarge
error PrecisionMultiplierTooLarge(uint256 precisionMultiplier)
Reverted when setting the incorrect config where the minimum possible price is less then the precision multiplier passed that will result in returning low prices as 0.
encodeConfig
function encodeConfig(struct IZNSCurvePricer.CurvePriceConfig config) external pure returns (bytes)
decodePriceConfig
function decodePriceConfig(bytes priceConfig) external pure returns (struct IZNSCurvePricer.CurvePriceConfig)
Last updated