public-awesome / cw-nfts

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

Validate royalty percentage when minting cw2981 #111

Closed peara closed 1 year ago

peara commented 1 year ago

Problem

At the moment, there is no validation of royalty_percentage when minting new token in cw2981-royalties. As percentage over 100% is mostly nonsensical in the context of royalty, it should be checked to prevent potential errors. For example, a marketplace contract can mistakenly send their own tokens instead of the buyer's because royalty amount will be larger than the price.

=> validate royalty_percentage to be smaller than equal to 100.

peara commented 1 year ago

@JakeHartnell @shanev @larry0x Please check this PR.

peara commented 1 year ago

@larry0x Can we go?