Fraction ProtocolinternalFacetspurchasePhaseFacetspurchaseDiscountFacetsnonGenesisIds

PurchaseDiscountMixerStorage

PurchaseDiscountMixerStorage

WrongInitializationData

error WrongInitializationData()

Thrown when attempting to pass wrong initialization data.

WrongSetAndCheckData

error WrongSetAndCheckData()

Thrown when attempting to pass wrong set and check data.

UnsupportedSelector

error UnsupportedSelector()

Thrown when attempting to pass unsupported selector.

UnsupportedDiscountModel

error UnsupportedDiscountModel()

Thrown when discount model is unsupported.

UnsupportedGetPriceModel

error UnsupportedGetPriceModel()

Thrown when getPrice model is unsupported.

STORAGE_SLOT

bytes32 STORAGE_SLOT

================================================== STORAGE =================================================

Unique identifier for the storage slot where the Layout struct is stored. Derived from the ERC7201 formula. STORAGE_SLOT: 0x05fe990148f1eb6424d275e8eea292b2b11e85023253974f34d83f900a093400

FunctionSelectors

struct FunctionSelectors {
  bytes4 initSelector;
  bytes4 setAndCheckSelector;
  bytes4 applyDiscountSelector;
  bytes4 getPriceSelector;
}

Layout

struct Layout {
  mapping(bytes4 => bool) isSetAndCheckSelectorSupported;
  mapping(bytes4 => bool) isApplyDiscountSelectorSupported;
  mapping(bytes4 => bool) isGetPriceSelectorSupported;
  mapping(uint256 => mapping(bytes4 => bool)) isDiscountModelForId;
  mapping(uint256 => mapping(bytes4 => bool)) isGetPriceModelForId;
}

layout

function layout() internal pure returns (struct PurchaseDiscountMixerStorage.Layout l)

Retrieves a reference to the Layout struct stored at a specified storage slot

initPurchaseDiscountFacet

function initPurchaseDiscountFacet(struct PurchaseDiscountMixerStorage.Layout l, bytes initPurchaseDiscountData) internal

setAndCheckPurchaseDiscount

function setAndCheckPurchaseDiscount(struct PurchaseDiscountMixerStorage.Layout l, bytes postFractionPurchaseDiscountData) internal returns (uint256, bytes4[])

applyDiscount

function applyDiscount(struct PurchaseDiscountMixerStorage.Layout l, uint256 campaignId, uint256 amountOfFractions, address account, bytes operationData) internal returns (uint256, uint256)

On this page