foundry README

The project's README from github.com/foundry-rs/foundry. As one markdown file: README.md.

Foundry banner

 

Github Actions Telegram Chat Telegram Support

Install | Docs | Benchmarks | Developer Guidelines | Contributing | Crate Docs


Blazing fast, portable and modular toolkit for Ethereum application development, written in Rust.

Demo

Installation

curl -L https://foundry.paradigm.xyz | bash
foundryup

See the installation guide for more details.

To verify a downloaded release archive or container image, see Verifying Releases.

Getting Started

Initialize a new project, build and test:

forge init counter && cd counter
forge build
forge test

Interact with a live network:

cast block-number --rpc-url https://eth.merkle.io
cast balance vitalik.eth --ether --rpc-url https://eth.merkle.io

Fork mainnet locally:

anvil --fork-url https://eth.merkle.io

Read the Foundry Docs to learn more.

Solidity editor integration

Configure your editor's Solidity language server command as forge lsp. The server is embedded in Forge, so the standalone solar executable is not required. Solar uses foundry.toml, workspace folders, remappings, and evm_version from the project automatically.

Solar's default flycheck runs forge lint --json with the same Forge executable that started the server. Solar's existing initializationOptions.forgePath option overrides that executable.

forge lsp follows Forge's normal environment setup, global-option parsing, and command dispatch. Project dotenv warnings use stderr, leaving stdout reserved for the LSP transport.

Contributing

Contributions are welcome and highly appreciated. To get started, check out the contributing guidelines.

Join our Telegram to chat about the development of Foundry.

Support

Having trouble? Check the Foundry Docs, join the support Telegram, or open an issue.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

foundry (foundry-rs/foundry)

Searching Database…

10.7K ·GitHub
这是什么?Foundry 是一个用 Rust 编写的以太坊应用开发工具包,速度极快、便携且模块化。它包含四个命令行工具:Forge、Cast、Anvil 和 Chisel。
它是单个工具还是一整套?是四个命令行工具组成的一套:Forge 用于构建、测试、模糊测试、调试和部署 Solidity 合约;Cast 用于操作合约、交易和链上数据;Anvil 是一个高速的本地以太坊节点;Chisel 是一个 Solidity REPL(交互式解释器)。
我该怎么安装并开始第一个项目?按照安装指南用官方安装器(foundryup)安装,然后运行 forge init 创建项目骨架,再用 forge build 和 forge test 来编译和测试。
运行之前还需要装别的东西吗?不需要——它以独立的发布压缩包和 Docker 镜像形式发布,不需要任何额外的运行时或语言环境。
它能在 Windows 上用吗,还是只支持 Mac 和 Linux?它是跨平台的:便携的 Rust 二进制文件可以在 macOS、Linux 和 Windows 上运行,同时也提供 Docker 镜像。
典型的开发流程是什么样的?在 forge init 和 forge build/test 之后,cast 负责与真实链上网络交互——发送交易、读取链上数据;anvil 则提供一个高速的本地节点,还可以分叉主网,让你基于真实的链上状态进行测试。
能接入我的编辑器吗?把你的 Solidity 语言服务器命令指向 'forge lsp' 即可。这个服务器内置于 Forge 中,会自动识别 foundry.toml、工作区文件夹、remappings 和 EVM 版本,并默认以 forge lint --json 作为 flycheck 检查。
Chisel 是干什么用的?Chisel 是一个快速、实用且输出详细的 Solidity REPL(交互式解释器)——不用搭建完整项目就能快速试验 Solidity 代码。
它只支持 Solidity,还是也能处理 Vyper?README 主要围绕 Solidity:Forge、Solar 语言服务器和 Chisel 都是面向 Solidity 的。Vyper 只出现在仓库的主题标签里,所以应把 Vyper 支持当作次要功能。
Creator
foundry-rs
Size
90.1 MB
Stars
10.7K
Age
5y
Commits · 90 Days