RGB-WG / rust-rgb20

RGB20 fungible asset schema
MIT License
18 stars 12 forks source link

Created contract must has at least one allocations or inflation seal #11

Closed nicbus closed 1 year ago

nicbus commented 1 year ago

create_rgb20() allows an issued_supply of 0 but in my opinion that should be treated as invalid and return an error, e.g. InvalidIssuanceSupply

dr-orlovsky commented 1 year ago
  1. It is valid under RGB20 schema to issue 0 assets in genesis. Why API shouldn't allow things which are allowed by the schema?
  2. The rational for 0-supply issue is to allow issuers postponing the real issue from claiming asset name and creating asset it. The asset can be issued later via secondary issuance.
  3. I propose the following: add to RGB20 library a standardness rule that either there should be non-zero supply in genesis - or secondary issuance allowed; otherwise error.
nicbus commented 1 year ago

I was not considering secondary issuance, it makes perfect sense now

I agree that the actual issue can be framed as having either a non-zero supply in genesis or secondary issuance allowed

dr-orlovsky commented 1 year ago

Not relevant with the move to interfaces in https://github.com/RGB-WG/rgb-wallet/ v0.10