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.
// Import SDK, chain configurations, and the Rentable module
import { DecentSDK, chain, rentable } from "@decent.xyz/sdk";
// Get the signer via wagmi or configure using ethers
// Setup the SDK with the desired chain and signer
const sdk = new DecentSDK(chain.goerli, signer);
Module Methods
deploy
Deploy a minimal proxy clone of the Rentable implementation contract.
getContract
Get an ethers contract instance of a previously deployed Rentable contract.
deploy
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.
getContract
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.