0xbc3e
January 6th, 2022

Forge is an Ethereum development framework. You can use it to create Solidity projects, manage dependencies, run tests, and more. It is inspired by Dapp and has the important similarity that tests are written in Solidity. This is unlike other Ethereum development frameworks to date. It is written in Rust and is very fast.

This is a beginners guide. I will go over how to create a project, manage dependencies, and write tests. The intended audience is someone familiar with Solidity who wants to learn more about developing with Forge.

Getting Started

First, you need to install Foundry, which is a broader Ethereum toolkit that Forge lives within. I recommend checking the repo for the latest install instructions, but this is the current install command.

0xbc3e
July 10th, 2021

data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDMwMCA0ODgiIHdpZHRoPSIzMDAiIGhlaWdodD0iNDg4IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGOyBvcGFjaXR5OjAuNzt9LnN0MXtmb250LWZhbWlseTpzYW5zLXNlcmlmO30uc3Qye2ZvbnQtc2l6ZToxNHB4O30uc3Qze2ZpbGw6IHB1cnBsZTt9LnN0NHtmaWxsOiBibHVlO30uc3Q2e2ZvbnQtZmFtaWx5OnNhbnMtc2VyaWY7IGZvbnQtd2VpZ2h0OmJvbGQ7IGZvbnQtc2l6ZTogMThweDt9LnN0OHtmaWxsOnVybCgjd2FzaCk7fS5oaWdobGlnaHQtaHVle3N0b3AtY29sb3I6aHNsKDQwLDEwMCUsODUlKX0uaGlnaGxpZ2h0LW9mZnNldHtzdG9wLWNvbG9yOmhzbCgyMjUsMTAwJSw4NSUpfTwvc3R5bGU+PGRlZnM+PG1hc2sgaWQ9Im1hc2stbWFycXVlZSI+PHJlY3QgeD0iMjAiIHk9IjcwIiB3aWR0aD0iMjY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