Rentable
Last updated
Last updated
An extension to implementing / allowing token owner's to grant time restricted user rights to another account.
To begin we'll import the DecentSDK, chain configurations, and the Rentable module.
Then we'll setup our signer (via wagmi/ethers) and create a new instance of the DecentSDK.
Deploy a minimal proxy clone of the Rentable implementation contract.
Get an ethers contract instance of a previously deployed Rentable contract.
Deploy a minimal proxy clone of the Rentable implementation contract.
sdk (SDK) An instance of the DecentSDK, configured with a chain and signer.
name (string) The name of the NFT collection.
symbol (string) The symbol of the NFT collection.
maxTokens (number) The total number of tokens allowed to be minted from the collection.
tokenPrice (BigNumber) The price (in Wei) to mint a token from the collection.
maxTokenPurchase (number) The maximum number of tokens allowed per mint.
royaltyBPS (number) The maximum number of tokens allowed per mint.
metadataURI (string) The base URI for the collection metadata.
metadataRendererInit (MetadataRendererInit) An object containing metadata to initialize with the on-chain metadata renderer.
onTxPending (Function) - optional A callback function executed upon submission of the deploy transaction.
onTxReceipt (Function) - optional A callback function executed upon receipt of the deploy transaction.
Get an ethers contract instance of a previously deployed Rentable contract.
sdk (SDK) An instance of the DecentSDK, configured with a chain and signer.
address (string) The contract address of a previously deployed Rentable contract.
Set a user and expiration for a token
tokenId (uint256) The id of the token.
user (uint256) The new user of the NFT.
expires (uint256) The timestamp at which the user expires.
Get the current user for a token.
tokenId (uint256) The id of the token.
Get the timestamp of expiration for a token.
tokenId (uint256) The id of the token.
Set a user and expiration for a token
Get the current user for a token
Get the timestamp of expiration for a token
*All methods available on are inherited and available on Rentable.