Function createContract

  • Parameters

    • nftId: number

      The NFT Id of the contract.

    • duration: DurationType

      The contract duration : Fixed(EndBlock (a block number)) or Subscription(Period (a block number), MaxDuration (a block number), IsChangeable (a boolean))

    • acceptanceType: AcceptanceType

      The type of acceptance: automatic or manual (with or without whitelist)

    • renterCanRevoke: boolean

      A boolean to allow renter to cancel the contract once started

    • rentFee: RentFeeType

      The fee to rent the contract: a token amount or an NFT

    • renterCancellationFee: CancellationFeeType

      The fee to cancel the contract (due by the renter): No Fee (None), FixedTokens amount, FlexibleTokens (only for Fixed contract) amount or an NFT

    • renteeCancellationFee: CancellationFeeType

      The fee to cancel the contract (due by the rentee): No Fee (None), FixedTokens amount, FlexibleTokens (only for Fixed contract) amount or an NFT

    • keyring: IKeyringPair

      Account that will sign the transaction.

    • waitUntil: WaitUntil

      Execution trigger that can be set either to BlockInclusion or BlockFinalization.

    Returns Promise<ContractCreatedEvent>

    ContractCreatedEvent Blockchain event.

    Name

    createContract

    Summary

    Creates a rental contract on the chain for an NFT.

Generated using TypeDoc