Rentable
Last updated
Was this helpful?
Last updated
Was this helpful?
An extension to Edition implementing / allowing token owner's to grant time restricted user rights to another account.
Getting Started Module Methods Smart Contract Methods
To begin we'll import the FrostySDK, chain configurations, and the Rentable module.
Then we'll setup our signer (via wagmi/ethers) and create a new instance of the FrostySDK.
deploy Deploy a minimal proxy clone of the Rentable implementation contract.
getContract 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 FrostySDK, 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 FrostySDK, configured with a chain and signer.
address (string) The contract address of a previously deployed Rentable contract.
setUser Set a user and expiration for a token
userOf Get the current user for a token
userExpires Get the timestamp of expiration for a token
*All methods available on Edition are inherited and available on Rentable.
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.