webmaster128 / cw-nfts

Examples and helpers to build NFT contracts on CosmWasm
Apache License 2.0
184 stars 177 forks source link

If someone else deploys an nft code, how should I verify that his nft code is from the cw-nfts specification? #129

Closed 99Kies closed 1 day ago

99Kies commented 1 year ago

If someone else deploys an nft code, how should I verify that his nft code is from the cw-nfts specification?

taitruong commented 1 year ago

Not sure what exactly u mean. But you can query for contract's code id (e.g. starsd query wasm contract CONTRACT_ADDR), then query for code info (e.g. starsd query wasm code-info CODE_ID). Here it returns data_hash. Now you can build cw721-base contract - which then returns data hash. This way you can check whether it uses cw721-base contract.

99Kies commented 1 year ago

@taitruong In fact, I would like to discuss whether there is a concept of inheritance on cosmwasm.

like solidity.

contract XXXXX is IERC721 {}
taitruong commented 10 months ago

@taitruong In fact, I would like to discuss whether there is a concept of inheritance on cosmwasm.

like solidity.

contract XXXXX is IERC721 {}

You can easily extend cw721-base. Examples here: