nftmart
consts

api.consts.nftmart.createClassDeposit

The minimum balance to create class

type:

6

api.consts.nftmart.metaDataByteDeposit

The amount of balance that must be deposited per byte of metadata.

type:

6

api.consts.nftmart.createTokenDeposit

The minimum balance to create token

type:

6

api.consts.nftmart.moduleId

The NFT's module id

type:

430
errors

api.errors.nftmart.ClassIdNotFound

ClassId not found

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.TokenIdNotFound

TokenId not found

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.CategoryNotFound

Category not found

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.NoPermission

The operator is not the owner of the token and has no permission

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.InvalidQuantity

Quantity is invalid. need >= 1

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.InvalidDeadline

Invalid deadline

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.InvalidDeposit

Invalid deposit

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.NonTransferable

Property of class don't support transfer

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.NonBurnable

Property of class don't support burn

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.CannotDestroyClass

Can not destroy class Total issuance is not 0

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.NoAvailableCategoryId

No available category ID

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.NameTooLong

NameTooLong

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.DescriptionTooLong

DescriptionTooLong

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.AccountNotInWhitelist

account not in whitelist

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.CategoryOutOfBound

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.DuplicatedCategories

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmart.RoyaltyRateTooHigh

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘
events

api.events.nftmart.CreatedClass

