Fraction ProtocolinternalFacetspurchasePhaseFacetspurchaseDiscountFacetsnonGenesisIdsburnForDiscount

BurnFungibleForDiscountFacetStorage

BurnFungibleForDiscountFacetStorage

AlreadyInitialized

error AlreadyInitialized()

Thrown when attempting to re-initialize.

UnsupportedBurnableInterface

error UnsupportedBurnableInterface()

Thrown when burnable interface is not supported.

InvalidZeroAmountPerFraction

error InvalidZeroAmountPerFraction()

Thrown when attempting to pass invalid zero amount per fraction.

InvalidDiscountPercentage

error InvalidDiscountPercentage(uint256 discountPercentage)

Thrown when attempting to pass invalid discount percentage.

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: 0x885cfbd4fe0a27ff29babde777c25f5ed3657a18baf6ad38630b390e37b72500

Layout

struct Layout {
  address tokenToBurn;
  mapping(uint256 => struct BurnFungibleForDiscountFacetStorage.CampaignInfo) campaignInfo;
}

CampaignInfo

struct CampaignInfo {
  uint256 amountToBurnPerFraction;
  uint256 discountPercentage;
}

layout

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

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

initPurchaseDiscountFacet

function initPurchaseDiscountFacet(struct BurnFungibleForDiscountFacetStorage.Layout l, bytes initPurchaseDiscountData) internal returns (address)

setAndCheckPurchaseDiscount

function setAndCheckPurchaseDiscount(struct BurnFungibleForDiscountFacetStorage.Layout l, bytes postFractionPurchaseDiscountData) internal returns (uint256, uint256, uint256)

applyDiscount

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

On this page