Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
QuickCheck orphans (plus a few helpers) for V2 Plutus ledger API types.
Synopsis
- newtype NonAdaValue = NonAdaValue Value
- getNonAdaValue :: NonAdaValue -> Value
- newtype UTxOValue = UTxOValue Value
- getUtxoValue :: UTxOValue -> Value
- newtype FeeValue = FeeValue Value
- getFeeValue :: FeeValue -> Value
Documentation
newtype NonAdaValue Source #
A Value
that contains zero Ada.
Note
This is designed to act as a modifier, and thus, we expose the constructor even though it preserves invariants. If you use the constructor directly, be very certain that the Value being wrapped satisfies the invariants described above: failing to do so means all guarantees of this type are off the table.
Since: 1.0.0
NonAdaValue Value |
Instances
Arbitrary NonAdaValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value arbitrary :: Gen NonAdaValue shrink :: NonAdaValue -> [NonAdaValue] | |
CoArbitrary NonAdaValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value coarbitrary :: NonAdaValue -> Gen b -> Gen b | |
Function NonAdaValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value function :: (NonAdaValue -> b) -> NonAdaValue :-> b | |
Show NonAdaValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value | |
Eq NonAdaValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value (==) :: NonAdaValue -> NonAdaValue -> Bool Source # (/=) :: NonAdaValue -> NonAdaValue -> Bool Source # |
getNonAdaValue :: NonAdaValue -> Value Source #
Since: 1.0.0
A Value
suitable for TxOut
. Specifically:
- The
Value
is sorted by both keys (meaningCurrencySymbol
andTokenName
); - There exists an Ada amount; and
- All amounts are positive.
Note
This is designed to act as a modifier, and thus, we expose the constructor even though it preserves invariants. If you use the constructor directly, be very certain that the Value being wrapped satisfies the invariants described above: failing to do so means all guarantees of this type are off the table.
Since: 1.0.2
UTxOValue Value |
Instances
Arbitrary UTxOValue Source # | Since: 1.0.2 |
CoArbitrary UTxOValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value coarbitrary :: UTxOValue -> Gen b -> Gen b | |
Function UTxOValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value | |
Show UTxOValue Source # | Since: 1.0.0 |
Eq UTxOValue Source # | Since: 1.0.0 |
getUtxoValue :: UTxOValue -> Value Source #
Since: 1.0.0
A Value
containing only Ada, suitable for fees. Furthermore, the
Ada quantity is positive.
Note
This is designed to act as a modifier, and thus, we expose the constructor even though it preserves invariants. If you use the constructor directly, be very certain that the Value being wrapped satisfies the invariants described above: failing to do so means all guarantees of this type are off the table.
Since: 1.0.0
FeeValue Value |
Instances
Arbitrary FeeValue Source # | Since: 1.0.0 |
CoArbitrary FeeValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value coarbitrary :: FeeValue -> Gen b -> Gen b | |
Function FeeValue Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.V1.Orphans.Value | |
Show FeeValue Source # | Since: 1.0.0 |
Eq FeeValue Source # | Since: 1.0.0 |
getFeeValue :: FeeValue -> Value Source #
Since: 1.0.0
Orphan instances
Arbitrary Data Source # | This is a very general instance, able to produce Since: 1.0.0 |
Arbitrary LedgerBytes Source # | Since: 1.0.0 |
Arbitrary ScriptContext Source # | Since: 1.0.0 |
CoArbitrary Data Source # | Since: 1.0.0 |
coarbitrary :: Data -> Gen b -> Gen b | |
CoArbitrary LedgerBytes Source # | Since: 1.0.0 |
coarbitrary :: LedgerBytes -> Gen b -> Gen b | |
CoArbitrary ScriptContext Source # | Since: 1.0.0 |
coarbitrary :: ScriptContext -> Gen b -> Gen b | |
Function Data Source # | Since: 1.0.0 |
function :: (Data -> b) -> Data :-> b | |
Function LedgerBytes Source # | Since: 1.0.0 |
function :: (LedgerBytes -> b) -> LedgerBytes :-> b | |
Function ScriptContext Source # | Since: 1.0.0 |
function :: (ScriptContext -> b) -> ScriptContext :-> b |