rmrk-team/rmrk-spec

SETPRIORITY discrepancy between spec and rmrk-tools

Opened this issue · 1 comments

There is a discrepancy between the RMRK2.0 standard for SETPRRIORITY and the implementation in rmrk-tools.

The spec is defined here: https://github.com/rmrk-team/rmrk-spec/blob/master/standards/rmrk2.0.0/interactions/setpriority.md

The example provided is this: rmrk::SETPRIORITY::2.0.0::5105000-0aff6865bed3a66b-DLEP-DL15-00000001::bar,foo,baz

Notice bar,foo,baz has no brackets or quotation marks.

However, in rmrk-tools, when you run the interaction for setpriority (example here: https://github.com/bmacer/rmrk2-interaction-examples/blob/master/interactions/setpriority/1-testing-setpriority.ts) the raw remark comes out like this:

RMRK::SETPRIORITY::2.0.0::11-ALICES_COLLECTION-ALICES_NFT-002::%5B%22bbbbb%22%2C%22aaaaa%22%5D

The relevant part is: %5B%22bbbbb%22%2C%22aaaaa%22%5D

URL decoded is: ["bbbbb","aaaaa"]

Notice there are brackets around the list and quotation marks around each item.

Essentially, either the rmrk-tools setpriority operation needs to be adjusted, or the example in the rmrk 2.0 spec needs to be updated.

I would expect the spec needs to be updated.

This is actually an implementation bug, tools should update imo. Every interaction like this spends an unnecessary extra 6*{num}+6 bytes, so an NFT with 3 resources spends an additional 24 bytes with every priority change.

Luckily, this is a non-essential operation and nothing would happen if the previous setpriority calls were invalidated except a revert to the initial resource for every bird. Thoughts @Yuripetusko?