ERC-1155 contract

ERC-1155 Smart Contract

Constructor

constructor(
        string memory _name,
        string memory _symbol,
        string memory _contractMetadataURI,
        string memory _tokenMetadataURI,
        bool _allowBuy,
        Addresses memory _addresses
) ERC1155('') {...}
IndexNameDescription
0__nameToken Name
1__symbolToken Symbol
2_contractMetadataURIContract Metadata URI
3_allowBuyToggle for API Mints
4_addresses- customer address
- collection owner address
- authorization address
- purchase token address (if purchasing with ERC-20 token)
- manager (HyperMint) primary royalty address
- customer primary royalty address
- secondary royalty address

Functions

Legend

FieldMeaning
🛠Function can modify state
💵Function is payable
Publicpublic functions can be called internally from within the contract or externally via messages
ExternalExternal functions are part of the contract interface, which means they can be called from other contracts and via transactions. An external function f cannot be called internally (i.e. f() does not work, but this.f() works)

Description

Function NameVisibilityMutabilityDescription
getTokenInfoExternal-Returns the current price, supply and max supply of the token
totalSupplyPublic-Returns the total supply for a specific tokenId
royaltyInfoExternal-Returns the royalty receiver and amount for each secondary sale
supportsInterfacePublic-Returns true if this contract implements the interface defined by interfaceId
setNameAndSymbolExternal🛠Modifies the token name and/or token symbol
setMetadataURIsExternal🛠Modifies the URIs for the contract and token
setDatesExternal🛠Modifies public sale start and end dates
setTokenDataExternal🛠Modifies token price, max supply and max amount of tokens can be purchased per transaction
setAddressesExternal🛠Modifies addresses
setAllowBuyExternal🛠Toggles buy on/off
setRoyaltyExternal🛠Modifies primary royalty for minting and/or secondary royalty
mintBatchExternal🛠Performs a batch mint of x tokens to y addresses
buyAuthorisedExternal💵Buys X amount of tokens in private sale
buyExternal💵Buys X amount of tokens in public sale
_buyExternal🛠- Processes a buy of X tokens for a total price Y
- Immediately sweeps proceeds from the contract
- Mints X tokens to the buyer
transferContractOwnershipExternal🛠Transfers ownership of the Contract Manager role

Architecture

Feedback

Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.