Skip to content

Commit 9cc6ffd

Browse files
committed
Rename "cbor_hex" in the configuration to "inline"
1 parent 7e5fd82 commit 9cc6ffd

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

app/App.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,14 @@ scripts:
9090
##
9191
# Tip: Leave this as an empty string and let plutus-script-reexecutor
9292
# error out with the expected script hash.
93-
hash: "6bfbd8fc6567153cbaacdcd0ee9fff9e69ba2a0eb62c129b303ade19"
93+
hash: "793f8c8cffba081b2a56462fc219cc8fe652d6a338b62c7b134876e7"
9494
source:
9595
# The source of the substitution script. This can either be a
9696
# "file_path" or a "cbor_hex".
97-
cbor_hex: "4e4d01000033222220051200120011"
97+
inline:
98+
type: "PlutusScriptV2"
99+
description: "Always failing script"
100+
cborHex: "4e4d01000033222220051200120011"
98101
# file_path: "local-config/policy-debug.plutus"
99102

100103
|]

dev-local/Main.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ tracingYamlContents scriptsDirName = do
140140
hash: "#{validatorDebugPolicyId}"
141141
source:
142142
file_path: "#{scriptsDirName}/validator-debug.plutus"
143+
- name: "Always failing script"
144+
hash: "793f8c8cffba081b2a56462fc219cc8fe652d6a338b62c7b134876e7"
145+
source:
146+
inline:
147+
type: "PlutusScriptV2"
148+
description: "Always failing script"
149+
cborHex: "4e4d01000033222220051200120011"
143150
|]
144151

145152
escrowYamlContents :: IO String

lib/PSR/ConfigMap.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import System.FilePath (dropFileName, (</>))
4141
or another file on disk.
4242
-}
4343
data ScriptSource
44-
= SCborHex C.TextEnvelope
44+
= SInline C.TextEnvelope
4545
| SFilePath FilePath
4646
deriving (Show, Eq)
4747

@@ -161,8 +161,8 @@ readScriptFile scriptYamlDir scrutScriptHash (ix, ScriptDetails{..}) = do
161161
relativePath <- liftIO $ makeRelativeToCurrentDirectory path
162162
liftIO $ putStrLn $ "Reading script from file: " <> relativePath
163163
withExceptT show $ ExceptT $ C.readFileTextEnvelopeAnyOf scriptTypes (C.File relativePath)
164-
SCborHex content ->
165-
withExceptT show $ except $ C.deserialiseFromTextEnvelopeAnyOf scriptTypes content
164+
SInline content -> do
165+
withExceptT show . except $ C.deserialiseFromTextEnvelopeAnyOf scriptTypes content
166166

167167
let actualScriptHash =
168168
case rsScriptFileContent of

0 commit comments

Comments
 (0)