Clarinet Overview
Clarinet is a local development environment that offers everything you need to create, test, and deploy smart contracts on Stacks.
Using a simple command line interface, Clarinet enables you to build and iterate on your contracts locally before moving into production on the mainnet
network.
You can code with Clarity syntax support, run tests, debug your code line by line, and deploy your contracts to a local Stacks blockchain environment to rapidly iterate on your code. It can also be used locally or as a hosted service in the cloud via the Hiro Platform.
To get started, check out our Installation Guide.
Guides
Create a new contract
Add new contracts to your project and have them automatically configured in your project file.
Debug a contract
Utilize powerful debugging tools to step through your code, print values, and trace execution paths.
Write unit tests
Leverage the Clarinet SDK to write comprehensive unit tests, ensuring your contract performs as expected.
Create deployment plans
Employ customizable deployment plans to streamline your contract deployments, facilitating multi-step processes with ease.
Run a local development environment
Set up a local devnet environment for developing and testing in a controlled environment before deployment.
Analyzing contracts for vulnerabilities
Learn how to enable the `check_checker` feature to identify potentially dangerous areas in your contracts.
Network types
Clarinet supports different network types to cater to various development and testing needs:
Network | Description | Use case |
---|---|---|
simnet | Optimized for fast feedback loops, introspection, and portability. | Ideal for initial development and unit-testing. |
devnet | Local Stacks and Bitcoin nodes running on Docker for faster feedback loops. | Use for integration tests or local frontend development. |
testnet | A pre-production network that offers a realistic environment for testing. | Ideal for final testing before deploying to Mainnet. |
mainnet | The production network where real transactions occur. | Use when you're ready to deploy your smart contract to production. |
Related Tools
- Clarinet JS SDK: Simplify your testing with the Clarinet SDK.
- Hiro Platform: Streamline your app development in our hosted dev experience.
- Stacks.js: Leverage a JavaScript library that handles basic functions, such as user authentication and transaction signing.
Need help building with Clarinet? Reach out to us on the #clarinet
channel on Discord under Hiro Developer Tools section. We also host a weekly office hours on Discord every Monday at 11am ET.
Last updated on