Skip to content

Commit

Permalink
Use submitTx and signTx in ProposeNewConstitutionSPO
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Apr 25, 2024
1 parent f25f1e4 commit f9c1d8a
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import GHC.Stack (HasCallStack)
import Lens.Micro
import System.FilePath ((</>))

import Testnet.Components.DReps (failToSubmitTx)
import Testnet.Components.DReps (failToSubmitTx, signTx, submitTx)
import Testnet.Components.Query
import Testnet.Components.TestWatchdog
import qualified Testnet.Process.Cli as P
Expand Down Expand Up @@ -135,7 +135,6 @@ hprop_ledger_events_propose_new_constitution_spo = H.integrationWorkspace "propo
]

txbodyFp <- H.note $ work </> "tx.body"
txbodySignedFp <- H.note $ work </> "tx.body.signed"

txin1 <- findLargestUtxoForPaymentKey epochStateView sbe wallet0

Expand All @@ -147,21 +146,13 @@ hprop_ledger_events_propose_new_constitution_spo = H.integrationWorkspace "propo
, "--out-file", txbodyFp
]

H.noteM_ $ H.execCli' execConfig
[ "conway", "transaction", "sign"
, "--tx-body-file", txbodyFp
, "--signing-key-file", paymentSKey $ paymentKeyInfoPair wallet0
, "--out-file", txbodySignedFp
]
txBodySigned <- signTx execConfig cEra work "signed" (File txbodyFp) [paymentKeyInfoPair wallet0]

H.noteM_ $ H.execCli' execConfig
[ "conway", "transaction", "submit"
, "--tx-file", txbodySignedFp
]
submitTx execConfig cEra txBodySigned

txidString <- mconcat . lines <$> H.execCli' execConfig
[ "transaction", "txid"
, "--tx-file", txbodySignedFp
, "--tx-file", unFile txBodySigned
]

QueryTipLocalStateOutput{mEpoch} <- queryTip execConfig
Expand Down

0 comments on commit f9c1d8a

Please sign in to comment.