ITicketRedeemer

Git Source

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

NameTypeDescription
_ticketaddressAddress of the ticket contract
_toaddressAddress of token receiver
_tokenIduint256ID of the ticket being burned
_fxParamsbytesRandom 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

NameTypeDescription
_reserveInfoReserveInfoReserve information for the token
_mintDetailsbytesDetails 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

NameTypeDescription
_ticketaddressAddress of the ticket contract
_tokenaddressAddress 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

NameTypeDescription
_ticketaddressAddress of the ticket contract
_tokenIduint256ID of the token being burned
_owneraddressAddress of the owner receiving the token
_tokenaddressAddress 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();