Module

Ctl.Internal.Test.E2E.Route

#E2ETestName

type E2ETestName = String

A name of some particular test. Used in the URL

#E2EConfigName

type E2EConfigName = String

A name of some particular E2E test environment (ContractParams and possible CIP-30 mock). Used in the URL for routing

#route

route :: Map E2EConfigName (ContractParams /\ (Maybe String)) -> Map E2ETestName (Contract Unit) -> Effect Unit

Serves given examples conditionally, depending on the URL query part.

The structure of the query string should be one of:

E2EConfigName:E2ETestName
E2EConfigName:E2ETestName:PrivatePaymentKeyCborHex
E2EConfigName:E2ETestName:PrivatePaymentKeyCborHex:PrivateStakeKeyCborHex

Examples:

gero:MintsMultiple
eternl:AlwaysSucceeds:58200b07c066ba037344acee5431e6df41f6034bf1c5ffd6f803751e356807c6a209
nami-mock:MintsMultiple:58200b07c066ba037344acee5431e6df41f6034bf1c5ffd6f803751e356807c6a209:5820f0db841df6c7fbc4506c58fad6676db0354a02dfd26efca445715a8adeabc338

In case that for the specified E2EConfigName a WalletMock is provided (present in the Map), but no private keys are given, this function assumes that the test is running on a local cluster, and pre-funded keys from the cluster should be used. If there's no local cluster, an error will be thrown.

#Route

type Route = { configName :: E2EConfigName, paymentKey :: Maybe PrivatePaymentKey, stakeKey :: Maybe PrivateStakeKey, testName :: E2ETestName }

Router state - parsed from URL by parseRoute

Modules