You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 28, 2023. It is now read-only.
This way we should be able to easily create functions on the NFTKeeper to get the NFTs efficiently without requiring these extra object. For example I'd suggest the keeper look like:
Stemming from
Eliminate structs
IDCollection
,Collection
and replace their functionality with index lookupsThe NFT design should be restructured to eliminate the:
Owner
structIDCollection
structWe should instead by applying the use of secondary indexes similarly to how the staking module stores references to the same validators by: operator-address, consensus-address, power, etc. (see example https://github.com/cosmos/cosmos-sdk/blob/master/x/staking/keeper/validator.go#L70)
(see spec: https://github.com/cosmos/cosmos-sdk/blob/master/docs/spec/staking/01_state.md#validator)
This way we should be able to easily create functions on the NFTKeeper to get the NFTs efficiently without requiring these extra object. For example I'd suggest the keeper look like:
Or something along those lines.
Additionally this means that all this Collection back-updating logic can be removed (see cosmos/cosmos-sdk#4209 (comment))
The text was updated successfully, but these errors were encountered: