Skip to content

Solidity API

PropsFeesStorage

Library for managing storage for the PropsFees facet

This library defines the storage structure and access methods for fee-related data

FeeType

Enum representing the type of fee

FLAT for fixed amount fees, PERCENTAGE for proportional fees

solidity
enum FeeType {
  FLAT,
  PERCENTAGE
}

FeeApplication

Enum representing how the fee is applied

PER_UNIT for fees applied to each unit, PER_TRANSACTION for fees applied once per transaction

solidity
enum FeeApplication {
  PER_UNIT,
  PER_TRANSACTION
}

Fee

Struct representing a fee configuration

Contains all necessary information to define and apply a fee

solidity
struct Fee {
  uint256[] feeAmounts;
  address[] feeRecipients;
  enum PropsFeesStorage.FeeType feeType;
  enum PropsFeesStorage.FeeApplication feeApplication;
  uint256 tokenId;
}

Layout

Main storage layout for PropsFees

Contains all persistent data for the PropsFees facet

solidity
struct Layout {
  address accessControlAddress;
  mapping(string => struct PropsFeesStorage.Fee) feeCatalog;
  string[] feeKeys;
}

STORAGE_SLOT

solidity
bytes32 STORAGE_SLOT

Unique storage slot for PropsFees, to avoid storage collisions in the diamond

layout

solidity
function layout() internal pure returns (struct PropsFeesStorage.Layout l)

Function to access the storage layout

Uses assembly to return the storage reference of the Layout struct

Return Values

NameTypeDescription
lstruct PropsFeesStorage.LayoutThe storage reference to the Layout struct