Autentica Market (AUTMKT) is an ERC-721 smart contract that enables anyone to mint NFTs through our Marketplace. In addition to the ERC-721 standard, our smart contract also enables creators to receive royalties for each subsequent sale by implementing a proprietary solution which is described in the IERC721Autentica interface but also the ERC-2981 standard to ensure that creators are compensated for every sale, regardless of whether that sale occurs on the same platform where the NFT was originally created or on a different platform entirely that also supports that standard.
Minting NFTs can be a problem for many artists because of the technical aspects or because of the high costs associated to this process, and for this our Autentica Market (AUTMKT) smart contract enables creators that use our Marketplace to have someone else cover the minting process and pay for the gas fees associated to it. What this means is that a creator can choose to have an investor to mint the NFT on his behalf and also cover the associated gas fees, while the the newly created NFT is owned by the creator. This solution is implemented on both the Autentica Marketplace and the smart contract.
The smart contract inherits OpenZeppelin Contracts's Context
, ERC721URIStorage
, ERC721Enumerable
, and AccessControl
abstract contracts and implements the IERC2981
and IERC721Autentica
interfaces.
In order to support royalties and keep references to the investors that handled the NFT minting process on behalf of other creators we defined the following structure called TokenDetails
This structure enables us to determine who created the token, who minted it (the creator or an investor), the royalty fee, and if the royalty fee should be shared with an investor if the token was not minted by the creator.
The additional storage that this smart contracts uses on top of the ERC721URIStorage
, ERC721Enumerable
and AccessControl
is the address of the NFT Marketplace smart contract which handles the trading part and a mapping from token ID to the TokenDetails
structure which contains information like the creator and investor address, royalty fee and the investor fee.
Minting
The standard minting process is to invoke the mint
function with tokenId
which represents a unique identifier for the NFT, uri
which represents the Uniform Resource Identifier that identifies the JSON file describing the NFT, and royaltyFee
which represents the royalties that the creator will earn from subsequent sales expressed as a percentage.
If the creator is unable to mint the NFT due to the process's intricacy or the rising network gas fees, he/she can decide to mint the NFT through an investor. Prior to handing over the artwork to the Investor, he/she sets the royaltyFee
that he/she wishes to earn from subsequent sales, as well as the investorFee
, which represents the percentage that he/she gives to the Investor from his/hers proceeds each time the NFT is traded.
The investor then invokes the investorMintingAndApproveMarketplace
function with the following parameters:
creator
which represents the address of the one that created the artwork
tokenId
which represents a unique identifier for the NFT
uri
which represents the Uniform Resource Identifier that identifies the JSON file describing the NFT
royaltyFee
which represents the royalties that the creator will earn from subsequent sales expressed as a percentage
investorFee
which represents a percentage from the creator's proceeds that is shared with the Investor each time the NFT is traded
v
, r
and s
that represents the ECDSA signature which verifies that the parameter values were chosen by the creator.
The source code for the token can be found in the AutenticaERC721.sol file located in the contracts
folder within our smart-contracts repository.
Network | Address |
---|---|
Ethereum
Binance Smart Chain
Ethereum (Rinkeby)
Binance Smart Chain (testnet)