[TOC]
This part describe the list of libraries present in the file package.json
.
This section concerns the packages installed in the section devDependencies
of package.json
Chai Library used for the tests
Coveralls It is used to perform a code coverage
Truffle A development environment, testing framework and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM).
Truffle Flattener Concats solidity files from Truffle projects with all of their dependencies.
Hardhat plugin for integration with TruffleContract from Truffle 5. This allows tests and scripts written for Truffle to work with Hardhat.
This plugin integrates Web3.js 1.x
into Hardhat.
eslint JavaScript static analyzer, and the following plugins:
-
eslint-config-standard Shareable configs designed to work with the extends feature of .eslintrc files.
-
eslint-plugin-import Plugin to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names.
-
eslint-plugin-node Additional ESLint's rules for Node.js
-
eslint-plugin-promise Enforcement best practices for JavaScript promises.
Ethlint Solidity static analyzer.
ethereumjs-util Collection of utility functions for Ethereum (account, address, signature, etc.).
ethjs-abi Encode and decode method and event from the smart contract ABI. Warning: marked as experimental package on 22.08.2022.
Eth-Sig-Util A collection of Ethereum signing functions.
Warning :
- Deprecated in favor of : @metamask/eth-sig-util
- It was not possible to use the new version of the library because the test "MetaTxModule.test.js" doesn't work with this one. The check of the signature fails.
solc JavaScript bindings for the Solidity compiler.
Web3 Ethereum JavaScript API.
Generate UML for smart contracts
Code coverage for Solidity smart-contracts
Program that extracts documentation for a Solidity project.
Utility tool for smart contract systems.
dotenv Loads environment variables from a .env file
This section concerns the packages installed in the section dependencies
of package.json
ethereumjs-wallet A wallet implementation
OpenZeppelin Contracts Upgradeable Upgradeable variant of OpenZeppelin Contracts, meant for use in upgradeable contracts. The version of the library used is available in the file USAGE.md
Warning:
- Submodules are not automatically updated when the host repository is updated.
- Only update the module to a specific version, not an intermediary commit.
Generate UML for smart contracts
You can generate UML for smart contracts by running the following command:
npm run-script uml
Warning:
From the version 2.3, this command is not working and generates the following error
Failed to convert dot to SVG. Error: lost 31 26 edge
Description | Command |
---|---|
Generate UML for the interfaces EIP1404 | npm run-script uml-i-eip1404 |
Generate UML for the contracts CMTAT_STANDALONE, CMTAT_PROXY && CMTAT_BASE | npm run-script uml-partial |
Generate UML for mandatory modules | npm run-script uml-modules-mandatory |
Generate UML for optional modules | npm run-script uml-modules-optional |
Generate UML for security modules | npm run-script uml-modules-security |
Generate UML for mocks | npm run-script uml-mocks |
To generate documentation with surya, you can call the three bash scripts in doc/script
Task | Script | Command exemple |
---|---|---|
Generate graph | script_surya_graph.sh | npx surya graph -i contracts/**/*.sol npx surya graph contracts/modules/CMTAT_BASE.sol |
Generate inheritance | script_surya_inheritance.sh | npx surya inheritance contracts/modules/CMTAT_BASE.sol -i npx surya inheritance contracts/modules/CMTAT_BASE.sol |
Generate report | script_surya_report.sh | npx surya mdreport -i surya_report.md contracts/modules/CMTAT_BASE.sol npx surya mdreport surya_report.md contracts/modules/CMTAT_BASE.sol |
In the report, the path for the different files are indicated in absolute. You have to remove the part which correspond to your local filesystem.
Code coverage for Solidity smart-contracts, installed as a hardhat plugin
npm run-script coverage
Slither is a Solidity static analysis framework written in Python3
slither . --checklist --filter-paths "openzeppelin-contracts-upgradeable|test" > slither-report.md