Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SETPRIORITY discrepancy between spec and rmrk-tools #29

Open
bmacer opened this issue Nov 21, 2021 · 1 comment
Open

SETPRIORITY discrepancy between spec and rmrk-tools #29

bmacer opened this issue Nov 21, 2021 · 1 comment

Comments

@bmacer
Copy link
Contributor

bmacer commented Nov 21, 2021

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.

@Swader
Copy link
Contributor

Swader commented Nov 21, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants