DA0-DA0 / dao-contracts

CosmWasm smart contracts for Interchain DAOs.
https://docs.daodao.zone
BSD 3-Clause "New" or "Revised" License
202 stars 132 forks source link

voting-cw721-staked has no way to query address from NFT id #820

Open Reecepbcups opened 2 months ago

Reecepbcups commented 2 months ago

Affected

Summary

I am building out https://github.com/Reecepbcups/stargaze-nft-snapshots to snapshot NFT holders. This iterates all NFT id's and exports them to make airdrops easier.

Issue

Staked DAODAO CW721 are no longer apart of the original collection for Racoon or Rekt bulls due to staking. In doing so, I need to query the crates.io:dao-voting-cw721-staked contract to get staked id -> stars address. Currently DAODAO only has stars address -> [list of staked ids]

Solution

It would be nice to add a query to get nft idx -> user address that has it staked. Since there is no way to query who is staking without indexing?

JakeHartnell commented 1 month ago

Ah, really good suggestion. This shouldn't be too hard to add.