Function createContract

  • Name

    createContract

    Summary

    Creates a rental contract on the chain for an NFT.

    Returns

    ContractCreatedEvent Blockchain event.

    Parameters

    • nftId: number

      The NFT Id of the contract.

    • duration: Rent.DurationType

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

    • acceptanceType: Rent.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: Rent.RentFeeType

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

    • renterCancellationFee: Rent.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: Rent.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: TernoaConstants.WaitUntil

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

    Returns Promise<TernoaEvents.ContractCreatedEvent>

Generated using TypeDoc