Validate a contract

Clarinet provides syntax and semantics checkers for Clarity.

To verify your contracts, run the clarinet check command inside your project.

Terminal
clarinet check

Clarinet uses the Clarinet.toml file to locate and analyze all the contracts in the project. If the Clarity code is valid, the command will indicate success with the response below.

Terminal
 2 contracts checked
Warnings

The clarinet check command may also report warnings indicating the code is valid.

You may also perform a syntax-check on a single file by using the command below.

Terminal
clarinet check <path/to/file.clar>

Clarinet reports syntactical errors, but does not perform type-checking or other semantic checks as that would require the full context for a comprehensive analysis.

Last updated on