Repository: https://github.com/AIQUANT13/pla-smart-contract-main.git
This folder contains the Haskell / Plutus smart contract modules used by the Plastiks project. The contracts implement minting, burning, role-based access control, account verification, and additional on-chain logic used by the application. Use this README as a quick reference for the files in the SmartContract/ directory and basic developer instructions.
Below are the files visible in the SmartContract directory and a short description for each.
-
PCMint.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PCMint.hs
- Primary minting contract (Plutus validator or minting policy) for plastic credits/tokens. Entry points for mint operations and on-chain validation logic.
-
PCMintV2.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PCMintV2.hs
- Second version of the
PCMintmodule. Likely contains fixes, improved validation, or an updated datum/redeemer layout and additional tests.
Smart Contract Address in Test Net (PreProd)
addr_test1wpahup46jmrujnlamnuv3ldwmeag8czvmz95rlthdunfepcew7fpu
- Second version of the
-
PlastikBurner.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PlastikBurner.hs
-
Burning policy/validator for retiring tokens or credits. Responsible for validating and authorizing token burn operations.
Smart Contract Address in Test Net (PreProd)
addr_test1wq8edj8x3rza25v5r0xxr6k0xw2e58jsdnmanuwz9ctzlysyevp7x
-
-
PlastikCryptoV2.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PlastikCryptoV2.hs
- Cryptographic helpers, signature verification, voucher verification functions and utilities used by other validators. (E.g., verifying seller vouchers, price signatures, or PRG vouchers.)
Smart Contract Address in Test Net (PreProd)
addr_test1wpyxpyn302xjurwsc2cv4nqmgv8whcj52uycp3lvp3l6jxct36md8
-
PlastikPRGV3OnChain.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PlastikPRGV3OnChain.hs
- On-chain portion of a PRG (pseudo-random generator) or PRG-backed voucher/claim logic (version 3). Contains validators that run fully on-chain.
Smart Contract Address in Test Net (PreProd)
addr_test1wpahup46jmrujnlamnuv3ldwmeag8czvmz95rlthdunfepcew7fpu
-
PlastikRecoveryProjects.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PlastikRecoveryProjects.hs
- Validator or helper code to recover or manage project state on-chain. Might include recovery flows or project-level state transitions.
Smart Contract Address in Test Net (PreProd)
addr_test1wqex6he42tmmptjxmadyudj6p6r6y9j2u4gnc8h69aum34cjyw66t
-
PlastikRoleV2.hs http://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PlastikRoleV2.hs
- Role-based validator implementing roles and permissions (e.g.,
GrantMinter,VerifyMinter). Likely used to manage role assignment on-chain and ensure only authorized actions occur.
Smart Contract Address in Test Net (PreProd)
addr_test1wrkpklgh9grqn36pjtsvl206xuxvmjv2krh3wz33twzs2hqjc0hur
- Role-based validator implementing roles and permissions (e.g.,
-
PlastikTokenMint.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/PlastikTokenMint.hs
- Token minting policy that defines token issuance rules, supply constraints and policy scripts used for minting the main project token(s).
-
VerifiedAccounts.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/VerifiedAccounts.h
- Helpers and on-chain checks for verified account flows — e.g. registry of verified recyclers/accounts, signature checks, or lookups.
Smart Contract Address in Test Net (PreProd)
addr_test1wr35kdkcknmk7vhvm3lq8t584k80zu3mdzs4aevp4xcc0ugl5qqlj
-
WhiteListSender.hs https://github.com/AIQUANT13/pla-smart-contract-main/blob/main/SmartContract/WhiteListSender.hs
- Utility or validator for performing whitelist-controlled sends, or for maintaining a whitelist of permitted senders/addresses.
Smart Contract Address in Test Net (PreProd)
addr_test1wq47x5v8td5smgenygrrtak03uqra5gx36e8eatekchv6xs80wg60
These are generic Haskell/Plutus steps. Adapt to your local toolchain (Nix, Cabal, Stack) and to the project’s CI.
-
Prerequisites
- Haskell toolchain (GHC + Cabal or Stack) and Cabal/Stack on PATH
- Nix (optional) if your project uses Nix for reproducible builds
- Plutus libraries and dependencies as defined in the project
cabal.project/package.yaml
-
Clone the repository
git clone https://github.com/your-org/your-repo.git
cd your-repo/SmartContract- Build (Cabal)
cabal buildOr with Stack:
stack buildIf using Nix, follow the repo’s README for nix-shell and build instructions.
- Run tests
- Unit tests and property tests (Tasty + QuickCheck) are typically run via:
cabal test
# or
stack test- Generate
.plutusfiles / compile validators
- Many Plutus projects expose a
plutusorscriptstarget to produce serialized validator files. Check the repo’s build scripts orMakefile.
- Local REPL / debugging
cabal repl
# then import modules: :l PCMint- Keep QuickCheck-based property tests (as you have been doing) for critical invariants: signature checks, datum format, duplicate ID checks, reputation calculations, role grants, and registry updates.
- Use Tasty to group unit tests and to run deterministic test cases for both happy and failure paths.
- Add a CI job to compile all modules and run tests on pushes and PRs.
- Keep private keys, signing keys, and KMS secrets out of source control. Use Google Secret Manager / AWS Secrets Manager / HashiCorp Vault.
- Validate datums and redeemers strictly on-chain; prefer inline datums for state flows where appropriate.
- Use a staging/testnet flow and automated integration tests before any mainnet deploy.
- Fork the repo and create a feature branch.
- Run tests locally and ensure new code is covered by tests.
- Open a PR with a clear description and link to any design notes.