Module

Contract.Test

Re-exports from Contract.Wallet

#withKeyWallet

withKeyWallet :: forall (a :: Type). KeyWallet -> Contract a -> Contract a

Re-exports from Ctl.Internal.Test.ContractTest

#ContractTest

newtype ContractTest

Represents a Contract test suite that depend on some wallet UtxoDistribution.

Constructors

#withWallets

withWallets :: forall (distr :: Type) (wallets :: Type). UtxoDistribution distr wallets => distr -> (wallets -> Contract Unit) -> ContractTest

Store a wallet UtxoDistribution and a Contract that depends on those wallets

#noWallet

noWallet :: Contract Unit -> ContractTest

Lift a Contract into ContractTest

Re-exports from Ctl.Internal.Test.KeyDir

#runContractTestsWithKeyDir

runContractTestsWithKeyDir :: ContractParams -> FilePath -> TestPlanM ContractTest Unit -> TestPlanM (Aff Unit) Unit

Runs ContractTests given a ContractParams value.

This function can be used to interpret TestPlanM ContractTest in any environment.

Tests are funded by the wallet in the supplied Contract environment. The FilePath parameter should point to a directory to store generated private keys (to make sure that no funds or on-chain state are lost).

Re-exports from Ctl.Internal.Test.UtxoDistribution

#UtxoAmount

type UtxoAmount = BigNum

UTxO amount in Lovelaces

#InitialUTxOsWithStakeKey

data InitialUTxOsWithStakeKey

A wrapper that allows to specify a stake key to attach to a generated pre-funded Address.

Instances

#InitialUTxOs

#InitialUTxODistribution

type InitialUTxODistribution = Array InitialUTxOs

A spec for distribution of UTxOs between wallets.

#UtxoDistribution

class UtxoDistribution distr wallets | distr -> wallets

A type class that implements a type-safe interface for specifying UTXO distribution for wallets. Number of wallets in distribution specification matches the number of wallets provided to the user.

Instances

Modules