$ pnpm i$ curl -L https://foundry.paradigm.xyz | bash
$ foundryupRestart your terminal after running the above commands.
contracts-protocol: Core contracts for the Summer Earn Protocolgov-contracts: Governance contracts for the Summer Earn Protocolvoting-decay: Voting Decay libraryaccess-control: Access control contracts for the Summer Earn Protocolrewards-contracts: Rewards contracts for the Summer Earn Protocoldutch-auction: Dutch Auction contracts for the Summer Earn Protocolexternal-dependencies: External dependencies for the Summer Earn Protocoleslint-config: Baseeslintconfigurationsjest-config: Basejestconfigurationstenderly-utils: Utility functions for interacting with Tenderly APItypescript-config: Basetsconfig.jsonconfigurations
To build all apps and packages, run the following command:
pnpm buildTo develop all apps and packages, run the following command:
pnpm devLearn more about the power of Turborepo:
- Install dependencies
# Node + pnpm
pnpm i
# Foundry (forge/cast/anvil)
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Optional (for HTML coverage report)
sudo apt-get update && sudo apt-get install -y lcov- Verify toolchain
forge --version | cat
pnpm --version | catScope includes SummerStaking.sol, SummerVestingWalletsEscrow.sol, SummerGovernorV2.sol, StakedSummerToken.sol.
Run build, tests, and coverage:
# Build
pnpm -F @summerfi/earn-gov-contracts build
# Tests (must be 100% passing)
pnpm -F @summerfi/earn-gov-contracts test
# Coverage (target >80%)
pnpm -F @summerfi/earn-gov-contracts coverage
# HTML coverage report (requires lcov)
pnpm -F @summerfi/earn-gov-contracts coverage:report
# Then open: packages/gov-contracts/coverage/index.htmlNotes:
- Coverage excludes common non-source files via
--no-match-coverage '(script|test|TestBase|Mock|Test)'. - Every test must include failure paths (e.g.,
vm.expectRevert(...)), otherwise it is not considered valid.
# Filter tests by contract or pattern
forge test -m YourTestName -vvv
# Gas snapshots
forge snapshot