Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Manifold Core NFT Implementation
copy icon
manifoldxyz
• version 1.0.0
Abstract
NFT
ERC721
ERC1155

Manifold Core NFT Implementation

The Creator Core is the underlying smart contract for creating NFTs with Manifold

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0x77CA saved

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 checks whether a given interfaceId is supported by the CreatorCore contract. It does this by comparing the given interfaceId to the interfaceId of the ICreatorCore interface, as well as to the interfaceIds of the four royalty contracts (Rarible, Foundation, EIP2981). If any of the interfaceIds match, the function returns true, otherwise it returns false. (autogenerated documentation)
getExtensions() :
This function is an external view override that returns an array of addresses representing the extensions of a given contract. It works by looping through the _extensions array and adding each address to the extensions array, which is then returned. (autogenerated documentation)
_registerExtension(address,string,bool) :
This function is used to register an extension contract with the ERC-20 token contract. It requires that the extension address is not 0 or the same as the token contract address, and that the extension is a contract. If the extension is not already registered, the baseURI and baseURIIdentical values are stored in the mapping, and an ExtensionRegistered event is emitted. Finally, the _setApproveTransferExtension function is called to set the extension to true. (autogenerated documentation)
setApproveTransferExtension(bool) :
This function enables or disables the approve transfer extension for a given address. It works by setting a boolean value (enabled) to true or false, which will determine whether the approve transfer extension is enabled or disabled for the given address. The function is marked as external override extensionRequired, which means that it can only be called by an external address that has the required extension. (autogenerated documentation)
_setApproveTransferExtension(address,bool) :
This function is an internal function that is used 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. It also emits an ExtensionUnregistered event to notify other contracts that the extension has been unregistered. (autogenerated documentation)
_unregisterExtension(address) :
This function is an internal function that is used to unregister an extension from the contract. It takes an address of an extension as an argument and checks if it is already registered in the contract. If it is, it emits an ExtensionUnregistered event and removes the extension from the list of registered extensions. (autogenerated documentation)
_blacklistExtension(address) :
This function is used to blacklist an extension address. It requires that the extension address is not 0 or the address of the contract itself. If the extension is already registered, it will be unregistered and removed from the list of extensions. If the extension is not already blacklisted, it will be added to the list of blacklisted extensions and an event will be emitted. (autogenerated documentation)
_setBaseTokenURIExtension(string,bool) :
This function sets the base token URI extension for a given sender. The uri parameter is a string containing the URI extension, and the identical parameter is a boolean indicating whether the URI extension should be identical for all tokens. This function stores the URI extension and the identical boolean in two mappings, _extensionBaseURI and _extensionBaseURIIdentical, respectively. (autogenerated documentation)
_setTokenURIPrefixExtension(string) :
This function sets the URI prefix extension for a given token. It takes a string as an argument, which is the prefix that will be used for the token. This prefix will be associated with the sender of the message, and will be used to identify the token when it is used in a URI. (autogenerated documentation)
_setTokenURIExtension(uint256,string) :
This function sets the URI extension for a given token ID. It requires that the sender of the message is the owner of the token, and then sets the URI extension for the token ID to the given URI. (autogenerated documentation)
_setBaseTokenURI(string) :
This function sets the base URI for the token contract. It takes a string memory argument which is the URI to be set. The function is marked as internal, meaning it can only be called from within the contract. The address(0) is used to store the URI in the _extensionBaseURI mapping. This mapping is used to store the base URI for the token contract. (autogenerated documentation)
_setTokenURIPrefix(string) :
This function sets 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 stored in the _extensionURIPrefix mapping, which is keyed by the address of the contract. The prefix is set using the calldata parameter, which is the data passed to the function when it is called. (autogenerated documentation)
_setTokenURI(uint256,string) :
This function sets the URI associated with a given token ID. It requires that the token ID is valid (greater than 0 and less than or equal to the total token count) and that the token has not already been extended. The function then sets the URI associated with the token ID to the given URI. (autogenerated documentation)
_tokenURI(uint256) :
This function is used to retrieve the token URI associated with a given token ID. It first checks to make sure that the token ID is valid, and that the associated extension is not blacklisted. If the token URI is stored in the contract, it is returned. Otherwise, the function checks to see if the extension supports the ICreatorExtensionTokenURI interface, and if so, calls the tokenURI function on the extension. If the extension does not support the interface, the function returns a URI based on the extension's base URI and the token ID. (autogenerated documentation)
_tokenExtension(uint256) :
This function is used to retrieve the address of the extension associated with a given token ID. It first checks if the token ID is associated with an extension address, and if so, it checks if the extension address is blacklisted. If both of these checks pass, the function returns the extension address. (autogenerated documentation)
_getRoyalties(uint256) :
This function is used to retrieve the royalties associated with a given tokenId. It first checks if there are any royalties associated with the tokenId in the _tokenRoyalty mapping. If not, it checks if there is an extension associated with the tokenId in the _tokensExtension mapping. If there is, it checks if the extension supports the ICreatorExtensionRoyalties interface. If it does, it retrieves the royalties from the extension. If there are still no royalties, it retrieves the royalties from the _extensionRoyalty mapping associated with the address 0. Finally, it stores the retrieved royalties in the receivers and bps arrays and returns them. (autogenerated documentation)
_getRoyaltyReceivers(uint256) :
This function is an internal view function that retrieves the list of royalty receivers associated with a given token ID. It does this by calling the _getRoyalties() function, which returns a tuple containing the list of royalty receivers. The function then assigns the list of royalty receivers to the recievers variable and returns it. (autogenerated documentation)
_getRoyaltyBPS(uint256) :
This function is an internal view function that retrieves the royalty rates (bps) associated with a given token ID. It does this by calling the _getRoyalties() function, which returns a tuple containing the royalty rates (bps) for the given token ID. The function then assigns the second element of the tuple (the royalty rates) to the bps variable, which is then returned. (autogenerated documentation)
_getRoyaltyInfo(uint256,uint256) :
This function is used to retrieve royalty information for a given tokenId. It takes in a tokenId and a value as parameters and returns the address of the royalty receiver and the amount of royalty due. The function first retrieves the royalty receivers and the royalty percentages associated with the tokenId from the _getRoyalties() function. It then checks to make sure that there is only one royalty receiver and returns the address of the receiver and the amount of royalty due (calculated by multiplying the royalty percentage by the value and dividing by 10000). (autogenerated documentation)
_setRoyalties(uint256,address,uint256[]) :
This function sets the royalties for a given tokenId. It first checks that the receivers and basisPoints provided are valid, then deletes any existing royalties associated with the tokenId. Finally, it sets the new royalties and emits an event to notify that the royalties have been updated. (autogenerated documentation)
_setRoyaltiesExtension(address,address,uint256[]) :
This function sets the royalties for a given extension. It takes in an address for the extension, an array of payable addresses for the receivers, and an array of uint256 values for the basis points. It first checks that the receivers and basis points are valid, then deletes any existing royalties for the extension. It then sets the royalties for the extension using the given receivers and basis points. Finally, it emits an event to indicate that the royalties have been updated. (autogenerated documentation)
_checkRoyalties(address,uint256[]) :
This function is used to check the royalties of a given set of receivers. It takes two parameters, an array of addresses and an array of uint256 values. It first checks that the two arrays are of equal length, and then it calculates the total basis points of the royalties by looping through the basisPoints array and adding each value to the totalBasisPoints variable. Finally, it checks that the totalBasisPoints is less than 10000. (autogenerated documentation)
_setRoyalties(address,uint256[]) :
This function sets the royalties for a given contract. It takes in two arrays, one containing the addresses of the receivers and one containing the basis points for each receiver. It then iterates through the arrays and creates a RoyaltyConfig object for each receiver, which contains the address and basis points. This object is then pushed to the royalties array, which is stored in the contract. (autogenerated documentation)

Get Cookin'
share iconShare

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

Recent Use

🍞 0x77CA saved

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.