-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implement helpers for SNIP-21, SNIP-22, and SNIP-23 interfaces #20
Comments
A quick question to this: Would the new modules only include the additions and changes to snip20 or would you rather have it to mirror everything? Concrete example: If I call Transfer on a snip21 do I import it from ::snip20 or ::snip21 ? |
Good question, that's the discussion that i'd like to have here. We could perhaps provide an alternative implementations to some things under The question though then becomes: does (I'm gonna explain that in the relevant PRs in a few minutes but) We're going to shelve |
I would personally prefer asymmetry in the packages. So the functionally resides in the package it is defined in and I compose it in my contracts. That will mean that I potentially have multiple crates to import but it also makes it very clear which functionality I am using when writing the contract. |
Yeah, at least in CLion if you use a symbol you didn't import, it offers several options, and pastes in the appropriate import line next to your other imports. |
So just to make sure, in your opinion should |
I think it should not export unchanged symbols. This is based on my following understanding (and please correct me if I am wrong here): Snip2X implementations are composable functionality- So my token could be based on snip20 and implement snip22 and 21 as well. Or potentially only 22 and so forth. |
Yup, your understanding is correct and makes sense to me. |
We ended up including all new SNIP-2x functionality in the |
Extend the methods available under
secret_toolkit::snip20
to also include the new interface specified in:SNIP-21, SNIP-22, and SNIP-23.
Alternatively, implement new modules called
snip21
,snip22
, andsnip23
which include versions of the modified interfaces that are aware of the new features, as well as support for the new message types.NOTE: at the time of writing SNIP-23 is not finalized yet so it's a lower priority.
UPDATE 2022-01-19:
We ended up including all new SNIP-2x functionality in the snip20 module. As far as I'm concerned we can still reshuffle this as discussed in this thread and release a new version, but for now let's experiment with it and see what feedback we get.
The text was updated successfully, but these errors were encountered: