{"id":26315197,"url":"https://github.com/hifi-finance/foundry-template","last_synced_at":"2025-07-28T20:08:59.281Z","repository":{"id":68804472,"uuid":"593707629","full_name":"hifi-finance/foundry-template","owner":"hifi-finance","description":"A lightning-fast Foundry template for Solidity smart contract development","archived":false,"fork":false,"pushed_at":"2024-02-12T19:03:12.000Z","size":10595,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-13T14:23:48.764Z","etag":null,"topics":["anvil","cast","ethereum","forge","foundry","precommit","precommit-hooks","smart-contracts","solidity","template"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hifi-finance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-26T16:58:44.000Z","updated_at":"2024-04-22T13:57:46.000Z","dependencies_parsed_at":"2024-01-18T17:02:05.425Z","dependency_job_id":null,"html_url":"https://github.com/hifi-finance/foundry-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/hifi-finance/foundry-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hifi-finance%2Ffoundry-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hifi-finance%2Ffoundry-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hifi-finance%2Ffoundry-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hifi-finance%2Ffoundry-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hifi-finance","download_url":"https://codeload.github.com/hifi-finance/foundry-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hifi-finance%2Ffoundry-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267578003,"owners_count":24110351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anvil","cast","ethereum","forge","foundry","precommit","precommit-hooks","smart-contracts","solidity","template"],"created_at":"2025-03-15T12:17:43.950Z","updated_at":"2025-07-28T20:08:59.154Z","avatar_url":"https://github.com/hifi-finance.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foundry Template [![Github Actions][gha-badge]][gha] [![Foundry][foundry-badge]][foundry] [![pre-commit][pre-commit-badge]][pre-commit] [![License: MIT][license-badge]][license]\n\n[gha]: https://github.com/hifi-finance/foundry-template/actions\n[gha-badge]: https://github.com/hifi-finance/foundry-template/actions/workflows/ci.yml/badge.svg\n[foundry]: https://getfoundry.sh/\n[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg\n[license]: https://opensource.org/licenses/MIT\n[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg\n[pre-commit]: https://pre-commit.com\n[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\n\n## Overview\n\nA lightning-fast Foundry template for Solidity smart contract development.\n\n## What's Inside\n\n- [Forge](https://github.com/foundry-rs/foundry/blob/master/forge): compile, test, fuzz, debug and deploy smart\n  contracts\n- [Forge Std](https://github.com/foundry-rs/forge-std): collection of helpful contracts and cheatcodes for testing\n\n## Getting Started\n\nClick the [`Use this template`](https://github.com/hifi-finance/foundry-template/generate) button at the top of the page to\ncreate a new repository with this repo as the initial state.\n\nOr, if you prefer to install the template manually:\n\n```sh\nforge init my-project --template https://github.com/hifi-finance/foundry-template\ncd my-project\nmake\n```\n\nThis project was built using [Foundry](https://book.getfoundry.sh/). Refer to installation instructions [here](https://github.com/foundry-rs/foundry#installation).\n\n## Features\n\nThis template builds upon the frameworks and libraries mentioned above, so for details about their specific features,\nplease consult their respective documentations.\n\nFor example, for Foundry, you can refer to the [Foundry Book](https://book.getfoundry.sh/). You might be in particular\ninterested in reading the [Writing Tests](https://book.getfoundry.sh/forge/writing-tests.html) guide.\n\n### Sensible Defaults\n\nThis template comes with sensible default configurations in the following files:\n\n```text\n├── .commitlintrc.yaml\n├── .gitattributes\n├── .gitignore\n├── .gitmodules\n├── .pre-commit-config.yaml\n├── foundry.toml\n├── makefile\n└── remappings.txt\n```\n\n### VSCode Integration\n\nThis template is IDE agnostic, but for the best user experience, you may want to use it in VSCode with Juan Blanco's\n[Solidity extension](https://github.com/juanfranblanco/vscode-solidity).\n\nFor guidance on how to integrate a Foundry project in VSCode, please refer to this\n[guide](https://book.getfoundry.sh/config/vscode).\n\n### GitHub Actions\n\nThis template comes with GitHub Actions pre-configured. Your contracts will be linted and tested on every push and pull\nrequest made to the `main` branch.\n\nYou can edit the CI script in [.github/workflows/ci.yml](./.github/workflows/ci.yml).\n\n### Conventional Commits\n\nThis template enforces the [Conventional Commits](https://www.conventionalcommits.org/) standard for git commit\nmessages. This is a lightweight convention that creates an explicit commit history, which makes it easier to write\nautomated tools on top of.\n\n## Writing Tests\n\nTo write a new test contract, you start by importing [DSTest](https://github.com/dapphub/ds-test) and inherit from\nit in your test contract. DSTest comes with a pre-instantiated [cheatcodes](https://book.getfoundry.sh/cheatcodes/)\nenvironment accessible via the `vm` property. You can also use\n[console.log](https://book.getfoundry.sh/faq?highlight=console.log#how-do-i-use-consolelog), whose logs you can see in\nthe terminal output by adding the `-vvvv` flag.\n\nThis template comes with an example test contract [Foo.t.sol](./tests/Foo.t.sol).\n\n## Commands\n\nTo make it easier to perform some tasks within the repo, a few commands are available through a [makefile](https://github.com/hifi-finance/foundry-template/blob/main/makefile):\n\n### Build Commands\n\n| Command          | Action                                                   |\n| ---------------- | -------------------------------------------------------- |\n| `make build`     | Compile all contracts in the repo, including submodules. |\n| `make clean`     | Delete the build artifacts and cache directories.        |\n| `make fmt-check` | Lint the contracts.                                      |\n| `make fmt-write` | Format the contracts.                                    |\n\n### Test Commands\n\n| Command           | Description                       |\n| ----------------- | --------------------------------- |\n| `make coverage`   | Get a test coverage report.       |\n| `make test`       | Run all tests located in `tests/`. |\n| `make gas-report` | Get a gas report.                 |\n\nSpecific tests can be run using `forge test` conventions, specified in more detail in the Foundry [Book](https://book.getfoundry.sh/reference/forge/forge-test#test-options).\n\n### Deploy Commands\n\n| Command       | Description      |\n| ------------- | ---------------- |\n| `make deploy` | Deploy to Anvil. |\n\nFor instructions on how to deploy to a testnet or mainnet, check out the\n[Solidity Scripting tutorial](https://book.getfoundry.sh/tutorials/solidity-scripting.html).\n\n## Notes\n\n1. Foundry piggybacks off [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to manage dependencies.\n   There's a [guide](https://book.getfoundry.sh/projects/dependencies.html) about how to work with dependencies in the\n   book.\n2. You don't have to create a `.env` file, but filling in the environment variables may be useful when debugging and\n   testing against a mainnet fork.\n\n## Related Efforts\n\n- [PaulRBerg/foundry-template](https://github.com/PaulRBerg/foundry-template)\n- [ScopeLift/foundry-template](https://github.com/ScopeLift/foundry-template)\n- [abigger87/femplate](https://github.com/abigger87/femplate)\n- [cleanunicorn/ethereum-smartcontract-template](https://github.com/cleanunicorn/ethereum-smartcontract-template)\n- [foundry-rs/forge-template](https://github.com/foundry-rs/forge-template)\n- [FrankieIsLost/forge-template](https://github.com/FrankieIsLost/forge-template)\n\n## License\n\n[MIT](./LICENSE.md) © Mainframe Group Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhifi-finance%2Ffoundry-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhifi-finance%2Ffoundry-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhifi-finance%2Ffoundry-template/lists"}