stellar / soroban-examples

Example Soroban Contracts
Apache License 2.0
57 stars 60 forks source link

Fix acceptance of neg amounts in mint-lock example #296

Closed leighmcculloch closed 7 months ago

leighmcculloch commented 7 months ago

What

Disallow minting with negative amounts in the mint-lock example.

Why

There isn't really a good reason to generically support minting with negative amounts. Due to the tracking of the limit inside the mint-lock contract it isn't well defined or obvious what the limits behavior should be with negative mints. For example, should it reduce the limit consumed, or keep it as it is. For the most part token mint functions usually don't support minting negative amounts.

Close #295