IFxTicketFactory

Git Source

Author: fx(hash)

Factory for managing newly deployed FxMintTicket721 tokens

Functions

createTicket

Creates new mint ticket

function createTicket(
    address _owner,
    address _genArt721,
    address _redeemer,
    address _renderer,
    uint48 _gracePeriod,
    MintInfo[] memory _mintInfo
) external returns (address);

Parameters

NameTypeDescription
_owneraddressAddress of project owner
_genArt721addressAddress of GenArt721 token contract
_redeemeraddressAddress of TicketRedeemer minter contract
_rendereraddress
_gracePerioduint48Duration of time before token enters harberger taxation
_mintInfoMintInfo[]Array of authorized minter contracts and their reserves

createTicket

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

function createTicket(bytes calldata _creationInfo) external returns (address);

Parameters

NameTypeDescription
_creationInfobytesBytes-encoded data for ticket creation

Returns

NameTypeDescription
<none>addressmintTicket Address of newly created FxMintTicket721 proxy

getTicketAddress

Calculates the CREATE2 address of a new FxMintTicket721 proxy

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

implementation

Returns address of current FxMintTicket721 implementation contract

function implementation() external view returns (address);

minGracePeriod

Returns the minimum duration of time before a ticket enters harberger taxation

function minGracePeriod() external view returns (uint48);

nonces

Mapping of deployer address to nonce value for precomputing ticket address

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

setMinGracePeriod

Sets the new minimum grace period

function setMinGracePeriod(uint48 _gracePeriod) external;

Parameters

NameTypeDescription
_gracePerioduint48Minimum time duration before a ticket enters harberger taxation

setImplementation

Sets new FxMintTicket721 implementation contract

function setImplementation(address _implementation) external;

Parameters

NameTypeDescription
_implementationaddressAddress of the implementation contract

ticketId

Returns counter of latest token ID

function ticketId() external view returns (uint48);

tickets

Mapping of token ID to address of FxMintTicket721 token contract

function tickets(uint48 _ticketId) external view returns (address);

Events

GracePeriodUpdated

Event emitted when the minimum grace period is updated

event GracePeriodUpdated(address indexed _owner, uint48 indexed _gracePeriod);

Parameters

NameTypeDescription
_owneraddressAddress of the factory owner
_gracePerioduint48Time duration of the new grace period

ImplementationUpdated

Event emitted when the FxMintTicket721 implementation contract is updated

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

Parameters

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

TicketCreated

Event emitted when new FxMintTicket721 is created

event TicketCreated(uint96 indexed _ticketId, address indexed _mintTicket, address indexed _owner);

Parameters

NameTypeDescription
_ticketIduint96ID of the ticket contract
_mintTicketaddressAddress of newly deployed FxMintTicket721 token contract
_owneraddressAddress of ticket owner

Errors

InvalidGracePeriod

Error thrown when grace period is less than minimum requirement of one day

error InvalidGracePeriod();

InvalidOwner

Error thrown when owner is zero address

error InvalidOwner();

InvalidRedeemer

Error thrown when redeemer contract is zero address

error InvalidRedeemer();

InvalidRenderer

Error thrown when renderer contract is zero address

error InvalidRenderer();

InvalidToken

Error thrown when token contract is zero address

error InvalidToken();