public-awesome / cw-nfts

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

feat: add cw721-fixed-price contract #36

Closed vernonjohnson closed 2 years ago

vernonjohnson commented 2 years ago

This PR includes a contract for implementing fixed-price limited edition NFTs, which can be purchased with cw20 tokens.

vernonjohnson commented 2 years ago

@JakeHartnell Good point. I can rename it to just "editions".

orkunkl commented 2 years ago

I think using cw721-x naming is convenient for extensions, or maybe cw721-ext-x @ethanfrey @JakeHartnell wdyt ? @verminator23 renaming the project to cw721-fixed-price makes sense.

ethanfrey commented 2 years ago

This looks like a very useful functionality (cw721 minting contract) that many people have asked for. They can either use this as is, or as inspiration to customize further. It think this is a valuable addition.

About the naming, we use cw20- for a number of related contracts, not just cw20-staking, which implements cw20 interface, but also cw20-escrow and cw20-ics20 which accept cw20 tokens and do something with them. As long as it is clear in the README, I think this is fine.

I haven't done a code review (just a brief skim), but I support adding it here (after someone does a better review)

ethanfrey commented 2 years ago

cw721-editions cw721-minter cw721-fixed-price cw721-so-this-is-how-you-let-people-mint-nfts-by-paying

are all fine with me. Naming is tough. But let's not kick ourselves too much and just pick something that is "good enough"

vernonjohnson commented 2 years ago

Appreciate the comments from everyone. Will rename it to "cw721-fixed-price" later today.

vernonjohnson commented 2 years ago

Changed the name of the contract to cw721-fixed-price. Lmk if there's anything else you guys think could be improved.

the-frey commented 2 years ago

Code looks good, but some way of expressing it's paid for in CW20 in the naming (hard I know 🙃) would be my only nitpick

cw721-mint-with-cw20? cw721-mint-paid-with-cw20?

Ew. Actually:

cw20-mints-cw721 is probably the shortest I can think of