public-awesome / cw-nfts

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

cw721-non-transferable: cannot mint #123

Open peterblockman opened 1 year ago

peterblockman commented 1 year ago

I am trying to implement the cw721-non-transferable into my project, however, I am currently facing issues with the minting process

If the sender is the admin, we will reach the _execute(deps, env, info, msg) function, which will execute the cw721-base's mint function. However, the mint function will throw an error due to this line of code: cw_ownable::assert_owner(deps.storage, &info.sender)?;which requires the sender to be the minter.

If the sender is the minter, the match arm will throw a NotOwner error.

It only works if the admin and minter are the same.