Skip to main content

core.classes.contract_royalty

ContractRoyalty Objects

class ContractRoyalty(Generic[TRoyaltyABI])

get_default_royalty_info

def get_default_royalty_info() -> ContractRoyaltySchema

Get the default royalty information for this contract.

Returns:

the default royalty information.

get_token_royalty_info

def get_token_royalty_info(token_id: int) -> ContractRoyaltySchema

Get the royalty information for a specific token.

Arguments:

  • token_id: the id of the token.

Returns:

the royalty information for the token.

set_default_royalty_info

def set_default_royalty_info(royalty_data: ContractRoyaltySchema) -> TxReceipt

Set the default royalty information for this contract.

Arguments:

  • royalty_data: the default royalty information.

Returns:

the transaction receipt of setting the royalty.

set_token_royalty_info

def set_token_royalty_info(token_id: int,
royalty_data: ContractRoyaltySchema) -> TxReceipt

Set the royalty information for a specific token.

Arguments:

  • token_id: the id of the token.
  • royalty_data: the royalty information for the token.

Returns:

the transaction receipt of setting the royalty.