diff --git a/app/App.hs b/app/App.hs index 02027dd..61ef315 100644 --- a/app/App.hs +++ b/app/App.hs @@ -90,11 +90,14 @@ scripts: ## # Tip: Leave this as an empty string and let plutus-script-reexecutor # error out with the expected script hash. - hash: "6bfbd8fc6567153cbaacdcd0ee9fff9e69ba2a0eb62c129b303ade19" + hash: "793f8c8cffba081b2a56462fc219cc8fe652d6a338b62c7b134876e7" source: # The source of the substitution script. This can either be a # "file_path" or a "cbor_hex". - cbor_hex: "4e4d01000033222220051200120011" + inline: + type: "PlutusScriptV2" + description: "Always failing script" + cborHex: "4e4d01000033222220051200120011" # file_path: "local-config/policy-debug.plutus" |] diff --git a/dev-local/Main.hs b/dev-local/Main.hs index 5ba6cde..d37dff4 100644 --- a/dev-local/Main.hs +++ b/dev-local/Main.hs @@ -140,6 +140,13 @@ tracingYamlContents scriptsDirName = do hash: "#{validatorDebugPolicyId}" source: file_path: "#{scriptsDirName}/validator-debug.plutus" + - name: "Always failing script" + hash: "793f8c8cffba081b2a56462fc219cc8fe652d6a338b62c7b134876e7" + source: + inline: + type: "PlutusScriptV2" + description: "Always failing script" + cborHex: "4e4d01000033222220051200120011" |] escrowYamlContents :: IO String diff --git a/lib/PSR/ConfigMap.hs b/lib/PSR/ConfigMap.hs index 60ccf72..b2a74c3 100644 --- a/lib/PSR/ConfigMap.hs +++ b/lib/PSR/ConfigMap.hs @@ -41,7 +41,7 @@ import System.FilePath (dropFileName, ()) or another file on disk. -} data ScriptSource - = SCborHex C.TextEnvelope + = SInline C.TextEnvelope | SFilePath FilePath deriving (Show, Eq) @@ -161,8 +161,8 @@ readScriptFile scriptYamlDir scrutScriptHash (ix, ScriptDetails{..}) = do relativePath <- liftIO $ makeRelativeToCurrentDirectory path liftIO $ putStrLn $ "Reading script from file: " <> relativePath withExceptT show $ ExceptT $ C.readFileTextEnvelopeAnyOf scriptTypes (C.File relativePath) - SCborHex content -> - withExceptT show $ except $ C.deserialiseFromTextEnvelopeAnyOf scriptTypes content + SInline content -> do + withExceptT show . except $ C.deserialiseFromTextEnvelopeAnyOf scriptTypes content let actualScriptHash = case rsScriptFileContent of