ERC1155OpenEdition
ERC1155OpenEdition
Inherits: ERC1155Base
Author: cosimo.demedici.eth *
A self-sovereign ERC-1155 minter preset. *
*This ERC1155 token features minting and lazy minting. **
State Variables
orders
Mapping of token ID to order details.
mapping(uint256 => _Order) public orders;Functions
mint
Mints new tokens for open editions. This function creates a new tokenId with an URI increasing totalSupply.
function mint(
uint256 unitPrice,
uint256 mintEnd,
uint256 maxSupply,
bytes calldata _data
)
external
onlyRole(MINTER_ROLE);Parameters
unitPrice
uint256
The price per unit of the token.
mintEnd
uint256
The end time for minting.
maxSupply
uint256
The maximum supply of the token.
_data
bytes
The data bytes containing token URI, royalty recipient and royalty BPS.
mint
Mints a desired tokenId value and pays the creator for the primary sale. This function is called by collectors.
Parameters
_to
address
The address to mint the tokens to.
_value
uint256
The amount of tokens to mint.
_tokenId
uint256
The ID of the token to mint.
_data
bytes
The data bytes.
setMintEnd
may be called in order to delay the mint end or to cut it short
there are not requirements meaning that it may be colled even during or after an open edition's sale period
Parameters
_tokenId
uint256
The ID of the token.
_newTimestamp
uint256
if set to a lower number than block.timestamp (ideally 0 for consistency) it is equivalent to pausing a tokenId's minting, until the timestamp is reset in the future
setUnitPrice
Sets the price per unit of the token. The contract admin can reset orders' price at any time, i.e. even after minting has begun.
Parameters
_tokenId
uint256
The ID of the token.
_newUnitPrice
uint256
The new price per unit.
setMaxSupply
Sets the maximum supply of the token.
Parameters
_tokenId
uint256
The ID of the token.
_newMaxSupply
uint256
The new maximum supply.
constructor
The constructor function.
Parameters
factory_
address
The address of the factory.
Structs
_Order
Structure to hold order details.
Last updated