Closed siriustaikun closed 1 year 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()
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.
deps.querier.query_supply
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
closed via PR #15
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
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