Skip to content

Commit

Permalink
remove hardhat stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Jul 11, 2024
1 parent 036840b commit fa787dc
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 1,278 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
- name: Build Typechain and Foundry
run: yarn build

- name: Run Forge and Hardhat Tests
- name: Run Forge Tests
run: yarn test
8 changes: 1 addition & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Foundry Dependencies
run: forge install

- name: Generate Hardhat & Foundry Coverage Report
- name: Generate Foundry Coverage Report
run: yarn coverage:report

- name: Upload Foundry Coverage Report to Codecov
Expand All @@ -36,9 +36,3 @@ jobs:
file: ./coverage/foundry/lcov.info
flags: foundry

- name: Upload Hardhat Coverage Report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: hardhat
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ broadcast/*/31337/
node_modules
.env

# Hardhat files
/cache
/artifacts
/docs

# TypeChain files
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

- Initial setup and configurations for both Foundry and Hardhat environments.
- Initial setup and configurations for Foundry.
- Integration of GitHub Actions for CI/CD pipelines.
- Addition of linter configurations for Solidity and TypeScript.

Expand All @@ -15,8 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added

- `Foo.sol` and `Lock.sol` smart contracts under the `contracts` directory.
- Foundry and Hardhat configurations for building and testing smart contracts.
- Comprehensive testing scripts for Foundry and Hardhat environments in `test/foundry` and `test/hardhat`.
- Foundry configuration for building and testing smart contracts.
- Comprehensive testing scripts for Foundry environment in `test/foundry`.
- GitHub Actions workflows for automated testing, linting, and security checks.
- Documentation for getting started, usage, and contribution guidelines.

Expand All @@ -39,4 +39,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added

- Initial commit with basic project structure.
- Setup of development environments for Solidity smart contract development using Foundry and Hardhat.
- Setup of development environments for Solidity smart contract development using Foundry.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Biconomy](https://img.shields.io/badge/Made_with_%F0%9F%8D%8A_by-Biconomy-ff4e17?style=flat)](https://biconomy.io) [![License MIT](https://img.shields.io/badge/License-MIT-blue?&style=flat)](./LICENSE) [![Hardhat](https://img.shields.io/badge/Built%20with-Hardhat-FFDB1C.svg)](https://hardhat.org/) [![Foundry](https://img.shields.io/badge/Built%20with-Foundry-FFBD10.svg)](https://getfoundry.sh/)
[![Biconomy](https://img.shields.io/badge/Made_with_%F0%9F%8D%8A_by-Biconomy-ff4e17?style=flat)](https://biconomy.io) [![License MIT](https://img.shields.io/badge/License-MIT-blue?&style=flat)](./LICENSE) [![Foundry](https://img.shields.io/badge/Built%20with-Foundry-FFBD10.svg)](https://getfoundry.sh/)


![Codecov Hardhat Coverage](https://img.shields.io/codecov/c/gh/bcnmy/sc-template?token=2BYDIFQ56W&flag=hardhat&label=Hardhat-coverage&logo=codecov) ![Codecov Foundry Coverage](https://img.shields.io/codecov/c/gh/bcnmy/sc-template?token=2BYDIFQ56W&flag=foundry&label=Foundry-coverage&logo=codecov)

# Smart Contract Template Base 🚀

Expand All @@ -23,14 +23,14 @@ This repository serves as a comprehensive foundation for smart contract projects
## Features

- **Smart Contract Template Base**: A robust foundation for future smart contract projects.
- **Hardhat & Foundry Support**: Equipped with both Hardhat and Foundry tools and an adapted folder structure for seamless development.
- **Foundry Support**: Equipped with Foundry tools and an adapted folder structure for seamless development.
- **Best Practices**: Adheres to industry best practices in smart contract programming to ensure code quality and security.
- **Continuous Integration & Deployment**: Utilizes GitHub Actions for automated testing and deployment, ensuring code reliability.
- **Strict Linting**: Implements Solhint based on the Solidity style guide, enhancing code quality and consistency.
- **Comprehensive Testing**: Includes a wide range of tests (unit, fuzz, fork) for both Foundry and Hardhat environments.
- **Comprehensive Testing**: Includes a wide range of tests (unit, fuzz, fork) for both Foundry environment.
- **Environment Configuration**: Comes with `.env.example` for easy setup of API keys and environmental variables.
- **Code Formatting**: Uses Prettier to maintain a consistent code style across the project.
- **Configurations for Foundry & Hardhat**: Provides essential settings and scripts for building, testing, and deployment, tailored for both development environments.
- **Configurations for Foundry**: Provides essential settings and scripts for building, testing, and deployment, tailored for both development environments.

## Getting Started

Expand Down Expand Up @@ -63,15 +63,15 @@ Copy `.env.example` to `.env` and fill in your details.

## 🛠️ Essential Scripts

Execute key operations for Foundry and Hardhat with these scripts. Append `:forge` or `:hardhat` to run them in the respective environment.
Execute key operations for Foundry with these scripts. Append `:forge` to run them in the respective environment.

### 🏗️ Build Contracts

```bash
yarn build
```

Compiles contracts for both Foundry and Hardhat.
Compiles contracts for both Foundry.

### 🧪 Run Tests

Expand Down Expand Up @@ -135,9 +135,9 @@ Automatically fixes linting problems found.
yarn check
```

To generate reports of the storage layout for potential upgrades safety using `hardhat-storage-layout`.

🔄 Add `:forge` or `:hardhat` to any script above to target only Foundry or Hardhat environment, respectively.

🔄 Add `:forge` to any script above to target only Foundry

## 🔒 Security Audits

Expand Down
26 changes: 0 additions & 26 deletions hardhat.config.ts

This file was deleted.

36 changes: 7 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,20 @@
},
"dependencies": {
"@biconomy-devx/erc7579-msa": "^0.0.4",
"@openzeppelin/contracts": "^5.0.1",
"hardhat": "^2.20.1"
"@openzeppelin/contracts": "^5.0.1"
},
"devDependencies": {
"@bonadocs/docgen": "^1.0.1-alpha.1",
"@ethersproject/abstract-provider": "^5.7.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-foundry": "^1.1.1",
"@nomicfoundation/hardhat-network-helpers": "^1.0.10",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.4",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@prb/test": "^0.6.4",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.11",
"@types/mocha": ">=10.0.6",
"@types/node": ">=20.11.19",
"account-abstraction": "github:eth-infinitism/account-abstraction#develop",
"chai": "^4.3.7",
"codecov": "^3.8.3",
"ethers": "^6.11.1",
"hardhat-deploy": "^0.11.45",
"hardhat-deploy-ethers": "^0.4.1",
"hardhat-gas-reporter": "^1.0.10",
"hardhat-storage-layout": "^0.1.7",
"modulekit": "github:rhinestonewtf/modulekit",
"prettier": "^3.2.5",
"prettier-plugin-solidity": "^1.3.1",
Expand All @@ -52,31 +39,22 @@
"ethereum",
"forge",
"foundry",
"hardhat",
"smart-contracts",
"solidity"
],
"private": true,
"scripts": {
"clean:forge": "forge clean",
"clean:hardhat": "yarn hardhat clean",
"clean": "yarn run clean:forge && yarn run clean:hardhat && rm -rf cache docs coverage storageLayout coverage.json",
"clean": "yarn run clean:forge && rm -rf cache docs coverage storageLayout coverage.json",
"build:forge": "forge build",
"build:hardhat": "yarn hardhat compile",
"build": "yarn run build:forge && yarn run build:hardhat",
"build": "yarn run build:forge",
"test:forge": "forge test",
"test:hardhat": "yarn hardhat test",
"test": "yarn run test:hardhat && yarn run test:forge",
"test": "yarn run test:forge",
"test:gas:forge": "forge test --gas-report",
"test:gas:hardhat": "REPORT_GAS=true hardhat test",
"test:gas": "yarn test:gas:hardhat && yarn test:gas:forge",
"test:gas": "yarn test:gas:forge",
"coverage:forge": "forge coverage",
"coverage:hardhat": "yarn hardhat coverage",
"coverage": "yarn run coverage:forge && yarn run coverage:hardhat",
"coverage:report": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage/foundry && mv lcov.info coverage/foundry && yarn run coverage:hardhat",
"docs": "yarn hardhat docgen",
"check-storage": "yarn hardhat check",
"deploy:hardhat": "yarn hardhat run --network localhost scripts/typescript/deploy.ts",
"coverage": "yarn run coverage:forge",
"coverage:report": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage/foundry && mv lcov.info coverage/foundry",
"deploy:forge": "forge script scripts/solidity/Deploy.s.sol --broadcast --rpc-url http://localhost:8545",
"lint:sol": "yarn solhint 'contracts/**/*.sol' && forge fmt --check",
"lint:sol-fix": "yarn prettier --write 'contracts/**/*.sol' && yarn solhint 'contracts/**/*.sol' --fix --noPrompt && forge fmt",
Expand Down
Loading

0 comments on commit fa787dc

Please sign in to comment.