github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/examples/gno.land/p/demo/grc/grc721/igrc721_royalty.gno (about)

     1  package grc721
     2  
     3  import (
     4  	"std"
     5  )
     6  
     7  // IGRC2981 follows the Ethereum standard
     8  type IGRC2981 interface {
     9  	// RoyaltyInfo retrieves royalty information for a tokenID and salePrice.
    10  	// It returns the payment address, royalty amount, and an error if any.
    11  	RoyaltyInfo(tokenID TokenID, salePrice uint64) (std.Address, uint64, error)
    12  }
    13  
    14  // RoyaltyInfo represents royalty information for a token.
    15  type RoyaltyInfo struct {
    16  	PaymentAddress std.Address // PaymentAddress is the address where royalty payment should be sent.
    17  	Percentage     uint64      // Percentage is the royalty percentage. It indicates the percentage of royalty to be paid for each sale. For example : Percentage = 10 => 10%
    18  }