bump plutarch to staging rev

This commit is contained in:
Emily Martins 2022-03-11 18:05:30 +01:00
parent 93dcd14847
commit 7003c4556e
7 changed files with 120 additions and 74 deletions

View file

@ -21,7 +21,6 @@ import Plutarch.Api.V1 (
mkValidator,
validatorHash,
)
import Plutus.V1.Ledger.Ada (adaValueOf)
import Plutus.V1.Ledger.Api (
Address (Address),
Credential (ScriptCredential),
@ -84,7 +83,7 @@ stakeCreation =
, txOutDatumHash = Just (DatumHash "")
}
]
, txInfoFee = adaValueOf 2
, txInfoFee = Value.singleton "" "" 2
, txInfoMint = st
, txInfoDCert = []
, txInfoWdrl = []

View file

@ -12,7 +12,7 @@ import Test.Tasty.HUnit (assertFailure, testCase)
--------------------------------------------------------------------------------
import Plutarch (compile)
import Plutarch.Evaluate (evaluateScript)
import Plutarch.Evaluate (evalScript)
import Plutus.V1.Ledger.Scripts (Script)
--------------------------------------------------------------------------------
@ -34,6 +34,8 @@ tests =
scriptTest :: String -> Script -> TestTree
scriptTest name script = testCase name $ do
case evaluateScript script of
Left e -> assertFailure (show e)
let (res, _budget, traces) = evalScript script
case res of
Left e -> do
assertFailure (show e <> " Traces: " <> show traces)
Right _v -> pure ()