This project demonstrates a Hardhat and Foundry use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
- Clone the repo
- Install foundry
git clone https://github.com/scatteringlabs/scattering-contracts
cd scattering-contracts
pnpm install
forge install
Copy .env
from .env.example
abd fill in all the variables in .env
Modify namedAccounts
in hardhat.config.ts
and add networks if necessary.
forge test
forge test -vvv
mkdir flat
npx hardhat flatten <path-to-contract> >> flat/<flat-contract-name>.sol
npx hardhat flatten contracts/Scattering.sol >> flat/Scattering.sol
npx hardhat run --network <NETWORK> scripts/01-deploy-scr.ts
slither .
GNU General Public License v3.0 or later
See COPYING to see the full text.