From 8dbce63bc6ea53505a1a88179729d927c606d709 Mon Sep 17 00:00:00 2001 From: hal <61718761+hal909@users.noreply.github.com> Date: Mon, 15 Feb 2021 18:51:22 -0700 Subject: [PATCH] add slither analysis (#487) * add slither * add slither script & update package.json Co-authored-by: Hal Hyatt --- package.json | 7 ++++--- slither.config.json | 6 ++++++ slither.sh | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 slither.config.json create mode 100755 slither.sh diff --git a/package.json b/package.json index 139a134ad..420d4e118 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "truecurrency", + "name": "trusttoken-smart-contracts", "version": "2.0.0", - "description": "", + "description": "TrueFi and True Currency Smart Contracts", "scripts": { "postinstall": "patch-package", "flatten": "./flatten.sh", @@ -16,7 +16,8 @@ "build": "yarn clean && yarn build:sol && yarn build:types && bash ./indexBuild.sh", "test": "mocha", "checks": "yarn lint && yarn typecheck && yarn test", - "docs": "npx solidity-docgen --solc-module solc-0.6 -i contracts -o docs" + "docs": "npx solidity-docgen --solc-module solc-0.6 -i contracts -o docs", + "slither": "./slither.sh" }, "author": "", "license": "SEE LICENSE IN LICENSE.md", diff --git a/slither.config.json b/slither.config.json new file mode 100644 index 000000000..fe8fd4416 --- /dev/null +++ b/slither.config.json @@ -0,0 +1,6 @@ +{ + "exclude_informational": true, + "exclude_low": false, + "solc_disable_warnings": true, + "detectors_to_exclude": "" +} \ No newline at end of file diff --git a/slither.sh b/slither.sh new file mode 100755 index 000000000..0584cc1ac --- /dev/null +++ b/slither.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +pip3 install slither-analyzer +pip3 install solc-select +solc-select install 0.6.10 +solc-select use 0.6.10 + +yarn flatten + +slither flatten/GovernorAlpha.sol --print human-summary +slither flatten/Liquidator.sol --print human-summary +slither flatten/LoanFactory.sol --print human-summary +slither flatten/LoanToken.sol --print human-summary +slither flatten/StkTruToken.sol --print human-summary +slither flatten/TrueLender.sol --print human-summary +slither flatten/TrueRatingAgencyV2.sol --print human-summary +slither flatten/TrustToken.sol --print human-summary +slither flatten/TimeLock.sol --print human-summary \ No newline at end of file