We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Inspired by #251 (comment)
We should add a quick existence operator to Map / IndexedMap that doesn't parse the data. This could be used like load:
Map
IndexedMap
let exists: bool = TOKENS.has(deps.storage, &token_id);
We should also expose this on the Path helper (which would be how the above is implemented`
Path
TOKENS.key(k).exists(deps.storage);
Note that neither must return errors (like remove) as neither parses data
remove
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Inspired by #251 (comment)
We should add a quick existence operator to
Map
/IndexedMap
that doesn't parse the data. This could be used like load:let exists: bool = TOKENS.has(deps.storage, &token_id);
We should also expose this on the
Path
helper (which would be how the above is implemented`TOKENS.key(k).exists(deps.storage);
Note that neither must return errors (like
remove
) as neither parses dataThe text was updated successfully, but these errors were encountered: