Skip to content

Commit

Permalink
Add cardanoCliEra helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking authored and rvl committed Jan 11, 2021
1 parent ba6e536 commit 148b4ba
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs
Expand Up @@ -1198,7 +1198,7 @@ preparePoolRegistration tr dir stakePub certs pledgeAmt = do
, "--ttl", "400"
, "--fee", show (faucetAmt - pledgeAmt - depositAmt)
, "--out-file", file
, "--mary-era"
, cardanoCliEra
] ++ mconcat ((\cert -> ["--certificate-file",cert]) <$> certs)

pure (file, faucetPrv)
Expand Down Expand Up @@ -1226,7 +1226,7 @@ sendFaucetFundsTo tr dir allTargets = do
, "--ttl", "600"
, "--fee", show (faucetAmt - total)
, "--out-file", file
, "--mary-era"
, cardanoCliEra
] ++ outputs

tx <- signTx tr dir file [faucetPrv]
Expand Down Expand Up @@ -1263,7 +1263,7 @@ moveInstantaneousRewardsTo tr dir targets = do
, "--fee", show (faucetAmt - 1_000_000 - totalDeposit)
, "--tx-out", sink <> "+" <> "1000000"
, "--out-file", file
, "--mary-era"
, cardanoCliEra
] ++ concatMap (\x -> ["--certificate-file", x]) (mconcat certs)

testData <- getShelleyTestDataPath
Expand Down Expand Up @@ -1326,7 +1326,7 @@ prepareKeyRegistration tr dir = do
, "--fee", show (faucetAmt - depositAmt - 1_000_000)
, "--certificate-file", cert
, "--out-file", file
, "--mary-era"
, cardanoCliEra
]
pure (file, faucetPrv)

Expand Down Expand Up @@ -1406,7 +1406,7 @@ waitUntilRegistered tr name opPub = do
(exitCode, distribution, err) <- readProcessWithExitCode "cardano-cli"
[ "query", "stake-distribution"
, "--mainnet"
, "--mary-era"
, cardanoCliEra
] mempty
traceWith tr $ MsgStakeDistribution name exitCode distribution err
unless (poolId `isInfixOf` distribution) $ do
Expand Down Expand Up @@ -1552,6 +1552,9 @@ operators = unsafePerformIO $ newMVar
]
{-# NOINLINE operators #-}

cardanoCliEra :: String
cardanoCliEra = "--allegra-era"

-- | A public stake key associated with a mnemonic that we pre-registered for
-- STAKE_POOLS_JOIN_05.
--
Expand Down

0 comments on commit 148b4ba

Please sign in to comment.