Skip to content

Commit f8f9e46

Browse files
authored
Merge pull request #129 from mlabs-haskell/master-docs-fixes
small docs fixes
2 parents 8616acc + b5883c2 commit f8f9e46

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ If your project is importing and making use of `Plutip`s library you will need t
1111

1212
And the following ghc flag must to be set for the test execution: `-Wall -threaded -rtsopts`
1313

14+
NOTE: This branch launches local network in Vasil. Please use appropriate node version if running w/o Nix. It was tested with node `1.35.3`.
15+
1416
## Usage
1517

1618
Plutip provides a tasty interface for executing Plutus contracts on a local cluster.
@@ -55,7 +57,3 @@ tests =
5557
For more, see `Test.Plutip.LocalCluster` `Test.Plutip.Contract`.
5658

5759
More examples could be found [here](test/Spec/Integration.hs).
58-
59-
## Known limitations
60-
61-
At the moment underlying mechanisms that execute contract do not support `awaitTxConfirmed`. As one possible solution, `waitNSlots n` can be used instead. We are working on it.

local-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ As long as the cluster is not stopped, the relay node can be used for arbitrary
66

77
The node socket path can be obtained from console output.
88

9-
NOTE: This branch currently starts local network in Alonzo era. Stable branch that not yet merged to master, but can start local network in Babbage era, can be found [here](https://github.com/mlabs-haskell/plutip/tree/gergely/vasil/local-cluster).
9+
NOTE: This branch launches local network in Vasil. Please use appropriate node version if running w/o Nix. It was tested with node `1.35.3`.
1010

1111
The `Main.hs` module can also serve as an example of how to make your own executable for starting local cluster with funded wallets. Note that when wallet is added with `addSomeWallet` it is recommended to wait some time (1 or 2 seconds) with `waitSeconds` while funding transaction is sent and confirmed.
1212

src/Test/Plutip/Config.hs

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import GHC.Generics (Generic)
99
import GHC.Natural (Natural)
1010

1111
-- | Configuration for the cluster working directory
12-
-- This determines where the node database, chain-index database, and bot-plutus-interface files will be stored for a running cluster
12+
-- This determines where the node database, chain-index database,
13+
-- and bot-plutus-interface files will be stored for a running cluster
1314
--
1415
-- @since 0.2
1516
data WorkingDirectory
@@ -19,7 +20,8 @@ data WorkingDirectory
1920
Fixed
2021
{ -- | Path to store cluster data, can be relative or absolute
2122
path :: FilePath
22-
, -- | Should the working data be kept on disk after cluster shutdown. Full directory will be deleted on shutdown if False
23+
, -- | Should the working data be kept on disk after cluster shutdown.
24+
-- Full directory will be deleted on shutdown if False
2325
shouldKeep :: Bool
2426
}
2527
deriving stock (Generic, Show)

src/Test/Plutip/Contract.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ withContractAs walletIdx toContract = do
332332
valuesAtWallet :: Contract w s e (NonEmpty Value)
333333
valuesAtWallet =
334334
void (waitNSlots 1)
335-
>> traverse (valueAt . (`pubKeyHashAddress` Nothing)) collectValuesPkhs -- debug: waiting exact time instead
335+
>> traverse (valueAt . (`pubKeyHashAddress` Nothing)) collectValuesPkhs
336336

337337
-- run the test contract
338338
execRes <- liftIO $ runContract cEnv ownWallet (toContract otherWalletsPkhs)

src/Test/Plutip/Predicate.hs

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ import Data.Map (Map)
2929
import Data.Map qualified as Map
3030
import Ledger (ExBudget (ExBudget), ExCPU (ExCPU), ExMemory (ExMemory), TxId, Value)
3131
import PlutusCore.Evaluation.Machine.ExMemory (CostingInteger)
32-
import Prettyprinter (Doc, align, defaultLayoutOptions, indent, layoutPretty, viaShow, vsep, (<+>))
32+
import Prettyprinter (
33+
Doc,
34+
align,
35+
defaultLayoutOptions,
36+
indent,
37+
layoutPretty,
38+
viaShow,
39+
vsep,
40+
(<+>),
41+
)
3342
import Prettyprinter.Render.String (renderString)
3443
import Test.Plutip.Internal.Types (
3544
ExecutionResult (ExecutionResult, contractState, outcome),

test/Spec/Test/Plutip/BotPlutusInterface.hs

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ import Network.HTTP.Client (
1111
)
1212
import Network.HTTP.Types.Status (status200)
1313
import System.Directory (doesDirectoryExist, doesFileExist)
14-
import Test.Plutip.Internal.BotPlutusInterface.Setup (keysDir, metadataDir, pParamsFile, scriptsDir, txsDir)
14+
import Test.Plutip.Internal.BotPlutusInterface.Setup (
15+
keysDir,
16+
metadataDir,
17+
pParamsFile,
18+
scriptsDir,
19+
txsDir,
20+
)
1521
import Test.Plutip.Internal.LocalCluster (withPlutusInterface)
1622
import Test.Tasty (TestTree)
1723
import Test.Tasty.HUnit (assertBool, testCase)

0 commit comments

Comments
 (0)