Absolutely β hereβs your README.md upgraded with professional icons (from GitHubβs emoji set) for each section, while keeping the numbered format, clean hierarchy, and glossary at the end.
# π§ 1. Auction Validator Project
Updated by **Coxygen Global β Bernard Sibanda**
> π‘ Plinth currently supports **GHC 9.6.x** and **Cabal 3.8+** (recommended).
---
## π 2. Table of Contents
1. [π§ Auction Validator Project](#-1-auction-validator-project)
2. [π Table of Contents](#-2-table-of-contents)
3. [βοΈ Overview](#οΈ-3-overview)
4. [β¨ Features](#-4-features)
5. [ποΈ Architecture](#οΈ-5-architecture)
6. [π Prerequisites](#-6-prerequisites)
7. [β‘ Quick Start](#-7-quick-start)
8. [π οΈ Installation & Build](#οΈ-8-installation--build)
9. [π§ͺ Testing](#-9-testing)
10. [π Property-Based Testing](#-10-property-based-testing)
11. [π Usage](#-11-usage)
12. [βοΈ Configuration](#οΈ-12-configuration)
13. [π Directory Structure](#-13-directory-structure)
14. [π Development Workflow](#-14-development-workflow)
15. [π€ CI/CD (Optional)](#-15-cicd-optional)
16. [π§― Troubleshooting](#-16-troubleshooting)
17. [π¬ FAQ](#-17-faq)
18. [π€ Contributing](#-18-contributing)
19. [π License](#-19-license)
20. [π Glossary](#-20-glossary)
---
## βοΈ 3. Overview
This repository contains a **Plutus-based Auction Validator** and **Minting Policy**.
It includes **Blueprint generators**, **property-based tests**, and **development tooling**.
The project is based on the **Plinth Template** for teaching on-chain Cardano smart contract development.
---
## β¨ 4. Features
- πͺ On-chain **Auction Validator** (bid, close, payout logic)
- π§± **Minting Policy** for auction tokens
- π§© **Blueprint** generation tools for off-chain deployment
- π§ͺ **Unit tests** and **property-based tests**
- π§° **Nix** and **Devcontainer** support for reproducibility
- π Modular Cabal/Nix structure for teaching and reuse
---
## ποΈ 5. Architecture
| Layer | Purpose |
|-------|----------|
| π§ **On-chain Logic** | Implemented in `src/AuctionValidator.hs`. |
| π§° **Executables** | Blueprint generators under `app/`. |
| π§ͺ **Tests** | Unit + property suites under `test/`. |
| βοΈ **Infrastructure** | Cabal/Nix build environment. |
---
## π 6. Prerequisites
- **GHC** `9.6.x`
- **Cabal** `3.8+`
- **Nix** *(optional)*
- **Docker / Devcontainer** *(optional)*
> π§© If not using Nix, install via [Haskell Platform](https://www.haskell.org/platform/) or `ghcup`.
---
## β‘ 7. Quick Start
```bash
# 1οΈβ£ Enter Nix shell (recommended)
nix-shell
# 2οΈβ£ Update Cabal package index
cabal update
# 3οΈβ£ Build project and tests
cabal build --enable-tests
# 4οΈβ£ Run test suite
cabal test-
Enter Nix shell (optional)
nix-shell
-
Update Cabal index
cabal update
-
Build project
cabal build --enable-tests
-
Generate Blueprints
cabal run gen-auction-validator-blueprint -- ./blueprint-auction.json cabal run gen-minting-policy-blueprint -- ./blueprint-minting.json
cabal test auction-testscabal testExample Cabal config:
test-suite auction-properties
type: exitcode-stdio-1.0
main-is: AuctionValidatorProperties.hs
hs-source-dirs: test
build-depends:
base >=4.7 && <5
, QuickCheck
, plutus-ledger-api
, plutus-tx
, scripts
default-language: Haskell2010Run:
cabal test auction-properties- Customize parameters in
app/GenAuctionValidatorBlueprint.hs(e.g. seller, token name, min bid, end time). - Generate blueprint JSONs via Cabal commands.
- Deploy the compiled Plutus scripts to Cardano network.
- Verify with unit and property-based tests.
-
Project settings:
cabal.project,auction.cabal -
Local overrides:
cabal.project.local -
To ignore local configs:
echo "cabal.project.local" >> .gitignore
auction/
βββ app/ # Executables (Blueprint generators)
β βββ GenAuctionValidatorBlueprint.hs
β βββ GenMintingPolicyBlueprint.hs
βββ src/ # On-chain modules
β βββ AuctionValidator.hs
βββ test/ # Tests
β βββ AuctionValidatorSpec.hs
β βββ AuctionMintingPolicySpec.hs
β βββ AuctionValidatorProperties.hs
βββ default.nix
βββ shell.nix
βββ auction.cabal
βββ cabal.project
βββ cabal.project.local
- πΏ Create a new branch
- π§± Make modular commits
- β
Run
cabal test - π§Ή Format and lint
- π Merge via PR
- π·οΈ Tag releases
- π§° Build & Test:
cabal build --enable-tests && cabal test - π¦ Artifacts: Upload blueprint JSONs, logs, etc.
- β‘ Cache: Use Cabal store caching for faster pipelines.
| Issue | Fix |
|---|---|
| Build fails | cabal clean && cabal update && cabal build --enable-tests |
| Wrong compiler | Use ghc --version β must be 9.6.x |
| Nix errors | Try nix develop or update flakes |
| Devcontainer fails | Check Docker Desktop / VSCode extensions |
Q: Do I need Nix? A: No. Itβs optional but ensures reproducibility.
Q: Where do I change auction parameters?
A: In GenAuctionValidatorBlueprint.hs.
Q: How do I run only property tests?
A: cabal test auction-properties
- π΄ Fork this repo
- πΏ Branch from
main - π§© Add code + tests
- π Verify with
cabal test - π¨ Open a Pull Request
Released under the MIT License (or your organizationβs chosen license).
See the LICENSE file for details.
| Icon | Term | Description |
|---|---|---|
| βοΈ | Cabal | Haskellβs package manager and build tool. |
| π§ | GHC | The Glasgow Haskell Compiler. |
| π | Plutus | Cardanoβs smart contract platform. |
| π§Ύ | Blueprint | JSON representation of a Plutus script and parameters. |
| π§© | ScriptContext | Context for execution (TxInfo, ScriptPurpose). |
| π | TxInfo | Transaction metadata passed to the validator. |
| π§ͺ | QuickCheck | Haskell property-based testing framework. |
| π§ | hspec | Behavior-driven testing framework for Haskell. |
| πΊοΈ | AssocMap | Plutus internal keyβvalue map type. |
π§ Maintained by Coxygen Global β Bernard Sibanda π Last updated: 15 September 2025
---
Would you like me to include **badge icons** (like build status, license, test coverage) at the top β for a GitHub-ready header? Those make it look extra professional for open-source repos.