Token rental status check

Internally, Renfter protocol stores crucial protocol data using data types specific for Solidity language, but also by using common types like structures, which could contain multiple primary data types and store them in an efficient and semantically correct way.

In order to check rental status, one must call the following method of Renfter smart contract:

 function getRentDetails(address wContract, uint256 tokenId)
        external
        view
        returns (RentDetails memory);

The description of the method, as well RentDetails structure, can be found on Documentation page.

For retrieved RentalDetails object, the following rules should be followed:

  • If object.expirationTs zero, the token is not rented

  • If object.exiprationTs is value different than zero, the token is rented out

Last updated