Function setMarketplaceConfiguration

  • Parameters

    • id: number

      Marketplace Id of the marketplace to update.

    • commissionFee: 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: 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: 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: OffchainDataType = MarketplaceConfigAction.Noop

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

    • collectionList: 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.

    • keyring: IKeyringPair

      Account that will sign the transaction.

    • waitUntil: WaitUntil

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

    Returns Promise<MarketplaceConfigSetEvent>

    MarketplaceConfigSetEvent Blockchain event.

    Name

    setMarketplaceConfiguration

    Summary

    Set or Remove (Noop for No Operation) the marketplace parameters configuration : Commission fee, listing fee, the account list or any offchain datas.

                       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 <a href="https://docs.ternoa.network/for-developers/guides/marketplace/">Ternoa Doc</a>.

Generated using TypeDoc