davidadachi / foundry-scaffold

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

foundry-scaffold

Github Actions Foundry License: GPL-3.0

Template foundry project created by Kwenta

Getting Started

  1. Create an .env file using the .env.example file as a template
  2. Update package.json with your project name, description, etc.
  3. Update the README.md with your project name, description, etc.
  4. Add required Repository Secrets to your github repository settings

Navigate to Settings > Secrets and variables > Actions and add whatever secrets are required for your project's CI.

  1. The current template CI will fail until the following repository secrets are added: OPTIMISM_SEPOLIA_RPC_URL and ETHERSCAN_API_KEY. See .github/workflows/* for more details.
  2. Finally, run npm run coverage:generate-lcov to generate a coverage report for your project and commit the results to your remote repository

This will be used by the CI to determine when changes to your project have caused the coverage to drop below a certain threshold.

Contracts

tree src/

src/
└── Counter.sol

Tests

  1. Follow the Foundry guide to working on an existing project

  2. Build project

npm run compile
  1. Execute tests (requires rpc url(s) to be set in .env)
npm run test
  1. Run specific test

    OPTIMISM_SEPOLIA_RPC_URL can be replaced with OPTIMISM_RPC_URL if a mainnet fork is desired

forge test --fork-url $(grep OPTIMISM_SEPOLIA_RPC_URL .env | cut -d '=' -f2) --match-test TEST_NAME -vvv

Deployment Addresses

See deployments/ folder

  1. Optimism deployments found in deployments/Optimism.json
  2. Optimism Sepolia deployments found in deployments/OptimismSepolia.json
  3. Base deployments found in deployments/Base.json
  4. Base Sepolia deployments found in deployments/BaseSepolia.json

Audits

See audits/ folder

  1. Internal audits found in audits/internal/
  2. External audits found in audits/external/

About

License:GNU General Public License v3.0


Languages

Language:Solidity 99.9%Language:Makefile 0.1%Language:Nix 0.0%