Closed
Description
opened on Jun 28, 2021
Summary
We currently store balance's as address ++ denom
. We should create another one which is denom ++ address
Problem Definition
#9393 adds a feature to query denom owners. The current implementation #9533 loops through all addresses, unmarshals each balance, and filters out balances whose denom doesn't match. This is an expensive operation.
This index is also desirable if bank is used for storing NFTs.
Proposal
- Create a new index in x/bank
denom ++ address
- The value of that index can be empty (no need to duplicate the balance)
- Modify DenomOwners logic to use this index
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity