IFxGenArt721

Git Source

Inherits: ISeedConsumer, IToken

Author: fx(hash)

ERC-721 token for generative art projects created on fxhash

Functions

activeMinters

function activeMinters() external view returns (address[] memory);

burn

Burns token ID from the circulating supply

function burn(uint256 _tokenId) external;

Parameters

NameTypeDescription
_tokenIduint256ID of the token

contractRegistry

Returns address of the FxContractRegistry contract

function contractRegistry() external view returns (address);

contractURI

Returns contract-level metadata for storefront marketplaces

function contractURI() external view returns (string memory);

fulfillSeedRequest

Fullfills the random seed request on the FxGenArt721 token contract

function fulfillSeedRequest(uint256 _tokenId, bytes32 _seed) external;

Parameters

NameTypeDescription
_tokenIduint256ID of the token
_seedbytes32Hash of the random seed

genArtInfo

Mapping of token ID to GenArtInfo struct (minter, seed, fxParams)

function genArtInfo(uint256 _tokenId) external view returns (address, bytes32, bytes memory);

generateOnchainPointerHash

Generates typed data hash for setting project metadata onchain

function generateOnchainPointerHash(bytes calldata _data) external view returns (bytes32);

Parameters

NameTypeDescription
_databytesBytes-encoded onchain data

Returns

NameTypeDescription
<none>bytes32Typed data hash

generateRendererHash

Generates typed data hash for setting the primary receiver address

function generateRendererHash(address _renderer) external view returns (bytes32);

Parameters

NameTypeDescription
_rendereraddressAddress of the new renderer contract

Returns

NameTypeDescription
<none>bytes32Typed data hash

initialize

Initializes new generative art project

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

Parameters

NameTypeDescription
_owneraddressAddress of token proxy owner
_initInfoInitInfoInitialization information set on project creation
_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

isMinter

Gets the authorization status for the given minter contract

function isMinter(address _minter) external view returns (bool);

Parameters

NameTypeDescription
_minteraddressAddress of the minter contract

Returns

NameTypeDescription
<none>boolAuthorization status

issuerInfo

Returns the issuer information of the project (primaryReceiver, ProjectInfo)

function issuerInfo() external view returns (address, ProjectInfo memory);

metadataInfo

Returns the metadata information of the project (baseURI, onchainPointer)

function metadataInfo() external view returns (bytes memory, address);

mint

Mints arbitrary number of tokens

Only callable by registered minter contracts

function mint(address _to, uint256 _amount, uint256 _payment) external;

Parameters

NameTypeDescription
_toaddressAddress receiving tokens
_amountuint256Number of tokens being minted
_paymentuint256Total payment amount of the transaction

mintParams

Mints single fxParams token

Only callable by registered minter contracts

function mintParams(address _to, bytes calldata _fxParams) external;

Parameters

NameTypeDescription
_toaddressAddress receiving minted token
_fxParamsbytesRandom sequence of fixed-length bytes used as input

nonce

Current nonce for admin signatures

function nonce() external returns (uint96);

ownerMint

Mints single token with randomly generated seed

Only callable by contract owner

function ownerMint(address _to) external;

Parameters

NameTypeDescription
_toaddressAddress receiving token

ownerMintParams

Mints single fxParams token

Only callable by contract owner

function ownerMintParams(address _to, bytes calldata _fxParams) external;

Parameters

NameTypeDescription
_toaddressAddress receiving minted token
_fxParamsbytesRandom sequence of fixed-length bytes used as input

pause

Pauses all function executions where modifier is applied

function pause() external;

primaryReceiver

Returns address of primary receiver for token sales

function primaryReceiver() external view returns (address);

randomizer

Returns the address of the randomizer contract

function randomizer() external view returns (address);

reduceSupply

Reduces maximum supply of collection

function reduceSupply(uint120 _supply) external;

Parameters

NameTypeDescription
_supplyuint120Maximum supply amount

registerMinters

Registers minter contracts with resereve info

function registerMinters(MintInfo[] memory _mintInfo) external;

Parameters

NameTypeDescription
_mintInfoMintInfo[]Mint information of token reserves

remainingSupply

Returns the remaining supply of tokens left to mint

function remainingSupply() external view returns (uint256);

renderer

Returns the address of the Renderer contract

function renderer() external view returns (address);

roleRegistry

Returns the address of the FxRoleRegistry contract

function roleRegistry() external view returns (address);

setBaseRoyalties

Sets the base royalties for all secondary token sales

function setBaseRoyalties(address[] calldata _receivers, uint32[] calldata _allocations, uint96 _basisPoints)
    external;

Parameters

NameTypeDescription
_receiversaddress[]Array of addresses receiving royalties
_allocationsuint32[]Array of allocations used to calculate royalty payments
_basisPointsuint96basis points used to calculate royalty payments

setBaseURI

Sets the new URI of the token metadata

function setBaseURI(bytes calldata _uri) external;

Parameters

NameTypeDescription
_uribytesDecoded content identifier of metadata pointer

setBurnEnabled

Sets flag status of public burn to enabled or disabled

function setBurnEnabled(bool _flag) external;

Parameters

NameTypeDescription
_flagboolStatus of burn

setMintEnabled

Sets flag status of public mint to enabled or disabled

function setMintEnabled(bool _flag) external;

Parameters

NameTypeDescription
_flagboolStatus of mint

setOnchainPointer

Sets the onchain pointer for reconstructing project metadata onchain

function setOnchainPointer(bytes calldata _onchainData, bytes calldata _signature) external;

