Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Jan 26, 2023
1 parent 761a00b commit 9bd7815
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions cardano-testnet/src/Testnet/Commands/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Aeson
import Data.Time.Clock (UTCTime)
import GHC.Stack (HasCallStack, withFrozenCallStack)

import Hedgehog.Extras.Stock.Time (showUTCTimeSeconds)
import Hedgehog.Internal.Property
Expand All @@ -24,15 +25,15 @@ import Testnet.Util.Process
-- | Creates a default Byron genesis. This is required for any testnet, predominantly because
-- we inject our ADA supply into our testnet via the Byron genesis.
createByronGenesis
:: (MonadTest m, MonadCatch m, MonadIO m)
:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack)
=> Int
-> UTCTime
-> BabbageTestnetOptions
-> String
-> String
-> m ()
createByronGenesis testnetMagic startTime testnetOptions pParamFp genOutputDir =
execCli_
withFrozenCallStack $ execCli_
[ "byron", "genesis", "genesis"
, "--protocol-magic", show testnetMagic
, "--start-time", showUTCTimeSeconds startTime
Expand All @@ -52,10 +53,10 @@ createByronGenesis testnetMagic startTime testnetOptions pParamFp genOutputDir =
-- command creates a transaction input that defaults to the 0th index and therefore
-- we can spend spend this tx input in a transaction.
createShelleyGenesisInitialTxIn
:: (MonadTest m, MonadCatch m, MonadIO m)
:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack)
=> Int -> FilePath -> m String
createShelleyGenesisInitialTxIn testnetMagic vKeyFp =
execCli
withFrozenCallStack $ execCli
[ "genesis", "initial-txin"
, "--testnet-magic", show @Int testnetMagic
, "--verification-key-file", vKeyFp
Expand Down
9 changes: 5 additions & 4 deletions cardano-testnet/src/Testnet/Commands/Governance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ import Prelude

import Control.Monad.Catch
import Control.Monad.IO.Class
import GHC.Stack (HasCallStack, withFrozenCallStack)

import Testnet.Util.Process (execCli_)

import Hedgehog.Internal.Property


createByronUpdateProposal
:: (MonadTest m, MonadCatch m, MonadIO m)
:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack)
=> Int -> String -> String -> Int -> m ()
createByronUpdateProposal testnetMagic signingKeyFp updateProposalFp ptclMajorVersion =
execCli_
withFrozenCallStack $ execCli_
[ "byron", "governance", "create-update-proposal"
, "--filepath", updateProposalFp
, "--testnet-magic", show testnetMagic
Expand All @@ -34,10 +35,10 @@ createByronUpdateProposal testnetMagic signingKeyFp updateProposalFp ptclMajorVe
]

createByronUpdateProposalVote
:: (MonadTest m, MonadCatch m, MonadIO m)
:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack)
=> Int -> String -> String -> String -> m ()
createByronUpdateProposalVote testnetMagic updateProposalFp signingKey outputFp =
execCli_
withFrozenCallStack $ execCli_
[ "byron", "governance", "create-proposal-vote"
, "--proposal-filepath", updateProposalFp
, "--testnet-magic", show testnetMagic
Expand Down

0 comments on commit 9bd7815

Please sign in to comment.