https://github.com/intersectmbo/plinth-template
This is a template repository for kickstarting your Plinth smart contract project. Please refer to the README.md for more information.
https://github.com/intersectmbo/plinth-template
Last synced: 5 months ago
JSON representation
This is a template repository for kickstarting your Plinth smart contract project. Please refer to the README.md for more information.
- Host: GitHub
- URL: https://github.com/intersectmbo/plinth-template
- Owner: IntersectMBO
- License: apache-2.0
- Created: 2024-03-19T14:04:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-12T12:02:23.000Z (9 months ago)
- Last Synced: 2025-06-12T13:20:30.818Z (9 months ago)
- Language: Haskell
- Homepage:
- Size: 158 KB
- Stars: 19
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Plinth Template Repository
A template repository for your Plinth smart contract project.
Plinth currently supports GHC `v9.6.x`. Cabal `v3.8+` is recommended.
### 1. Create the repository
- From the command line:
```
gh repo create my-project --private --template IntersectMBO/plinth-template
```
- Or from the [GitHub web page](https://github.com/IntersectMBO/plinth-template), 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](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).
### 2. Setup your development environment
With Nix (recommended)
1. Follow [these instructions](https://github.com/input-output-hk/iogx/blob/main/doc/nix-setup-guide.md) to install and configure nix, even if you already have it installed.
2. Then enter the shell using `nix develop`.
> NOTE:
> The nix files inside this template follow the [`iogx` template](https://github.com/input-output-hk/iogx), but you can delete and replace them with your own. In that case, you might want to include the [`devx` flake](https://github.com/input-output-hk/devx/issues) 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](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2) and the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) VSCode extension (if using VSCode) installed before the Nix setup.
With Docker / Devcontainer / Codespaces
- **Docker + Codespaces:** From the [GitHub web page](https://github.com/IntersectMBO/plinth-template), click the top-right green button:
`Use this template -> Open in a codespace`
- **Docker + Devcontainer:**
1. Make sure to have [VSCode](https://code.visualstudio.com/) installed with the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.
2. 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`](./.devcontainer/devcontainer.json) file to customize the container (more info [here](https://github.com/input-output-hk/devx?tab=readme-ov-file#vscode-devcontainer--github-codespace-support)).
> 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](https://docs.docker.com/desktop/setup/vm-vdi/).
With Demeter
1. Create an account in [Demeter](https://demeter.run/).
2. Follow [their instructions](https://docs.demeter.run/guides/getting-started) 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](https://developers.cardano.org/docs/get-started/cardano-node/installing-cardano-node/) for a custom setup.
> NOTE:
> When using this approach, you can ignore/delete/replace the Nix files entirely.
### 3. Run the example application
Run `cabal update` first, then read [Example: An Auction Smart Contract](https://plutus.cardano.intersectmbo.org/docs/category/example-an-auction-smart-contract) to get started.