โ†ฉ๏ธIZNSCurvePricer

MaxPriceSet

event MaxPriceSet(bytes32 domainHash, uint256 price)

Emitted when the maxPrice is set in CurvePriceConfig

Parameters

MinPriceSet

event MinPriceSet(bytes32 domainHash, uint256 price)

Emitted when the minPrice is set in CurvePriceConfig

Parameters

BaseLengthSet

event BaseLengthSet(bytes32 domainHash, uint256 length)

Emitted when the baseLength is set in CurvePriceConfig

Parameters

MaxLengthSet

event MaxLengthSet(bytes32 domainHash, uint256 length)

Emitted when the maxLength is set in CurvePriceConfig

Parameters

PrecisionMultiplierSet

event PrecisionMultiplierSet(bytes32 domainHash, uint256 precision)

Emitted when the precisionMultiplier is set in CurvePriceConfig

Parameters

FeePercentageSet

event FeePercentageSet(bytes32 domainHash, uint256 feePercentage)

Emitted when the feePercentage is set in state

Parameters

PriceConfigSet

event PriceConfigSet(bytes32 domainHash, uint256 maxPrice, uint256 minPrice, uint256 maxLength, uint256 baseLength, uint256 precisionMultiplier, uint256 feePercentage)

Emitted when the full CurvePriceConfig is set in state

Parameters

initialize

function initialize(address accessController_, address registry_, struct ICurvePriceConfig.CurvePriceConfig zeroPriceConfig_) external

getPrice

function getPrice(bytes32 parentHash, string label, bool skipValidityCheck) external view returns (uint256)

parentHash param is here to allow pricer contracts to have different price configs for different subdomains skipValidityCheck param is added to provide proper revert when the user is calling this to find out the price of a domain that is not valid. But in Registrar contracts we want to do this explicitly and before we get the price to have lower tx cost for reverted tx. So Registrars will pass this bool as "true" to not repeat the validity check. Note that if calling this function directly to find out the price, a user should always pass "false" as skipValidityCheck param, otherwise, the price will be returned for an invalid label that is not possible to register.

getFeeForPrice

function getFeeForPrice(bytes32 parentHash, uint256 price) external view returns (uint256)

Returns the fee for a given price.

Fees are only supported for PaymentType.STAKE !

getPriceAndFee

function getPriceAndFee(bytes32 parentHash, string label, bool skipValidityCheck) external view returns (uint256 price, uint256 stakeFee)

Fees are only supported for PaymentType.STAKE ! This function will NOT be called if PaymentType != PaymentType.STAKE Instead getPrice() will be called.

setPriceConfig

function setPriceConfig(bytes32 domainHash, struct ICurvePriceConfig.CurvePriceConfig priceConfig) external

setMaxPrice

function setMaxPrice(bytes32 domainHash, uint256 maxPrice) external

setMinPrice

function setMinPrice(bytes32 domainHash, uint256 minPrice) external

setBaseLength

function setBaseLength(bytes32 domainHash, uint256 length) external

setMaxLength

function setMaxLength(bytes32 domainHash, uint256 length) external

setPrecisionMultiplier

function setPrecisionMultiplier(bytes32 domainHash, uint256 multiplier) external

setFeePercentage

function setFeePercentage(bytes32 domainHash, uint256 feePercentage) external

setRegistry

function setRegistry(address registry_) external