Skip to content

Commit b9d581e

Browse files
authored
Merge pull request #64 from mlabs-haskell/bladyjoker/minor-additions
Added plutus-chain-index, polished the README and the coop-env
2 parents 57100b6 + 15a4392 commit b9d581e

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ mkdir $COOP_PAB_DIR
255255
mkdir $JS_STORE_DIR
256256
mkdir $COOP_PUBLISHER_DIR
257257
mkdir $CLUSTER_DIR $CLUSTER_DIR/scripts $CLUSTER_DIR/txs
258-
259258
```
260259

261260
#### 3. Running a local Cardano network
@@ -264,7 +263,6 @@ Let's first start by preparing and running a local Cardano network using the `lo
264263

265264
```sh
266265
export CLUSTER_DIR=.local-cluster WALLETS=.wallets
267-
mkdir $CLUSTER_DIR $CLUSTER_DIR/scripts $CLUSTER_DIR/txs $WALLETS
268266
local-cluster --dump-info-json $CLUSTER_DIR/local-cluster-info.json \
269267
--wallet-dir $WALLETS --num-wallets 10 --utxos 5 \
270268
--chain-index-port 9084 \
@@ -572,7 +570,7 @@ publish.
572570
First let's prepare and initialize the service:
573571
574572
```sh
575-
export JS_STORE_DIR=.json-fs-store && mkdir $JS_STORE_DIR
573+
export JS_STORE_DIR=.json-fs-store
576574
sqlite3 -batch $JS_STORE_DIR/json-store.db ""
577575
json-fs-store-cli genesis --db $JS_STORE_DIR/json-store.db
578576
generate-keys $JS_STORE_DIR
@@ -633,7 +631,7 @@ gRPC](coop-proto/fact-statement-store-service.proto) service.
633631
It's straightforward to run:
634632
635633
```sh
636-
export COOP_PUBLISHER_DIR=.coop-publisher-cli && mkdir $COOP_PUBLISHER_DIR
634+
export COOP_PUBLISHER_DIR=.coop-publisher-cli
637635
generate-keys $COOP_PUBLISHER_DIR
638636
coop-publisher-cli publisher-grpc
639637
```

coop-extras/coop-env/build.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ pkgs
22
, cardanoCli
33
, cardanoNode
4+
, chainIndex
45
, coopPabCli
56
, coopPlutusCli
67
, coopPublisherCli
@@ -19,6 +20,7 @@ pkgs.mkShell {
1920
nodejs
2021
grpcui
2122
grpcurl
23+
chainIndex
2224
cardanoCli
2325
cardanoNode
2426
coopPabCli
@@ -29,14 +31,21 @@ pkgs.mkShell {
2931
plutipLocalCluster
3032
];
3133
shellHook = ''
34+
echo "Making proto and resources symlinks"
35+
rm -f coop-proto
3236
ln -s ${../../coop-proto} coop-proto
37+
rm -f resources
3338
ln -s ${../../coop-pab/resources} resources
39+
echo "Sourcing ${./aux.bash}"
3440
. ${./aux.bash}
41+
echo "Running on-load"
3542
on-load
36-
echo "WARNING: Running COOP services requires having $ export LC_CTYPE=C.UTF-8 LC_ALL=C.UTF-8 LANG=C.UTF-8"
43+
# WARN(bladyjoker): Running COOP services requires having $ export LC_CTYPE=C.UTF-8 LC_ALL=C.UTF-8 LANG=C.UTF-8
44+
echo "Exporting locale"
3745
export LC_CTYPE=C.UTF-8
3846
export LC_ALL=C.UTF-8
3947
export LANG=C.UTF-8
4048
export PS1='\[\e[0m\][\[\e[0;1;38;5;142m\]coop-env \[\e[0m\]~ \[\e[0m\]\W\[\e[0m\]] \[\e[0m\]\$ \[\e[0m\]'
49+
echo "Done"
4150
'';
4251
}

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
iohk-nix.follows = "plutip/iohk-nix";
3131

3232
nixpkgs-fourmolu.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
33-
3433
};
3534
outputs =
3635
{ self
@@ -218,6 +217,7 @@
218217
inherit coopPabCli coopPlutusCli jsFsStoreCli coopPublisherCli plutusJsonCli;
219218
cardanoNode = coopPabProj.hsPkgs.cardano-node.components.exes.cardano-node;
220219
cardanoCli = coopPabProj.hsPkgs.cardano-cli.components.exes.cardano-cli;
220+
chainIndex = coopPabProj.hsPkgs.plutus-chain-index.components.exes.plutus-chain-index;
221221
};
222222

223223
renameAttrs = rnFn: pkgs.lib.attrsets.mapAttrs' (n: value: { name = rnFn n; inherit value; });

0 commit comments

Comments
 (0)