const FeeDenominator
FeeDenominator is the EIP-2981 basis-point denominator: bps/10000, 10000 == 100%.
Package royalty is a stackable GRC721 extension implementing EIP-2981 in basis points. Writes are issuer-only so a ho...
Package royalty is a stackable GRC721 extension implementing EIP-2981 in basis points. Writes are issuer-only so a holder cannot zero out a royalty on a token they just received.
FeeDenominator is the EIP-2981 basis-point denominator: bps/10000, 10000 == 100%.
1var (
2 ErrInvalidReceiver = errors.New("invalid royalty receiver")
3 ErrInvalidBps = errors.New("royalty bps out of range")
4 ErrTokenNotMinted = errors.New("token is not minted")
5 ErrMaxBpsRange = errors.New("maxBps out of range (0..10000)")
6 ErrInvalidSalePrice = errors.New("invalid sale price (negative or would overflow)")
7)NewRoyalty attaches a royalty extension; maxBps caps every rate and must be 0..10000.
DeleteTokenRoyalty clears the per-token override, falling back to the default.
OnBurn clears the per-token override (cannot resurface on re-mint) but keeps the default, which is collection-level policy, not per-token state.
SetDefaultRoyalty sets the collection default for tokens without an override; issuer-only.
SetTokenRoyalty sets a per-token override for tid; issuer-only.
RoyaltyInfo implements EIP-2981; per-token override takes precedence over the default, and no royalty returns (zeroAddress, 0) — the "no royalty" signal.
RoyaltyInfo is a royalty policy: send Bps/10000 of a sale to Receiver.