Search Apps Documentation Source Content File Folder Download Copy

igrc721_royalty.gno

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