Method whitelisting

Defining the methods that are going to be whitelisted can be done when the wrapper token is being offered for rent by calling the following function defined in Renfter smart contract:

function offerForRent(
        address wContract,
        uint256 tokenId,
        uint96 pricePerSecond,
        uint64 maxRendDuration,
        IMethodWhitelist.WhitelistedDTO[] calldata whitelisted
 ) external;

Description of used structures can be found in Smart Contract Documentation, under Structure page.

whitelisted parameter should contain an array of WhitelistedDTO structure objects. This object contains info about the method selector, the call limit of the method, and if it's whitelisted or not. The lender can call the following function of NFT collection wrapper in order to add/remove whitelist and configure it:

function setWhitelistedMethods(
    uint256 tokenId,
    WhitelistedDTO[] calldata whitelisted
)

The whitelist can only be changed only when the token of interest is not rented out.

Last updated