← All NFT Flashcard Decks

On-Chain Royalties (EIP-2981) Flashcards

7 cards from real NFT practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 On-Chain Royalties (EIP-2981) flashcards as text
  1. In OpenZeppelin's ERC2981 contract, what does _setDefaultRoyalty set?

    Answer: A collection-wide royalty receiver and fee

    _setDefaultRoyalty configures a default receiver and fee fraction applied to all tokens lacking a specific override.

  2. How does OpenZeppelin let you override royalties for one specific token?

    Answer: _setTokenRoyalty

    _setTokenRoyalty assigns a per-token receiver and fee that takes precedence over the default.

  3. In OpenZeppelin's implementation, what is the denominator for the fee fraction by default?

    Answer: 10000 (basis points)

    The default _feeDenominator returns 10000, so fees are expressed in basis points (e.g., 500 = 5%).

  4. A fee numerator of 250 with the default denominator represents what royalty?

    Answer: 2.5%

    250 / 10000 equals 0.025, which is a 2.5% royalty.

  5. What happens if you set a fee numerator greater than the denominator in OpenZeppelin's ERC2981?

    Answer: The transaction reverts with a royalty-too-high error

    OpenZeppelin reverts if the fee numerator exceeds the denominator, preventing royalties above 100%.

  6. When deleting a token-specific royalty, which OpenZeppelin function is used?

    Answer: _resetTokenRoyalty

    _resetTokenRoyalty removes a per-token override so the token falls back to the default royalty.

  7. To expose EIP-2981 alongside ERC-721 in OpenZeppelin, what must supportsInterface do?

    Answer: Override and call super to combine both interface checks

    You override supportsInterface and call super so both ERC721 and ERC2981 interface IDs are reported.