Skip to content

[suggestion] Eliminate AssetType inconsistencies #4087

@Mingela

Description

@Mingela

Feature request

There are several value types for assets exist:

"AssetValue": {
  "Enum": [
    {
      "tag": "Quantity",
      "discriminant": 0,
      "type": "u32"
    },
    {
      "tag": "BigQuantity",
      "discriminant": 1,
      "type": "u128"
    },
    {
      "tag": "Fixed",
      "discriminant": 2,
      "type": "Fixed"
    },
    {
      "tag": "Store",
      "discriminant": 3,
      "type": "Metadata"
    }
  ]
}

Basically just Numeric and Store.
Although:

  • One can Transfer, Mint and Burn assets of type Numeric, but not assets of type Store
  • One can SetKetValue and RemoveKeyValue in relation to a Store asset, but not Numeric one
  • Once/Infinitely mintability makes little sense since it does not affect Store assets at all
  • A Store asset cannot be destroyed, there will be empty metadata container in the end

Motivation

Current situation hardly can show Store and Numeric assets being just a type of the same entity. They feel totally different entities.

I'd support either enabling the same set of instructions to be applicable to any asset with meaningful outcome or make Store asset something different than an asset. In the latter case an adjustment to enable deleting that somehow would be still worth considering.

Who can help?

No response

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or requestapi-changesChanges in the API for client librariesiroha2-devThe re-implementation of a BFT hyperledger in RUST

Type

No type

Projects

Status

Work in Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions