@@ -26,14 +26,11 @@ import Hydra.Data.Party qualified as OnChain
26
26
import Hydra.Ledger.Cardano.Time (slotNoFromUTCTime )
27
27
import Hydra.Plutus.Orphans ()
28
28
import Hydra.Tx.ContestationPeriod (ContestationPeriod , toChain )
29
- import Hydra.Tx.Contract.Deposit (healthyDepositTx , healthyDepositUTxO )
30
29
import Hydra.Tx.Crypto (HydraKey , MultiSignature (.. ), aggregate , sign , toPlutusSignatures )
31
30
import Hydra.Tx.Deposit qualified as Deposit
32
31
import Hydra.Tx.HeadId (mkHeadId )
33
32
import Hydra.Tx.HeadParameters (HeadParameters (.. ))
34
- import Hydra.Tx.Increment (
35
- incrementTx ,
36
- )
33
+ import Hydra.Tx.Increment (incrementTx )
37
34
import Hydra.Tx.Init (mkHeadOutput )
38
35
import Hydra.Tx.IsTx (IsTx (hashUTxO ))
39
36
import Hydra.Tx.Party (Party , deriveParty , partyToChain )
@@ -43,7 +40,7 @@ import Hydra.Tx.Utils (adaOnly)
43
40
import PlutusLedgerApi.V2 qualified as Plutus
44
41
import PlutusTx.Builtins (toBuiltin )
45
42
import Test.Hydra.Tx.Fixture (aliceSk , bobSk , carolSk , depositDeadline , slotLength , systemStart , testNetworkId , testPolicyId )
46
- import Test.Hydra.Tx.Gen (genForParty , genScriptRegistry , genUTxOSized , genValue , genVerificationKey )
43
+ import Test.Hydra.Tx.Gen (genForParty , genScriptRegistry , genUTxO , genUTxOSized , genValue , genVerificationKey )
47
44
import Test.QuickCheck (arbitrarySizedNatural , elements , oneof , suchThat )
48
45
import Test.QuickCheck.Instances ()
49
46
@@ -53,7 +50,7 @@ healthyIncrementTx =
53
50
where
54
51
lookupUTxO =
55
52
UTxO. singleton (headInput, headOutput)
56
- <> depositUTxO
53
+ <> healthyDepositUTxO
57
54
<> registryUTxO scriptRegistry
58
55
59
56
tx =
@@ -64,7 +61,7 @@ healthyIncrementTx =
64
61
parameters
65
62
(headInput, headOutput)
66
63
healthySnapshot
67
- depositUTxO
64
+ healthyDepositUTxO
68
65
(slotNoFromUTCTime systemStart slotLength depositDeadline)
69
66
healthySignature
70
67
@@ -83,8 +80,8 @@ healthyIncrementTx =
83
80
& addParticipationTokens healthyParticipants
84
81
& modifyTxOutValue (<> foldMap txOutValue healthyUTxO)
85
82
86
- depositUTxO :: UTxO
87
- depositUTxO = utxoFromTx ( fst healthyDepositTx)
83
+ healthyDepositUTxO :: UTxO
84
+ healthyDepositUTxO = genUTxO `generateWith` 42
88
85
89
86
somePartyCardanoVerificationKey :: VerificationKey PaymentKey
90
87
somePartyCardanoVerificationKey =
@@ -195,7 +192,7 @@ genIncrementMutation (tx, utxo) =
195
192
Head. IncrementRedeemer
196
193
{ signature = invalidSignature
197
194
, snapshotNumber = fromIntegral healthySnapshotNumber
198
- , increment = toPlutusTxOutRef $ fst $ List. head $ UTxO. pairs depositUTxO
195
+ , increment = toPlutusTxOutRef $ fst $ List. head $ UTxO. pairs healthyDepositUTxO
199
196
}
200
197
, SomeMutation (pure $ toErrorCode HeadValueIsNotPreserved ) ChangeHeadValue <$> do
201
198
newValue <- genValue `suchThat` (/= txOutValue headTxOut)
0 commit comments