Created NFT class. [owner, class_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
└─────────┴───────────────┘

api.events.nftmart.UpdatedClass

Updated NFT class. [owner, class_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
└─────────┴───────────────┘

api.events.nftmart.MintedToken

Minted NFT token. [from, to, class_id, token_id, quantity]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │ 'AccountId32' │
│    2    │     'u32'     │
│    3    │     'u64'     │
│    4    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmart.UpdatedToken

Updated NFT token beneficiary, quantity, metadata, royalty. [owner, class_id, token_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
│    2    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmart.UpdatedTokenMetadata

Updated NFT token metadata. [owner, class_id, token_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
│    2    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmart.UpdatedTokenRoyalty

Updated NFT token royalty. [beneficiary, class_id, token_id, royalty]

args:

┌─────────┬──────────────────┐
│ (index) │      Values      │
├─────────┼──────────────────┤
│    0    │  'AccountId32'   │
│    1    │      'u32'       │
│    2    │      'u64'       │
│    3    │ 'Option<PerU16>' │
└─────────┴──────────────────┘

api.events.nftmart.UpdatedTokenRoyaltyBeneficiary

Updated NFT token royalty beneficiary. [from, class_id, token_id, to]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
│    2    │     'u64'     │
│    3    │ 'AccountId32' │
└─────────┴───────────────┘

api.events.nftmart.TransferredToken

Transferred NFT token. [from, to, class_id, token_id, quantity]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │ 'AccountId32' │
│    2    │     'u32'     │
│    3    │     'u64'     │
│    4    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmart.BurnedToken

Burned NFT token. [owner, class_id, token_id, quantity, unreserved]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
│    2    │     'u64'     │
│    3    │     'u64'     │
│    4    │    'u128'     │
└─────────┴───────────────┘

api.events.nftmart.DestroyedClass

Destroyed NFT class. [owner, class_id, dest]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u32'     │
│    2    │ 'AccountId32' │
└─────────┴───────────────┘
query

api.query.nftmart.palletVersion

Returns the current pallet version from storage

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '73'  │
└─────────┴────────┘

api.query.nftmart.storageVersion

Storage version of the pallet.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │ '507'  │
└─────────┴────────┘
tx

api.tx.nftmart.createClass

Create NFT class, tokens belong to the class.

  • metadata: external metadata
  • properties: class property, include Transferable Burnable
  • name: class name, with len limitation.
  • description: class description, with len limitation.

args:

┌─────────┬───────────────┬───────────────────┬─────────────────┐
│ (index) │     name      │       type        │    typeName     │
├─────────┼───────────────┼───────────────────┼─────────────────┤
│    0    │  'metadata'   │      'Bytes'      │  'NFTMetadata'  │
│    1    │    'name'     │      'Bytes'      │     'Bytes'     │
│    2    │ 'description' │      'Bytes'      │     'Bytes'     │
│    3    │ 'royaltyRate' │ 'Compact<PerU16>' │    'PerU16'     │
│    4    │ 'properties'  │       'u64'       │  'Properties'   │
│    5    │ 'categoryIds' │    'Vec<u64>'     │ 'Vec<GlobalId>' │
└─────────┴───────────────┴───────────────────┴─────────────────┘

api.tx.nftmart.updateClass

Update NFT class.

  • class_id: class id
  • metadata: external metadata
  • properties: class property, include Transferable Burnable
  • name: class name, with len limitation.
  • description: class description, with len limitation.

args:

┌─────────┬───────────────┬───────────────────┬─────────────────┐
│ (index) │     name      │       type        │    typeName     │
├─────────┼───────────────┼───────────────────┼─────────────────┤
│    0    │   'classId'   │  'Compact<u32>'   │   'ClassIdOf'   │
│    1    │  'metadata'   │      'Bytes'      │  'NFTMetadata'  │
│    2    │    'name'     │      'Bytes'      │     'Bytes'     │
│    3    │ 'description' │      'Bytes'      │     'Bytes'     │
│    4    │ 'royaltyRate' │ 'Compact<PerU16>' │    'PerU16'     │
│    5    │ 'properties'  │       'u64'       │  'Properties'   │
│    6    │ 'categoryIds' │    'Vec<u64>'     │ 'Vec<GlobalId>' │
└─────────┴───────────────┴───────────────────┴─────────────────┘

api.tx.nftmart.updateTokenRoyalty

Update token royalty.

args:

┌─────────┬─────────────────┬──────────────────┬──────────────────┐
│ (index) │      name       │       type       │     typeName     │
├─────────┼─────────────────┼──────────────────┼──────────────────┤
│    0    │    'classId'    │  'Compact<u32>'  │   'ClassIdOf'    │
│    1    │    'tokenId'    │  'Compact<u64>'  │   'TokenIdOf'    │
│    2    │ 'chargeRoyalty' │ 'Option<PerU16>' │ 'Option<PerU16>' │
└─────────┴─────────────────┴──────────────────┴──────────────────┘

api.tx.nftmart.updateTokenRoyaltyBeneficiary

Update token royalty beneficiary.

args:

┌─────────┬───────────┬────────────────┬────────────────┐
│ (index) │   name    │      type      │    typeName    │
├─────────┼───────────┼────────────────┼────────────────┤
│    0    │ 'classId' │ 'Compact<u32>' │  'ClassIdOf'   │
│    1    │ 'tokenId' │ 'Compact<u64>' │  'TokenIdOf'   │
│    2    │   'to'    │ 'MultiAddress' │ 'LookupSource' │
└─────────┴───────────┴────────────────┴────────────────┘

api.tx.nftmart.updateTokenMetadata

Update token metadata.

args:

┌─────────┬────────────┬────────────────┬───────────────┐
│ (index) │    name    │      type      │   typeName    │
├─────────┼────────────┼────────────────┼───────────────┤
│    0    │ 'classId'  │ 'Compact<u32>' │  'ClassIdOf'  │
│    1    │ 'tokenId'  │ 'Compact<u64>' │  'TokenIdOf'  │
│    2    │ 'metadata' │    'Bytes'     │ 'NFTMetadata' │
└─────────┴────────────┴────────────────┴───────────────┘

api.tx.nftmart.updateToken

Update token royalty_beneficiary, quantity, metadata, and royalty.

args:

┌─────────┬─────────────────┬──────────────────┬──────────────────┐
│ (index) │      name       │       type       │     typeName     │
├─────────┼─────────────────┼──────────────────┼──────────────────┤
│    0    │      'to'       │  'MultiAddress'  │  'LookupSource'  │
│    1    │    'classId'    │  'Compact<u32>'  │   'ClassIdOf'    │
│    2    │    'tokenId'    │  'Compact<u64>'  │   'TokenIdOf'    │
│    3    │   'quantity'    │  'Compact<u64>'  │   'TokenIdOf'    │
│    4    │   'metadata'    │     'Bytes'      │  'NFTMetadata'   │
│    5    │ 'chargeRoyalty' │ 'Option<PerU16>' │ 'Option<PerU16>' │
└─────────┴─────────────────┴──────────────────┴──────────────────┘

api.tx.nftmart.mint

Mint NFT token

  • to: the token owner's account
  • class_id: token belong to the class id
  • metadata: external metadata
  • quantity: token quantity

args:

┌─────────┬─────────────────┬──────────────────┬──────────────────┐
│ (index) │      name       │       type       │     typeName     │
├─────────┼─────────────────┼──────────────────┼──────────────────┤
│    0    │      'to'       │  'MultiAddress'  │  'LookupSource'  │
│    1    │    'classId'    │  'Compact<u32>'  │   'ClassIdOf'    │
│    2    │   'metadata'    │     'Bytes'      │  'NFTMetadata'   │
│    3    │   'quantity'    │  'Compact<u64>'  │   'TokenIdOf'    │
│    4    │ 'chargeRoyalty' │ 'Option<PerU16>' │ 'Option<PerU16>' │
└─────────┴─────────────────┴──────────────────┴──────────────────┘

api.tx.nftmart.proxyMint

Mint NFT token by a proxy account.

  • origin: a proxy account

args:

┌─────────┬─────────────────┬──────────────────┬──────────────────┐
│ (index) │      name       │       type       │     typeName     │
├─────────┼─────────────────┼──────────────────┼──────────────────┤
│    0    │      'to'       │  'MultiAddress'  │  'LookupSource'  │
│    1    │    'classId'    │  'Compact<u32>'  │   'ClassIdOf'    │
│    2    │   'metadata'    │     'Bytes'      │  'NFTMetadata'   │
│    3    │   'quantity'    │  'Compact<u64>'  │   'TokenIdOf'    │
│    4    │ 'chargeRoyalty' │ 'Option<PerU16>' │ 'Option<PerU16>' │
└─────────┴─────────────────┴──────────────────┴──────────────────┘

api.tx.nftmart.transfer

Transfer NFT tokens to another account

  • to: the token owner's account
  • class_id: class id
  • token_id: token id
  • quantity: quantity

args:

┌─────────┬─────────┬──────────────────────┬────────────────────────────────────────┐
│ (index) │  name   │         type         │                typeName                │
├─────────┼─────────┼──────────────────────┼────────────────────────────────────────┤
│    0    │  'to'   │    'MultiAddress'    │             'LookupSource'             │
│    1    │ 'items' │ 'Vec<(u32,u64,u64)>' │ 'Vec<(ClassIdOf,TokenIdOf,TokenIdOf)>' │
└─────────┴─────────┴──────────────────────┴────────────────────────────────────────┘

api.tx.nftmart.burn

Burn NFT token

  • class_id: class id
  • token_id: token id
  • quantity: quantity

args:

┌─────────┬────────────┬────────────────┬─────────────┐
│ (index) │    name    │      type      │  typeName   │
├─────────┼────────────┼────────────────┼─────────────┤
│    0    │ 'classId'  │ 'Compact<u32>' │ 'ClassIdOf' │
│    1    │ 'tokenId'  │ 'Compact<u64>' │ 'TokenIdOf' │
│    2    │ 'quantity' │ 'Compact<u64>' │ 'TokenIdOf' │
└─────────┴────────────┴────────────────┴─────────────┘

api.tx.nftmart.destroyClass

Destroy NFT class

  • class_id: destroy class id
  • dest: transfer reserve balance from sub_account to dest

args:

┌─────────┬───────────┬────────────────┬────────────────┐
│ (index) │   name    │      type      │    typeName    │
├─────────┼───────────┼────────────────┼────────────────┤
│    0    │ 'classId' │ 'Compact<u32>' │  'ClassIdOf'   │
│    1    │  'dest'   │ 'MultiAddress' │ 'LookupSource' │
└─────────┴───────────┴────────────────┴────────────────┘
nftmartAuction
consts

api.consts.nftmartAuction.treasuryPalletId

The treasury's pallet id, used for deriving its sovereign account ID.

type:

430
errors

api.errors.nftmartAuction.SubmitWithInvalidDeposit

submit with invalid deposit

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.SubmitWithInvalidDeadline

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.TooManyTokenChargedRoyalty

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.InvalidHammerPrice

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.BritishAuctionNotFound

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.DutchAuctionNotFound

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.BritishAuctionBidNotFound

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.DutchAuctionBidNotFound

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.BritishAuctionClosed

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.DutchAuctionClosed

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.PriceTooLow

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.CannotRemoveAuction

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.CannotRedeemAuction

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.CannotRedeemAuctionNoBid

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.CannotRedeemAuctionUntilDeadline

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.DuplicatedBid

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.MaxPriceShouldBeGreaterThanMinPrice

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.InvalidDutchMinPrice

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.SelfBid

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.TooManyTokens

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.EmptyTokenList

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.InvalidCommissionRate

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartAuction.SenderTakeCommission

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘
events

api.events.nftmartAuction.CreatedBritishAuction

CreatedBritishAuction [who, auction_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartAuction.CreatedDutchAuction

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartAuction.RemovedBritishAuction

RemovedBritishAuction [who, auction_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartAuction.RemovedDutchAuction

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartAuction.RedeemedBritishAuction

args:

┌─────────┬─────────────────────────────────────┐
│ (index) │               Values                │
├─────────┼─────────────────────────────────────┤
│    0    │            'AccountId32'            │
│    1    │                'u64'                │
│    2    │ 'Option<(bool,AccountId32,PerU16)>' │
│    3    │           'Option<Bytes>'           │
└─────────┴─────────────────────────────────────┘

api.events.nftmartAuction.RedeemedDutchAuction

args:

┌─────────┬─────────────────────────────────────┐
│ (index) │               Values                │
├─────────┼─────────────────────────────────────┤
│    0    │            'AccountId32'            │
│    1    │                'u64'                │
│    2    │ 'Option<(bool,AccountId32,PerU16)>' │
│    3    │           'Option<Bytes>'           │
└─────────┴─────────────────────────────────────┘

api.events.nftmartAuction.BidBritishAuction

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartAuction.BidDutchAuction

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartAuction.HammerBritishAuction

args:

┌─────────┬─────────────────────────────────────┐
│ (index) │               Values                │
├─────────┼─────────────────────────────────────┤
│    0    │            'AccountId32'            │
│    1    │                'u64'                │
│    2    │ 'Option<(bool,AccountId32,PerU16)>' │
│    3    │           'Option<Bytes>'           │
└─────────┴─────────────────────────────────────┘
query

api.query.nftmartAuction.palletVersion

Returns the current pallet version from storage

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '73'  │
└─────────┴────────┘

api.query.nftmartAuction.storageVersion

Storage version of the pallet.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │ '516'  │
└─────────┴────────┘

api.query.nftmartAuction.britishAuctions

BritishAuctions

type:

┌─────────┬────────────────────────────────────────┬───────┬───────┐
│ (index) │                hashers                 │  key  │ value │
├─────────┼────────────────────────────────────────┼───────┼───────┤
│   Map   │ [ 'Blake2_128Concat', 'Twox64Concat' ] │ '510' │ '517' │
└─────────┴────────────────────────────────────────┴───────┴───────┘

api.query.nftmartAuction.britishAuctionBids

BritishAuctionBids

type:

┌─────────┬────────────────────┬─────┬───────┐
│ (index) │      hashers       │ key │ value │
├─────────┼────────────────────┼─────┼───────┤
│   Map   │ [ 'Twox64Concat' ] │ '8' │ '518' │
└─────────┴────────────────────┴─────┴───────┘

api.query.nftmartAuction.dutchAuctions

DutchAuctions

type:

┌─────────┬────────────────────────────────────────┬───────┬───────┐
│ (index) │                hashers                 │  key  │ value │
├─────────┼────────────────────────────────────────┼───────┼───────┤
│   Map   │ [ 'Blake2_128Concat', 'Twox64Concat' ] │ '510' │ '519' │
└─────────┴────────────────────────────────────────┴───────┴───────┘

api.query.nftmartAuction.dutchAuctionBids

DutchAuctionBids

type:

┌─────────┬────────────────────┬─────┬───────┐
│ (index) │      hashers       │ key │ value │
├─────────┼────────────────────┼─────┼───────┤
│   Map   │ [ 'Twox64Concat' ] │ '8' │ '518' │
└─────────┴────────────────────┴─────┴───────┘
tx

api.tx.nftmartAuction.submitDutchAuction

args:

┌─────────┬───────────────────────┬──────────────────────┬────────────────────────────────────────┐
│ (index) │         name          │         type         │                typeName                │
├─────────┼───────────────────────┼──────────────────────┼────────────────────────────────────────┤
│    0    │     'currencyId'      │    'Compact<u32>'    │             'CurrencyIdOf'             │
│    1    │       'deposit'       │   'Compact<u128>'    │               'Balance'                │
│    2    │      'minPrice'       │   'Compact<u128>'    │               'Balance'                │
│    3    │      'maxPrice'       │   'Compact<u128>'    │               'Balance'                │
│    4    │      'deadline'       │    'Compact<u32>'    │            'BlockNumberOf'             │
│    5    │        'items'        │ 'Vec<(u32,u64,u64)>' │ 'Vec<(ClassIdOf,TokenIdOf,TokenIdOf)>' │
│    6    │ 'allowBritishAuction' │        'bool'        │                 'bool'                 │
│    7    │      'minRaise'       │  'Compact<PerU16>'   │                'PerU16'                │
│    8    │   'commissionRate'    │  'Compact<PerU16>'   │                'PerU16'                │
└─────────┴───────────────────────┴──────────────────────┴────────────────────────────────────────┘

api.tx.nftmartAuction.bidDutchAuction

args:

┌─────────┬───────────────────┬───────────────────────┬─────────────────────┐
│ (index) │       name        │         type          │      typeName       │
├─────────┼───────────────────┼───────────────────────┼─────────────────────┤
│    0    │      'price'      │    'Compact<u128>'    │      'Balance'      │
│    1    │  'auctionOwner'   │    'MultiAddress'     │   'LookupSource'    │
│    2    │    'auctionId'    │    'Compact<u64>'     │     'GlobalId'      │
│    3    │ 'commissionAgent' │ 'Option<AccountId32>' │ 'Option<AccountId>' │
│    4    │ 'commissionData'  │    'Option<Bytes>'    │   'Option<Bytes>'   │
└─────────┴───────────────────┴───────────────────────┴─────────────────────┘

api.tx.nftmartAuction.redeemDutchAuction

redeem

args:

┌─────────┬────────────────┬────────────────┬────────────────┐
│ (index) │      name      │      type      │    typeName    │
├─────────┼────────────────┼────────────────┼────────────────┤
│    0    │ 'auctionOwner' │ 'MultiAddress' │ 'LookupSource' │
│    1    │  'auctionId'   │ 'Compact<u64>' │   'GlobalId'   │
└─────────┴────────────────┴────────────────┴────────────────┘

api.tx.nftmartAuction.removeDutchAuction

remove a dutch auction by auction owner.

args:

┌─────────┬─────────────┬────────────────┬────────────┐
│ (index) │    name     │      type      │  typeName  │
├─────────┼─────────────┼────────────────┼────────────┤
│    0    │ 'auctionId' │ 'Compact<u64>' │ 'GlobalId' │
└─────────┴─────────────┴────────────────┴────────────┘

api.tx.nftmartAuction.removeExpiredDutchAuction

remove an expired dutch auction by auction owner.

args:

┌─────────┬────────────────┬────────────────┬─────────────┐
│ (index) │      name      │      type      │  typeName   │
├─────────┼────────────────┼────────────────┼─────────────┤
│    0    │ 'auctionOwner' │ 'AccountId32'  │ 'AccountId' │
│    1    │  'auctionId'   │ 'Compact<u64>' │ 'GlobalId'  │
└─────────┴────────────────┴────────────────┴─────────────┘

api.tx.nftmartAuction.submitBritishAuction

Create an British auction.

  • currency_id: Currency Id
  • hammer_price: If somebody offer this price, the auction will be finished. Set to zero to disable.
  • min_raise: The next price of bid should be larger than old_price * ( 1 + min_raise )
  • deposit: A higher deposit will be good for the display of the auction in the market.
  • init_price: The initial price for the auction to kick off.
  • deadline: A block number which represents the end of the auction activity.
  • allow_delay: If ture, in some cases the deadline will be extended.
  • items: Nft list.

args:

┌─────────┬──────────────────┬──────────────────────┬────────────────────────────────────────┐
│ (index) │       name       │         type         │                typeName                │
├─────────┼──────────────────┼──────────────────────┼────────────────────────────────────────┤
│    0    │   'currencyId'   │    'Compact<u32>'    │             'CurrencyIdOf'             │
│    1    │  'hammerPrice'   │   'Compact<u128>'    │               'Balance'                │
│    2    │    'minRaise'    │  'Compact<PerU16>'   │                'PerU16'                │
│    3    │    'deposit'     │   'Compact<u128>'    │               'Balance'                │
│    4    │   'initPrice'    │   'Compact<u128>'    │               'Balance'                │
│    5    │    'deadline'    │    'Compact<u32>'    │            'BlockNumberOf'             │
│    6    │   'allowDelay'   │        'bool'        │                 'bool'                 │
│    7    │     'items'      │ 'Vec<(u32,u64,u64)>' │ 'Vec<(ClassIdOf,TokenIdOf,TokenIdOf)>' │
│    8    │ 'commissionRate' │  'Compact<PerU16>'   │                'PerU16'                │
└─────────┴──────────────────┴──────────────────────┴────────────────────────────────────────┘

api.tx.nftmartAuction.bidBritishAuction

Bid

args:

┌─────────┬───────────────────┬───────────────────────┬─────────────────────┐
│ (index) │       name        │         type          │      typeName       │
├─────────┼───────────────────┼───────────────────────┼─────────────────────┤
│    0    │      'price'      │    'Compact<u128>'    │      'Balance'      │
│    1    │  'auctionOwner'   │    'MultiAddress'     │   'LookupSource'    │
│    2    │    'auctionId'    │    'Compact<u64>'     │     'GlobalId'      │
│    3    │ 'commissionAgent' │ 'Option<AccountId32>' │ 'Option<AccountId>' │
│    4    │ 'commissionData'  │    'Option<Bytes>'    │   'Option<Bytes>'   │
└─────────┴───────────────────┴───────────────────────┴─────────────────────┘

api.tx.nftmartAuction.redeemBritishAuction

redeem

args:

┌─────────┬────────────────┬────────────────┬────────────────┐
│ (index) │      name      │      type      │    typeName    │
├─────────┼────────────────┼────────────────┼────────────────┤
│    0    │ 'auctionOwner' │ 'MultiAddress' │ 'LookupSource' │
│    1    │  'auctionId'   │ 'Compact<u64>' │   'GlobalId'   │
└─────────┴────────────────┴────────────────┴────────────────┘

api.tx.nftmartAuction.removeBritishAuction

remove an auction by auction owner.

args:

┌─────────┬─────────────┬────────────────┬────────────┐
│ (index) │    name     │      type      │  typeName  │
├─────────┼─────────────┼────────────────┼────────────┤
│    0    │ 'auctionId' │ 'Compact<u64>' │ 'GlobalId' │
└─────────┴─────────────┴────────────────┴────────────┘

api.tx.nftmartAuction.removeExpiredBritishAuction

remove an expired british auction by auction owner.

args:

┌─────────┬────────────────┬────────────────┬─────────────┐
│ (index) │      name      │      type      │  typeName   │
├─────────┼────────────────┼────────────────┼─────────────┤
│    0    │ 'auctionOwner' │ 'AccountId32'  │ 'AccountId' │
│    1    │  'auctionId'   │ 'Compact<u64>' │ 'GlobalId'  │
└─────────┴────────────────┴────────────────┴─────────────┘
nftmartConf
errors

api.errors.nftmartConf.NoAvailableId

no available id

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartConf.CategoryNotFound

category not found

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘
events

api.events.nftmartConf.AddWhitelist

AddWhitelist [who]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
└─────────┴───────────────┘

api.events.nftmartConf.RemoveWhitelist

RemoveWhitelist [who]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
└─────────┴───────────────┘

api.events.nftmartConf.CreatedCategory

Created NFT common category. [category_id]

args:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│    0    │ 'u64'  │
└─────────┴────────┘

api.events.nftmartConf.UpdatedCategory

Updated NFT common category. [category_id]

args:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│    0    │ 'u64'  │
└─────────┴────────┘
query

api.query.nftmartConf.palletVersion

Returns the current pallet version from storage

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '73'  │
└─────────┴────────┘

api.query.nftmartConf.auctionCloseDelay

auction delay

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '4'   │
└─────────┴────────┘

api.query.nftmartConf.accountWhitelist

Whitelist for class creation

type:

┌─────────┬────────────────────────┬─────┬───────┐
│ (index) │        hashers         │ key │ value │
├─────────┼────────────────────────┼─────┼───────┤
│   Map   │ [ 'Blake2_128Concat' ] │ '0' │ '27'  │
└─────────┴────────────────────────┴─────┴───────┘

api.query.nftmartConf.royaltiesRate

Royalties rate, which can be set by council or sudo.

Incentive: In order to reward creators of nfts. A small part of trading price will be paid to the nft creator.

Royalty = Price * RoyaltiesRate

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '84'  │
└─────────┴────────┘

api.query.nftmartConf.platformFeeRate

Platform fee rate for trading nfts. After deals, it will transfer a small amount of price into the treasury.

PlatformFee = Price * PlatformFeeRate

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '84'  │
└─────────┴────────┘

api.query.nftmartConf.maxCommissionRewardRate

max distribution reward

Reward = (Price - Royalty - PlatformFee) * distributionReward It will pay the Reward to the secondary retailer.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '84'  │
└─────────┴────────┘

api.query.nftmartConf.minCommissionAgentDeposit

min reference deposit

The secondary retailer who will get reward from helping selling should keep at least MinReferenceDeposit balances.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '6'   │
└─────────┴────────┘

api.query.nftmartConf.minOrderDeposit

The lowest deposit every order should deposit.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '6'   │
└─────────┴────────┘

api.query.nftmartConf.nextId

Next available global ID.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '8'   │
└─────────┴────────┘

api.query.nftmartConf.categories

The storage of categories.

type:

┌─────────┬────────────────────┬─────┬───────┐
│ (index) │      hashers       │ key │ value │
├─────────┼────────────────────┼─────┼───────┤
│   Map   │ [ 'Twox64Concat' ] │ '8' │ '505' │
└─────────┴────────────────────┴─────┴───────┘
tx

api.tx.nftmartConf.addWhitelist

add an account into whitelist

args:

┌─────────┬───────┬───────────────┬─────────────┐
│ (index) │ name  │     type      │  typeName   │
├─────────┼───────┼───────────────┼─────────────┤
│    0    │ 'who' │ 'AccountId32' │ 'AccountId' │
└─────────┴───────┴───────────────┴─────────────┘

api.tx.nftmartConf.removeWhitelist

remove an account from whitelist

args:

┌─────────┬───────┬───────────────┬─────────────┐
│ (index) │ name  │     type      │  typeName   │
├─────────┼───────┼───────────────┼─────────────┤
│    0    │ 'who' │ 'AccountId32' │ 'AccountId' │
└─────────┴───────┴───────────────┴─────────────┘

api.tx.nftmartConf.createCategory

Create a common category for trading NFT. A Selling NFT should belong to a category.

  • metadata: metadata

args:

┌─────────┬────────────┬─────────┬───────────────┐
│ (index) │    name    │  type   │   typeName    │
├─────────┼────────────┼─────────┼───────────────┤
│    0    │ 'metadata' │ 'Bytes' │ 'NFTMetadata' │
└─────────┴────────────┴─────────┴───────────────┘

api.tx.nftmartConf.updateCategory

Update a common category.

  • category_id: category ID
  • metadata: metadata

args:

┌─────────┬──────────────┬─────────┬───────────────┐
│ (index) │     name     │  type   │   typeName    │
├─────────┼──────────────┼─────────┼───────────────┤
│    0    │ 'categoryId' │  'u64'  │  'GlobalId'   │
│    1    │  'metadata'  │ 'Bytes' │ 'NFTMetadata' │
└─────────┴──────────────┴─────────┴───────────────┘

api.tx.nftmartConf.updateAuctionCloseDelay

args:

┌─────────┬─────────┬───────┬──────────────────┐
│ (index) │  name   │ type  │     typeName     │
├─────────┼─────────┼───────┼──────────────────┤
│    0    │ 'delay' │ 'u32' │ 'BlockNumberFor' │
└─────────┴─────────┴───────┴──────────────────┘
nftmartOrder
consts

api.consts.nftmartOrder.treasuryPalletId

The treasury's pallet id, used for deriving its sovereign account ID.

type:

430
errors

api.errors.nftmartOrder.SubmitWithInvalidDeposit

submit with invalid deposit

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.SubmitWithInvalidDeadline

submit with invalid deadline

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.TakeExpiredOrderOrOffer

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.TooManyTokenChargedRoyalty

too many token charged royalty

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.OrderNotFound

order not found

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.OfferNotFound

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.TakeOwnOrder

cannot take one's own order

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.TakeOwnOffer

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.InvalidCommissionRate

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘

api.errors.nftmartOrder.SenderTakeCommission

args:

┌─────────┐
│ (index) │
├─────────┤
└─────────┘
events

api.events.nftmartOrder.CreatedOrder

CreatedOrder [who, order_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartOrder.RemovedOrder

RemovedOrder [who, order_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartOrder.RemovedOffer

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘

api.events.nftmartOrder.TakenOrder

TakenOrder [purchaser, order_owner, order_id]

args:

┌─────────┬─────────────────────────────────────┐
│ (index) │               Values                │
├─────────┼─────────────────────────────────────┤
│    0    │            'AccountId32'            │
│    1    │            'AccountId32'            │
│    2    │                'u64'                │
│    3    │ 'Option<(bool,AccountId32,PerU16)>' │
│    4    │           'Option<Bytes>'           │
└─────────┴─────────────────────────────────────┘

api.events.nftmartOrder.TakenOffer

TakenOrder [token_owner, offer_owner, order_id]

args:

┌─────────┬─────────────────────────────────────┐
│ (index) │               Values                │
├─────────┼─────────────────────────────────────┤
│    0    │            'AccountId32'            │
│    1    │            'AccountId32'            │
│    2    │                'u64'                │
│    3    │ 'Option<(bool,AccountId32,PerU16)>' │
│    4    │           'Option<Bytes>'           │
└─────────┴─────────────────────────────────────┘

api.events.nftmartOrder.CreatedOffer

CreatedOffer [who, order_id]

args:

┌─────────┬───────────────┐
│ (index) │    Values     │
├─────────┼───────────────┤
│    0    │ 'AccountId32' │
│    1    │     'u64'     │
└─────────┴───────────────┘
query

api.query.nftmartOrder.palletVersion

Returns the current pallet version from storage

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │  '73'  │
└─────────┴────────┘

api.query.nftmartOrder.storageVersion

Storage version of the pallet.

type:

┌─────────┬────────┐
│ (index) │ Values │
├─────────┼────────┤
│  Plain  │ '509'  │
└─────────┴────────┘

api.query.nftmartOrder.orders

Index/store orders by account as primary key and order id as secondary key.

type:

┌─────────┬────────────────────────────────────────┬───────┬───────┐
│ (index) │                hashers                 │  key  │ value │
├─────────┼────────────────────────────────────────┼───────┼───────┤
│   Map   │ [ 'Blake2_128Concat', 'Twox64Concat' ] │ '510' │ '511' │
└─────────┴────────────────────────────────────────┴───────┴───────┘

api.query.nftmartOrder.offers

Index/store offers by account as primary key and order id as secondary key.

type:

┌─────────┬────────────────────────────────────────┬───────┬───────┐
│ (index) │                hashers                 │  key  │ value │
├─────────┼────────────────────────────────────────┼───────┼───────┤
│   Map   │ [ 'Blake2_128Concat', 'Twox64Concat' ] │ '510' │ '514' │
└─────────┴────────────────────────────────────────┴───────┴───────┘
tx

api.tx.nftmartOrder.submitOrder

Create an order.

  • currency_id: currency id
  • category_id: category id
  • deposit: The balances to create an order
  • price: nfts' price.
  • deadline: deadline
  • items: a list of (class_id, token_id, quantity, price)

args:

┌─────────┬──────────────────┬──────────────────────┬────────────────────────────────────────┐
│ (index) │       name       │         type         │                typeName                │
├─────────┼──────────────────┼──────────────────────┼────────────────────────────────────────┤
│    0    │   'currencyId'   │    'Compact<u32>'    │             'CurrencyIdOf'             │
│    1    │    'deposit'     │   'Compact<u128>'    │               'Balance'                │
│    2    │     'price'      │   'Compact<u128>'    │               'Balance'                │
│    3    │    'deadline'    │    'Compact<u32>'    │            'BlockNumberOf'             │
│    4    │     'items'      │ 'Vec<(u32,u64,u64)>' │ 'Vec<(ClassIdOf,TokenIdOf,TokenIdOf)>' │
│    5    │ 'commissionRate' │  'Compact<PerU16>'   │                'PerU16'                │
└─────────┴──────────────────┴──────────────────────┴────────────────────────────────────────┘

api.tx.nftmartOrder.takeOrder

Take a NFT order.

  • order_id: order id
  • order_owner: token owner

args:

┌─────────┬───────────────────┬───────────────────────┬─────────────────────┐
│ (index) │       name        │         type          │      typeName       │
├─────────┼───────────────────┼───────────────────────┼─────────────────────┤
│    0    │     'orderId'     │    'Compact<u64>'     │     'GlobalId'      │
│    1    │   'orderOwner'    │    'MultiAddress'     │   'LookupSource'    │
│    2    │ 'commissionAgent' │ 'Option<AccountId32>' │ 'Option<AccountId>' │
│    3    │ 'commissionData'  │    'Option<Bytes>'    │   'Option<Bytes>'   │
└─────────┴───────────────────┴───────────────────────┴─────────────────────┘

api.tx.nftmartOrder.removeOrder

remove an order by order owner.

  • order_id: order id

args:

┌─────────┬───────────┬────────────────┬────────────┐
│ (index) │   name    │      type      │  typeName  │
├─────────┼───────────┼────────────────┼────────────┤
│    0    │ 'orderId' │ 'Compact<u64>' │ 'GlobalId' │
└─────────┴───────────┴────────────────┴────────────┘

api.tx.nftmartOrder.removeOffer

remove an offer by offer owner.

  • offer_id: offer id

args:

┌─────────┬───────────┬────────────────┬────────────┐
│ (index) │   name    │      type      │  typeName  │
├─────────┼───────────┼────────────────┼────────────┤
│    0    │ 'offerId' │ 'Compact<u64>' │ 'GlobalId' │
└─────────┴───────────┴────────────────┴────────────┘

api.tx.nftmartOrder.submitOffer

args:

┌─────────┬──────────────────┬──────────────────────┬────────────────────────────────────────┐
│ (index) │       name       │         type         │                typeName                │
├─────────┼──────────────────┼──────────────────────┼────────────────────────────────────────┤
│    0    │   'currencyId'   │    'Compact<u32>'    │             'CurrencyIdOf'             │
│    1    │     'price'      │   'Compact<u128>'    │               'Balance'                │
│    2    │    'deadline'    │    'Compact<u32>'    │            'BlockNumberOf'             │
│    3    │     'items'      │ 'Vec<(u32,u64,u64)>' │ 'Vec<(ClassIdOf,TokenIdOf,TokenIdOf)>' │
│    4    │ 'commissionRate' │  'Compact<PerU16>'   │                'PerU16'                │
└─────────┴──────────────────┴──────────────────────┴────────────────────────────────────────┘

api.tx.nftmartOrder.takeOffer

Take a NFT offer.

  • offer_id: offer id
  • offer_owner: token owner

args:

┌─────────┬───────────────────┬───────────────────────┬─────────────────────┐
│ (index) │       name        │         type          │      typeName       │
├─────────┼───────────────────┼───────────────────────┼─────────────────────┤
│    0    │     'offerId'     │    'Compact<u64>'     │     'GlobalId'      │
│    1    │   'offerOwner'    │    'MultiAddress'     │   'LookupSource'    │
│    2    │ 'commissionAgent' │ 'Option<AccountId32>' │ 'Option<AccountId>' │
│    3    │ 'commissionData'  │    'Option<Bytes>'    │   'Option<Bytes>'   │
└─────────┴───────────────────┴───────────────────────┴─────────────────────┘