{"id":26790314,"url":"https://github.com/qiaopengjun5162/foundry-template","last_synced_at":"2025-08-29T17:18:57.946Z","repository":{"id":277153885,"uuid":"931486466","full_name":"qiaopengjun5162/foundry-template","owner":"qiaopengjun5162","description":"Foundry Template is a starter project for Ethereum development using Foundry. It includes key tools like Forge, Cast, Anvil, and Chisel, along with utilities for code quality (pre-commit), spell checking (typos), and changelog generation (git-cliff).","archived":false,"fork":false,"pushed_at":"2025-03-12T14:15:27.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T14:32:42.879Z","etag":null,"topics":["forge-generated","foundry","solidity","solidity-contract","solidity-contracts","template","template-project","web3"],"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/qiaopengjun5162.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-12T11:07:29.000Z","updated_at":"2025-03-12T14:15:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b3666ab-e7d1-497b-bb84-064222b489b1","html_url":"https://github.com/qiaopengjun5162/foundry-template","commit_stats":null,"previous_names":["qiaopengjun5162/foundry-template"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/qiaopengjun5162/foundry-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaopengjun5162%2Ffoundry-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaopengjun5162%2Ffoundry-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaopengjun5162%2Ffoundry-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaopengjun5162%2Ffoundry-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qiaopengjun5162","download_url":"https://codeload.github.com/qiaopengjun5162/foundry-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaopengjun5162%2Ffoundry-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272731566,"owners_count":24983962,"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-08-29T02:00:10.610Z","response_time":87,"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":["forge-generated","foundry","solidity","solidity-contract","solidity-contracts","template","template-project","web3"],"created_at":"2025-03-29T14:28:12.875Z","updated_at":"2025-08-29T17:18:57.901Z","avatar_url":"https://github.com/qiaopengjun5162.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foundry Template\n\nThis is a template project to quickly bootstrap Ethereum application development using Foundry. Foundry is a blazing-fast, modular toolkit for Ethereum development written in Rust.\n\nThis template provides a basic setup for using Foundry's tools like **Forge**, **Cast**, **Anvil**, and **Chisel**. Whether you are building, testing, deploying, or interacting with smart contracts, this template will give you a solid foundation.\n\n## Foundry\n\n**Foundry** is a fast, portable, and modular toolkit for Ethereum application development. It includes:\n\n- **Forge**: Ethereum testing framework (like Truffle, Hardhat, and DappTools).\n- **Cast**: A Swiss army knife for interacting with EVM smart contracts, sending transactions, and getting chain data.\n- **Anvil**: A local Ethereum node, similar to Ganache or Hardhat Network.\n- **Chisel**: A fast, utilitarian Solidity REPL.\n\n## Documentation\n\nFor detailed documentation, refer to the official Foundry book:\n[Foundry Documentation](https://book.getfoundry.sh/)\n\n## Project Setup\n\nTo get started with this project, make sure you have **Foundry** installed. If not, follow the instructions in the official documentation to set it up.\n\n### Install Foundry\n\nFirst, install Foundry by running the following command:\n\n```shell\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\nThen, run the following command to install the necessary tools:\n\n```shell\nfoundryup\n```\n\n## Install Pre-commit\n\n`pre-commit` is a tool to manage and maintain multi-language pre-commit hooks. It ensures that your code is checked before committing to the repository.\n\nInstall `pre-commit` using `pipx`:\n\n```shell\npipx install pre-commit\n```\n\nAfter installation, run the following command to set up `pre-commit` in your project:\n\n```shell\npre-commit install\n```\n\n## Install Typos\n\n`typos` is a tool for spelling checks in your project. It helps catch common spelling mistakes in your codebase.\n\nInstall `typos` with Cargo:\n\n```shell\ncargo install typos-cli\n```\n\nYou can run it using:\n\n```shell\ntypos\n```\n\n## Install Git Cliff\n\n`git-cliff` is a tool that generates changelogs from your commit history. It automatically creates a structured changelog for your project.\n\nTo install `git-cliff`, run:\n\n```shell\ncargo install git-cliff\n```\n\nGenerate a changelog using:\n\n```shell\ngit cliff --output CHANGELOG.md\n```\n\n## Usage\n\nTitle: Initialize Foundry Project\n\nDescription: This set of commands creates a new directory named `my-project`, navigates into that directory, and then initializes a new Foundry project using a custom template from the specified GitHub repository.\n\n```bash\nmkdir my-project\ncd my-project/\nforge init --template https://github.com/qiaopengjun5162/foundry-template\n```\n\n### Build the Project\n\nTo build the project, run the following command:\n\n```shell\nforge build\n```\n\n### Run Tests\n\nTo run tests, use the following command:\n\n```shell\nforge test\n```\n\n### Format Code\n\nTo format your Solidity code, use:\n\n```shell\nforge fmt\n```\n\n### Take Gas Snapshots\n\nTo take gas snapshots of your transactions, use:\n\n```shell\nforge snapshot\n```\n\n### Start Anvil (Local Ethereum Node)\n\nTo start an Anvil instance, use:\n\n```shell\nanvil\n```\n\n### Deploy Contracts\n\nTo deploy contracts using Foundry, use:\n\n```shell\nforge script script/Counter.s.sol:CounterScript --rpc-url \u003cyour_rpc_url\u003e --private-key \u003cyour_private_key\u003e\n```\n\n### Use Cast for Interactions\n\n`cast` is a tool to interact with Ethereum smart contracts. You can use various subcommands:\n\n```shell\ncast \u003csubcommand\u003e\n```\n\nFor more information about `cast`, run:\n\n```shell\ncast --help\n```\n\n## Help Commands\n\nFor a list of available commands and options:\n\n- `forge --help`\n- `anvil --help`\n- `cast --help`\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n**Happy Coding!** 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiaopengjun5162%2Ffoundry-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiaopengjun5162%2Ffoundry-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiaopengjun5162%2Ffoundry-template/lists"}