-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat(backend): record custom user ICRC tokens #1037
Conversation
…-tokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
|
||
mutate_state(|s| remove_from_user_token(stored_principal, &mut s.user_custom_token, &find)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would make the query below a certified query but I see that it is the same as the query above. And who knows, there are shiny new certification methods coming that don't require you to keep all your data in a merkle tree!
Description
Similar to how users interact with ERC20 tokens, we aim to provide the capability to add, remove, and list ICRC tokens. Considering the differences between these token types, we've introduced a new storage mechanism tailored for a stable, yet more generic structure. This decision anticipates the potential to support additional token types in the future. Consequently, we may consider migrating existing ERC20 tokens into this new, more adaptable map.
Feature
UserToken
, structIcrcToken
and implementation for equality purpose when adding or removing entryUserTokenId
to be able to identity token uniquely