Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

IERC2981InfoDispatcherTrait

Fully qualified path: openzeppelin_interfaces::token::erc2981::IERC2981InfoDispatcherTrait

Part of the group: dispatchers

pub trait IERC2981InfoDispatcherTrait<T>

Trait functions

default_royalty

Returns the royalty information that all ids in this contract will default to.

The returned tuple contains:

  • t.0: The receiver of the royalty payment.
  • t.1: The numerator of the royalty fraction.
  • t.2: The denominator of the royalty fraction.

Fully qualified path: openzeppelin_interfaces::token::erc2981::IERC2981InfoDispatcherTrait::default_royalty

fn default_royalty(self: T) -> (ContractAddress, u128, u128)

token_royalty

Returns the royalty information specific to a token. If no specific royalty information is set for the token, the default is returned.

The returned tuple contains:

  • t.0: The receiver of the royalty payment.
  • t.1: The numerator of the royalty fraction.
  • t.2: The denominator of the royalty fraction.

Fully qualified path: openzeppelin_interfaces::token::erc2981::IERC2981InfoDispatcherTrait::token_royalty

fn token_royalty(self: T, token_id: u256) -> (ContractAddress, u128, u128)