Template foundry project created by Kwenta
- Create an
.envfile using the.env.examplefile as a template - Update
package.jsonwith your project name, description, etc. - Update the
README.mdwith your project name, description, etc. - Add required Repository Secrets to your github repository settings
Navigate to
Settings > Secrets and variables > Actionsand add whatever secrets are required for your project's CI.
- The current template CI will fail until the following repository secrets are added:
OPTIMISM_GOERLI_RPC_URLandETHERSCAN_API_KEY. See.github/workflows/*for more details. - Finally, run
npm run coverage:generate-lcovto 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.
tree src/
src/
└── Counter.sol
-
Build project
npm run compile
- Execute tests (requires rpc url(s) to be set in
.env)
npm run test
- Run specific test
OPTIMISM_GOERLI_RPC_URLcan be replaced withOPTIMISM_RPC_URLif a mainnet fork is desired
forge test --fork-url $(grep OPTIMISM_GOERLI_RPC_URL .env | cut -d '=' -f2) --match-test TEST_NAME -vvv
See
deployments/folder
- Optimism deployments found in
deployments/Optimism.json - Optimism Goerli deployments found in
deployments/OptimismGoerli.json - Base deployments found in
deployments/Base.json - Base Goerli deployments found in
deployments/BaseGoerli.json
See
audits/folder
- Internal audits found in
audits/internal/ - External audits found in
audits/external/