IFxIssuerFactory

Git Source

Author: fx(hash)

Factory for managing newly deployed FxGenArt721 tokens

Functions

createProjectWithParams

Creates new generative art project

function createProjectWithParams(
    address _owner,
    InitInfo memory _initInfo,
    ProjectInfo memory _projectInfo,
    MetadataInfo memory _metadataInfo,
    MintInfo[] memory _mintInfo,
    address[] memory _royaltyReceivers,
    uint32[] memory _allocations,
    uint96 _basisPoints
) external returns (address);

Parameters

NameTypeDescription
_owneraddressAddress of project owner
_initInfoInitInfoInitialization information
_projectInfoProjectInfoProject information
_metadataInfoMetadataInfoMetadata information
_mintInfoMintInfo[]Array of authorized minter contracts and their reserves
_royaltyReceiversaddress[]Array of addresses receiving royalties
_allocationsuint32[]Array of allocation amounts for calculating royalty shares
_basisPointsuint96Total allocation scalar for calculating royalty shares

Returns

NameTypeDescription
<none>addressgenArtToken Address of newly created FxGenArt721 proxy

createProject

Creates new generative art project with single parameter

function createProject(bytes memory _creationInfo) external returns (address);

Parameters

NameTypeDescription
_creationInfobytesBytes-encoded data for project creation

Returns

NameTypeDescription
<none>addressgenArtToken Address of newly created FxGenArt721 proxy

createProjectWithTicket

Creates new generative art project with new mint ticket in single transaction

function createProjectWithTicket(
    bytes calldata _projectCreationInfo,
    bytes calldata _ticketCreationInfo,
    address _tickeFactory
) external returns (address, address);

Parameters

NameTypeDescription
_projectCreationInfobytesBytes-encoded data for project creation
_ticketCreationInfobytesBytes-encoded data for ticket creation
_tickeFactoryaddressAddress of FxTicketFactory contract

Returns

NameTypeDescription
<none>addressgenArtToken Address of newly created FxGenArt721 proxy
<none>addressmintTicket Address of newly created FxMintTicket721 proxy

getTokenAddress

Calculates the CREATE2 address of a new FxGenArt721 proxy

function getTokenAddress(address _sender) external view returns (address);

implementation

Returns address of current FxGenArt721 implementation contract

function implementation() external view returns (address);

nonces

Mapping of deployer address to nonce value for precomputing token address

function nonces(address _deployer) external view returns (uint256);

pause

Stops new FxGenArt721 tokens from being created

function pause() external;

projectId

Returns counter of latest project ID

function projectId() external view returns (uint96);

projects

Mapping of project ID to address of FxGenArt721 token contract

function projects(uint96) external view returns (address);

roleRegistry

Returns the address of the FxRoleRegistry contract

function roleRegistry() external view returns (address);

setImplementation

Sets new FxGenArt721 implementation contract

function setImplementation(address _implementation) external;

Parameters

NameTypeDescription
_implementationaddressAddress of the implementation contract

unpause

Enables new FxGenArt721 tokens from being created

function unpause() external;

Events

ImplementationUpdated

Event emitted when the FxGenArt721 implementation contract is updated

event ImplementationUpdated(address indexed _owner, address indexed _implementation);

Parameters

NameTypeDescription
_owneraddressAddress of the factory owner
_implementationaddressAddress of the new FxGenArt721 implementation contract

ProjectCreated

Event emitted when a new generative art project is created

event ProjectCreated(uint96 indexed _projectId, address indexed _genArtToken, address indexed _owner);

Parameters

NameTypeDescription
_projectIduint96ID of the project
_genArtTokenaddressAddress of newly deployed FxGenArt721 token contract
_owneraddressAddress of project owner

Errors

InvalidOwner

Error thrown when owner is zero address

error InvalidOwner();

InvalidPrimaryReceiver

Error thrown when primary receiver is zero address

error InvalidPrimaryReceiver();

NotAuthorized

Error thrown when caller is not authorized to execute transaction

error NotAuthorized();