- Clone plutus-apps repository and this repository.
- Enter cloned
plutus-apps
repository and checkout the tag corresponding to that mentioned in this repository'scabal.project
file. - Run
nix-shell
(make sure you have setupnix
properly, as outlined here). - Inside
nix
shell, enter the directory for this repository and execute:cabal configure -f defer-plugin-errors # See https://cardano.stackexchange.com/questions/459/haskell-ide-inlinable-error-help/6554#6554 cabal update cabal build
- In a new shell (not inside
nix-shell
), open this directory inside your editor (sayneovim
). When you open, say PDR.Validator.hs, your HLS will take some time to get ready and then it should work. - Back in shell inside
nix
, can runcabal exec generate-PDR-files
to generate relevant files forPDR
contract which is an example contract illustrating how to use custom datum & custom redeemer in a parameterized contract.
Note I needed to have
postgresql
installed on my system so that HLS doesn't complain.
- cabal.project is mostly copy-paste of corresponding file from plutus-apps repository for the corresponding tag (this is necessary because the
plutus-apps
libraries depend on a number of other libraries which are not on Hackage, and so need to be pulled in assource-repository-package
s themselves), I have clearly mentioned my additions and their rational in this file. To update this template, you would need to update this file and perhaps other example files if their is any breaking change.
Note
hie.yaml
file was generated with the help ofimplicit-hie
. And the usual drill for that is after you have executedcabal build
, executegen-hie > hie.yaml
.