Function setMarketplaceConfigurationTx

  • Name

    setMarketplaceConfigurationTx

    Summary

    Creates an unsigned unsubmitted Set-Marketplace-Configuration Transaction Hash.

                       Each of the parameters of the marketplace, need one of the following type: Noop is set by default for each of the parameters.
    - Noop: No Operation, nothing change.
    - Remove: Current datas will be deleted.
    - Set: An object that updates parameter value below.
    - Commission Fee and Listing Fee require a data type (flat or percentage) under format : { [MarketplaceConfigAction.Set]: { setFeeType: number || BN}}
    - AccountList require an array of string: { [MarketplaceConfigAction.Set]: string[]}
    - OffChainData require a string: { [MarketplaceConfigAction.Set]: string}
    - CollectionList require an arry of number: { [MarketplaceConfigAction.Set]: number[]}

    IMPORTANT: In order to avoid any error, we strongly recommand you to construct those fields using the helpers we provide.
    - formatMarketplaceFee() for both commission and listing fee.
    - formatMarketplaceAccountList() for the account list.
    - formatMarketplaceOffchainData() for the offchain data.
    - formatMarketplaceCollectionList() for the collection list.
    - Check [Ternoa Doc](https://docs.ternoa.network/for-developers/guides/marketplace/).

    Returns

    MarketplaceConfigSetEvent Blockchain event.

    Parameters

    • id: number

      Marketplace Id of the marketplace to update.

    • commissionFee: Marketplace.CommissionFeeType = MarketplaceConfigAction.Noop

      Commission when an NFT is sold on the marketplace : it can be set as flat (in Big Number format) or as percentage (in permill format). Without using formatters, you can use the convertMarketplaceFee() function.

    • listingFee: Marketplace.ListingFeeType = MarketplaceConfigAction.Noop

      Fee when an NFT is added for sale to marketplace : it can be set as flat (in Big Number format) or as percentage (in permill format). Without using formatters, you can use the convertMarketplaceFee() function.

    • accountList: Marketplace.AccountListType = MarketplaceConfigAction.Noop

      A list of accounts : if the marketplace kind is private, it allows these accounts to sell NFT. If the marketplace kind is public, it bans these accounts from selling NFT.

    • offchainData: Marketplace.OffchainDataType = MarketplaceConfigAction.Noop

      Off-chain related marketplace metadata. Can be an IPFS Hash, an URL or plain text.

    • collectionList: Marketplace.CollectionListType = MarketplaceConfigAction.Noop

      A list of Collection Id: same as accountList, if the marketplace kind is private, the list is a whitelist and if the marketplace is public, the list bans the collection to be listed.

    Returns Promise<`0x${string}`>

Generated using TypeDoc