@@ -90,6 +90,7 @@ import Hydra.Tx (
9090 utxoFromTx ,
9191 withoutUTxO ,
9292 )
93+ import Hydra.Tx.Accumulator (HasAccumulatorElement )
9394import Hydra.Tx.Accumulator qualified as Accumulator
9495import Hydra.Tx.Crypto (
9596 Signature ,
@@ -296,7 +297,7 @@ onOpenClientNewTx tx =
296297--
297298-- __Transition__: 'OpenState' → 'OpenState'
298299onOpenNetworkReqTx ::
299- IsTx tx =>
300+ HasAccumulatorElement tx =>
300301 Environment ->
301302 Ledger tx ->
302303 ChainSlot ->
@@ -387,7 +388,7 @@ onOpenNetworkReqTx env ledger currentSlot st ttl tx =
387388--
388389-- __Transition__: 'OpenState' → 'OpenState'
389390onOpenNetworkReqSn ::
390- IsTx tx =>
391+ HasAccumulatorElement tx =>
391392 Environment ->
392393 Ledger tx ->
393394 PendingDeposits tx ->
@@ -839,7 +840,7 @@ onOpenClientDecommit headId ledger currentSlot coordinatedHeadState decommitTx =
839840-- be taken out of a Head.
840841-- - Check if we are the leader
841842onOpenNetworkReqDec ::
842- IsTx tx =>
843+ HasAccumulatorElement tx =>
843844 Environment ->
844845 Ledger tx ->
845846 TTL ->
@@ -972,7 +973,7 @@ onChainTick env pendingDeposits chainTime =
972973--
973974-- This is primarily used to track deposits and either drop them or request
974975-- snapshots for inclusion.
975- onOpenChainTick :: IsTx tx => Environment -> UTCTime -> PendingDeposits tx -> OpenState tx -> Outcome tx
976+ onOpenChainTick :: HasAccumulatorElement tx => Environment -> UTCTime -> PendingDeposits tx -> OpenState tx -> Outcome tx
976977onOpenChainTick env chainTime pendingDeposits st =
977978 -- Determine new active and new expired
978979 let nextDeposits = determineNextDepositStatus env pendingDeposits chainTime
@@ -1119,7 +1120,7 @@ onOpenClientClose st =
11191120--
11201121-- __Transition__: 'OpenState' → 'ClosedState'
11211122onOpenChainCloseTx ::
1122- IsTx tx =>
1123+ HasAccumulatorElement tx =>
11231124 OpenState tx ->
11241125 -- | New chain state.
11251126 ChainStateType tx ->
@@ -1172,7 +1173,7 @@ onOpenChainCloseTx openState newChainState closedSnapshotNumber contestationDead
11721173-- Besides the above, it is expected to work very much like the confirmed snapshot.
11731174--
11741175-- __Transition__: 'OpenState' → 'OpenState'
1175- onOpenClientSideLoadSnapshot :: IsTx tx => OpenState tx -> ConfirmedSnapshot tx -> Outcome tx
1176+ onOpenClientSideLoadSnapshot :: HasAccumulatorElement tx => OpenState tx -> ConfirmedSnapshot tx -> Outcome tx
11761177onOpenClientSideLoadSnapshot openState requestedConfirmedSnapshot =
11771178 case requestedConfirmedSnapshot of
11781179 InitialSnapshot {} ->
@@ -1242,7 +1243,7 @@ onOpenClientSideLoadSnapshot openState requestedConfirmedSnapshot =
12421243--
12431244-- __Transition__: 'ClosedState' → 'ClosedState'
12441245onClosedChainContestTx ::
1245- IsTx tx =>
1246+ HasAccumulatorElement tx =>
12461247 ClosedState tx ->
12471248 -- | New chain state.
12481249 ChainStateType tx ->
@@ -1287,7 +1288,7 @@ onClosedChainContestTx closedState newChainState snapshotNumber contestationDead
12871288--
12881289-- __Transition__: 'ClosedState' → 'ClosedState'
12891290onClosedClientFanout ::
1290- IsTx tx =>
1291+ HasAccumulatorElement tx =>
12911292 ClosedState tx ->
12921293 Outcome tx
12931294onClosedClientFanout closedState =
@@ -1339,7 +1340,7 @@ onClosedChainFanoutTx closedState newChainState fanoutUTxO =
13391340-- 'Effect's, in case it is processed successfully. Later, the Node will
13401341-- 'aggregate' the events, resulting in a new 'HeadState'.
13411342update ::
1342- IsChainState tx =>
1343+ ( IsChainState tx , HasAccumulatorElement tx ) =>
13431344 Environment ->
13441345 Ledger tx ->
13451346 -- | Current NodeState to validate the command against.
0 commit comments