File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Cardano.PlutusExample.Game (
1313import Data.Aeson qualified as JSON
1414import Data.Aeson.TH (defaultOptions , deriveJSON )
1515import Data.ByteString.Lazy qualified as LazyByteString
16+ import Data.Maybe (fromMaybe )
1617import MLabsPAB qualified
1718import MLabsPAB.Types (
1819 CLILocation (Local ),
@@ -46,7 +47,9 @@ $(deriveJSON defaultOptions ''GameContracts)
4647
4748main :: IO ()
4849main = do
49- protocolParams <- JSON. decode <$> LazyByteString. readFile " protocol.json"
50+ protocolParams <-
51+ fromMaybe (error " protocol.json file not found" ) . JSON. decode
52+ <$> LazyByteString. readFile " protocol.json"
5053 let pabConf =
5154 PABConfig
5255 { pcCliLocation = Local
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import Cardano.PlutusExample.NFT (
1111import Data.Aeson qualified as JSON
1212import Data.Aeson.TH (defaultOptions , deriveJSON )
1313import Data.ByteString.Lazy qualified as LazyByteString
14+ import Data.Maybe (fromMaybe )
1415import Ledger.Value (TokenName )
1516import MLabsPAB qualified
1617import MLabsPAB.Types (
@@ -46,7 +47,9 @@ $(deriveJSON defaultOptions ''MintNFTContracts)
4647
4748main :: IO ()
4849main = do
49- protocolParams <- JSON. decode <$> LazyByteString. readFile " protocol.json"
50+ protocolParams <-
51+ fromMaybe (error " protocol.json file not found" ) . JSON. decode
52+ <$> LazyByteString. readFile " protocol.json"
5053 let pabConf =
5154 PABConfig
5255 { pcCliLocation = Local
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ import Cardano.PlutusExample.Transfer (
99 transfer ,
1010 )
1111import Data.Aeson qualified as JSON
12- import Ledger.Value (Value )
1312import Data.Aeson.TH (defaultOptions , deriveJSON )
1413import Data.ByteString.Lazy qualified as LazyByteString
1514import Data.Maybe (fromMaybe )
1615import Ledger.Crypto (PubKeyHash )
16+ import Ledger.Value (Value )
1717import MLabsPAB qualified
1818import MLabsPAB.Types (
1919 CLILocation (Local ),
You can’t perform that action at this time.
0 commit comments