@@ -4,8 +4,8 @@ module Test.Golden.Shelley.TextEnvelope.Tx.Tx
4
4
( golden_shelleyTx
5
5
) where
6
6
7
- import Cardano.Api (AsType (.. ), HasTextEnvelope (.. ))
8
7
import Cardano.Prelude
8
+
9
9
import Hedgehog (Property )
10
10
import Test.OptParse
11
11
@@ -20,29 +20,21 @@ import qualified Hedgehog.Extras.Test.Base as H
20
20
golden_shelleyTx :: Property
21
21
golden_shelleyTx = propertyOnce . H. moduleWorkspace " tmp" $ \ tempDir -> do
22
22
-- Reference keys
23
- let referenceTx = " test/data/golden/shelley/tx /tx"
23
+ let referenceTx = " test/data/golden/alonzo /tx"
24
24
25
25
-- Key filepaths
26
- paymentVerKey <- noteTempFile tempDir " payment-verification-key-file"
27
- paymentSignKey <- noteTempFile tempDir " payment-signing-key-file"
26
+ paymentSignKey <- noteInputFile " test/data/golden/shelley/transaction-sign/utxo.skey"
28
27
transactionFile <- noteTempFile tempDir " tx-file"
29
28
transactionBodyFile <- noteTempFile tempDir " tx-body-file"
30
29
31
- -- Generate payment signing key to sign transaction
32
- void $ execCardanoCLI
33
- [ " address" ," key-gen"
34
- , " --verification-key-file" , paymentVerKey
35
- , " --signing-key-file" , paymentSignKey
36
- ]
37
-
38
30
-- Create transaction body
39
31
void $ execCardanoCLI
40
32
[ " transaction" , " build-raw"
41
- , " --shelley -era"
42
- , " --tx-in" , " 91999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c3 #0"
43
- , " --tx-out" , " addr1v9wmu83pzajplrtpsq6tsqdgwr98x888trpmah2u0ezznsge7del3+100000000 "
44
- , " --fee " , " 1000000 "
45
- , " --invalid-hereafter " , " 500000 "
33
+ , " --alonzo -era"
34
+ , " --tx-in" , " f62cd7bc15d8c6d2c8519fb8d13c57c0157ab6bab50af62bc63706feb966393d #0"
35
+ , " --tx-out" , " addr_test1qpmxr8d8jcl25kyz2tz9a9sxv7jxglhddyf475045y8j3zxjcg9vquzkljyfn3rasfwwlkwu7hhm59gzxmsyxf3w9dps8832xh+1199989833223 "
36
+ , " --tx-out " , " addr_test1vpqgspvmh6m2m5pwangvdg499srfzre2dd96qq57nlnw6yctpasy4+10000000 "
37
+ , " --fee " , " 166777 "
46
38
, " --out-file" , transactionBodyFile
47
39
]
48
40
@@ -51,12 +43,10 @@ golden_shelleyTx = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
51
43
[ " transaction" , " sign"
52
44
, " --tx-body-file" , transactionBodyFile
53
45
, " --signing-key-file" , paymentSignKey
54
- , " --mainnet "
46
+ , " --testnet-magic " , " 42 "
55
47
, " --out-file" , transactionFile
56
48
]
57
49
58
- let txType = textEnvelopeType (AsTx AsShelleyEra )
59
-
60
50
-- Check the newly created files have not deviated from the
61
51
-- golden files
62
- checkTextEnvelopeFormat txType referenceTx transactionFile
52
+ checkTxCddlFormat referenceTx transactionFile
0 commit comments