Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ERC2981Component

ERC2981 Component

Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.

Royalty information can be specified globally for all token ids via set_default_royalty, and/or individually for specific token ids via set_token_royalty. The latter takes precedence over the first.

Royalty is specified as a fraction of sale price. The denominator is set by the contract by using the Immutable Component Config pattern. See https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-107.md

IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-paymentsRationale in the ERC. Marketplaces are expected to voluntarily pay royalties together with sales.

Fully qualified path: openzeppelin_token::common::erc2981::erc2981::ERC2981Component

Modules

Constants

ROYALTY_ADMIN_ROLERole for the admin responsible for managing royalty settings.
DEFAULT_FEE_DENOMINATOR

Free functions

Structs

Enums

Event

Traits