# @smartdec/smartcheck

> SmartCheck is an extensible static analysis tool for discovering vulnerabilities and other code issues in Ethereum smart contracts written in the Solidity programming language.

Latest version **2.0.1** (published 2019-01-24) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @smartdec/smartcheck
pnpm add @smartdec/smartcheck
yarn add @smartdec/smartcheck
bun add @smartdec/smartcheck
```

Provides the command `smartcheck`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2019-01-24 |
| First published | 2019-01-24 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.4 MB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 398 |
| Author | SmartDec |
| Maintainers | pyushchenko |
| Keywords | solidity, viper, sast, security, linter |

## Links

- npm: https://www.npmjs.com/package/@smartdec/smartcheck
- Repository: https://github.com/smartdec/smartcheck
- Homepage: https://tool.smartdec.ru/
- Issues: https://github.com/smartdec/smartcheck/issues
- npm.io page: https://npm.io/package/@smartdec/smartcheck

## Dependencies (1)

- [shelljs](https://npm.io/package/shelljs.md) ^0.7.5

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2019-01-24
- 2.0.0-rc1 — 2019-01-24

## README

# SmartCheck

SmartCheck is an extensible static analysis tool for discovering vulnerabilities and other code issues
in Ethereum smart contracts written in the Solidity programming language.

SmartCheck is described in the academic paper titled
["SmartCheck: Static Analysis of Ethereum Smart Contracts"](https://orbilu.uni.lu/bitstream/10993/35862/1/smartcheck-paper.pdf)
as released on May 27, 2018.

An online version of SmartCheck is available on [our website](https://tool.smartdec.net/).
## Using NPM package
### Install SmartCheck globally
To install SmartCheck globally to your system run (administrative rights required)
```bash
npm install @smartdec/smartcheck -g
```
### (Optional) Add SmartCheck as development dependency
To add and install SmartCheck as development dependency to your npm project run:
```bash
npm install --save-dev @smartdec/smartcheck
```

### Start the analysis
To start analysis simply run:
```bash
smartcheck -p ./
```
Argument: `-p <path to directory or file>`  
Optional argument: `-r <path to .xml-file with rules>`; by default it uses the built-in rules files.

## Using source code of SmartCheck

### Building the project
The project uses Maven. To build it, execute in the project directory:

```bash
$ mvn clean package
```

### Start the analysis

```bash
$ java -jar target/smartcheck-2.0-SNAPSHOT-jar-with-dependencies.jar -p <path to directory or file>
```

Optional argument: `-r <path to .xml-file with rules>`; by default it uses the built-in rules files.

Analysis can also be started from an IDE by running the `ru.smartdec.smartcheck.app.cli.Tool.main()` method.

## Advanced
### View the parse tree in a graphical form

```bash
$ mvn exec:java@tree -Dexec.args="-p <path to the file>"
```

It can also be done from an IDE by running the `ru.smartdec.smartcheck.app.cli.TreeView.main()` method.

### View the parse tree as XML

```bash
$ mvn exec:java@xml -Dexec.args="-t <path to save xml-tree> -s <path to the file>"
```

It can also be done from an IDE by running the `ru.smartdec.smartcheck.app.cli.XmlView.main()` method.

---
_Source: https://npm.io/package/@smartdec/smartcheck · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
