Renfter Protocol
  • Welcome
    • Welcome to Renfter Docs
    • Supported Chains
    • Whitelabel Renting Solution
    • Renfter Marketplace
    • Protocol Fees
    • RENFTER Token
  • Renfter Features
    • Uncollateralized NFT Renting
    • Custom Functionality Execution
    • Rewards & Airdrop Sharing
  • Developers
    • Developer Documentation
    • Technical Overview
      • Under the hood
    • Integration
      • API
      • SDKs
        • JavaScript SDK
        • Unity SDK
      • Smart Contracts
        • Functionality-specific details
          • Token rental status check
          • Token offed for rent check
          • Method whitelisting
          • Original NFT method call
        • Documentation
Powered by GitBook
On this page
  1. Developers
  2. Integration
  3. Smart Contracts
  4. Functionality-specific details

Method whitelisting

PreviousToken offed for rent checkNextOriginal NFT method call

Last updated 2 years ago

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 , under Structure page.

whitelisted parameter should contain an array of 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.

Smart Contract Documentation
WhitelistedDTO