You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Set up your machine to build things with Nix, following the Plutus README (make sure to set up the binary cache!)
10
11
11
-
## The Plutus Application Backend (PAB) example
12
+
## The Plutus Application Backend (PAB) usage
12
13
13
-
We have provided an example PAB application in `./pab`. With the PAB we can serve and interact
14
-
with contracts over a web API. You can read more about the PAB here: [PAB Architecture](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/ARCHITECTURE.adoc).
14
+
We have provided two PAB applications in `./pab` and `./pab-simulation`. The first one is made for real world usage and interaction through frontend [client](client/README.md), the second one is a big test scenario.
15
+
With the PAB we can serve and interact with contracts over a web API. You can read more about the PAB here: [PAB Architecture](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/ARCHITECTURE.adoc).
15
16
16
17
1. Enter the nix shell (cd to the cloned Plutus repo):
The client application has a minimalistic interface to the PAB [server](/MetaLamp/lending-pool/README.md).
2
4
3
5
## Running the project
4
6
7
+
1. Install npm packages.
8
+
5
9
```
6
10
npm install
7
11
```
8
12
13
+
2. Generate necessary PureScript code from Haskell source. This step runs an executable(`generate-purs`) from `lending-pool` directory, which requires a certain environment. The setup steps are described in `lending-pool/README`. Provided that you are able to build the backend, you can use the same approach to run purescript generation from `client` folder, i.e.
14
+
15
+
Enter the nix shell (cd to the cloned Plutus repo):
CORS protection needs to be disabled. You can use this script to launch chrome:
34
+
4. Open browser to interact with the app at https://localhost:8009/.
35
+
CORS protection needs to be disabled. You can use this script to launch chromium (note that first you need to close chromium completely, otherwise security won't be disabled):
14
36
15
37
```
16
38
npm run start-chrome
17
39
```
40
+
41
+
## Troubleshooting
42
+
43
+
Sometimes the build results in error with Haskell IDE enabled. If the build does not work or the app behaves strangely, disable IDE and clean all source files:
44
+
45
+
```
46
+
cd MetaLamp/lending-pool/ && cabal clean
47
+
```
48
+
49
+
```
50
+
cd MetaLamp/lending-pool/client && rm -rf node_modules/ generated/ output/ plutus-purs/ .spago/
0 commit comments