public-awesome / cw-nfts

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

cw721-template #120

Open JakeHartnell opened 1 year ago

JakeHartnell commented 1 year ago

Closes #118.

Need to write more contract templates... cargo-generate is pretty cool.

Art3miX commented 1 year ago

I really like the templates idea, while this might seem like not needed, or can be easily achieved by simply copying a folder without generating a template, those sort of small developing improvements are exactly what cosmos is missing.

The only thing I don't like is the fact all of the code is in the lib.rs file, templates should be structurally as similar as possible to a working contract, in my opinion it will be much better to separate the lib.rs file into the corresponding files: errors.rs, msg.rs, contract.rs, tests.rs

JakeHartnell commented 1 year ago

I really like the templates idea, while this might seem like not needed, or can be easily achieved by simply copying a folder without generating a template, those sort of small developing improvements are exactly what cosmos is missing.

The only thing I don't like is the fact all of the code is in the lib.rs file, templates should be structurally as similar as possible to a working contract, in my opinion it will be much better to separate the lib.rs file into the corresponding files: errors.rs, msg.rs, contract.rs, tests.rs

I've been meaning to break it up but haven't found the time yet, that's a really good suggestion. Would be great to upstream a template to sg721 as well.

Art3miX commented 1 year ago

https://github.com/JakeHartnell/cw-nfts/pull/1

elix1er commented 1 year ago

break it up!