@@ -1492,20 +1492,23 @@ freshKeyPair = do
14921492
14931493-- | Generate a random `Addr` that uses a `KeyHash`, and add the corresponding `KeyPair`
14941494-- to the known keys in the Imp state.
1495- freshKeyAddr_ ::
1496- (HasKeyPairs s , MonadState s m , HasStatefulGen g m , MonadGen m ) => m Addr
1495+ freshKeyAddr_ :: EraGov era => ImpTestM era Addr
14971496freshKeyAddr_ = snd <$> freshKeyAddr
14981497
14991498-- | Generate a random `Addr` that uses a `KeyHash`, add the corresponding `KeyPair`
15001499-- to the known keys in the Imp state, and return the `KeyHash` as well as the `Addr`.
1501- freshKeyAddr ::
1502- (HasKeyPairs s , MonadState s m , HasStatefulGen g m , MonadGen m ) =>
1503- m (KeyHash Payment , Addr )
1500+ freshKeyAddr :: EraGov era => ImpTestM era (KeyHash Payment , Addr )
15041501freshKeyAddr = do
1502+ ProtVer pv _ <- getProtVer
15051503 paymentKeyHash <- freshKeyHash @ Payment
15061504 stakingKeyHash <-
1507- oneof
1508- [Just . mkStakeRef <$> freshKeyHash @ Staking , Just . mkStakeRef @ Ptr <$> arbitrary, pure Nothing ]
1505+ oneof $
1506+ [ Just . mkStakeRef <$> freshKeyHash @ Staking
1507+ , pure Nothing
1508+ ]
1509+ <> [ Just . mkStakeRef @ Ptr <$> arbitrary
1510+ | pv < natVersion @ 12
1511+ ]
15091512 pure (paymentKeyHash, mkAddr paymentKeyHash stakingKeyHash)
15101513
15111514-- | Looks up the keypair corresponding to the `BootstrapAddress`. The `BootstrapAddress`
0 commit comments