Using Misti with Blueprint
Blueprint is a platform to compile, test, and deploy contracts on the TON blockchain. It is quite similar to Hardhat and Truffle for Ethereum.
There is a blueprint-misti plugin that can be added to a Blueprint configuration. It adds the blueprint misti
command, which runs the static analyzer over the selected Blueprint project.
This page describes how to use it.
Getting Started
-
Install Soufflé to use all detectors provided by Misti.
-
Add this plugin as a dependency of your Blueprint project:
yarn add @tact-lang/compiler
yarn add @nowarp/blueprint-misti
- Add this configuration to
blueprint.config.ts
:
import { MistiPlugin } from '@nowarp/blueprint-misti';
export const config = {
plugins: [
new MistiPlugin(),
],
};
Usage
Run the following command:
yarn blueprint misti
It will run the analysis of the available project, if there is one, or show an interactive window to select a project:
You could also pass the supported CLI options for Misti, for example:
yarn blueprint misti --all-detectors
Or you can even pass the path to the contract directly:
yarn blueprint misti path/to/my/contract.tact
If you have any problems, feel free to reach out to us in the Misti discussion group.