use liqwid-nix 2.0
This commit is contained in:
parent
b6ab3762ce
commit
7e628328da
35 changed files with 458 additions and 564 deletions
|
|
@ -42,9 +42,9 @@ import PlutusLedgerApi.V2 (
|
|||
Address (Address),
|
||||
Credential (..),
|
||||
PubKeyHash (PubKeyHash),
|
||||
ScriptHash (ScriptHash),
|
||||
TxId (..),
|
||||
TxOutRef (..),
|
||||
ValidatorHash (ValidatorHash),
|
||||
Value,
|
||||
toBuiltin,
|
||||
)
|
||||
|
|
@ -76,7 +76,7 @@ genUserCredential = PubKeyCredential . PubKeyHash . toBuiltin <$> genHashByteStr
|
|||
|
||||
-- | Random script credential.
|
||||
genScriptCredential :: Gen Credential
|
||||
genScriptCredential = ScriptCredential . ValidatorHash . toBuiltin <$> genHashByteString
|
||||
genScriptCredential = ScriptCredential . ScriptHash . toBuiltin <$> genHashByteString
|
||||
|
||||
-- | Random credential: combination of user and script credential generators.
|
||||
genCredential :: Gen Credential
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ import Plutarch.Context (
|
|||
import Plutarch.Evaluate (evalTerm)
|
||||
import Plutarch.Extra.AssetClass (assetClassValue)
|
||||
import Plutarch.Extra.Compile (mustCompile)
|
||||
import Plutarch.Script (Script)
|
||||
import Plutarch.Test.QuickCheck (
|
||||
Equality (OnPEq),
|
||||
Partiality (ByComplete),
|
||||
|
|
@ -66,14 +67,14 @@ import Plutarch.Test.QuickCheck (
|
|||
shouldCrash,
|
||||
shouldRun,
|
||||
)
|
||||
import PlutusLedgerApi.V2 (Script, ScriptContext)
|
||||
import PlutusLedgerApi.V2 (ScriptContext)
|
||||
import Property.Generator (genInput, genOutput)
|
||||
import Sample.Shared (
|
||||
deterministicTracingConfig,
|
||||
governor,
|
||||
governorAssetClass,
|
||||
governorScriptHash,
|
||||
governorSymbol,
|
||||
governorValidatorHash,
|
||||
gstUTXORef,
|
||||
)
|
||||
import Test.QuickCheck (
|
||||
|
|
@ -109,7 +110,7 @@ instance Arbitrary GovernorDatumCases where
|
|||
-}
|
||||
governorDatumValidProperty :: Property
|
||||
governorDatumValidProperty =
|
||||
haskEquiv @( 'OnPEq) @( 'ByComplete)
|
||||
haskEquiv @('OnPEq) @('ByComplete)
|
||||
isValidModelImpl
|
||||
(TestableTerm pisGovernorDatumValid)
|
||||
(genDatum :* Nil)
|
||||
|
|
@ -283,7 +284,7 @@ mkGovMintingCasePropertyTest name case' positiveCaseName negativeCaseName =
|
|||
outputToGov =
|
||||
output $
|
||||
mconcat
|
||||
[ script governorValidatorHash
|
||||
[ script governorScriptHash
|
||||
, withValue gst
|
||||
, withDatum govDatum
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue