https://github.com/yosriady/contracts-starter
A robust smart contract development template for Ethereum and EVM chains
https://github.com/yosriady/contracts-starter
Last synced: 12 days ago
JSON representation
A robust smart contract development template for Ethereum and EVM chains
- Host: GitHub
- URL: https://github.com/yosriady/contracts-starter
- Owner: yosriady
- Created: 2021-07-28T05:49:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-01T11:04:59.000Z (about 3 years ago)
- Last Synced: 2025-05-12T19:43:49.333Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 528 KB
- Stars: 20
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hardhat Boilerplate
## Setup
```sh
$ yarn install
$ yarn prepare
```Create a `.env` following the `.env.example`:
```
INFURA_API_KEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
MNEMONIC=here is where your twelve words mnemonic should be put my friend
```### Compile
Compile the smart contracts with Hardhat:
```sh
$ yarn compile
```### TypeChain
Compile the smart contracts and generate TypeChain artifacts:
```sh
$ yarn typechain
```### Lint Solidity
Lint the Solidity code:
```sh
$ yarn lint:sol
```### Lint TypeScript
Lint the TypeScript code:
```sh
$ yarn lint:ts
```### Format files
```sh
$ yarn prettier
```### Test
Run unit tests:
```sh
$ yarn test
```Run a single test:
```sh
$ yarn test test/MyContract.test.ts
```### Coverage
Generate a test coverage report:
```sh
$ yarn coverage
```### Deploy and Verify
```sh
$ yarn deploy:kovan
$ yarn verify:kovan
```### Clean
Delete the smart contract artifacts, the coverage reports and the Hardhat cache:
```sh
$ yarn clean
```## Tooling
- [Hardhat](https://github.com/nomiclabs/hardhat): compile and run the smart contracts on a local development network
- [TypeChain](https://github.com/ethereum-ts/TypeChain): generate TypeScript types for smart contracts
- [Ethers](https://github.com/ethers-io/ethers.js/): renowned Ethereum library and wallet implementation
- [Waffle](https://github.com/EthWorks/Waffle): tooling for writing comprehensive smart contract tests
- [Solhint](https://github.com/protofire/solhint): linter
- [Solcover](https://github.com/sc-forks/solidity-coverage) code coverage
- [Prettier Plugin Solidity](https://github.com/prettier-solidity/prettier-plugin-solidity): code formatter