1.0.0 • Published 3 years ago
@diversify-io/core v1.0.0
Diversify
Smart contracts implemented in Solidity for Diversify.
Introduction
The Diversify Token (DIV) is an ERC20 token on the Ethereum Blockchain. It has a deflationary, democratic and diversified character.
Architecture
The following UML provides a high level overview on the contracts.
Development
Local environment
npx hardhat node
Mainnet forking
npx hardhat node --fork <https://eth-mainnet.alchemyapi.io/v2/API_KEY>
https://hardhat.org/guides/mainnet-forking.html#mainnet-forking
Build
yarn build
Size Contracts
yarn build:size
Testing
yarn test
Single files
yarn test test/DiversifyToken.spec.js
Mocha & Chai with Waffle matchers (these are really useful).
https://ethereum-waffle.readthedocs.io/en/latest/matchers.html
Running Tests on VSCode
https://hardhat.org/guides/vscode-tests.html#running-tests-on-visual-studio-code
Console
yarn console
npx hardhat --network localhost console
https://hardhat.org/guides/hardhat-console.html
Coverage
yarn test:coverage
https://hardhat.org/plugins/solidity-coverage.html#tasks
Gas Usage
yarn test:gas
https://github.com/cgewecke/hardhat-gas-reporter
Lint
yarn lint
UML
yarn uml
Watch
npx hardhat watch compile
Deployment
HardHat
npx hardhat node
Mainnet
yarn mainnet:deploy
Rinkeby
yarn rinkeby:deploy
Localhost
yarn localhost:deploy
Community
License
All code in this repository is licensed under MIT.