IFxGenArt721
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
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID 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
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_seed | bytes32 | Hash 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
Name | Type | Description |
---|---|---|
_data | bytes | Bytes-encoded onchain data |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | Typed data hash |
generateRendererHash
Generates typed data hash for setting the primary receiver address
function generateRendererHash(address _renderer) external view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
_renderer | address | Address of the new renderer contract |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | Typed 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
Name | Type | Description |
---|---|---|
_owner | address | Address of token proxy owner |
_initInfo | InitInfo | Initialization information set on project creation |
_projectInfo | ProjectInfo | Project information |
_metadataInfo | MetadataInfo | Metadata information |
_mintInfo | MintInfo[] | Array of authorized minter contracts and their reserves |
_royaltyReceivers | address[] | Array of addresses receiving royalties |
_allocations | uint32[] | Array of allocation amounts for calculating royalty shares |
_basisPoints | uint96 | Total 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
Name | Type | Description |
---|---|---|
_minter | address | Address of the minter contract |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Authorization 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
Name | Type | Description |
---|---|---|
_to | address | Address receiving tokens |
_amount | uint256 | Number of tokens being minted |
_payment | uint256 | Total 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
Name | Type | Description |
---|---|---|
_to | address | Address receiving minted token |
_fxParams | bytes | Random 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
Name | Type | Description |
---|---|---|
_to | address | Address receiving token |
ownerMintParams
Mints single fxParams token
Only callable by contract owner
function ownerMintParams(address _to, bytes calldata _fxParams) external;
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address receiving minted token |
_fxParams | bytes | Random 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
Name | Type | Description |
---|---|---|
_supply | uint120 | Maximum supply amount |
registerMinters
Registers minter contracts with resereve info
function registerMinters(MintInfo[] memory _mintInfo) external;
Parameters
Name | Type | Description |
---|---|---|
_mintInfo | MintInfo[] | 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
Name | Type | Description |
---|---|---|
_receivers | address[] | Array of addresses receiving royalties |
_allocations | uint32[] | Array of allocations used to calculate royalty payments |
_basisPoints | uint96 | basis points used to calculate royalty payments |
setBaseURI
Sets the new URI of the token metadata
function setBaseURI(bytes calldata _uri) external;
Parameters
Name | Type | Description |
---|---|---|
_uri | bytes | Decoded content identifier of metadata pointer |
setBurnEnabled
Sets flag status of public burn to enabled or disabled
function setBurnEnabled(bool _flag) external;
Parameters
Name | Type | Description |
---|---|---|
_flag | bool | Status of burn |
setMintEnabled
Sets flag status of public mint to enabled or disabled
function setMintEnabled(bool _flag) external;
Parameters
Name | Type | Description |
---|---|---|
_flag | bool | Status of mint |
setOnchainPointer
Sets the onchain pointer for reconstructing project metadata onchain
function setOnchainPointer(bytes calldata _onchainData, bytes calldata _signature) external;
Parameters
Name | Type | Description |
---|---|---|
_onchainData | bytes | Bytes-encoded metadata |
_signature | bytes | Signature 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
Name | Type | Description |
---|---|---|
_receivers | address[] | Array of addresses receiving shares from primary sales |
_allocations | uint32[] | Array of allocation amounts for calculating primary sales shares |
setRandomizer
Sets the new randomizer contract
function setRandomizer(address _randomizer) external;
Parameters
Name | Type | Description |
---|---|---|
_randomizer | address | Address of the randomizer contract |
setRenderer
Sets the new renderer contract
function setRenderer(address _renderer, bytes calldata _signature) external;
Parameters
Name | Type | Description |
---|---|---|
_renderer | address | Address of the renderer contract |
_signature | bytes | Signature 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
Name | Type | Description |
---|---|---|
_tagIds | uint256[] | 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
Name | Type | Description |
---|---|---|
_uri | bytes | Decoded content identifier of metadata pointer |
BurnEnabled
Event emitted when public burn is enabled or disabled
event BurnEnabled(bool indexed _flag);
Parameters
Name | Type | Description |
---|---|---|
_flag | bool | Status of burn |
MintEnabled
Event emitted when public mint is enabled or disabled
event MintEnabled(bool indexed _flag);
Parameters
Name | Type | Description |
---|---|---|
_flag | bool | Status 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
Name | Type | Description |
---|---|---|
_primaryReceiver | address | Address of splitter contract receiving primary sales |
_projectInfo | ProjectInfo | Project information |
_metadataInfo | MetadataInfo | Metadata information of token |
_mintInfo | MintInfo[] | 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
Name | Type | Description |
---|---|---|
_receiver | address | The split address receiving funds on behalf of the users |
_receivers | address[] | Array of addresses receiving a portion of the funds in a split |
_allocations | uint32[] | Array of allocation shares for the split |
ProjectTags
Event emitted when project tags are set
event ProjectTags(uint256[] indexed _tagIds);
Parameters
Name | Type | Description |
---|---|---|
_tagIds | uint256[] | Array of tag IDs describing the project |
RandomizerUpdated
Event emitted when Randomizer contract is updated
event RandomizerUpdated(address indexed _randomizer);
Parameters
Name | Type | Description |
---|---|---|
_randomizer | address | Address of new Randomizer contract |
RendererUpdated
Event emitted when Renderer contract is updated
event RendererUpdated(address indexed _renderer);
Parameters
Name | Type | Description |
---|---|---|
_renderer | address | Address of new Renderer contract |
OnchainPointerUpdated
Event emitted when onchain data of project is updated
event OnchainPointerUpdated(address _pointer);
Parameters
Name | Type | Description |
---|---|---|
_pointer | address | SSTORE2 pointer to the onchain data |
SupplyReduced
Event emitted when maximum supply is reduced
event SupplyReduced(uint120 indexed _prevSupply, uint120 indexed _newSupply);
Parameters
Name | Type | Description |
---|---|---|
_prevSupply | uint120 | Amount of previous supply |
_newSupply | uint120 | Amount 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();