Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a handful of updates/changes:
Make metadata field naming convention consistent
base_uri, part_uri
Refactor
rmrk::config::Config
to allow better composition. SplitConfig
trait into individual functions with relevant trait bounds.Remove cargo flags
mintable, equippable
as they were actually redundant. Compiled wasm contract size is the same with/without them - the only difference is in the rmrk crate dependency size at build-time. It might be better to reserve these flags for future configurable backends (psp34, uniques, etc) where conditional compilation may be required.Add
rmrk::query::Query
trait, for ui-based helpers. Tried a few different approaches but ran into various limitations - this feels the most versatile for now. Fetching children directly would lead to gas-limits quickly being hit, hence theToken
type containing IDs. Not 100% satisfied with having two fields (pending & accepted) for assets/children, however this was the cleanest way to avoid introducing new duplicate types. The reason some functions are cross-contract builders is due to the impl potentially not existing on a child contract, so need to be able to directly handle the error otherwise the call will trap. Currently no tests for these, as it'll be much easier with e2e tests once we update to ink 4.0.Add getter methods required for Query functions
get_asset, get_pending_token_assets, get_pending_children, get_accepted_children