MeshJS / mesh

An open-source library to advance Web3 development on Cardano

Home Page:https://meshjs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Royalty token issue -- mandatory metadata

eric248550 opened this issue · comments

Currently, there is no way to mint royalty tokens without the policy id attached.
I was able to generate a token with the 777 label, the issue is that it had the policy id and asset name attached in the metadata. Wondering if there's a way to get rid of this metadata.

TokenI mint using mesh:

{
   "policyId": {
      "": {
         "addr": [ "addr_test1djfkh8skjne8u8wknsafnekjaikjkkasfgj9w89nsakjf84nuknsf9",
            "msf4jj70v7n30289afjknr4389wjknfsa893jknfs893"
         ],
         "rate": "0.025"
      }
   }
}

What royalty token should be:

{
  "addr": [ "addr_test1djfkh8skjne8u8wknsafnekjaikjkkasfgj9w89nsakjf84nuknsf9",
    "msf4jj70v7n30289afjknr4389wjknfsa893jknfs893"
  ],
  "rate": "0.025"
}

After went through the repo, I found the issue is the metadata format being fixed by forgeAssetsIfNeeded(), forge()

private async forgeAssetsIfNeeded() {