A complete template to kick start smart contract engineering with ease.
Features:
- git hooks with husky for pre-commit linting & pre-push smart contract testing
- recommended extensions for Solidity and JavaScript development
- configured prettier for .js and .sol files
- sample project skelaton for smart contract engineering
- sample tests with mocha using ganache cli
- migrations to a ganache cli network using truffle
- configured linting for .sol and .js files
git clone https://github.com/typhoonese/smart-contracts.git
npm install
npm ganache-quorum:local
In this mode, the ganache cli is configured to act more like a Quorum network.
npm run migrate:local
Prior to this command, a running ganache network is required. See above for how to run a ganache network locally.
npm run test:local
Prior to this command, a running ganache network is required. See above for how to run a ganache network locally.
To lint the project: npm run lint
To lint .sol files: npm run lint:contracts
To lint .js files: npm run lint:js
npm run format:prettier
This repo is developed using Ubuntu 18.04.
Windows Users:
Windows users might benefit from using WSL 2 while running the commands above. The recommended extension can be found in .vscode/extensions.json