relevant tag icon
Manifold ERC1155
copy icon
manifoldxyz
• version 1.0.0
ERC1155
NFT
Token

Manifold ERC1155

ERC1155 using the Manifold Creator Architecture. The Manifold Creator Architecture is a more powerful version of the ERC721 and ERC1155 standard token contracts, providing creators with the ability to deploy smart contracts with functionalities beyond basic NFT minting.

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0xf594 downloaded

Last Publish

11/27/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
supportsInterface(bytes4) :
This function is used to check if a given interfaceId is supported by the contract. It does this by calling the supportsInterface() function of the ERC1155CreatorCore, ERC1155, and AdminControl contracts, and returning true if any of them return true. (autogenerated documentation)
_beforeTokenTransfer(address,address,uint256[],uint256[]) :
This function is an override of the _beforeTokenTransfer function in the ERC-20 token standard. It is used to approve a transfer of tokens from one address to another. It takes in the addresses of the sender and receiver, an array of token IDs, an array of token amounts, and a byte array of data. It then calls the _approveTransfer function, passing in the sender and receiver addresses, the token IDs and amounts, to approve the transfer. (autogenerated documentation)
registerExtension(address,string) :
This function registers an extension with the contract. It requires the address of the extension, as well as a baseURI string. It is only accessible to the admin of the contract, and the extension address must not be blacklisted. The function sets the extension address and baseURI in the contract storage, and sets a boolean flag to indicate that the extension is registered. (autogenerated documentation)
registerExtension(address,string,bool) :
This function allows an admin to register an extension contract with the base contract. It requires the address of the extension contract, a base URI, and a boolean value indicating whether the base URI is identical to the base URI of the base contract. The function is protected by the adminRequired modifier, which ensures that only an admin can call the function, and the nonBlacklistRequired modifier, which ensures that the extension contract is not blacklisted. Once the function is called, the _registerExtension function is called, which registers the extension contract with the base contract. (autogenerated documentation)
unregisterExtension(address) :
This function allows an admin to unregister an extension from the contract. It takes an address of the extension as an argument and removes it from the list of registered extensions. This function is only accessible to admins and requires them to have the adminRequired permission. (autogenerated documentation)
blacklistExtension(address) :
This function allows an admin to blacklist an extension address. This means that the extension address will no longer be able to interact with the contract. The function works by taking in an address as an argument and then calling the internal _blacklistExtension() function, which updates the blacklist mapping to include the extension address. (autogenerated documentation)
setBaseTokenURIExtension(string) :
This function sets the base token URI extension for the contract. It takes a string as an argument and stores it in the contract's storage. This allows the contract to provide additional information about the token, such as its purpose, origin, or other relevant details. This information can then be accessed by anyone who interacts with the contract. (autogenerated documentation)
setBaseTokenURIExtension(string,bool) :
This function sets the base token URI extension for the contract. It takes two parameters: a string calldata uri_, which is the URI to be set, and a boolean identical, which indicates whether the URI should be identical to the base token URI. If identical is set to true, the URI will be set to the same as the base token URI. If it is set to false, the URI will be set to the value of uri_. The function is an external override extension, meaning that it can only be called by an external account with the appropriate permissions. (autogenerated documentation)
setTokenURIPrefixExtension(string) :
This function allows the contract owner to set a prefix for the token URI of the tokens issued by the contract. The prefix is a string of characters that will be added to the beginning of the token URI for each token. This allows the contract owner to easily identify the tokens issued by the contract and to provide additional information about the tokens. (autogenerated documentation)
setTokenURIExtension(uint256,string) :
This function sets the URI extension for a given token ID. It takes in a token ID and a URI string as parameters, and then calls the _setTokenURIExtension() function to set the URI extension for the given token ID. This allows the token to be associated with a specific URI, which can be used to provide additional information about the token. (autogenerated documentation)
setTokenURIExtension(uint256[]) :
This function is an override extension of the setTokenURIExtension function. It takes two parameters, an array of uint256 tokenIds and an array of strings containing URIs. It then iterates through the arrays, setting the URI for each tokenId. This ensures that the URI is set for each tokenId in the array. (autogenerated documentation)
setBaseTokenURI(string) :
This function allows an admin to set the base token URI for the contract. The base token URI is a string that is used to provide a link to more information about the token. The function requires the admin to provide the new URI as an argument, and then sets the base token URI to the provided value. (autogenerated documentation)
setTokenURIPrefix(string) :
This function allows an admin to set the token URI prefix for the contract. The token URI prefix is a string that is used to identify the token and provide additional information about it. The prefix is used to construct the full token URI, which is then used to access the token's metadata. The function takes a string as an argument and sets the token URI prefix to that string. (autogenerated documentation)
setTokenURI(uint256,string) :
This function allows an admin to set the URI of a token with a given tokenId. The function takes two parameters, the tokenId and the uri_, which is a string containing the URI. The function then calls the _setTokenURI() function, which sets the URI of the token with the given tokenId. (autogenerated documentation)
setTokenURI(uint256[]) :
This function allows an admin to set the token URI for multiple tokens at once. It takes two parameters, an array of token IDs and an array of URIs. It then iterates through the arrays, setting the token URI for each token ID to the corresponding URI. (autogenerated documentation)
setMintPermissions(address,address) :
This function sets the minting permissions for a given address (extension) to a given address (permissions). It is an external function that requires admin privileges to execute. It works by calling the internal _setMintPermissions() function, which updates the minting permissions for the given address. (autogenerated documentation)
mintBaseNew(uint256[]) :
This function is used to mint new tokens to a specified list of addresses. It takes in three parameters: an array of addresses to mint the tokens to, an array of amounts to mint to each address, and an array of strings containing URIs associated with the tokens. It returns an array of uint256 values representing the token IDs of the newly minted tokens. The function is protected by the adminRequired modifier, which ensures that only the contract's admin can call it. (autogenerated documentation)
mintBaseExisting(uint256[],uint256[]) :
This function is used to mint existing tokens to a specified address. It takes in an array of addresses, an array of token IDs, and an array of amounts as parameters. It first checks that the token IDs are valid and that the tokens have not been created by an extension. It then calls the _mintExisting function, passing in the address of the sender (0) and the other parameters. This function will mint the specified amount of tokens to the specified address. (autogenerated documentation)
mintExtensionNew(uint256[]) :
This function is an extension of the mint function, allowing the sender to mint multiple tokens at once. It takes in an array of addresses, an array of amounts, and an array of URIs as parameters. It then calls the _mintNew function, passing in the sender's address, the array of addresses, the array of amounts, and the array of URIs as arguments. The _mintNew function then mints the specified tokens and returns an array of token IDs for the newly minted tokens. (autogenerated documentation)
mintExtensionExisting(uint256[],uint256[]) :
This function is an override of the _mintExisting() function in the ERC721 contract. It is used to mint existing tokens to a specified address. It takes in three parameters: an array of addresses to mint the tokens to, an array of token IDs, and an array of amounts. It first checks that the tokens being minted were created by the extension, then calls the _mintExisting() function to mint the tokens. (autogenerated documentation)
_mintNew(address,uint256[]) :
This function is used to mint new tokens. It takes in an address of an extension, an array of addresses to send the tokens to, an array of amounts to send to each address, and an array of URIs associated with each token. It then checks the minting permissions, and mints the tokens either one at a time or in batches. Finally, it sets the URIs for each token. (autogenerated documentation)
_mintExisting(address,uint256[],uint256[]) :
This function is used to mint existing tokens. It takes in four parameters: an address extension, an array of addresses to, an array of tokenIds, and an array of amounts. It checks the mint permissions for the given inputs, and then mints the tokens accordingly. If there is only one address, tokenId, and amount, it will mint a single token. If there is only one tokenId and one amount, it will mint multiple tokens to the given addresses. If there is one address and multiple tokenIds and amounts, it will mint multiple tokens to the given address. Finally, if there are multiple addresses, tokenIds, and amounts, it will mint multiple tokens to the corresponding addresses. (autogenerated documentation)
tokenExtension(uint256) :
This function is used to retrieve the address of the token extension associated with a given token ID. It works by calling the _tokenExtension() internal function, which takes the token ID as an argument and returns the address of the associated token extension. (autogenerated documentation)
burn(address,uint256[],uint256[]) :
This function allows the owner of an account or an approved user to burn a given number of tokens from the account. It takes two arrays as parameters, one containing the token IDs and the other containing the amounts of tokens to be burned. If only one token is to be burned, the function calls the _burn() function, otherwise it calls the _burnBatch() function. Finally, it calls the _postBurn() function to update the state of the account. (autogenerated documentation)
setRoyalties(address,uint256[]) :
This function allows an admin to set royalties for a given set of receivers. It takes two parameters: an array of addresses of the receivers and an array of basis points for each receiver. The basis points represent the percentage of the total royalties that each receiver will receive. The function calls the _setRoyaltiesExtension() function, passing in a zero address and the two arrays of parameters. This function will update the royalties for each receiver accordingly. (autogenerated documentation)
setRoyalties(uint256,address,uint256[]) :
This function allows an admin to set royalties for a given tokenId. It takes in two parameters: an array of addresses (receivers) and an array of uint256 (basisPoints). The function then calls the _setRoyalties() internal function, which sets the royalties for the given tokenId to the provided receivers and basisPoints. The basisPoints represent the percentage of royalties that each receiver will receive when the token is sold. (autogenerated documentation)
setRoyaltiesExtension(address,address,uint256[]) :
This function sets a new royalties extension contract for the current contract. It requires the address of the new extension contract, an array of payable addresses of the receivers, and an array of basis points for each receiver. The function will then call the _setRoyaltiesExtension() internal function to set the new extension contract, receivers, and basis points. (autogenerated documentation)
getRoyalties(uint256) :
This function is used to retrieve the royalties associated with a given token ID. It works by calling the _getRoyalties() internal function, which returns an array of addresses and an array of uint256 values representing the royalties associated with the token ID. (autogenerated documentation)
getFees(uint256) :
This function gets the fees associated with a given token ID. It works by calling the _getRoyalties() internal function, which returns an array of addresses and an array of uint256 values representing the fees associated with the token ID. (autogenerated documentation)
getFeeRecipients(uint256) :
This function is used to retrieve the addresses of the recipients of fees associated with a given token ID. It works by calling the _getRoyaltyReceivers() internal function, which returns an array of addresses payable that represent the fee recipients. (autogenerated documentation)
getFeeBps(uint256) :
This function is used to retrieve the royalty fee (in basis points) associated with a given token ID. It works by calling the _getRoyaltyBPS() internal function, which returns an array of uints representing the royalty fee for the given token ID. (autogenerated documentation)
royaltyInfo(uint256,uint256) :
This function is used to retrieve royalty information for a given token ID and value. It takes two parameters, a token ID and a value, and returns an address and a uint256 value. The address is the address of the royalty recipient, and the uint256 value is the amount of royalty that will be paid to the recipient. The function works by calling the _getRoyaltyInfo() internal function, which is responsible for retrieving the royalty information from the contract's storage. (autogenerated documentation)
uri(uint256) :
This function is used to retrieve the URI associated with a given token ID. It works by calling the _tokenURI() function, which is a virtual override of the ERC721 interface, and passing in the token ID as an argument. The function then returns the URI associated with the token ID as a string. (autogenerated documentation)
totalSupply(uint256) :
This function returns the total supply of a given tokenId. It works by accessing the _totalSupply mapping, which stores the total supply of each tokenId, and returning the value associated with the given tokenId. (autogenerated documentation)
_mint(address,uint256,uint256) :
This function is an override of the _mint() function from the ERC-20 standard. It is used to mint a new token with a given ID, amount, and data. The function adds the given amount to the total supply of the token with the given ID, and then calls the super._mint() function to mint the token. (autogenerated documentation)
_mintBatch(address,uint256[],uint256[]) :
This function is an override of the _mintBatch() function from the ERC-1155 contract. It is used to mint multiple tokens at once. It takes in an address to mint the tokens to, an array of ids for the tokens to be minted, an array of amounts for the tokens to be minted, and a data field. It then calls the super function to mint the tokens, and then updates the total supply of each token by adding the amount of each token to the total supply. (autogenerated documentation)
_burn(address,uint256,uint256) :
This function is an override of the _burn() function from the ERC-20 standard. It reduces the total supply of a token by the specified amount. It takes three parameters: the address of the account burning the token, the ID of the token being burned, and the amount of the token being burned. The function first calls the _burn() function from the ERC-20 standard, and then reduces the total supply of the token by the specified amount. (autogenerated documentation)
_burnBatch(address,uint256[],uint256[]) :
This function is an override of the _burnBatch() function from the ERC20 contract. It is used to burn a batch of tokens from a given account. It takes in three parameters: an address of the account to burn from, an array of ids of the tokens to burn, and an array of amounts of the tokens to burn. It then iterates through the arrays, subtracting the amounts from the total supply of each token. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i manifold-erc1155-creator
copy icon

Recent Use

🍞 0xf594 downloaded

Last Publish

11/27/2022

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.