csw-locker-contract is the smart contract codebase for the CSW-Locker project, built using Clarity, the smart contract language for the Stacks blockchain.
This repository contains all the core contracts that power CSW-Locker — a decentralized platform for secure asset locking, permission management, and programmatic release.
- 🧱 Modular Clarity contracts for:
- Asset lockers
- Permissioned access control
- Time-based and condition-based release mechanisms
- 🔐 Secure and composable logic
- 🧪 Contracts designed with testability and auditability in mind
This repo serves as the foundational layer of on-chain logic for the CSW-Locker ecosystem, enabling decentralized and trust-minimized workflows.
To build and test contracts locally:
clarinet check
pnpm install
pnpm generate
pnpm testTo fuzz the contracts using @stacks/rendezvous:
pnpm install
# Smart Wallet Standard
# Run invariant tests.
npx rv . smart-wallet-standard invariant
# Run property-based tests.
npx rv . smart-wallet-standard test
# CSW Registry
# Run invariant tests.
npx rv . csw-registry invariant
# Run property-based tests.
npx rv . csw-registry testTo visualize the project coverage:
genhtml lcov.info --output-directory coverage-html --title "CSW Locker Contracts Coverage" --show-details --legend
cd coverage-html/
npx http-server . -p 8080