IRenfter

Interface to protocol core functionalities

ERCType

enum ERCType {
  ERC721,
  ERC1155
}

OCollectionData

struct OCollectionData {
  address oAddress;
  enum IRenfter.ERCType ercType;
}

Offer

struct Offer {
  address lender;
  uint96 pricePerSecond;
  uint64 maxRentDuration;
  address beneficiary;
}

Rent

ConditionsParams

setWNFTFactory

Sets address of wNFTFactory contract

Parameters

Name
Type
Description

wNFTFactory_

address

New wNFTFactory contract address

setWalletManager

Sets address of WalletFactory contract

Parameters

Name
Type
Description

walletManager_

address

New WalletManager contract address

setFeeDistributor

Sets address of FeeDistributor contract

Parameters

Name
Type
Description

feeDistributor_

address

New FeeDistributor contract address

safeWrap721Collection

Creates wrapper contract for ERC-721 collection

Parameters

Name
Type
Description

oContract

address

Collection address being wrapped

restrictedSelectors

bytes4[]

List of selectors restricted for call whitelisting

safeWrap1155Collection

Creates wrapper contract for ERC-1155 collection

Parameters

Name
Type
Description

oContract

address

Collection address being wrapped

restrictedSelectors

bytes4[]

List of selectors restricted for call whitelisting

safeWrap721Token

Creates a ERC-721 wrapper token of original contract with same token identifier

Parameters

Name
Type
Description

oContract

address

Collection address token is being wrapped

tokenId

uint256

Token identifier

wrapAndOffer721Token

Wraps ERC-721 token and offers it for renting

Parameters

Name
Type
Description

oContract

address

Collection address token is being wrapped

tokenId

uint256

Token identifier

conditions

struct IRenfter.ConditionsParams

ConditionsParams struct with offer conditions

whitelisted

struct WhitelistedParams[]

Array of WhitelistedParam structs with whitelisted method selectors

safeWrap1155Token

Creates a ERC-1155 wrapper token of original contract with same token identifier

Parameters

Name
Type
Description

oContract

address

Collection address token is being wrapped

tokenId

uint256

Token identifier

wrapAndOffer1155Token

Wraps ERC-1155 token and offers it for renting

Parameters

Name
Type
Description

oContract

address

Collection address token is being wrapped

tokenId

uint256

Token identifier

conditions

struct IRenfter.ConditionsParams

ConditionsParams struct with offer conditions

whitelisted

struct WhitelistedParams[]

Array of WhitelistedParam structs with whitelisted method selectors

emergencyUnwrap

Performs emergency unwrap of wrapper token

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

safeUnwrap721Token

Unwraps wrapped token ERC-721 token and returns original token to initial owner

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

safeUnwrap1155Token

Unwraps wrapped token ERC1155 token and returns original token to initial owner

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

offerForRent

Offers token for a rent with defined conditions and whitelisted methods

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

conditions

struct IRenfter.ConditionsParams

ConditionsParams struct with offer conditions

whitelisted

struct WhitelistedParams[]

Array of WhitelistedParam structs with whitelisted method selectors

removeRentalOffer

Sets previously listed token as unavailable for renting

Parameters

Name
Type
Description

wContract

address

Address of wrapper contract

tokenId

uint256

Token identifier

rentToken

Rents wrapper token that was previously listed for renting

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

duration

uint64

Rent duration in seconds

forwardCall

Forwards call received by wrapper contract

Parameters

Name
Type
Description

tokenId

uint256

Token identifier

data

bytes

Calldata being passed as calldata (selector + data)

batchResetOwnership

Batch method for reseting ownership of wrapper and original tokens if rent has expired

Parameters

Name
Type
Description

wContracts

address[]

Array of wrapper contract addresses

tokenIds

uint256[]

Array of token identifiers

resetOwnership

Resets ownership of wrapper and original tokens if rent has expired

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

getHolderOf

It probably won't return the same result as for example ownerOf method, as tokens are not transferred on rent expiration

Returns the address that should hold original token

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

getOriginTokenData

Returns original token data

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

Return Values

Name
Type
Description

oContract

address

Original collection address

originOwner

address

Original token owner

wTokenOwner

address

Wrapper token owner

getWrapperTokenData

Returns wrapper token data

Parameters

Name
Type
Description

oContract

address

Original collection address

tokenId

uint256

Token identifier

Return Values

Name
Type
Description

wContract

address

Wrapper contract address

wTokenOwner

address

Wrapper token owner

getERCCompatible

Returns whether if address_ is compatible with ERC-721 or ERC-1155 standard

Parameters

Name
Type
Description

address_

address

Address being checked

Return Values

Name
Type
Description

compatible721

bool

Flag if address_ compatible with ERC-721

compatible1155

bool

Flag if address_ comaptible with ERC-1155

getOriginalContract

Returns original contract address for wContract

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

Return Values

Name
Type
Description

[0]

address

Original collection address

getWrapperContract

Returns wrapper contract address for oContract

Parameters

Name
Type
Description

oContract

address

Address of original contract

Return Values

Name
Type
Description

[0]

address

Address of wrapper contract

getBatchWrapperTokenExist

Returns if all of oContracts have wrapper contract

Parameters

Name
Type
Description

contracts

address[]

Array of original contracts

tokenId

uint256[]

Return Values

Name
Type
Description

[0]

bool

Flag if all original contracts have wrapper contracts

getOfferDetails

Returns offer details for wrapper token

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

Return Values

Name
Type
Description

[0]

struct IRenfter.Offer

{Offer} struct with data

getRentDetails

Returns rent details for wrapper token

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

Return Values

Name
Type
Description

[0]

struct IRenfter.Rent

{Rent} struct with data

getOffered

Returns if token is listed for renting

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

getLender

Returns original owner of wrapper token

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

Return Values

Name
Type
Description

[0]

address

Original owner address

getRentExpired

Returns if rent has expired for token

Parameters

Name
Type
Description

wContract

address

Wrapper contract address

tokenId

uint256

Token identifier

Return Values

Name
Type
Description

[0]

bool

Flag if rent has expired

Last updated