Skip to content

Commit 9a08ecd

Browse files
committed
Use cbor_hex and file_path over cbor and path
1 parent 5072d69 commit 9a08ecd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

app/App.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ scripts:
8989
# error out with the expected script hash.
9090
hash: "6bfbd8fc6567153cbaacdcd0ee9fff9e69ba2a0eb62c129b303ade19"
9191
source:
92-
# The source of the substitution script. This can either be a "path"
93-
# or a "cbor".
94-
cbor: "4e4d01000033222220051200120011"
95-
# path: "local-config/policy-debug.plutus"
92+
# The source of the substitution script. This can either be a
93+
# "file_path" or a "cbor_hex".
94+
cbor_hex: "4e4d01000033222220051200120011"
95+
# file_path: "local-config/policy-debug.plutus"
9696

9797
|]

dev-local/Main.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ tracingYamlContents scriptsDirName = do
127127
- name: "Local Policy"
128128
hash: "#{policyDebugPolicyId}"
129129
source:
130-
path: "#{scriptsDirName}/policy-debug.plutus"
130+
file_path: "#{scriptsDirName}/policy-debug.plutus"
131131
#{validatorPrefix}
132132
- name: "Local Validator"
133133
hash: "#{validatorDebugPolicyId}"
134134
source:
135-
path: "#{scriptsDirName}/validator-debug.plutus"
135+
file_path: "#{scriptsDirName}/validator-debug.plutus"
136136
|]
137137

138138
escrowYamlContents :: IO String
@@ -146,7 +146,7 @@ escrowYamlContents = do
146146
- name: "Escrow"
147147
hash: "#{escrowDebugPolicyId}"
148148
source:
149-
path: "./escrow-debug.plutus"
149+
file_path: "./escrow-debug.plutus"
150150
|]
151151

152152
createScriptsYaml :: IO ()

lib/PSR/ConfigMap.hs

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

4848
$(deriveJSONSimpleSum "S" ''ScriptSource)
@@ -144,12 +144,12 @@ readScriptFile scriptYamlDir scrutScriptHash (ix, ScriptDetails{..}) = do
144144
]
145145

146146
rsScriptFileContent <- case sdSource of
147-
SPath path' -> do
147+
SFilePath path' -> do
148148
let path = scriptYamlDir </> path'
149149
relativePath <- liftIO $ makeRelativeToCurrentDirectory path
150150
liftIO $ putStrLn $ "Reading script from file: " <> relativePath
151151
withExceptT show $ ExceptT $ C.readFileTextEnvelopeAnyOf scriptTypes (C.File relativePath)
152-
SCbor content ->
152+
SCborHex content ->
153153
withExceptT show $ except $ C.deserialiseFromTextEnvelopeAnyOf scriptTypes content
154154

155155
let expectedScriptHash =

0 commit comments

Comments
 (0)