netadao / nft-minter

NFT Minter contract v1 for Neta DAO dApp
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Improve Denom Verification #10

Closed siriustaikun closed 1 year ago

siriustaikun commented 2 years ago

Token registry denoms will not follow this pattern. NATIVE_DENOM doesn't need to be hardcoded. you can query it with deps.querier.query_bonded_denom()

https://github.com/netadao/nft-minter/blob/c0e65798ba7d9a83878e8f56e63cf9619250434c/contracts/minter/src/contract.rs#L159-L162

you can also upgrade your deps to

cosmwasm-std = { version = "1.1.1", features = ["cosmwasm_1_1"] }

and use deps.querier.query_supply and verify supply is greater than zero. this will work for all tokens.

The other option is cw-denom by zeke, under DA0-DA0/dao-contracts/packages/cw-denom using a git dependency and the 2.0.0-beta tag

onewhiskeypls commented 1 year ago

closed via PR #15