{-# LANGUAGE NamedFieldPuns #-}
module Main (main) where
import Cardano.Crypto.Init (cryptoInit)
import Cardano.Tools.Config (withConfigErrorHandling)
import Cardano.Tools.DBSynthesizer.Run
import DBSynthesizer.Parsers
import Main.Utf8 (withStdTerminalHandles)
main :: IO ()
IO ()
main = IO () -> IO ()
forall (m :: * -> *) r. (MonadIO m, MonadMask m) => m r -> m r
withStdTerminalHandles (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$ IO () -> IO ()
forall a. IO a -> IO a
withConfigErrorHandling (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$ do
IO ()
cryptoInit
Options{configFile, chainDBDir, credentials, synthOptions} <- IO Options
parseCommandLine
(shelleyGenesis, protocol) <- initialize configFile credentials
result <- synthesize genTxs synthOptions shelleyGenesis chainDBDir protocol
putStrLn $ "--> done; result: " ++ show result
where
genTxs :: p -> p -> p -> p -> f [a]
genTxs p
_ p
_ p
_ p
_ = [a] -> f [a]
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure []