NFT Marketplace with Lazy Minting #10 Royalties and EIP-2981

Поделиться
HTML-код
  • Опубликовано: 7 авг 2024
  • In this video we implement Royalty payments to the creators of the NFTs. The NFT creators will receive a creator share, which is a fraction of the sales price, whenever their NFT Token is sold.
    For this purpose we will extend the revenue distribution that we implemented in the 9th video.
    In order to support Royalty payments for secondary sales across different marketplaces we implement the EIP-2981 standard, which is a standardized way to retrieve royalty payment information.
    Chapters in this video:
    0:00 - Intro and Explanation
    0:58 - Import ERC2981 smart contract
    1:36 - _setTokenRoyalty function
    2:29 - Derive NFT contract from ERC2981
    2:59 - Define creator percentage
    3:17 - Set Token Royalty in safeMint function
    3:30 - Reset Token Royalty on token burn
    4:18 - royaltyInfo function
    4:52 - Marketplace integration
    5:23 - Distribute earnings to NFT creator
    6:27 - _getCreatorShare function
    6:35 - Check ERC2981 support with ERC165Checker
    7:30 - Call the royaltyInfo function
    8:51 - Payout to NFT creator
    9:17 - Outro
    Contact us:
    www.blueantoinette.com/contac...
    / blueantoinette_
    Note the underscore in our Twitter Handle: @BlueAntoinette_
    Sources and Links:
    Get the Source Code on Blue Antoinette (Payable):
    www.blueantoinette.com/produc...
    Blue Antoinette:
    www.blueantoinette.com/
    Hashtags:
    #NFT #royalties #eip2981
  • НаукаНаука

Комментарии • 4

  • @ethanguidry4386
    @ethanguidry4386 2 года назад

    Great video thanks !!

  • @frankwilder6860
    @frankwilder6860 2 года назад

    Top 👍. Thanks!

  • @gilomer3670
    @gilomer3670 Год назад +1

    Great video!
    Quick question: if I'm the creator of NFTs and I'm deploying an ERC721 Contract (meaning I'm NOT creating this *full NFT Marketplace* you're showing us here in your excellent tutorial series, I'm only just deploying a regular ERC721 Minting Contract), so if I’m doing that, and I want to include these ERC2981 Royalties-settings capabilities in my ERC721 contract, what ERC2981 functions would I need to include in it?
    Do I only need the "supportsInterface()" and "_setTokenRoyalty()" functions - and that’s it? Or are there other functions from ERC2981 that I would need to implement in my ERC721 contract?
    Thanks!

    • @BlueAntoinette
      @BlueAntoinette  Год назад +1

      Hi Gil, the Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
      Therefore if you want to set individual royalities for specific token ids, then you need to call the _setTokenRoyalty() function and additionally I would call the _resetTokenRoyalty() when the token gets burned.
      But if you just want to set the same receiver and royalty for all token ids in you contract, then you just need to call the _setDefaultRoyalty() function.
      In any case you want to implement the supportsInterface() function.