Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
- Cardano.Testnet re-exports
Synopsis
- data Setup
- withPrivnet ∷ CardanoTestnetOptions → (Setup → IO ()) → IO ()
- withSetup ∷ (String → IO ()) → Setup → (Ctx → IO ()) → IO ()
- withSetup' ∷ GYLogSeverity → (String → IO ()) → Setup → (Ctx → IO ()) → IO ()
- withSetupOld ∷ Setup → (String → IO ()) → (Ctx → IO ()) → IO ()
- mkPrivnetTestFor ∷ TestName → Setup → (TestInfo → GYTxGameMonadIO ()) → TestTree
- mkPrivnetTestFor' ∷ TestName → GYLogSeverity → Setup → (TestInfo → GYTxGameMonadIO ()) → TestTree
- cardanoDefaultTestnetOptions ∷ CardanoTestnetOptions
- cardanoDefaultTestnetOptionsConway ∷ CardanoTestnetOptions
- cardanoDefaultTestnetNodeOptions ∷ [TestnetNodeOptions]
- data CardanoTestnetOptions = CardanoTestnetOptions {
- cardanoNodes ∷ [TestnetNodeOptions]
- cardanoNodeEra ∷ AnyCardanoEra
- cardanoEpochLength ∷ Int
- cardanoSlotLength ∷ Double
- cardanoTestnetMagic ∷ Int
- cardanoActiveSlotsCoeff ∷ Double
- cardanoMaxSupply ∷ Word64
- cardanoEnableP2P ∷ Bool
- cardanoNodeLoggingFormat ∷ NodeLoggingFormat
- cardanoNumDReps ∷ Int
- cardanoEnableNewEpochStateLogging ∷ Bool
- data TestnetNodeOptions = SpoTestnetNodeOptions (Maybe NodeConfigurationYaml) [String]
- data NodeLoggingFormat
- newtype NodeConfigurationYaml = NodeConfigurationYaml {}
Documentation
This setup represents a three argument function where first two arguments are for logging & third is for the continuation, in need of Ctx
.
Once these arguments are given to this function, it will give Ctx
to the continuation, where the logging part (the ctxLog
) of Ctx
would be obtained from the first two arguments of this function.
The first argument is the log severity filter. Only logs of this severity or higher will be passed on to the second argument, which is a logging action.
withPrivnet ∷ CardanoTestnetOptions → (Setup → IO ()) → IO () #
Spawn a resource managed privnet and do things with it (closing it in the end).
Privnet can be configured using Cardano.Testnet.CardanoTestnetOptions. Pass cardanoDefaultTestnetOptionsConway
for default configuration.
Note that passed CardanoTestnetOptions
must imply Conway era.
Returns continuation on Setup
, which is essentially a function that performs an action
given a logging -- function and the action itself (which receives the Privnet Ctx).
withSetup ∷ (String → IO ()) → Setup → (Ctx → IO ()) → IO () #
Calls the Setup
function with a logging function that receives info severity logs, and the action you wish to use with the privnet.
withSetup' ∷ GYLogSeverity → (String → IO ()) → Setup → (Ctx → IO ()) → IO () #
Calls the Setup
function with target logging severity, a logging function and the action you wish to use with the privnet.
mkPrivnetTestFor ∷ TestName → Setup → (TestInfo → GYTxGameMonadIO ()) → TestTree #
Given a test name, runs the test under privnet.
mkPrivnetTestFor' ∷ TestName → GYLogSeverity → Setup → (TestInfo → GYTxGameMonadIO ()) → TestTree #
Given a test name, runs the test under privnet with target logging severity.
Cardano.Testnet re-exports
data CardanoTestnetOptions #
CardanoTestnetOptions | |
|
Instances
Show CardanoTestnetOptions | |
Defined in Testnet.Start.Types | |
Eq CardanoTestnetOptions | |
Defined in Testnet.Start.Types |
data TestnetNodeOptions #
Specify a BFT node (Pre-Babbage era only) or an SPO (Shelley era onwards only)
SpoTestnetNodeOptions (Maybe NodeConfigurationYaml) [String] | These arguments will be appended to the default set of CLI options when starting the node. |
Instances
Show TestnetNodeOptions | |
Defined in Testnet.Start.Types showsPrec ∷ Int → TestnetNodeOptions → ShowS # show ∷ TestnetNodeOptions → String # showList ∷ [TestnetNodeOptions] → ShowS # | |
Eq TestnetNodeOptions | |
Defined in Testnet.Start.Types |
data NodeLoggingFormat #
Instances
Show NodeLoggingFormat | |
Defined in Testnet.Start.Types showsPrec ∷ Int → NodeLoggingFormat → ShowS # show ∷ NodeLoggingFormat → String # showList ∷ [NodeLoggingFormat] → ShowS # | |
Eq NodeLoggingFormat | |
Defined in Testnet.Start.Types |
newtype NodeConfigurationYaml #
Instances
Show NodeConfigurationYaml | |
Defined in Testnet.Start.Types | |
Eq NodeConfigurationYaml | |
Defined in Testnet.Start.Types |