Ana içeriğe geç

RoyaltyFeeSetter

It is used to allow creators to set royalty parameters in the RoyaltyFeeRegistry.

Methods

INTERFACE_ID_ERC1155

function INTERFACE_ID_ERC1155() external view returns (bytes4)

Returns

NameTypeDescription
INTERFACE_ID_ERC1155bytes4-

INTERFACE_ID_ERC2981

function INTERFACE_ID_ERC2981() external view returns (bytes4)

Returns

NameTypeDescription
INTERFACE_ID_ERC2981bytes4-

INTERFACE_ID_ERC721

function INTERFACE_ID_ERC721() external view returns (bytes4)

Returns

NameTypeDescription
INTERFACE_ID_ERC721bytes4-

checkForCollectionSetter

function checkForCollectionSetter(address collection) external view returns (address, uint8)

Check royalty info for collection

Parameters

NameTypeDescription
collectionaddresscollection address

Returns

NameTypeDescription
-addresswhether there is a setter (address(0) if not)
-uint80: Royalty setter is set in the registry
1: ERC2981 and no setter
2: setter can be set using owner()
3: setter can be set using admin()
4: setter cannot be set, nor support for ERC2981

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
owneraddressaddress of the current owner

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

royaltyFeeRegistry

function royaltyFeeRegistry() external view returns (address)

Returns

NameTypeDescription
royaltyFeeRegistryaddressaddress of the RoyaltyFeeRegistry contract

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressaddress of the new owner

updateOwnerOfRoyaltyFeeRegistry

function updateOwnerOfRoyaltyFeeRegistry(address _owner) external nonpayable

Update owner of royalty fee registry

Can be used for migration of this royalty fee setter contract

Parameters

NameTypeDescription
_owneraddressaddress of the new owner

updateRoyaltyFeeLimit

function updateRoyaltyFeeLimit(uint256 _royaltyFeeLimit) external nonpayable

Update royalty info for collection

Parameters

NameTypeDescription
_royaltyFeeLimituint256new royalty fee limit (500 = 5%, 1,000 = 10%)

updateRoyaltyInfoForCollection

function updateRoyaltyInfoForCollection(address collection, address setter, address receiver, uint256 fee) external nonpayable

Update royalty info for collection

Can only be called by contract owner (of this)

Parameters

NameTypeDescription
collectionaddressaddress of the NFT contract
setteraddressaddress that sets the receiver
receiveraddressreceiver for the royalty fee
feeuint256fee (500 = 5%, 1,000 = 10%)

updateRoyaltyInfoForCollectionIfAdmin

function updateRoyaltyInfoForCollectionIfAdmin(address collection, address setter, address receiver, uint256 fee) external nonpayable

Update royalty info for collection if admin

Only to be called if there is no setter address

Parameters

NameTypeDescription
collectionaddressaddress of the NFT contract
setteraddressaddress that sets the receiver
receiveraddressreceiver for the royalty fee
feeuint256fee (500 = 5%, 1,000 = 10%)

updateRoyaltyInfoForCollectionIfOwner

function updateRoyaltyInfoForCollectionIfOwner(address collection, address setter, address receiver, uint256 fee) external nonpayable

Update royalty info for collection if owner

Only to be called if there is no setter address

Parameters

NameTypeDescription
collectionaddressaddress of the NFT contract
setteraddressaddress that sets the receiver
receiveraddressreceiver for the royalty fee
feeuint256fee (500 = 5%, 1,000 = 10%)

updateRoyaltyInfoForCollectionIfSetter

function updateRoyaltyInfoForCollectionIfSetter(address collection, address setter, address receiver, uint256 fee) external nonpayable

Update royalty info for collection

Only to be called if there msg.sender is the setter

Parameters

NameTypeDescription
collectionaddressaddress of the NFT contract
setteraddressaddress that sets the receiver
receiveraddressreceiver for the royalty fee
feeuint256fee (500 = 5%, 1,000 = 10%)

Events

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressaddress of the previous owner
newOwner indexedaddressaddress of the new owner