public-awesome / cw-nfts

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

js lib for contracts #170

Open taitruong opened 2 months ago

taitruong commented 2 months ago

There's ts-codegen for easily creating js libs. But it wont solve different versions of cw721.

Like in v16 there is Minter query, whereas in v18 it is Ownership and in upcoming v19 it is GetMinterOwnership.

New lib may have a version for constructor. In case of v16 then GetMinterOwnership call does an actual Minter call.

@shanev @JakeHartnell wdyt?

JakeHartnell commented 2 months ago

cw721 is probably a case that warrants making a dedicate npm library for to handle the different versions (including sg721 NFTs). Could also add some helper methods for fetching token_uri, etc.

ts-codegen output could be a good start for this.