Fraction ProtocolinternalFacetspurchasePhaseFacetspurchaseDiscountFacetsgenesisIds

PurchaseDiscountGenesisIdsMixerStorage

PurchaseDiscountGenesisIdsMixerStorage

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: TO-DO

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 PurchaseDiscountGenesisIdsMixerStorage.Layout l)

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

initPurchaseDiscountFacet

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

setAndCheckPurchaseDiscount

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

applyDiscount

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

getPricePerFractionForGenesisId

function getPricePerFractionForGenesisId(struct PurchaseDiscountGenesisIdsMixerStorage.Layout l, uint256 campaignId, uint256 genesisId, bytes discountOperationData) internal returns (uint256 pricePerFraction)

On this page