Skip to main content

Royalties Provider

A royalty fee provider for the Endemic marketplace. Contract keeps royalties for collections and specific tokens. Collection owners can set royalies up to 50%.

Methods

getRoyalties

function getRoyalties(address nftContract, uint256 tokenId) external view returns (address, fee)

Method returns recipient of the royalties fee and fee %

Parameters

NameTypeDescription
nftContractaddressaddress of the collection
tokenIduint256token id for which we want to check royalties

Returns

NameTypeDescription
accountaddressaddress of the fee recipient account
feeuint256fee %, divide it by 100 to get actual (ex 1000 = 10%)

setRoyaltiesForCollection

function setRoyaltiesForCollection(address nftContract, address feeRecipient, uint256 fee) external

Method sets royalties for specific collection. Called by collection owner or royalties provider admin

Parameters

NameTypeDescription
nftContractaddressaddress of the collection
feeRecipientaddressaddress of the fee recipient account
feeuint256fee %, divide it by 100 to get actual (ex 1000 = 10%), max is 5000

Returns

NameTypeDescription
accountaddressaddress of the fee recipient account
feeuint256fee %, divide it by 100 to get actual (ex 1000 = 10%)

setRoyaltiesForToken

function setRoyaltiesForToken(address nftContract, uint256 tokenId, address feeRecipient, uint256 fee) external

Method sets royalties for specific token. Called by collection owner or royalties provider admin

Parameters

NameTypeDescription
nftContractaddressaddress of the collection
tokenIduint256token id for which we want to set royalties
feeRecipientaddressaddress of the fee recipient account
feeuint256fee %, divide it by 100 to get actual (ex 1000 = 10%), max is 5000

Returns

NameTypeDescription
accountaddressaddress of the fee recipient account
feeuint256fee %, divide it by 100 to get actual (ex 1000 = 10%)