A template repository for your Plinth smart contract project.
Plinth currently supports GHC v9.6.x
. Cabal v3.8+
is recommended.
-
From the command line:
gh repo create my-project --private --template IntersectMBO/plinth-template
-
Or from the GitHub web page, click the top-right green button:
Use this template -> Create new repository
-
Or just fork/clone
plinth-template
(but note that this is a template repository)More information on GitHub template repositories can be found here.
With Nix (recommended)
-
Follow these instructions to install and configure nix, even if you already have it installed.
-
Then enter the shell using
nix develop
.
NOTE:
The nix files inside this template follow theiogx
template, but you can delete and replace them with your own. In that case, you might want to include thedevx
flake in your flake inputs as a starting point to supply all the necessary dependencies, making sure to use one of the-iog
flavors.
NOTE (for Windows users):
Make sure to have WSL2 and the WSL VSCode extension (if using VSCode) installed before the Nix setup.
With Docker / Devcontainer / Codespaces
-
Docker + Codespaces: From the GitHub web page, click the top-right green button:
Use this template -> Open in a codespace
-
Docker + Devcontainer:
- Make sure to have VSCode installed with the Dev Containers extension.
- Open this project in VSCode and let it create a local codespace for you (See Dev Containers instructions, if needed).
-
Stand-alone Docker: Change the
/path/to/my-project
accordingly and run:
docker run \
-v /path/to/my-project:/workspaces/my-project \
-it ghcr.io/input-output-hk/devx-devcontainer:x86_64-linux.ghc96-iog
NOTE: You can modify your
devcontainer.json
file to customize the container (more info here).
NOTE:
When using this approach, you can ignore/delete/replace the Nix files entirely.
NOTE (for Windows users):
It is recommended to install and run Docker on your native OS. If you want to run Docker Desktop inside a VM, read through these notes.
With Demeter
-
Create an account in Demeter.
-
Follow their instructions to setup a remote development environment.
IMPORTANT:
Demeter uses its own infrastructure and packages. If something is not working correctly, please contact them before creating an issue.
NOTE:
When using this approach, you can ignore/delete/replace the Nix files entirely.
With manually-installed dependencies (not recommended)
Follow the instructions for cardano-node for a custom setup.
NOTE:
When using this approach, you can ignore/delete/replace the Nix files entirely.
Run cabal update
first, then read Example: An Auction Smart Contract to get started.