You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mint a token of based on id to recipient address, send fee to revenueAddress
public payable
freeMint(uint, address[])
Mint an event ticket to a list of specific addresses (e.g. for guest, giveaway)
public onlyOwner
setRevenueAddress(address)
Set the revenue address to a new address
public OnlyOwner
setForSale(uint, bool)
Toggle the forSale mapping for a tokenId
public OnlyOwner
setTicketPrice(uint, uint)
Set the ticket price for the given token id
public OnlyOwner
setCapacity(uint, uint)
Set the event capacity for the given token id
public OnlyOwner
createEvent(uint, uint, uint)
Create an event by calling setForSale, setTicketPrice, setCapacity
public OnlyOwner
Override all the transfer related functions to make it soulboundAlso need to expose some internal functions for pausing, etc., use OpenZeppelinContractsWizard for easy setup.
Example Usage for each event:
Create a new event by supplying token id, ticket price, and capacity
Unpause minting (default should be paused)
Users mint tickets at ticket price until capacity is full or until we pause
Owner can also mint tickets to guests or for giveways
Test cases:
Should create event (only owner)
Should mint ticket
Should not mint ticket if msg.value != price
Should not mint ticket if event is at capacity
should not mint ticket if id is not for sale
Should pause/unpause minting (only owner)
Should mint for free to list of addresses (only owner)