Parameters

NameTypeDescription
_onchainDatabytesBytes-encoded metadata
_signaturebytesSignature of creator used to verify metadata update

setPrimaryReceivers

Sets the primary receiver address for primary sale proceeds

function setPrimaryReceivers(address[] calldata _receivers, uint32[] calldata _allocations) external;

Parameters

NameTypeDescription
_receiversaddress[]Array of addresses receiving shares from primary sales
_allocationsuint32[]Array of allocation amounts for calculating primary sales shares

setRandomizer

Sets the new randomizer contract

function setRandomizer(address _randomizer) external;

Parameters

NameTypeDescription
_randomizeraddressAddress of the randomizer contract

setRenderer

Sets the new renderer contract

function setRenderer(address _renderer, bytes calldata _signature) external;

Parameters

NameTypeDescription
_rendereraddressAddress of the renderer contract
_signaturebytesSignature of creator used to verify renderer update

setTags

Emits an event for setting tag descriptions for the project

function setTags(uint256[] calldata _tagIds) external;

Parameters

NameTypeDescription
_tagIdsuint256[]Array of tag IDs describing the project

totalSupply

Returns the current circulating supply of tokens

function totalSupply() external view returns (uint96);

unpause

Unpauses all function executions where modifier is applied

function unpause() external;

Events

BaseURIUpdated

Event emitted when the base URI is updated

event BaseURIUpdated(bytes _uri);

Parameters

NameTypeDescription
_uribytesDecoded content identifier of metadata pointer

BurnEnabled

Event emitted when public burn is enabled or disabled

event BurnEnabled(bool indexed _flag);

Parameters

NameTypeDescription
_flagboolStatus of burn

MintEnabled

Event emitted when public mint is enabled or disabled

event MintEnabled(bool indexed _flag);

Parameters

NameTypeDescription
_flagboolStatus of mint

ProjectDeleted

Event emitted when project is deleted only once supply is set to zero

event ProjectDeleted();

ProjectInitialized

Event emitted when new project is initialized

event ProjectInitialized(
    address indexed _primaryReceiver, ProjectInfo _projectInfo, MetadataInfo _metadataInfo, MintInfo[] _mintInfo
);

Parameters

NameTypeDescription
_primaryReceiveraddressAddress of splitter contract receiving primary sales
_projectInfoProjectInfoProject information
_metadataInfoMetadataInfoMetadata information of token
_mintInfoMintInfo[]Array of authorized minter contracts and their reserves

PrimaryReceiverUpdated

Event emitted when the primary receiver address is updated

event PrimaryReceiverUpdated(address indexed _receiver, address[] _receivers, uint32[] _allocations);

Parameters

NameTypeDescription
_receiveraddressThe split address receiving funds on behalf of the users
_receiversaddress[]Array of addresses receiving a portion of the funds in a split
_allocationsuint32[]Array of allocation shares for the split

ProjectTags

Event emitted when project tags are set

event ProjectTags(uint256[] indexed _tagIds);

Parameters

NameTypeDescription
_tagIdsuint256[]Array of tag IDs describing the project

RandomizerUpdated

Event emitted when Randomizer contract is updated

event RandomizerUpdated(address indexed _randomizer);

Parameters

NameTypeDescription
_randomizeraddressAddress of new Randomizer contract

RendererUpdated

Event emitted when Renderer contract is updated

event RendererUpdated(address indexed _renderer);

Parameters

NameTypeDescription
_rendereraddressAddress of new Renderer contract

OnchainPointerUpdated

Event emitted when onchain data of project is updated

event OnchainPointerUpdated(address _pointer);

Parameters

NameTypeDescription
_pointeraddressSSTORE2 pointer to the onchain data

SupplyReduced

Event emitted when maximum supply is reduced

event SupplyReduced(uint120 indexed _prevSupply, uint120 indexed _newSupply);

Parameters

NameTypeDescription
_prevSupplyuint120Amount of previous supply
_newSupplyuint120Amount of new supply

Errors

AllocationExceeded

Error thrown when total minter allocation exceeds maximum supply

error AllocationExceeded();

BurnInactive

Error thrown when burning is inactive

error BurnInactive();

FeeReceiverMissing

Error thrown when the fee receiver address is not included in the receiver allocations

error FeeReceiverMissing();

InsufficientSupply

Error thrown when remaining supply is zero

error InsufficientSupply();

InvalidAmount

Error thrown when max supply amount is invalid

error InvalidAmount();

InvalidInputSize

Error thrown when input size does not match actual byte size of params data

error InvalidInputSize();

InvalidStartTime

Error thrown when reserve start time is invalid

error InvalidStartTime();

InvalidEndTime

Error thrown when reserve end time is invalid

error InvalidEndTime();

InvalidFeeReceiver

Error thrown when the configured fee receiver is not valid

error InvalidFeeReceiver();

MintActive

Error thrown when minting is active

error MintActive();

MintInactive

Error thrown when minting is inactive

error MintInactive();

NotAuthorized

Error thrown when caller is not authorized to execute transaction

error NotAuthorized();

NotOwner

Error thrown when signer is not the owner

error NotOwner();

SupplyRemaining

Error thrown when supply is remaining

error SupplyRemaining();

UnauthorizedAccount

Error thrown when caller does not have the specified role

error UnauthorizedAccount();

UnauthorizedMinter

Error thrown when caller does not have minter role

error UnauthorizedMinter();

UnregisteredMinter

Error thrown when minter is not registered on token contract

error UnregisteredMinter();