Skip to content

Latest commit

 

History

History
138 lines (78 loc) · 3.03 KB

TOOLCHAIN.md

File metadata and controls

138 lines (78 loc) · 3.03 KB

TOOLCHAIN

[TOC]

Node.JS package

This part describe the list of libraries present in the file package.json.

Dev

This section concerns the packages installed in the section devDependencies of package.json

hardhat-foundry

Hardhat plugin for integration with Foundry

Ethlint Solidity static analyzer.

prettier-plugin-solidity

A Prettier plugin for automatically formatting your Solidity code.

Documentation

sol2uml

Generate UML for smart contracts

solidity-docgen

Program that extracts documentation for a Solidity project.

Surya

Utility tool for smart contract systems.

Submodule

OpenZeppelin Contracts OpenZeppelin Contracts The version of the library used is available in the READEME

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 documentation

Solidity-docgen is a program that extracts documentation for a Solidity project.

npx hardhat docgen 

Generate UML for smart contracts

You can generate UML for smart contracts by running the following command:

npm run-script uml
npm run-script uml:test

Or only specified contracts

npx sol2uml class -i -c src/deployment/CCIPSender.sol

The related component can be installed with npm install (see package.json).

Graph

To generate graphs with Surya, you can run the following command

npm run-script surya:graph

OR

  • CCIPSender
npx surya graph  src/deployment/CCIPSender.sol | dot -Tpng > surya_graph_CCIPSender.png

Report

npm run-script surya:report

Slither is a Solidity static analysis framework written in Python3

slither .  --checklist --filter-paths "openzeppelin-contracts|test|CMTAT|forge-std|lib" > slither-report.md

Code style guidelines

We use the following tools to ensure consistent coding style:

Prettier

npm run-script lint:sol:prettier 

Ethlint / Solium

npm run-script lint:sol 
npm run-script lint:sol:fix 
npm run-script lint:sol:test 
npm run-script lint:sol:test:fix

The related components can be installed with npm install (see package.json).