IOfferingFactory

Git Source

Inherits: IFactory

Defines all functions available in the offering factory

Interface for OfferingFactory diamond using unified FacetRegistry and IFactory

Template management moved to unified FacetRegistry

Combines FactoryBase functionality with offering-specific functions and unified access control

Functions

createOffering

function createOffering(string calldata templateName, address identityAccessManager, bytes calldata initData)
    external
    returns (address offering);

createOfferingWithFee

function createOfferingWithFee(string calldata templateName, address identityAccessManager, bytes calldata initData)
    external
    payable
    returns (address offering);

getAllOfferings

function getAllOfferings() external view returns (address[] memory offerings);

getOfferingsByType

function getOfferingsByType(string calldata offeringType) external view returns (address[] memory offerings);

getOfferingsByEntity

function getOfferingsByEntity(address entity) external view returns (address[] memory offerings);

getOfferingType

function getOfferingType(address offering) external view returns (string memory offeringType);

getOfferingEntity

function getOfferingEntity(address offering) external view returns (address entity);

setMaxOfferingsPerEntity

function setMaxOfferingsPerEntity(uint256 maxOfferings) external;

setCreationFee

function setCreationFee(uint256 fee) external;

setFeeRecipient

function setFeeRecipient(address recipient) external;

setTypeSpecificFee

function setTypeSpecificFee(string calldata offeringType, uint256 fee) external;

setOfferingTypeAllowed

function setOfferingTypeAllowed(string calldata offeringType, bool allowed) external;

initializeFactory

function initializeFactory(address feeRecipient, uint256 creationFee, uint256 maxOfferingsPerEntity) external;

getTotalOfferingsCreated

function getTotalOfferingsCreated() external view returns (uint256 total);

getOfferingCountByType

function getOfferingCountByType(string calldata offeringType) external view returns (uint256 count);

getEntityOfferingCount

function getEntityOfferingCount(address entity) external view returns (uint256 count);

getCreationFee

function getCreationFee(string calldata offeringType) external view returns (uint256 fee);

isOfferingTypeAllowed

function isOfferingTypeAllowed(string calldata offeringType) external view returns (bool allowed);

getFeeRecipient

function getFeeRecipient() external view returns (address recipient);

getMaxOfferingsPerEntity

function getMaxOfferingsPerEntity() external view returns (uint256 maxOfferings);

getFactoryStats

function getFactoryStats()
    external
    view
    returns (uint256 totalTemplates, uint256 totalOfferings, uint256 totalActiveTemplates);

getFactoryConfiguration

function getFactoryConfiguration()
    external
    view
    returns (uint256 maxOfferingsPerEntity, uint256 creationFee, address feeRecipient);

Events

OfferingCreated

event OfferingCreated(address indexed offering, address indexed entity, string offeringType, string templateName);

OfferingFactoryCreated

event OfferingFactoryCreated(address indexed factory);

FactoryConfigurationUpdated

event FactoryConfigurationUpdated(bool paused, uint256 maxOfferingsPerEntity, uint256 creationFee);

OfferingTypeAllowedUpdated

event OfferingTypeAllowedUpdated(string offeringType, bool allowed);

Last updated

Was this helpful?