mlabs-haskell / seabug-onchain

Seabug onchain contracts taken from plutus-use-cases
Apache License 2.0
1 stars 0 forks source link

Add non-negative checks #6

Closed samuelWilliams99 closed 2 years ago

samuelWilliams99 commented 2 years ago

Updating means we'll be dropping plutus-extra, as such we drop Naturals, in favor of Integers. As such, any fields that were changed may need >0 checks onchain.

samuelWilliams99 commented 2 years ago

Proposed solution, simple Integer newtype that has an explicit FromData, which checks >=0

samuelWilliams99 commented 2 years ago

Need not be as complex as plutus-extra, no need for QQ for example, just an enum instance that'll error, and the Data instances