Module

Ctl.Internal.Plutip.Server

#checkPlutipServer

#runPlutipContract

runPlutipContract :: forall (distr :: Type) (wallets :: Type) (a :: Type). UtxoDistribution distr wallets => PlutipConfig -> distr -> (wallets -> Contract a) -> Aff a

Run a single Contract in Plutip environment.

#runPlutipTestPlan

runPlutipTestPlan :: PlutipConfig -> ContractTestPlan -> TestPlanM (Aff Unit) Unit

Run a ContractTestPlan in a (single) Plutip environment. Supports wallet reuse - see docs on sharing wallet state between wallets in doc/plutip-testing.md.

#startPlutipCluster

startPlutipCluster :: PlutipConfig -> InitialUTxODistribution -> Aff (PrivatePaymentKey /\ ClusterStartupParameters)

Start the plutip cluster, initializing the state with the given UTxO distribution. Also initializes an extra payment key (aka ourKey) with some UTxOs for use with further plutip setup. ourKey has funds proportional to the total amount of the UTxOs in the passed distribution, so it can be used to handle transaction fees.

#stopChildProcessWithPort

stopChildProcessWithPort :: UInt -> ManagedProcess -> Aff Unit

Kill a process and wait for it to stop listening on a specific port.

#testPlutipContracts

testPlutipContracts :: PlutipConfig -> TestPlanM ContractTest Unit -> TestPlanM (Aff Unit) Unit

Run several Contracts in tests in a (single) Plutip environment (plutip-server and cluster, kupo, etc.). NOTE: This uses MoteTs bracketing, and thus has the same caveats. Namely, brackets are run for each of the top-level groups and tests inside the bracket. If you wish to only set up Plutip once, ensure all tests that are passed to testPlutipContracts are wrapped in a single group. https://github.com/Plutonomicon/cardano-transaction-lib/blob/develop/doc/plutip-testing.md#testing-with-mote

#withPlutipContractEnv

withPlutipContractEnv :: forall (distr :: Type) (wallets :: Type) (a :: Type). UtxoDistribution distr wallets => PlutipConfig -> distr -> (ContractEnv -> wallets -> Aff a) -> Aff a

Provide a ContractEnv connected to Plutip. can be used to run multiple Contracts using runContractInEnv.

Modules