fx(hash)
Core Contracts
-
FxContractRegistry: Registry contract that manages all deployed smart contracts registered by fxhash
-
FxGenArt721:
ERC-721
implementation contract that allows for minting of new tokens, burning of existing tokens and managing of token royalties -
FxIssuerFactory: Factory contract that clones the
FxGenArt721
implementation to create new Generative Art Projects -
FxMintTicket721:
ERC-721
implementation contract that allows for minting of new tickets, burning of exisiting tickets, and enforcing of harberger taxes over ticket ownership -
FxRoleRegistry: Registry contract that implements AccessControl to manage different roles within the system, such as admin, creator, minter, and moderator
-
FxTicketFactory: Factory contract that clones the
FxMintTicket721
implementation to create new Mint Tickets for an existingFxGenArt721
project
Periphery Contracts
-
DutchAuction: Minter contract that distributes new
FxGenArt721
andFxMintTicket721
tokens at a linear price over a fixed interval of time -
FixedPrice: Minter contract that distributes new
FxGenArt721
andFxMintTicket721
tokens at a fixed price -
IPFSRenderer: Renderer contract that constructs offchain metadata of
FxGenArt721
andFxMintTicket721
tokens pinned to IPFS -
PseudoRandomizer: Randomizer contract that provides a pseudo-randomness
keccak256
hash using the token ID, sender's address, current block number, and hash of the previous block -
ONCHFSRenderer: Renderer contract that constructs onchain metadata of
FxGenArt721
andFxMintTicket721
tokens stored through ONCHFS -
TicketRedeemer: Minter contract that burns an existing
FxMintTicket721
token and mints a newFxGenArt721
token
Setup
- Clone repository
git clone https://github.com/fxhash/fxhash-evm-contracts.git
- Create
.env
file in root directory
DEPLOYER_PRIVATE_KEY=
ETHERSCAN_API_KEY=
GOERLI_RPC_URL=
MAINNET_RPC_URL=
SEPOLIA_RPC_URL=
- Install dependencies
forge install
npm ci
- Activate husky and commitlint
npx husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
- Run tests
npm run test
- Run prettier
npm run prettier
- Deploy contracts
forge script script/Deploy.s.sol --rpc-url $GOERLI_RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --verify --etherscan-api-key $ETHERSCAN_API_KEY --broadcast
- View documentation locally
forge doc --serve --port 3000
Contents
FxIssuerFactory
Inherits: IFxIssuerFactory, Ownable, Pausable
Author: fx(hash)
See the documentation in {IFxIssuerFactory}
State Variables
roleRegistry
Returns the address of the FxRoleRegistry contract
address public immutable roleRegistry;
implementation
Returns address of current FxGenArt721 implementation contract
address public implementation;
projectId
Returns counter of latest project ID
uint96 public projectId;
nonces
Mapping of deployer address to nonce value for precomputing token address
mapping(address => uint256) public nonces;
projects
Mapping of project ID to address of FxGenArt721 token contract
mapping(uint96 => address) public projects;
Functions
constructor
Initializes factory owner, FxRoleRegistry and FxGenArt721 implementation
constructor(address _admin, address _roleRegistry, address _implementation);
createProjectWithTicket
Creates new generative art project with new mint ticket in single transaction
function createProjectWithTicket(
bytes calldata _projectCreationInfo,
bytes calldata _ticketCreationInfo,
address _ticketFactory
) external whenNotPaused returns (address genArtToken, address mintTicket);
Parameters
Name | Type | Description |
---|---|---|
_projectCreationInfo | bytes | Bytes-encoded data for project creation |
_ticketCreationInfo | bytes | Bytes-encoded data for ticket creation |
_ticketFactory | address |
Returns
Name | Type | Description |
---|---|---|
genArtToken | address | Address of newly created FxGenArt721 proxy |
mintTicket | address | Address of newly created FxMintTicket721 proxy |
unpause
Enables new FxGenArt721 tokens from being created
function unpause() external onlyOwner;
pause
Stops new FxGenArt721 tokens from being created
function pause() external onlyOwner;
setImplementation
Sets new FxGenArt721 implementation contract
function setImplementation(address _implementation) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_implementation | address | Address of the implementation contract |
createProject
Creates new generative art project with single parameter
function createProject(bytes memory _creationInfo) public returns (address genArt721);
Parameters
Name | Type | Description |
---|---|---|
_creationInfo | bytes | Bytes-encoded data for project creation |
Returns
Name | Type | Description |
---|---|---|
genArt721 | address | genArtToken Address of newly created FxGenArt721 proxy |
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
) public whenNotPaused returns (address genArtToken);
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address of project owner |
_initInfo | InitInfo | Initialization information |
_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 |
Returns
Name | Type | Description |
---|---|---|
genArtToken | address | Address of newly created FxGenArt721 proxy |
getTokenAddress
Calculates the CREATE2 address of a new FxGenArt721 proxy
function getTokenAddress(address _sender) external view returns (address);
_setImplementation
Sets the FxGenArt721 implementation contract
function _setImplementation(address _implementation) internal;
FxTicketFactory
Inherits: IFxTicketFactory, Ownable
Author: fx(hash)
See the documentation in {IFxTicketFactory}
State Variables
implementation
Returns address of current FxMintTicket721 implementation contract
address public implementation;
minGracePeriod
Returns the minimum duration of time before a ticket enters harberger taxation
uint48 public minGracePeriod;
ticketId
Returns counter of latest token ID
uint48 public ticketId;
nonces
Mapping of deployer address to nonce value for precomputing ticket address
mapping(address => uint256) public nonces;
tickets
Mapping of token ID to address of FxMintTicket721 token contract
mapping(uint48 => address) public tickets;
Functions
constructor
Initializes factory owner, FxMintTicket721 implementation and minimum grace period
constructor(address _admin, address _implementation, uint48 _gracePeriod);
createTicket
Creates new mint ticket
function createTicket(bytes calldata _creationInfo) external returns (address mintTicket);
Parameters
Name | Type | Description |
---|---|---|
_creationInfo | bytes |
setImplementation
Sets new FxMintTicket721 implementation contract
function setImplementation(address _implementation) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_implementation | address | Address of the implementation contract |
setMinGracePeriod
Sets the new minimum grace period
function setMinGracePeriod(uint48 _gracePeriod) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_gracePeriod | uint48 | Minimum time duration before a ticket enters harberger taxation |
createTicket
Creates new mint ticket
function createTicket(
address _owner,
address _genArt721,
address _redeemer,
address _renderer,
uint48 _gracePeriod,
MintInfo[] memory _mintInfo
) public returns (address mintTicket);
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address of project owner |
_genArt721 | address | Address of GenArt721 token contract |
_redeemer | address | Address of TicketRedeemer minter contract |
_renderer | address | |
_gracePeriod | uint48 | Duration of time before token enters harberger taxation |
_mintInfo | MintInfo[] | Array of authorized minter contracts and their reserves |
getTicketAddress
Calculates the CREATE2 address of a new FxMintTicket721 proxy
function getTicketAddress(address _sender) external view returns (address);
_setImplementation
Sets the FxMintTicket721 implementation contract
function _setImplementation(address _implementation) internal;
_setMinGracePeriod
Sets the minimum grace period of time for when token enters harberger taxation
function _setMinGracePeriod(uint48 _gracePeriod) internal;
Contents
- IDutchAuction
- IERC5192
- IFixedPrice
- IFxContractRegistry
- IFxGenArt721
- IFxIssuerFactory
- IFxMintTicket721
- IFxRoleRegistry
- IFxTicketFactory
- IIPFSRenderer
- IMinter
- IONCHFSRenderer
- IPseudoRandomizer
- IRandomizer
- IRenderer
- IRoyaltyManager
- ISeedConsumer
- ISplitsMain
- ITicketRedeemer
- IToken
IDutchAuction
Inherits: IMinter
Author: fx(hash)
Minter for distributing tokens at linear prices over fixed periods of time
Functions
auctions
Mapping of token address to reserve ID to reserve information
function auctions(address, uint256) external view returns (bool, uint248);
buy
Purchases tokens at a linear price over fixed amount of time
function buy(address _token, uint256 _reserveId, uint256 _amount, address _to) external payable;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Amount of tokens to purchase |
_to | address | Address receiving the purchased tokens |
buyAllowlist
Purchases tokens through an allowlist at a linear price over fixed amount of time
function buyAllowlist(
address _token,
uint256 _reserveId,
address _to,
uint256[] calldata _indexes,
bytes32[][] calldata _proofs
) external payable;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_to | address | Address receiving the purchased tokens |
_indexes | uint256[] | Array of indices containing purchase info inside the BitMap |
_proofs | bytes32[][] | Array of merkle proofs used for verifying the purchase |
buyMintPass
Purchases tokens through a mint pass at a linear price over fixed amount of time
function buyMintPass(
address _token,
uint256 _reserveId,
uint256 _amount,
address _to,
uint256 _index,
bytes calldata _signature
) external payable;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Number of tokens being purchased |
_to | address | Address receiving the purchased tokens |
_index | uint256 | Index of puchase info inside the BitMap |
_signature | bytes | Array of merkle proofs used for verifying the purchase |
getFirstValidReserve
Returns the earliest valid reserveId that can mint a token
function getFirstValidReserve(address _token) external view returns (uint256);
getLatestUpdate
Gets the latest timestamp update made to token reserves
function getLatestUpdate(address _token) external view returns (uint40);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
Returns
Name | Type | Description |
---|---|---|
<none> | uint40 | Timestamp of latest update |
getPrice
Gets the current auction price
function getPrice(address _token, uint256 _reserveId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | price Price of the token |
merkleRoots
Mapping of token address to reserve ID to merkle root
function merkleRoots(address, uint256) external view returns (bytes32);
numberMinted
Mapping of token address to reserve ID to number of tokens minted
function numberMinted(address _token, uint256 _reserveId) external view returns (uint256);
pause
Pauses all function executions where modifier is applied
function pause() external;
refund
Refunds an auction buyer with their rebate amount
function refund(address _token, uint256 _reserveId, address _buyer) external;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the mint |
_buyer | address | Address of the buyer receiving the refund |
refunds
Mapping of token address to reserve ID to refund amount
function refunds(address, uint256) external view returns (uint256);
reserves
Mapping of token address to reserve ID to reserve information (allocation, price, max mint)
function reserves(address _token, uint256 _reserveId) external view returns (uint64, uint64, uint128);
saleProceeds
Mapping of token address to reserve ID to amount of sale proceeds
function saleProceeds(address _token, uint256 _reserveId) external view returns (uint256);
setMintDetails
Sets the mint details for token reserves
Mint Details: struct of auction information, merkle root, and signer address
function setMintDetails(ReserveInfo calldata _reserveInfo, bytes calldata _mintDetails) external;
Parameters
Name | Type | Description |
---|---|---|
_reserveInfo | ReserveInfo | Reserve information for the token |
_mintDetails | bytes | Details of the mint pertaining to the minter |
unpause
Unpauses all function executions where modifier is applied
function unpause() external;
withdraw
Withdraws sale processed of primary sales to receiver
function withdraw(address _token, uint256 _reserveId) external;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
Events
MintDetailsSet
Event emitted when the mint details for a Dutch auction are set
event MintDetailsSet(
address indexed _token,
uint256 indexed _reserveId,
ReserveInfo _reserveInfo,
bytes32 _merkleRoot,
address _mintPassSigner,
AuctionInfo _auctionInfo
);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being minted |
_reserveId | uint256 | ID of the reserve |
_reserveInfo | ReserveInfo | The reserve info of the Dutch auction |
_merkleRoot | bytes32 | The merkle root allowlisted buyers |
_mintPassSigner | address | The signing account for mint passes |
_auctionInfo | AuctionInfo | Dutch auction information |
Purchase
Event emitted when a purchase is made during the auction
event Purchase(
address indexed _token,
uint256 indexed _reserveId,
address indexed _buyer,
address _to,
uint256 _amount,
uint256 _price
);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_buyer | address | Address of the buyer |
_to | address | Address where the purchased tokens will be sent |
_amount | uint256 | Amount of tokens purchased |
_price | uint256 | Price at which the tokens were purchased |
RefundClaimed
Event emitted when a refund is claimed by a buyer
event RefundClaimed(address indexed _token, uint256 indexed _reserveId, address indexed _buyer, uint256 _refundAmount);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token for which the refund is claimed |
_reserveId | uint256 | ID of the reserve |
_buyer | address | Address of the buyer claiming the refund |
_refundAmount | uint256 | Amount of refund claimed |
Withdrawn
Event emitted when the sale proceeds are withdrawn
event Withdrawn(address indexed _token, uint256 indexed _reserveId, address indexed _creator, uint256 _proceeds);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token |
_reserveId | uint256 | ID of the reserve |
_creator | address | Address of the creator of the project |
_proceeds | uint256 | Amount of sale proceeds withdrawn |
Errors
AddressZero
Error thrown when receiver is zero address
error AddressZero();
InsufficientFunds
Error thrown when no funds available to withdraw
error InsufficientFunds();
InsufficientPrice
Error thrown when the price is insufficient
error InsufficientPrice();
InvalidAllocation
Error thrown when the allocation amount is zero
error InvalidAllocation();
InvalidAmount
Error thrown when the purchase amount is zero
error InvalidAmount();
InvalidPayment
Error thrown when payment does not equal price
error InvalidPayment();
InvalidPrice
Error thrown when the price is zero
error InvalidPrice();
InvalidPriceCurve
Error thrown when the passing a price curve with less than 2 points
error InvalidPriceCurve();
InvalidReserve
Error thrown when a reserve does not exist
error InvalidReserve();
InvalidStep
Error thrown when the step length is not equally divisible by the auction duration
error InvalidStep();
InvalidToken
Error thrown when the token is address zero
error InvalidToken();
NoAllowlist
Error thrown when buying through allowlist and no allowlist exists
error NoAllowlist();
NoPublicMint
Error thrown when calling buy when either an allowlist or signer exists
error NoPublicMint();
NoRefund
Error thrown when there is no refund available
error NoRefund();
NoSigningAuthority
Error thrown when buy with a mint pass and no signing authority exists
error NoSigningAuthority();
NotEnded
Error thrown if auction has not ended
error NotEnded();
NonRefundableDA
Error thrown if auction is not a refundable dutch auction
error NonRefundableDA();
NotStarted
Error thrown when the auction has not started
error NotStarted();
OnlyAuthorityOrAllowlist
Error thrown when setting both an allowlist and mint signer
error OnlyAuthorityOrAllowlist();
PricesOutOfOrder
Error thrown when the prices are out of order
error PricesOutOfOrder();
IERC5192
Minimal Soulbound NFTs
Functions
locked
Returns the locking status of an Soulbound Token
SBTs assigned to zero address are considered invalid, and queries about them do throw
function locked(uint256 tokenId) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The identifier for an SBT |
Events
Locked
Emitted when the locking status is changed to locked
If a token is minted and the status is locked, this event should be emitted
event Locked(uint256 tokenId);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The identifier for a token |
Unlocked
Emitted when the locking status is changed to unlocked
If a token is minted and the status is unlocked, this event should be emitted
event Unlocked(uint256 tokenId);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The identifier for a token |
IFixedPrice
Inherits: IMinter
Author: fx(hash)
Minter for distributing tokens at fixed prices
Functions
buy
Purchases tokens at a fixed price
function buy(address _token, uint256 _reserveId, uint256 _amount, address _to) external payable;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Amount of tokens being purchased |
_to | address | Address receiving the purchased tokens |
buyAllowlist
Purchases tokens through an allowlist at a fixed price
function buyAllowlist(
address _token,
uint256 _reserveId,
address _to,
uint256[] calldata _indexes,
bytes32[][] calldata _proofs
) external payable;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_to | address | Address receiving the purchased tokens |
_indexes | uint256[] | Array of indices regarding purchase info inside the BitMap |
_proofs | bytes32[][] | Array of merkle proofs used for verifying the purchase |
buyMintPass
Purchases tokens through a mint pass at a fixed price
function buyMintPass(
address _token,
uint256 _reserveId,
uint256 _amount,
address _to,
uint256 _index,
bytes calldata _signature
) external payable;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Number of tokens being purchased |
_to | address | Address receiving the purchased tokens |
_index | uint256 | Index of puchase info inside the BitMap |
_signature | bytes | Array of merkle proofs used for verifying the purchase |
getFirstValidReserve
Returns the earliest valid reserveId that can mint a token
function getFirstValidReserve(address _token) external view returns (uint256);
getLatestUpdate
Gets the latest timestamp update made to token reserves
function getLatestUpdate(address _token) external view returns (uint40);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
Returns
Name | Type | Description |
---|---|---|
<none> | uint40 | Timestamp of latest update |
getSaleProceed
Gets the proceed amount from a token sale
function getSaleProceed(address _token) external view returns (uint128);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
Returns
Name | Type | Description |
---|---|---|
<none> | uint128 | Amount of proceeds |
merkleRoots
Mapping of token address to reserve ID to merkle roots
function merkleRoots(address, uint256) external view returns (bytes32);
pause
Pauses all function executions where modifier is applied
function pause() external;
prices
Mapping of token address to reserve ID to prices
function prices(address, uint256) external view returns (uint256);
reserves
Mapping of token address to reserve ID to reserve information
function reserves(address, uint256) external view returns (uint64, uint64, uint128);
setMintDetails
Sets the mint details for token reserves
Mint Details: token price, merkle root, and signer address
function setMintDetails(ReserveInfo calldata _reserveInfo, bytes calldata _mintDetails) external;
Parameters
Name | Type | Description |
---|---|---|
_reserveInfo | ReserveInfo | Reserve information for the token |
_mintDetails | bytes | Details of the mint pertaining to the minter |
unpause
Unpauses all function executions where modifier is applied
function unpause() external;
withdraw
Withdraws the sale proceeds to the sale receiver
function withdraw(address _token) external;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token withdrawing proceeds from |
Events
MintDetailsSet
Event emitted when a new fixed price mint has been set
event MintDetailsSet(
address indexed _token,
uint256 indexed _reserveId,
uint256 _price,
ReserveInfo _reserveInfo,
bytes32 _merkleRoot,
address _mintPassSigner,
bool _openEdition,
bool _timeUnlimited
);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being minted |
_reserveId | uint256 | ID of the reserve |
_price | uint256 | Amount of fixed price mint |
_reserveInfo | ReserveInfo | Reserve information for the mint |
_merkleRoot | bytes32 | The merkle root allowlisted buyers |
_mintPassSigner | address | The signing account for mint passes |
_openEdition | bool | Status of an open edition mint |
_timeUnlimited | bool | Status of a mint with unlimited time |
Purchase
Event emitted when a purchase is made
event Purchase(
address indexed _token,
uint256 indexed _reserveId,
address indexed _buyer,
uint256 _amount,
address _to,
uint256 _price
);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the mint |
_buyer | address | Address purchasing the tokens |
_amount | uint256 | Amount of tokens being purchased |
_to | address | Address to which the tokens are being transferred |
_price | uint256 | Price of the purchase |
Withdrawn
Event emitted when sale proceeds are withdrawn
event Withdrawn(address indexed _token, address indexed _creator, uint256 _proceeds);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token |
_creator | address | Address of the project creator |
_proceeds | uint256 | Amount of proceeds being withdrawn |
Errors
AddressZero
Error thrown when receiver is zero address
error AddressZero();
Ended
Error thrown when the sale has already ended
error Ended();
InsufficientFunds
Error thrown when no funds available to withdraw
error InsufficientFunds();
InvalidAllocation
Error thrown when the allocation amount is zero
error InvalidAllocation();
InvalidPayment
Error thrown when payment does not equal price
error InvalidPayment();
InvalidReserve
Error thrown thrown when reserve does not exist
error InvalidReserve();
InvalidTimes
Error thrown when reserve start and end times are invalid
error InvalidTimes();
InvalidToken
Error thrown when token address is invalid
error InvalidToken();
NoAllowlist
Error thrown when buying through allowlist and no allowlist exists
error NoAllowlist();
NoPublicMint
Error thrown when calling buy when either an allowlist or signer exists
error NoPublicMint();
NoSigningAuthority
Error thrown when buy with a mint pass and no signing authority exists
error NoSigningAuthority();
NotStarted
Error thrown when the auction has not started
error NotStarted();
OnlyAuthorityOrAllowlist
Error thrown when setting both an allowlist and mint signer
error OnlyAuthorityOrAllowlist();
TooMany
Error thrown when amount purchased exceeds remaining allocation
error TooMany();
IFxContractRegistry
Author: fx(hash)
Registry for managing fxhash smart contracts
Functions
configInfo
Returns the system config information
function configInfo() external view returns (address, uint32, uint32, uint32, uint64, string memory, string memory);
contracts
Mapping of hashed contract name to contract address
function contracts(bytes32) external view returns (address);
register
Registers deployed contract addresses based on hashed value of name
function register(string[] calldata _names, address[] calldata _contracts) external;
Parameters
Name | Type | Description |
---|---|---|
_names | string[] | Array of contract names |
_contracts | address[] | Array of contract addresses |
setConfig
Sets the system config information
function setConfig(ConfigInfo calldata _configInfo) external;
Parameters
Name | Type | Description |
---|---|---|
_configInfo | ConfigInfo | Config information (lock time, referrer share, default metadata) |
Events
ContractRegistered
Event emitted when contract gets registered
event ContractRegistered(string indexed _contractName, bytes32 indexed _hashedName, address indexed _contractAddr);
Parameters
Name | Type | Description |
---|---|---|
_contractName | string | Name of the contract |
_hashedName | bytes32 | Hashed name of the contract |
_contractAddr | address | Address of the contract |
ConfigUpdated
Event emitted when the config information is updated
event ConfigUpdated(address indexed _owner, ConfigInfo _configInfo);
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address of the registry owner |
_configInfo | ConfigInfo | Updated config information |
Errors
LengthMismatch
Error thrown when array lengths do not match
error LengthMismatch();
LengthZero
Error thrown when array length is zero
error LengthZero();
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();
IFxIssuerFactory
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
Name | Type | Description |
---|---|---|
_owner | address | Address of project owner |
_initInfo | InitInfo | Initialization information |
_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 |
Returns
Name | Type | Description |
---|---|---|
<none> | address | genArtToken Address of newly created FxGenArt721 proxy |
createProject
Creates new generative art project with single parameter
function createProject(bytes memory _creationInfo) external returns (address);
Parameters
Name | Type | Description |
---|---|---|
_creationInfo | bytes | Bytes-encoded data for project creation |
Returns
Name | Type | Description |
---|---|---|
<none> | address | genArtToken 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
Name | Type | Description |
---|---|---|
_projectCreationInfo | bytes | Bytes-encoded data for project creation |
_ticketCreationInfo | bytes | Bytes-encoded data for ticket creation |
_tickeFactory | address | Address of FxTicketFactory contract |
Returns
Name | Type | Description |
---|---|---|
<none> | address | genArtToken Address of newly created FxGenArt721 proxy |
<none> | address | mintTicket 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
Name | Type | Description |
---|---|---|
_implementation | address | Address 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
Name | Type | Description |
---|---|---|
_owner | address | Address of the factory owner |
_implementation | address | Address 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
Name | Type | Description |
---|---|---|
_projectId | uint96 | ID of the project |
_genArtToken | address | Address of newly deployed FxGenArt721 token contract |
_owner | address | Address 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();
IFxMintTicket721
Inherits: IToken
Author: fx(hash)
ERC-721 token for mint tickets used to redeem FxGenArt721 tokens
Functions
activeMinters
Returns the list of active minters
function activeMinters(uint256) external view returns (address);
balances
Mapping of wallet address to pending balance available for withdrawal
function balances(address) external view returns (uint256);
baseURI
Returns the decoded content identifier of the metadata pointer
function baseURI() external view returns (bytes memory);
burn
Burns token ID from the circulating supply
function burn(uint256 _tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
claim
Claims token at current price and sets new price of token with initial deposit amount
function claim(uint256 _tokenId, uint256 _maxPrice, uint80 _newPrice) external payable;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_maxPrice | uint256 | Maximum payment amount allowed to prevent front-running of listing price |
_newPrice | uint80 | New listing price of token |
contractRegistry
Returns the address of the FxContractRegistry contract
function contractRegistry() external view returns (address);
contractURI
Gets the contact-level metadata for the ticket
function contractURI() external view returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the contract metadata |
deposit
Deposits taxes for given token
function deposit(uint256 _tokenId) external payable;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
depositAndSetPrice
Deposits taxes for given token and set new price for same token
function depositAndSetPrice(uint256 _tokenId, uint80 _newPrice) external payable;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_newPrice | uint80 | New listing price of token |
initialize
Initializes new generative art project
function initialize(
address _owner,
address _genArt721,
address _redeemer,
address _renderer,
uint48 _gracePeriod,
MintInfo[] calldata _mintInfo
) external;
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address of contract owner |
_genArt721 | address | Address of GenArt721 token contract |
_redeemer | address | Address of TicketRedeemer minter contract |
_renderer | address | Address of renderer contract |
_gracePeriod | uint48 | Period time before token enters harberger taxation |
_mintInfo | MintInfo[] | Array of authorized minter contracts and their reserves |
isForeclosed
Checks if token is foreclosed
function isForeclosed(uint256 _tokenId) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Status of foreclosure |
genArt721
Returns address of the FxGenArt721 token contract
function genArt721() external view returns (address);
getAuctionPrice
Gets the current auction price of the token
function getAuctionPrice(uint256 _currentPrice, uint256 _foreclosureTime) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_currentPrice | uint256 | Listing price of the token |
_foreclosureTime | uint256 | Timestamp of the foreclosure |
getDailyTax
Gets the daily tax amount based on current price
function getDailyTax(uint256 _currentPrice) external pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_currentPrice | uint256 | Current listing price |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Daily tax amount |
getDepositAmounts
Gets the deposit amount owed and remaining after change in price, claim or burn
function getDepositAmounts(uint256 _dailyTax, uint256 _depositAmount, uint256 _foreclosureTime)
external
view
returns (uint256, uint256);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Total amount of taxes deposited |
_foreclosureTime | uint256 | Timestamp of current foreclosure |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Deposit amount owed |
<none> | uint256 | Deposit amount remaining |
getExcessTax
Gets the excess amount of taxes paid
function getExcessTax(uint256 _dailyTax, uint256 _depositAmount) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Total amount of taxes deposited |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Excess amount of taxes |
getNewForeclosure
Gets the new foreclosure timestamp
function getNewForeclosure(uint256 _dailyTax, uint256 _depositAmount, uint256 _foreclosureTime)
external
view
returns (uint48);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Amount of taxes being deposited |
_foreclosureTime | uint256 | Timestamp of current foreclosure |
Returns
Name | Type | Description |
---|---|---|
<none> | uint48 | Timestamp of new foreclosure |
getTaxDuration
Gets the total duration of time covered
function getTaxDuration(uint256 _dailyTax, uint256 _depositAmount) external pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Amount of taxes being deposited |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Total time duration |
gracePeriod
Returns default grace period of time for each token
function gracePeriod() external view returns (uint48);
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 |
minters
Returns the active status of a registered minter contract
function minters(address) external view returns (uint8);
pause
Pauses all function executions where modifier is set
function pause() external;
primaryReceiver
Returns address of primary receiver for token sales
function primaryReceiver() external view returns (address);
redeemer
Returns the address of the TickeRedeemer contract
function redeemer() external view returns (address);
renderer
Returns the address of the renderer contract
function renderer() external view returns (address);
registerMinters
Registers minter contracts with resereve info
function registerMinters(MintInfo[] memory _mintInfo) external;
roleRegistry
Returns the address of the FxRoleRegistry contract
function roleRegistry() external view returns (address);
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 |
setPrice
Sets new price for given token
function setPrice(uint256 _tokenId, uint80 _newPrice) external;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_newPrice | uint80 | New price of the token |
taxes
Mapping of ticket ID to tax information (grace period, foreclosure time, current price, deposit amount)
function taxes(uint256) external returns (uint48, uint48, uint80, uint80);
totalSupply
Returns the current circulating supply of tokens
function totalSupply() external returns (uint48);
unpause
Unpauses all function executions where modifier is set
function unpause() external;
updateStartTime
Updates taxation start time to the current timestamp
function updateStartTime(uint256 _tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
withdraw
Withdraws available balance amount to given address
function withdraw(address _to) external;
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address being withdrawn to |
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 |
Claimed
Event emitted when token is claimed at either listing or auction price
event Claimed(
uint256 indexed _tokenId,
address indexed _claimer,
uint128 _newPrice,
uint48 _foreclosureTime,
uint80 _depositAmount,
uint256 _payment
);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_claimer | address | Address of the token claimer |
_newPrice | uint128 | Updated listing price of token |
_foreclosureTime | uint48 | Timestamp of new foreclosure date |
_depositAmount | uint80 | Total amount of taxes deposited |
_payment | uint256 | Current price of token in addition to taxes deposited |
Deposited
Event emitted when additional taxes are deposited
event Deposited(uint256 indexed _tokenId, address indexed _depositer, uint48 _foreclosureTime, uint80 _depositAmount);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_depositer | address | Address of tax depositer |
_foreclosureTime | uint48 | Timestamp of new foreclosure date |
_depositAmount | uint80 | Total amount of taxes deposited |
SetPrice
Event emitted when new listing price is set
event SetPrice(uint256 indexed _tokenId, uint128 _newPrice, uint128 _foreclosureTime, uint128 _depositAmount);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_newPrice | uint128 | New listing price of token |
_foreclosureTime | uint128 | Timestamp of new foreclosure date |
_depositAmount | uint128 | Adjusted amount of taxes deposited due to price change |
StartTimeUpdated
Event emitted when taxation start time is updated to current timestamp
event StartTimeUpdated(uint256 indexed _tokenId, address indexed _owner, uint128 _foreclosureTime);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_owner | address | Address of token owner |
_foreclosureTime | uint128 | Timestamp of foreclosure date |
TicketInitialized
Event emitted when mint ticket is initialized
event TicketInitialized(
address indexed _genArt721,
address indexed _redeemer,
address indexed _renderer,
uint48 _gracePeriod,
MintInfo[] _mintInfo
);
Parameters
Name | Type | Description |
---|---|---|
_genArt721 | address | Address of FxGenArt721 token contract |
_redeemer | address | Address of TicketRedeemer contract |
_renderer | address | Address of renderer contract |
_gracePeriod | uint48 | Time period before token enters harberger taxation |
_mintInfo | MintInfo[] | Array of authorized minter contracts and their reserves |
Withdraw
Event emitted when balance is withdrawn
event Withdraw(address indexed _caller, address indexed _to, uint256 indexed _balance);
Parameters
Name | Type | Description |
---|---|---|
_caller | address | Address of caller |
_to | address | Address receiving balance amount |
_balance | uint256 | Amount of ether being withdrawn |
Errors
AllocationExceeded
Error thrown when total minter allocation exceeds maximum supply
error AllocationExceeded();
Foreclosure
Error thrown when token is in foreclosure
error Foreclosure();
GracePeriodActive
Error thrown when token is being claimed within the grace period
error GracePeriodActive();
GracePeriodInactive
Error thrown when token is outside of the grace period
error GracePeriodInactive();
InsufficientDeposit
Error thrown when deposit amount is not for at least one day
error InsufficientDeposit();
InsufficientPayment
Error thrown when payment amount does not meet price plus daily tax amount
error InsufficientPayment();
InvalidEndTime
Error thrown when reserve end time is invalid
error InvalidEndTime();
InvalidPrice
Error thrown when new listing price is less than the mininmum amount
error InvalidPrice();
InvalidStartTime
Error thrown when reserve start time is invalid
error InvalidStartTime();
PriceExceeded
Error thrown when current price exceeds maximum payment amount
error PriceExceeded();
MintActive
Error thrown when minting is active
error MintActive();
NotAuthorized
Error thrown when caller is not authorized to execute transaction
error NotAuthorized();
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();
UnauthorizedRedeemer
Error thrown when caller does not have the redeemer role
error UnauthorizedRedeemer();
UnregisteredMinter
Error thrown when caller is not a registered minter
error UnregisteredMinter();
IFxRoleRegistry
Author: fx(hash)
Registry for managing AccessControl roles throughout the system
Functions
setRoleAdmin
Sets the admin of a new or existing role
function setRoleAdmin(bytes32 _role) external;
Parameters
Name | Type | Description |
---|---|---|
_role | bytes32 | Hash of the role name |
IFxTicketFactory
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
Name | Type | Description |
---|---|---|
_owner | address | Address of project owner |
_genArt721 | address | Address of GenArt721 token contract |
_redeemer | address | Address of TicketRedeemer minter contract |
_renderer | address | |
_gracePeriod | uint48 | Duration of time before token enters harberger taxation |
_mintInfo | MintInfo[] | 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
Name | Type | Description |
---|---|---|
_creationInfo | bytes | Bytes-encoded data for ticket creation |
Returns
Name | Type | Description |
---|---|---|
<none> | address | mintTicket 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
Name | Type | Description |
---|---|---|
_gracePeriod | uint48 | Minimum time duration before a ticket enters harberger taxation |
setImplementation
Sets new FxMintTicket721 implementation contract
function setImplementation(address _implementation) external;
Parameters
Name | Type | Description |
---|---|---|
_implementation | address | Address 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
Name | Type | Description |
---|---|---|
_owner | address | Address of the factory owner |
_gracePeriod | uint48 | Time 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
Name | Type | Description |
---|---|---|
_owner | address | Address of the factory owner |
_implementation | address | Address 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
Name | Type | Description |
---|---|---|
_ticketId | uint96 | ID of the ticket contract |
_mintTicket | address | Address of newly deployed FxMintTicket721 token contract |
_owner | address | Address 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();
IIPFSRenderer
Inherits: IRenderer
Author: fx(hash)
Renderer for constructing offchain metadata of FxGenArt721 tokens pinned to IPFS
Functions
contractRegistry
Returns address of the FxContractRegistry contract
function contractRegistry() external view returns (address);
contractURI
Gets the contact-level metadata for the project
function contractURI() external view returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the contract metadata |
getMetadataURL
Generates the metadata URL for a token ID
function getMetadataURL(address _contractAddr, string memory _baseURI, uint256 _tokenId)
external
view
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_baseURI | string | URI of the content identifier |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the JSON metadata |
tokenURI
Gets the metadata for a token
function tokenURI(uint256 _tokenId, bytes calldata _data) external view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_data | bytes | Additional data used to construct metadata |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the token metadata |
IMinter
Author: fx(hash)
Interface for FxGenArt721 tokens to interact with minters
Functions
setMintDetails
Sets the mint details for token reserves
function setMintDetails(ReserveInfo calldata _reserveInfo, bytes calldata _mintDetails) external;
Parameters
Name | Type | Description |
---|---|---|
_reserveInfo | ReserveInfo | Reserve information for the token |
_mintDetails | bytes | Details of the mint pertaining to the minter |
IONCHFSRenderer
Inherits: IRenderer
Author: fx(hash)
Renderer for reconstructing metadata of FxGenArt721 tokens stored onchain through ONCHFS
Functions
contractRegistry
Returns address of the FxContractRegistry contract
function contractRegistry() external view returns (address);
contractURI
Gets the contact-level metadata for the project
function contractURI() external view returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the contract metadata |
getAnimationURL
Generates the animation URL for a token ID
function getAnimationURL(bytes32 _onchfsCID, uint256 _tokenId, address _minter, bytes32 _seed, bytes memory _fxParams)
external
pure
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_onchfsCID | bytes32 | CID hash of token animation |
_tokenId | uint256 | ID of the token |
_minter | address | Address of initial token owner |
_seed | bytes32 | Hash of randomly generated seed |
_fxParams | bytes | Random sequence of fixed-length bytes used as token input |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the animation pointer |
getAttributes
Generates the list of attributes for a token ID
function getAttributes(address _contractAddr, string memory _baseURI, uint256 _tokenId)
external
view
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_baseURI | string | URI of the content identifier |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | List of token attributes |
getExternalURL
Generates the external URL for a token ID
function getExternalURL(address _contractAddr, uint256 _tokenId) external view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the external token pointer |
getImageURL
Generates the image URL for a token ID
function getImageURL(address _contractAddr, string memory _baseURI, uint256 _tokenId)
external
view
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_baseURI | string | URI of the content identifier |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the image pointer |
tokenURI
Gets the metadata for a token
function tokenURI(uint256 _tokenId, bytes calldata _data) external view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_data | bytes | Additional data used to construct metadata |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the token metadata |
IPseudoRandomizer
Inherits: IRandomizer
Author: fx(hash)
Randomizer for generating psuedorandom seeds for newly minted tokens
Functions
generateSeed
Generates random seed for token using entropy
function generateSeed(uint256 _tokenId) external view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | Hash of the seed |
requestRandomness
Requests random seed for a given token
function requestRandomness(uint256 _tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
IRandomizer
Author: fx(hash)
Interface for FxGenArt721 tokens to interact with randomizers
Functions
requestRandomness
Requests random seed for a given token
function requestRandomness(uint256 _tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
IRenderer
Author: fx(hash)
Interface for FxGenArt721 tokens to interact with renderers
Functions
contractRegistry
Returns address of the FxContractRegistry contract
function contractRegistry() external view returns (address);
contractURI
Gets the contact-level metadata for the project
function contractURI() external view returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the contract metadata |
tokenURI
Gets the metadata for a token
function tokenURI(uint256 _tokenId, bytes calldata _data) external view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_data | bytes | Additional data used to construct metadata |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the token metadata |
IRoyaltyManager
Author: fx(hash)
Extension for managing secondary royalties of FxGenArt721 tokens
Functions
getRoyalties
Gets the royalties for a specific token ID
function getRoyalties(uint256 _tokenId) external view returns (address[] memory, uint256[] memory);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | address[] | Total receivers and basis points |
<none> | uint256[] |
royaltyInfo
Returns the royalty information for a specific token ID and sale price
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_salePrice | uint256 | Sale price of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | address | receiver Address receiving royalties |
<none> | uint256 | royaltyAmount Amount to royalties being paid out |
Events
TokenIdRoyaltiesUpdated
Event emitted when the royalties for a token ID have been updated
event TokenIdRoyaltiesUpdated(uint256 indexed _tokenId, address _receiver, uint96 _basisPoints);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_receiver | address | Addresses receiving the royalties |
_basisPoints | uint96 | Points used to calculate royalty payments (100 = 1%) |
TokenRoyaltiesUpdated
Event emitted when the royalties for a list of receivers have been updated
event TokenRoyaltiesUpdated(
address indexed _receiver, address[] _receivers, uint32[] _allocations, uint96 _basisPoints
);
Parameters
Name | Type | Description |
---|---|---|
_receiver | address | The address receiving royalties for the token either an account or a split address |
_receivers | address[] | Array of addresses receiving royalties |
_allocations | uint32[] | Array of allocations used to determine the proportional share of royalty payments |
_basisPoints | uint96 | Points used to calculate royalty payments (100 = 1%) |
Errors
BaseRoyaltiesNotSet
Error thrown when the royalties are not set
error BaseRoyaltiesNotSet();
InvalidRoyaltyConfig
Error thrown when royalty configuration is greater than or equal to 100%
error InvalidRoyaltyConfig();
LengthMismatch
Error thrown when array lengths do not match
error LengthMismatch();
MoreThanOneRoyaltyReceiver
Error thrown when more than one royalty receiver is set
error MoreThanOneRoyaltyReceiver();
NonExistentToken
Error thrown when the token ID does not exist
error NonExistentToken();
NoRoyaltyReceiver
Error thrown when royalty receiver is zero address
error NoRoyaltyReceiver();
OverMaxBasisPointsAllowed
Error thrown when total basis points exceeds maximum value allowed
error OverMaxBasisPointsAllowed();
TokenRoyaltiesNotSet
Error thrown when the token royalties are not set
error TokenRoyaltiesNotSet();
ISeedConsumer
Author: fx(hash)
Interface for randomizers to interact with FxGenArt721 tokens
Functions
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 |
Events
SeedFulfilled
Event emitted when a seed request is fulfilled for a specific token
event SeedFulfilled(address indexed _randomizer, uint256 indexed _tokenId, bytes32 _seed);
Parameters
Name | Type | Description |
---|---|---|
_randomizer | address | Address of the randomizer contract |
_tokenId | uint256 | ID of the token |
_seed | bytes32 | Hash of the random seed |
ISplitsMain
Author: 0xSplits
Interface for SplitsFactory to interact with SplitsMain
Functions
createSplit
function createSplit(
address[] calldata accounts,
uint32[] calldata percentAllocations,
uint32 distributorFee,
address controller
) external returns (address);
distributeETH
function distributeETH(
address split,
address[] calldata accounts,
uint32[] calldata percentAllocations,
uint32 distributorFee,
address distributorAddress
) external;
getHash
function getHash(address split) external view returns (bytes32);
predictImmutableSplitAddress
function predictImmutableSplitAddress(
address[] calldata accounts,
uint32[] calldata percentAllocations,
uint32 distributorFee
) external view returns (address);
updateSplit
function updateSplit(
address split,
address[] calldata accounts,
uint32[] calldata percentAllocations,
uint32 distributorFee
) external;
withdraw
function withdraw(address account, uint256 withdrawETH, address[] calldata tokens) external;
ITicketRedeemer
Inherits: IMinter
Author: fx(hash)
Minter for redeeming FxGenArt721 tokens by burning FxMintTicket721 tokens
Functions
pause
Pauses all function executions where modifier is applied
function pause() external;
redeem
Burns a ticket and mints a new token to the caller
function redeem(address _ticket, address _to, uint256 _tokenId, bytes calldata _fxParams) external;
Parameters
Name | Type | Description |
---|---|---|
_ticket | address | Address of the ticket contract |
_to | address | Address of token receiver |
_tokenId | uint256 | ID of the ticket being burned |
_fxParams | bytes | Random sequence of fixed-length bytes used for token input |
setMintDetails
Sets the mint details for token reserves
Mint Details: ticket contract address
function setMintDetails(ReserveInfo calldata _reserveInfo, bytes calldata _mintDetails) external;
Parameters
Name | Type | Description |
---|---|---|
_reserveInfo | ReserveInfo | Reserve information for the token |
_mintDetails | bytes | Details of the mint pertaining to the minter |
tickets
Mapping of FxGenArt721 token address to FxMintTicket721 token address
function tickets(address) external view returns (address);
unpause
Unpauses all function executions where modifier is applied
function unpause() external;
Events
MintDetailsSet
Event emitted when the mint details are set for a ticket contract
event MintDetailsSet(address indexed _ticket, address indexed _token);
Parameters
Name | Type | Description |
---|---|---|
_ticket | address | Address of the ticket contract |
_token | address | Address of the token contract that can be redeemed through the ticket |
Redeemed
Event emitted when a ticket is burned and a new token is minted
event Redeemed(address indexed _ticket, uint256 indexed _tokenId, address indexed _owner, address _token);
Parameters
Name | Type | Description |
---|---|---|
_ticket | address | Address of the ticket contract |
_tokenId | uint256 | ID of the token being burned |
_owner | address | Address of the owner receiving the token |
_token | address | Address of the token being minted |
Errors
AlreadySet
Error thrown when mint details are already set for a ticket contract
error AlreadySet();
InvalidToken
Error thrown when token address is invalid
error InvalidToken();
NotAuthorized
Error thrown when the caller is not authorized
error NotAuthorized();
ZeroAddress
Error thrown when receiver is zero address
error ZeroAddress();
IToken
Author: fx(hash)
Interface for minters to interact with tokens
Functions
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 |
primaryReceiver
Returns address of primary receiver for token sales
function primaryReceiver() external view returns (address);
Contents
- LibIPFSEncoder
- AuctionInfo
- ConfigInfo
- GenArtInfo
- InitInfo
- IssuerInfo
- MetadataInfo
- MintInfo
- MinterInfo
- ProjectInfo
- RefundInfo
- ReserveInfo
- RoyaltyInfo
- TaxInfo
LibIPFSEncoder
Author: fx(hash)
Library for encoding IPFS CID hashes
Functions
encodeURL
Encodes IPFS CID hash to URL string format
function encodeURL(bytes32 _value) internal pure returns (string memory);
AuctionInfo
Struct of dutch auction information
refunded
Flag indicating if refunds are enabledstepLength
Duration (in seconds) of each auction stepprices
Array of prices for each step of the auction
struct AuctionInfo {
bool refunded;
uint248 stepLength;
uint256[] prices;
}
ConfigInfo
Struct of system config information
feeReceiver
Address receiving platform feesprimaryFeeAllocation
Amount of basis points allocated to calculate platform fees on primary sale proceedssecondaryFeeAllocation
Amount of basis points allocated to calculate platform fees on royalty paymentslockTime
Locked time duration added to mint start time for unverified creatorsreferrerShare
Share amount distributed to accounts referring tokensdefaultMetadataURI
Default base URI of token metadataexternalURI
External URI for displaying tokens
struct ConfigInfo {
address feeReceiver;
uint32 primaryFeeAllocation;
uint32 secondaryFeeAllocation;
uint32 lockTime;
uint64 referrerShare;
string defaultMetadataURI;
string externalURI;
}
GenArtInfo
Struct of generative art information
minter
Address of initial token ownerseed
Hash of randomly generated seedfxParams
Random sequence of fixed-length bytes used as token input
struct GenArtInfo {
address minter;
bytes32 seed;
bytes fxParams;
}
InitInfo
Struct of initialization information used on project creation
name
Name of projectsymbol
Symbol of projectprimaryReceiver
Address of splitter contract receiving primary salesrandomizer
Address of Randomizer contractrenderer
Address of Renderer contracttagIds
Array of tag IDs describing the project- 'onchainData' Onchain data to be stored using SSTORE2 and available to renderers
struct InitInfo {
string name;
string symbol;
address[] primaryReceivers;
uint32[] allocations;
address randomizer;
address renderer;
uint256[] tagIds;
bytes onchainData;
}
IssuerInfo
Struct of issuer information
primaryReceiver
Address of splitter contract receiving primary salesprojectInfo
Project informationactiveMinters
Array of authorized minter contracts used for enumerationminters
Mapping of minter contract to authorization status
struct IssuerInfo {
address primaryReceiver;
ProjectInfo projectInfo;
address[] activeMinters;
mapping(address => uint8) minters;
}
MetadataInfo
Struct of metadata information
baseURI
Decoded URI of content identifieronchainPointer
Address of bytes-encoded data rendered onchain
struct MetadataInfo {
bytes baseURI;
address onchainPointer;
}
MintInfo
Struct of mint information
minter
Address of the minter contractreserveInfo
Reserve informationparams
Optional bytes data decoded inside minter
struct MintInfo {
address minter;
ReserveInfo reserveInfo;
bytes params;
}
MinterInfo
Struct of minter information
totalMints
Total number of mints executed by the mintertotalPaid
Total amount paid by the minter
struct MinterInfo {
uint128 totalMints;
uint128 totalPaid;
}
ProjectInfo
Struct of project information
mintEnabled
Flag inidicating if minting is enabledburnEnabled
Flag inidicating if burning is enabledmaxSupply
Maximum supply of tokensinputSize
Maximum input size of fxParams bytes dataearliestStartTime
Earliest possible start time for registering minters
struct ProjectInfo {
bool mintEnabled;
bool burnEnabled;
uint120 maxSupply;
uint88 inputSize;
uint32 earliestStartTime;
}
RefundInfo
Struct of refund information
lastPrice
Price of last sale before selling outminterInfo
Mapping of minter address to struct of minter information
struct RefundInfo {
uint256 lastPrice;
mapping(address minter => MinterInfo) minterInfo;
}
ReserveInfo
Struct of reserve information
startTime
Start timestamp of minterendTime
End timestamp of minterallocation
Allocation amount for minter
struct ReserveInfo {
uint64 startTime;
uint64 endTime;
uint128 allocation;
}
RoyaltyInfo
Struct of royalty information
receiver
Address receiving royaltiesbasisPoints
Points used to calculate the royalty payment (0.01%)
struct RoyaltyInfo {
address receiver;
uint96 basisPoints;
}
TaxInfo
Struct of tax information
startTime
Timestamp of when harberger taxation beginsforeclosureTime
Timestamp of token foreclosurecurrentPrice
Current listing price of tokendepositAmount
Total amount of taxes deposited
struct TaxInfo {
uint48 startTime;
uint48 foreclosureTime;
uint80 currentPrice;
uint80 depositAmount;
}
Contents
Contents
Allowlist
Author: fx(hash)
Extension for claiming tokens through merkle trees
Functions
_claimSlot
Claims a merkle tree slot
function _claimSlot(
address _token,
uint256 _reserveId,
uint256 _index,
address _claimer,
bytes32[] memory _proof,
LibBitmap.Bitmap storage _bitmap
) internal;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
_index | uint256 | Index in the merkle tree |
_claimer | address | Address of allowlist slot claimer |
_proof | bytes32[] | Merkle proof used for validating claim |
_bitmap | LibBitmap.Bitmap | Bitmap used for checking if index is already claimed |
_getMerkleRoot
Gets the merkle root of a token reserve
function _getMerkleRoot(address _token, uint256 _reserveId) internal view virtual returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
Events
SlotClaimed
Event emitted when allowlist slot is claimed
event SlotClaimed(address indexed _token, uint256 indexed _reserveId, address indexed _claimer, uint256 _index);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token |
_reserveId | uint256 | ID of the reserve |
_claimer | address | Address of the claimer |
_index | uint256 | Index of purchase info inside the BitMap |
Errors
InvalidProof
Error thrown when the merkle proof for an index is invalid
error InvalidProof();
SlotAlreadyClaimed
Error thrown when an index in the merkle tree has already been claimed
error SlotAlreadyClaimed();
MintPass
Inherits: EIP712
Author: fx(hash)
Extension for claiming tokens through mint passes
State Variables
reserveNonce
Mapping of token address to reserve ID to reserve nonce
mapping(address => mapping(uint256 => uint256)) public reserveNonce;
signingAuthorities
Mapping of token address to reserve ID to address of mint pass authority
mapping(address => mapping(uint256 => address)) public signingAuthorities;
Functions
constructor
Initializes EIP-712
constructor() EIP712("MINT_PASS", "1");
generateTypedDataHash
Generates the typed data hash for a mint pass claim
function generateTypedDataHash(
address _token,
uint256 _reserveId,
uint256 _reserveNonce,
uint256 _index,
address _claimer
) public view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
_token | address | address of token for the reserve |
_reserveId | uint256 | Id of the reserve to mint the token from |
_reserveNonce | uint256 | |
_index | uint256 | Index of the mint pass |
_claimer | address | Address of mint pass claimer |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | Digest of typed data hash claimer |
_claimMintPass
Validates a mint pass claim
function _claimMintPass(
address _token,
uint256 _reserveId,
uint256 _index,
address _claimer,
bytes calldata _signature,
LibBitmap.Bitmap storage _bitmap
) internal;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
_index | uint256 | Index of the mint pass |
_claimer | address | Account associated with the mint pass |
_signature | bytes | Signature of the mint pass claimer |
_bitmap | LibBitmap.Bitmap | Bitmap used for checking if index is already claimed |
Events
PassClaimed
Event emitted when mint pass is claimed
event PassClaimed(address indexed _token, uint256 indexed _reserveId, address indexed _claimer, uint256 _index);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token |
_reserveId | uint256 | ID of the reserve |
_claimer | address | Address of the mint pass claimer |
_index | uint256 | Index of purchase info inside the BitMap |
Errors
InvalidSignature
Error thrown when the signature of mint pass claimer is invalid
error InvalidSignature();
PassAlreadyClaimed
Error thrown when a mint pass has already been claimed
error PassAlreadyClaimed();
DutchAuction
Inherits: IDutchAuction, Allowlist, MintPass, Ownable, Pausable
Author: fx(hash)
See the documentation in {IDutchAuction}
State Variables
claimedMerkleTreeSlots
Mapping of token address to reserve ID to Bitmap of claimed merkle tree slots
mapping(address => mapping(uint256 => LibBitmap.Bitmap)) internal claimedMerkleTreeSlots;
claimedMintPasses
Mapping of token address to reserve ID to Bitmap of claimed mint passes
mapping(address => mapping(uint256 => LibBitmap.Bitmap)) internal claimedMintPasses;
latestUpdates
Mapping of token address to timestamp of latest update made for token reserves
LibMap.Uint40Map internal latestUpdates;
firstValidReserve
Mapping of token to the last valid reserveId that can mint on behalf of the token
LibMap.Uint40Map internal firstValidReserve;
auctions
Mapping of token address to reserve ID to reserve information
mapping(address => AuctionInfo[]) public auctions;
merkleRoots
Mapping of token address to reserve ID to merkle root
mapping(address => mapping(uint256 => bytes32)) public merkleRoots;
refunds
Mapping of token address to reserve ID to refund amount
mapping(address => mapping(uint256 => RefundInfo)) public refunds;
reserves
Mapping of token address to reserve ID to reserve information (allocation, price, max mint)
mapping(address => ReserveInfo[]) public reserves;
saleProceeds
Mapping of token address to reserve ID to amount of sale proceeds
mapping(address => mapping(uint256 => uint256)) public saleProceeds;
numberMinted
Mapping of token address to reserve ID to number of tokens minted
mapping(address => mapping(uint256 => uint256)) public numberMinted;
Functions
buy
Purchases tokens at a linear price over fixed amount of time
function buy(address _token, uint256 _reserveId, uint256 _amount, address _to) external payable whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Amount of tokens to purchase |
_to | address | Address receiving the purchased tokens |
buyAllowlist
Purchases tokens through an allowlist at a linear price over fixed amount of time
function buyAllowlist(
address _token,
uint256 _reserveId,
address _to,
uint256[] calldata _indexes,
bytes32[][] calldata _proofs
) external payable whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_to | address | Address receiving the purchased tokens |
_indexes | uint256[] | Array of indices containing purchase info inside the BitMap |
_proofs | bytes32[][] | Array of merkle proofs used for verifying the purchase |
buyMintPass
Purchases tokens through a mint pass at a linear price over fixed amount of time
function buyMintPass(
address _token,
uint256 _reserveId,
uint256 _amount,
address _to,
uint256 _index,
bytes calldata _signature
) external payable whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Number of tokens being purchased |
_to | address | Address receiving the purchased tokens |
_index | uint256 | Index of puchase info inside the BitMap |
_signature | bytes | Array of merkle proofs used for verifying the purchase |
refund
Refunds an auction buyer with their rebate amount
function refund(address _token, uint256 _reserveId, address _buyer) external whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the mint |
_buyer | address | Address of the buyer receiving the refund |
setMintDetails
Mint Details: struct of auction information, merkle root, and signer address
function setMintDetails(ReserveInfo calldata _reserve, bytes calldata _mintDetails) external whenNotPaused;
withdraw
Withdraws sale processed of primary sales to receiver
function withdraw(address _token, uint256 _reserveId) external whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
pause
Pauses all function executions where modifier is applied
function pause() external onlyOwner;
unpause
Unpauses all function executions where modifier is applied
function unpause() external onlyOwner;
getFirstValidReserve
Returns the earliest valid reserveId that can mint a token
function getFirstValidReserve(address _token) public view returns (uint256);
getLatestUpdate
Gets the latest timestamp update made to token reserves
function getLatestUpdate(address _token) public view returns (uint40);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
Returns
Name | Type | Description |
---|---|---|
<none> | uint40 | Timestamp of latest update |
getPrice
Gets the current auction price
function getPrice(address _token, uint256 _reserveId) public view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | price Price of the token |
_buy
Purchases arbitrary amount of tokens at auction price and mints tokens to given account
function _buy(address _token, uint256 _reserveId, uint256 _amount, address _to) internal;
_setLatestUpdate
Sets timestamp of the latest update to token reserves
function _setLatestUpdate(address _token, uint256 _timestamp) internal;
_setFirstValidReserve
function _setFirstValidReserve(address _token, uint256 _reserveId) internal;
_getMerkleRoot
Gets the merkle root of a token reserve
function _getMerkleRoot(address _token, uint256 _reserveId) internal view override returns (bytes32);
_getPrice
Gets the current price of auction reserve
function _getPrice(ReserveInfo memory _reserve, AuctionInfo storage _daInfo) internal view returns (uint256);
_recordLastPrice
function _recordLastPrice(ReserveInfo memory _reserve, address _token, uint256 _reserveId)
internal
returns (uint256 lastPrice);
_validateInput
Validates token address, reserve information and given account
function _validateInput(address _token, uint256 _reserveId, address _buyer) internal view;
FixedPrice
Inherits: IFixedPrice, Allowlist, MintPass, Ownable, Pausable
Author: fx(hash)
See the documentation in {IFixedPrice}
State Variables
claimedMerkleTreeSlots
Mapping of token address to reserve ID to Bitmap of claimed merkle tree slots
mapping(address => mapping(uint256 => LibBitmap.Bitmap)) internal claimedMerkleTreeSlots;
claimedMintPasses
Mapping of token address to reserve ID to Bitmap of claimed mint passes
mapping(address => mapping(uint256 => LibBitmap.Bitmap)) internal claimedMintPasses;
latestUpdates
Mapping of token address to timestamp of latest update made for token reserves
LibMap.Uint40Map internal latestUpdates;
firstValidReserve
Mapping of token to the last valid reserveId that can mint on behalf of the token
LibMap.Uint40Map internal firstValidReserve;
saleProceeds
Mapping of token address to sale proceeds
LibMap.Uint128Map internal saleProceeds;
merkleRoots
Mapping of token address to reserve ID to merkle roots
mapping(address => mapping(uint256 => bytes32)) public merkleRoots;
prices
Mapping of token address to reserve ID to prices
mapping(address => uint256[]) public prices;
reserves
Mapping of token address to reserve ID to reserve information
mapping(address => ReserveInfo[]) public reserves;
Functions
buy
Purchases tokens at a fixed price
function buy(address _token, uint256 _reserveId, uint256 _amount, address _to) external payable whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Amount of tokens being purchased |
_to | address | Address receiving the purchased tokens |
buyAllowlist
Purchases tokens through an allowlist at a fixed price
function buyAllowlist(
address _token,
uint256 _reserveId,
address _to,
uint256[] calldata _indexes,
bytes32[][] calldata _proofs
) external payable whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_to | address | Address receiving the purchased tokens |
_indexes | uint256[] | Array of indices regarding purchase info inside the BitMap |
_proofs | bytes32[][] | Array of merkle proofs used for verifying the purchase |
buyMintPass
Purchases tokens through a mint pass at a fixed price
function buyMintPass(
address _token,
uint256 _reserveId,
uint256 _amount,
address _to,
uint256 _index,
bytes calldata _signature
) external payable whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token being purchased |
_reserveId | uint256 | ID of the reserve |
_amount | uint256 | Number of tokens being purchased |
_to | address | Address receiving the purchased tokens |
_index | uint256 | Index of puchase info inside the BitMap |
_signature | bytes | Array of merkle proofs used for verifying the purchase |
setMintDetails
Mint Details: token price, merkle root, and signer address
function setMintDetails(ReserveInfo calldata _reserve, bytes calldata _mintDetails) external whenNotPaused;
withdraw
Withdraws the sale proceeds to the sale receiver
function withdraw(address _token) external whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token withdrawing proceeds from |
pause
Pauses all function executions where modifier is applied
function pause() external onlyOwner;
unpause
Unpauses all function executions where modifier is applied
function unpause() external onlyOwner;
getFirstValidReserve
Returns the earliest valid reserveId that can mint a token
function getFirstValidReserve(address _token) public view returns (uint256);
getLatestUpdate
Gets the latest timestamp update made to token reserves
function getLatestUpdate(address _token) public view returns (uint40);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
Returns
Name | Type | Description |
---|---|---|
<none> | uint40 | Timestamp of latest update |
getSaleProceed
Gets the proceed amount from a token sale
function getSaleProceed(address _token) public view returns (uint128);
Parameters
Name | Type | Description |
---|---|---|
_token | address | Address of the token contract |
Returns
Name | Type | Description |
---|---|---|
<none> | uint128 | Amount of proceeds |
_buy
Purchases arbitrary amount of tokens at auction price and mints tokens to given account
function _buy(address _token, uint256 _reserveId, uint256 _amount, address _to) internal;
_setLatestUpdate
Sets timestamp of the latest update to token reserves
function _setLatestUpdate(address _token, uint256 _timestamp) internal;
_setFirstValidReserve
Sets earliest valid reserve
function _setFirstValidReserve(address _token, uint256 _reserveId) internal;
_setSaleProceeds
Sets the proceed amount from the token sale
function _setSaleProceeds(address _token, uint256 _amount) internal;
_getMerkleRoot
Gets the merkle root of a token reserve
function _getMerkleRoot(address _token, uint256 _reserveId) internal view override returns (bytes32);
TicketRedeemer
Inherits: ITicketRedeemer, Ownable, Pausable
Author: fx(hash)
See the documentation in {ITicketRedeemer}
State Variables
tickets
Mapping of FxGenArt721 token address to FxMintTicket721 token address
mapping(address => address) public tickets;
Functions
redeem
Burns a ticket and mints a new token to the caller
function redeem(address _token, address _to, uint256 _ticketId, bytes calldata _fxParams) external whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_token | address | |
_to | address | Address of token receiver |
_ticketId | uint256 | |
_fxParams | bytes | Random sequence of fixed-length bytes used for token input |
setMintDetails
Mint Details: ticket contract address
function setMintDetails(ReserveInfo calldata, bytes calldata _mintDetails) external whenNotPaused;
pause
Pauses all function executions where modifier is applied
function pause() external onlyOwner;
unpause
Unpauses all function executions where modifier is applied
function unpause() external onlyOwner;
Contents
PseudoRandomizer
Inherits: IPseudoRandomizer
Author: fx(hash)
See the documentation in {IPseudoRandomizer}
Functions
requestRandomness
function requestRandomness(uint256 _tokenId) external;
generateSeed
Generates random seed for token using entropy
function generateSeed(uint256 _tokenId) public view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | Hash of the seed |
Contents
FxContractRegistry
Inherits: IFxContractRegistry, Ownable
Author: fx(hash)
See the documentation in {IFxContractRegistry}
State Variables
configInfo
Returns the system config information
ConfigInfo public configInfo;
contracts
Mapping of hashed contract name to contract address
mapping(bytes32 => address) public contracts;
Functions
constructor
Initializes registry owner and system config information
constructor(address _admin, ConfigInfo memory _configInfo) Ownable;
register
Registers deployed contract addresses based on hashed value of name
function register(string[] calldata _names, address[] calldata _contracts) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_names | string[] | Array of contract names |
_contracts | address[] | Array of contract addresses |
setConfig
Sets the system config information
function setConfig(ConfigInfo calldata _configInfo) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_configInfo | ConfigInfo | Config information (lock time, referrer share, default metadata) |
_setConfigInfo
Sets the system config information
function _setConfigInfo(ConfigInfo memory _configInfo) internal;
FxRoleRegistry
Inherits: AccessControl, IFxRoleRegistry
Author: fx(hash)
See the documentation in {IFxRoleRegistry}
Functions
constructor
Initializes registry owner and role admins
constructor(address _admin);
setRoleAdmin
Sets the admin of a new or existing role
function setRoleAdmin(bytes32 _role) external onlyRole(ADMIN_ROLE);
Parameters
Name | Type | Description |
---|---|---|
_role | bytes32 | Hash of the role name |
Contents
IPFSRenderer
Inherits: IIPFSRenderer
Author: fx(hash)
See the documentation in {IIPFSRenderer}
State Variables
contractRegistry
address public immutable contractRegistry;
Functions
constructor
Initializes FxContractRegistry
constructor(address _contractRegistry);
contractURI
function contractURI() external view returns (string memory);
tokenURI
function tokenURI(uint256 _tokenId, bytes calldata _data) external view returns (string memory);
getMetadataURL
Generates the metadata URL for a token ID
function getMetadataURL(address _contractAddr, string memory _baseURI, uint256 _tokenId)
public
view
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_baseURI | string | URI of the content identifier |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the JSON metadata |
ONCHFSRenderer
Inherits: IONCHFSRenderer
Author: fx(hash)
See the documentation in {IONCHFSRenderer}
State Variables
contractRegistry
address public immutable contractRegistry;
Functions
constructor
Initializes FxContractRegistry
constructor(address _contractRegistry);
contractURI
function contractURI() external view returns (string memory);
tokenURI
function tokenURI(uint256 _tokenId, bytes calldata _data) external view returns (string memory);
getAttributes
Generates the list of attributes for a token ID
function getAttributes(address _contractAddr, string memory _baseURI, uint256 _tokenId)
public
view
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_baseURI | string | URI of the content identifier |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | List of token attributes |
getExternalURL
Generates the external URL for a token ID
function getExternalURL(address _contractAddr, uint256 _tokenId) public view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the external token pointer |
getImageURL
Generates the image URL for a token ID
function getImageURL(address _contractAddr, string memory _baseURI, uint256 _tokenId)
public
view
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_contractAddr | address | Address of the token contract |
_baseURI | string | URI of the content identifier |
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the image pointer |
getAnimationURL
Generates the animation URL for a token ID
function getAnimationURL(bytes32 _onchfsCID, uint256 _tokenId, address _minter, bytes32 _seed, bytes memory _fxParams)
public
pure
returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
_onchfsCID | bytes32 | CID hash of token animation |
_tokenId | uint256 | ID of the token |
_minter | address | Address of initial token owner |
_seed | bytes32 | Hash of randomly generated seed |
_fxParams | bytes | Random sequence of fixed-length bytes used as token input |
Returns
Name | Type | Description |
---|---|---|
<none> | string | URL of the animation pointer |
_renderJSON
Reconstructs JSON metadata of token onchain
function _renderJSON(
address _contractAddr,
uint256 _tokenId,
string memory _description,
string memory _baseURI,
string memory _animationURL
) internal view returns (string memory);
Contents
Contents
RoyaltyManager
Inherits: IRoyaltyManager
Author: fx(hash)
See the documentation in {IRoyaltyManager}
State Variables
baseRoyalties
Returns royalty information of index in array list
RoyaltyInfo public baseRoyalties;
tokenRoyalties
Mapping of token ID to array of royalty information
mapping(uint256 => RoyaltyInfo) public tokenRoyalties;
Functions
getRoyalties
Gets the royalties for a specific token ID
function getRoyalties(uint256 _tokenId)
external
view
returns (address[] memory receivers, uint256[] memory basisPoints);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
receivers | address[] | Total receivers and basis points |
basisPoints | uint256[] |
royaltyInfo
Returns the royalty information for a specific token ID and sale price
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_salePrice | uint256 | Sale price of the token |
Returns
Name | Type | Description |
---|---|---|
receiver | address | Address receiving royalties |
amount | uint256 | royaltyAmount Amount to royalties being paid out |
_getOrCreateSplit
function _getOrCreateSplit(address[] calldata _receivers, uint32[] calldata _allocations)
internal
returns (address receiver);
_setBaseRoyalties
Sets the base royalties for all tokens
function _setBaseRoyalties(address[] calldata _receivers, uint32[] calldata _allocations, uint96 _basisPoints)
internal
virtual;
Parameters
Name | Type | Description |
---|---|---|
_receivers | 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 |
_setTokenRoyalties
compute split if necessary
Sets the royalties for a specific token ID
function _setTokenRoyalties(uint256 _tokenId, address _receiver, uint96 _basisPoints) internal;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_receiver | address | Address receiving royalty payments |
_basisPoints | uint96 | Total allocation scalar for calculating royalty shares |
_exists
Checks if the token ID exists
function _exists(uint256 _tokenId) internal view virtual returns (bool);
_checkRoyalties
*Checks if:
- Total basis points of royalties exceeds 10,000 (100%)
- A single receiver exceeds 2,500 (25%)*
function _checkRoyalties(address[] memory _receivers, uint32[] memory _allocations, uint96 _basisPoints)
internal
pure;
FxGenArt721
Inherits: IFxGenArt721, IERC4906, ERC721, EIP712, Initializable, Ownable, Pausable, RoyaltyManager
Author: fx(hash)
See the documentation in {IFxGenArt721}
State Variables
contractRegistry
Returns address of the FxContractRegistry contract
address public immutable contractRegistry;
roleRegistry
Returns the address of the FxRoleRegistry contract
address public immutable roleRegistry;
nameAndSymbol_
Packed value of name and symbol where combined length is 30 bytes or less
bytes32 internal nameAndSymbol_;
name_
Project name
string internal name_;
symbol_
Project symbol
string internal symbol_;
totalSupply
Returns the current circulating supply of tokens
uint96 public totalSupply;
randomizer
Returns the address of the randomizer contract
address public randomizer;
renderer
Returns the address of the Renderer contract
address public renderer;
nonce
Current nonce for admin signatures
uint96 public nonce;
issuerInfo
Returns the issuer information of the project (primaryReceiver, ProjectInfo)
IssuerInfo public issuerInfo;
metadataInfo
Returns the metadata information of the project (baseURI, onchainPointer)
MetadataInfo public metadataInfo;
genArtInfo
Mapping of token ID to GenArtInfo struct (minter, seed, fxParams)
mapping(uint256 => GenArtInfo) public genArtInfo;
Functions
onlyMinter
Modifier for restricting calls to only registered minters
modifier onlyMinter();
onlyRole
Modifier for restricting calls to only authorized accounts with given role
modifier onlyRole(bytes32 _role);
constructor
Initializes FxContractRegistry and FxRoleRegistry
constructor(address _contractRegistry, address _roleRegistry)
ERC721("FxGenArt721", "FXHASH")
EIP712("FxGenArt721", "1");
initialize
Initializes new generative art project
function initialize(
address _owner,
InitInfo calldata _initInfo,
ProjectInfo memory _projectInfo,
MetadataInfo calldata _metadataInfo,
MintInfo[] calldata _mintInfo,
address[] calldata _royaltyReceivers,
uint32[] calldata _allocations,
uint96 _basisPoints
) external initializer;
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 |
burn
Burns token ID from the circulating supply
function burn(uint256 _tokenId) external whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
fulfillSeedRequest
function fulfillSeedRequest(uint256 _tokenId, bytes32 _seed) external;
mint
function mint(address _to, uint256 _amount, uint256) external onlyMinter whenNotPaused;
mintParams
Mints single fxParams token
Only callable by registered minter contracts
function mintParams(address _to, bytes calldata _fxParams) external onlyMinter whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address receiving minted token |
_fxParams | bytes | Random sequence of fixed-length bytes used as input |
ownerMint
Mints single token with randomly generated seed
Only callable by contract owner
function ownerMint(address _to) external onlyOwner whenNotPaused;
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 onlyOwner whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address receiving minted token |
_fxParams | bytes | Random sequence of fixed-length bytes used as input |
reduceSupply
Reduces maximum supply of collection
function reduceSupply(uint120 _supply) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_supply | uint120 | Maximum supply amount |
registerMinters
Registers minter contracts with resereve info
function registerMinters(MintInfo[] memory _mintInfo) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_mintInfo | MintInfo[] | Mint information of token reserves |
setBaseRoyalties
Sets the base royalties for all secondary token sales
function setBaseRoyalties(address[] calldata _receivers, uint32[] calldata _allocations, uint96 _basisPoints)
external
onlyOwner;
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 |
setBurnEnabled
Sets flag status of public burn to enabled or disabled
function setBurnEnabled(bool _flag) external onlyOwner;
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 onlyOwner;
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 onlyOwner;
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 onlyOwner;
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 |
setRenderer
Sets the new renderer contract
function setRenderer(address _renderer, bytes calldata _signature) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_renderer | address | Address of the renderer contract |
_signature | bytes | Signature of creator used to verify renderer update |
setRandomizer
Sets the new randomizer contract
function setRandomizer(address _randomizer) external onlyRole(ADMIN_ROLE);
Parameters
Name | Type | Description |
---|---|---|
_randomizer | address | Address of the randomizer contract |
setBaseURI
Sets the new URI of the token metadata
function setBaseURI(bytes calldata _uri) external onlyRole(METADATA_ROLE);
Parameters
Name | Type | Description |
---|---|---|
_uri | bytes | Decoded content identifier of metadata pointer |
pause
Pauses all function executions where modifier is applied
function pause() external onlyRole(MODERATOR_ROLE);
setTags
Emits an event for setting tag descriptions for the project
function setTags(uint256[] calldata _tagIds) external onlyRole(MODERATOR_ROLE);
Parameters
Name | Type | Description |
---|---|---|
_tagIds | uint256[] | Array of tag IDs describing the project |
unpause
Unpauses all function executions where modifier is applied
function unpause() external onlyRole(MODERATOR_ROLE);
activeMinters
function activeMinters() external view returns (address[] memory);
contractURI
Returns contract-level metadata for storefront marketplaces
function contractURI() external view returns (string memory);
primaryReceiver
function primaryReceiver() external view returns (address);
generateOnchainPointerHash
Generates typed data hash for setting project metadata onchain
function generateOnchainPointerHash(bytes calldata _data) public 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) public view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
_renderer | address | Address of the new renderer contract |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | Typed data hash |
isMinter
Gets the authorization status for the given minter contract
function isMinter(address _minter) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
_minter | address | Address of the minter contract |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Authorization status |
remainingSupply
Returns the remaining supply of tokens left to mint
function remainingSupply() public view returns (uint256);
name
function name() public view override returns (string memory);
symbol
function symbol() public view override returns (string memory);
tokenURI
function tokenURI(uint256 _tokenId) public view override returns (string memory);
_mintParams
Mints single token to given account using fxParams as input
function _mintParams(address _to, uint256 _tokenId, bytes calldata _fxParams) internal;
_mintRandom
Mints single token to given account using randomly generated seed as input
function _mintRandom(address _to, uint256 _tokenId) internal;
_registerMinters
Registers arbitrary number of minter contracts and sets their reserves
function _registerMinters(MintInfo[] memory _mintInfo) internal;
_setBaseRoyalties
Sets receivers and allocations for base royalties of token sales
function _setBaseRoyalties(address[] calldata _receivers, uint32[] calldata _allocations, uint96 _basisPoints)
internal
override;
_setPrimaryReceiver
Sets primary receiver address for token sales
function _setPrimaryReceiver(address[] calldata _receivers, uint32[] calldata _allocations) internal;
_setNameAndSymbol
Packs name and symbol into single slot if combined length is 30 bytes or less
function _setNameAndSymbol(string calldata _name, string calldata _symbol) internal;
_setOnchainPointer
Sets the onchain pointer for reconstructing metadata onchain
function _setOnchainPointer(bytes calldata _onchainData) internal;
_setTags
Emits event for setting the project tag descriptions
function _setTags(uint256[] calldata _tagIds) internal;
_verifySignature
Verifies that a signature was generated for the computed digest
function _verifySignature(bytes32 _digest, bytes calldata _signature) internal;
_isVerified
Checks if creator is verified by the system
function _isVerified(address _creator) internal view returns (bool);
_checkFeeReceiver
Checks if fee receiver and allocation amount are included in their respective arrays
function _checkFeeReceiver(
address[] calldata _receivers,
uint32[] calldata _allocations,
address _feeReceiver,
uint32 _feeAllocation
) internal pure;
_exists
Returns if token id
exists.
function _exists(uint256 _tokenId) internal view override(ERC721, RoyaltyManager) returns (bool);
FxMintTicket721
Inherits: IFxMintTicket721, IERC4906, IERC5192, ERC721, Initializable, Ownable, Pausable
Author: fx(hash)
See the documentation in {IFxMintTicket721}
State Variables
contractRegistry
Returns the address of the FxContractRegistry contract
address public immutable contractRegistry;
roleRegistry
Returns the address of the FxRoleRegistry contract
address public immutable roleRegistry;
genArt721
Returns address of the FxGenArt721 token contract
address public genArt721;
totalSupply
Returns the current circulating supply of tokens
uint48 public totalSupply;
gracePeriod
Returns default grace period of time for each token
uint48 public gracePeriod;
baseURI
Returns the decoded content identifier of the metadata pointer
bytes public baseURI;
redeemer
Returns the address of the TickeRedeemer contract
address public redeemer;
renderer
Returns the address of the renderer contract
address public renderer;
activeMinters
Returns the list of active minters
address[] public activeMinters;
balances
Mapping of wallet address to pending balance available for withdrawal
mapping(address => uint256) public balances;
minters
Returns the active status of a registered minter contract
mapping(address => uint8) public minters;
taxes
Mapping of ticket ID to tax information (grace period, foreclosure time, current price, deposit amount)
mapping(uint256 => TaxInfo) public taxes;
Functions
onlyRole
Modifier for restricting calls to only callers with the specified role
modifier onlyRole(bytes32 _role);
constructor
Initializes FxContractRegistry and FxRoleRegistry
constructor(address _contractRegistry, address _roleRegistry) ERC721("FxMintTicket721", "FXTICKET");
initialize
Initializes new generative art project
function initialize(
address _owner,
address _genArt721,
address _redeemer,
address _renderer,
uint48 _gracePeriod,
MintInfo[] calldata _mintInfo
) external initializer;
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address of contract owner |
_genArt721 | address | Address of GenArt721 token contract |
_redeemer | address | Address of TicketRedeemer minter contract |
_renderer | address | Address of renderer contract |
_gracePeriod | uint48 | Period time before token enters harberger taxation |
_mintInfo | MintInfo[] | Array of authorized minter contracts and their reserves |
burn
Burns token ID from the circulating supply
function burn(uint256 _tokenId) external whenNotPaused;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
claim
Claims token at current price and sets new price of token with initial deposit amount
function claim(uint256 _tokenId, uint256 _maxPrice, uint80 _newPrice) external payable;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_maxPrice | uint256 | Maximum payment amount allowed to prevent front-running of listing price |
_newPrice | uint80 | New listing price of token |
depositAndSetPrice
Deposits taxes for given token and set new price for same token
function depositAndSetPrice(uint256 _tokenId, uint80 _newPrice) external payable;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_newPrice | uint80 | New listing price of token |
mint
function mint(address _to, uint256 _amount, uint256 _payment) external whenNotPaused;
updateStartTime
Updates taxation start time to the current timestamp
function updateStartTime(uint256 _tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
withdraw
Withdraws available balance amount to given address
function withdraw(address _to) external;
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address being withdrawn to |
deposit
Deposits taxes for given token
function deposit(uint256 _tokenId) public payable;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
setPrice
Sets new price for given token
function setPrice(uint256 _tokenId, uint80 _newPrice) public;
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
_newPrice | uint80 | New price of the token |
registerMinters
Registers minter contracts with resereve info
function registerMinters(MintInfo[] calldata _mintInfo) external onlyOwner;
setBaseURI
Sets the new URI of the token metadata
function setBaseURI(bytes calldata _uri) external onlyRole(METADATA_ROLE);
Parameters
Name | Type | Description |
---|---|---|
_uri | bytes | Decoded content identifier of metadata pointer |
pause
Pauses all function executions where modifier is set
function pause() external onlyRole(MODERATOR_ROLE);
unpause
Unpauses all function executions where modifier is set
function unpause() external onlyRole(MODERATOR_ROLE);
contractURI
Gets the contact-level metadata for the ticket
function contractURI() external view returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | URI of the contract metadata |
locked
Returns the locking status of an Soulbound Token
SBTs assigned to zero address are considered invalid, and queries about them do throw
function locked(uint256 _tokenId) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 |
primaryReceiver
function primaryReceiver() external view returns (address);
isApprovedForAll
function isApprovedForAll(address _owner, address _operator) public view override(ERC721, IERC721) returns (bool);
tokenURI
function tokenURI(uint256 _tokenId) public view override returns (string memory);
getAuctionPrice
Gets the current auction price of the token
function getAuctionPrice(uint256 _currentPrice, uint256 _foreclosureTime) public view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_currentPrice | uint256 | Listing price of the token |
_foreclosureTime | uint256 | Timestamp of the foreclosure |
getDepositAmounts
Gets the deposit amount owed and remaining after change in price, claim or burn
function getDepositAmounts(uint256 _dailyTax, uint256 _depositAmount, uint256 _foreclosureTime)
public
view
returns (uint256 depositOwed, uint256 depositRemaining);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Total amount of taxes deposited |
_foreclosureTime | uint256 | Timestamp of current foreclosure |
Returns
Name | Type | Description |
---|---|---|
depositOwed | uint256 | Deposit amount owed |
depositRemaining | uint256 |
isForeclosed
Checks if token is foreclosed
function isForeclosed(uint256 _tokenId) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | ID of the token |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Status of foreclosure |
getDailyTax
Gets the daily tax amount based on current price
function getDailyTax(uint256 _currentPrice) public pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_currentPrice | uint256 | Current listing price |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Daily tax amount |
getExcessTax
Gets the excess amount of taxes paid
function getExcessTax(uint256 _dailyTax, uint256 _depositAmount) public pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Total amount of taxes deposited |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Excess amount of taxes |
getNewForeclosure
Gets the new foreclosure timestamp
function getNewForeclosure(uint256 _dailyTax, uint256 _depositAmount, uint256 _currentForeclosure)
public
pure
returns (uint48);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Amount of taxes being deposited |
_currentForeclosure | uint256 |
Returns
Name | Type | Description |
---|---|---|
<none> | uint48 | Timestamp of new foreclosure |
getTaxDuration
Gets the total duration of time covered
function getTaxDuration(uint256 _dailyTax, uint256 _depositAmount) public pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_dailyTax | uint256 | Daily tax amount based on current price |
_depositAmount | uint256 | Amount of taxes being deposited |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | Total time duration |
_registerMinters
Registers arbitrary number of minter contracts and sets their reserves
function _registerMinters(MintInfo[] memory _mintInfo) internal;
_beforeTokenTransfer
*Tokens can only be transferred when either of these conditions is met:
- This contract executes transfer when token is in foreclosure and claimed at auction price
- This contract executes transfer when token is not in foreclosure and claimed at listing price
- Token owner executes transfer when token is not in foreclosure
- Registered minter contract executes burn when token is not in foreclosure*
function _beforeTokenTransfer(address _from, address, uint256 _tokenId, uint256) internal view override;
_isVerified
Checks if creator is verified by the system
function _isVerified(address _creator) internal view returns (bool);
Contents
Constants
FX_CONTRACT_REGISTRY
string constant FX_CONTRACT_REGISTRY = "FX_CONTRACT_REGISTRY";
FX_GEN_ART_721
string constant FX_GEN_ART_721 = "FX_GEN_ART_721";
FX_ISSUER_FACTORY
string constant FX_ISSUER_FACTORY = "FX_ISSUER_FACTORY";
FX_MINT_TICKET_721
string constant FX_MINT_TICKET_721 = "FX_MINT_TICKET_721";
FX_ROLE_REGISTRY
string constant FX_ROLE_REGISTRY = "FX_ROLE_REGISTRY";
FX_TICKET_FACTORY
string constant FX_TICKET_FACTORY = "FX_TICKET_FACTORY";
DUTCH_AUCTION
string constant DUTCH_AUCTION = "DUTCH_AUCTION";
FIXED_PRICE
string constant FIXED_PRICE = "FIXED_PRICE";
ONCHFS_RENDERER
string constant ONCHFS_RENDERER = "ONCHFS_RENDERER";
IPFS_RENDERER
string constant IPFS_RENDERER = "IPFS_RENDERER";
PSEUDO_RANDOMIZER
string constant PSEUDO_RANDOMIZER = "PSEUDO_RANDOMIZER";
TICKET_REDEEMER
string constant TICKET_REDEEMER = "TICKET_REDEEMER";
CLAIM_TYPEHASH
bytes32 constant CLAIM_TYPEHASH =
keccak256("Claim(address token,uint256 reserveId,uint96 nonce,uint256 index,address user)");
SET_ONCHAIN_POINTER_TYPEHASH
bytes32 constant SET_ONCHAIN_POINTER_TYPEHASH = keccak256("SetOnchainPointer(bytes onchainData,uint96 nonce)");
SET_PRIMARY_RECEIVER_TYPEHASH
bytes32 constant SET_PRIMARY_RECEIVER_TYPEHASH = keccak256("SetPrimaryReceiver(address receiver,uint96 nonce)");
SET_RENDERER_TYPEHASH
bytes32 constant SET_RENDERER_TYPEHASH = keccak256("SetRenderer(address renderer,uint96 nonce)");
IPFS_URL
bytes constant IPFS_URL =
hex"697066733a2f2f172c151325290607391d2c391b242225180a020b291b260929391d1b31222525202804120031280917120b280400";
IPFS_PREFIX
string constant IPFS_PREFIX = "ipfs://";
API_VERSION
string constant API_VERSION = "0.2";
ATTRIBUTES_ENDPOINT
string constant ATTRIBUTES_ENDPOINT = "/attributes.json";
METADATA_ENDPOINT
string constant METADATA_ENDPOINT = "/metadata.json";
THUMBNAIL_ENDPOINT
string constant THUMBNAIL_ENDPOINT = "/thumbnail.json";
FX_HASH_QUERY
string constant FX_HASH_QUERY = "/?fxhash=";
FX_PARAMS_QUERY
string constant FX_PARAMS_QUERY = "#0x";
ITERATION_QUERY
string constant ITERATION_QUERY = "&fxiteration=";
MINTER_QUERY
string constant MINTER_QUERY = "&fxminter=";
ONCHFS_PREFIX
string constant ONCHFS_PREFIX = "onchfs://";
UNINITIALIZED
uint8 constant UNINITIALIZED = 0;
FALSE
uint8 constant FALSE = 1;
TRUE
uint8 constant TRUE = 2;
LOCK_TIME
uint32 constant LOCK_TIME = 3600;
TIME_UNLIMITED
uint64 constant TIME_UNLIMITED = type(uint64).max;
OPEN_EDITION_SUPPLY
uint120 constant OPEN_EDITION_SUPPLY = type(uint120).max;
LAUNCH_TIMESTAMP
uint256 constant LAUNCH_TIMESTAMP = 1702558800;
ADMIN_ROLE
bytes32 constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
BANNED_USER_ROLE
bytes32 constant BANNED_USER_ROLE = keccak256("BANNED_USER_ROLE");
CREATOR_ROLE
bytes32 constant CREATOR_ROLE = keccak256("CREATOR_ROLE");
METADATA_ROLE
bytes32 constant METADATA_ROLE = keccak256("METADATA_ROLE");
MINTER_ROLE
bytes32 constant MINTER_ROLE = keccak256("MINTER_ROLE");
MODERATOR_ROLE
bytes32 constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE");
SIGNER_ROLE
bytes32 constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
ALLOCATION_DENOMINATOR
uint32 constant ALLOCATION_DENOMINATOR = 1_000_000;
FEE_DENOMINATOR
uint96 constant FEE_DENOMINATOR = 10_000;
MAX_ROYALTY_BPS
uint96 constant MAX_ROYALTY_BPS = 2500;
SPLITS_MAIN
address constant SPLITS_MAIN = 0x2ed6c4B5dA6378c7897AC67Ba9e43102Feb694EE;
AUCTION_DECAY_RATE
uint256 constant AUCTION_DECAY_RATE = 200;
DAILY_TAX_RATE
uint256 constant DAILY_TAX_RATE = 27;
MINIMUM_PRICE
uint256 constant MINIMUM_PRICE = 0.001 ether;
ONE_DAY
uint256 constant ONE_DAY = 86_400;
SCALING_FACTOR
uint256 constant SCALING_FACTOR = 10_000;
TEN_MINUTES
uint256 constant TEN_MINUTES = 600;