/foundry-starter

forge and cast experiments

Primary LanguageSolidityGNU Affero General Public License v3.0AGPL-3.0

foundry-starter • tests lints GitHub GitHub package.json version

Backwards Compatible Template for Foundry and DappTools Projects

Blueprint

lib
├─ ds-test — https://github.com/dapphub/ds-test
├─ forge-std — https://github.com/brockelmore/forge-std
├─ solmate — https://github.com/Rari-Capital/solmate
├─ clones-with-immutable-args — https://github.com/wighawag/clones-with-immutable-args
src
├─ tests
│  └─ Greeter.t — "Greeter Tests"
└─ Greeter"A Minimal Greeter Contract"

Development

foundry-starter is intended to be minimal while also providing backwards compatibility. Thus, both DappTools and Foundry are supported. Installation instructions for both are included below.

Install DappTools

Install DappTools using their installation guide.

First time with Forge/Foundry?

See the official Foundry installation instructions.

Don't have rust installed? Run

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then, install the foundry toolchain installer (foundryup) with:

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

Now that you've installed the foundryup binary, anytime you need to get the latest forge or cast binaries, you can run foundryup.

So, simply execute:

foundryup

🎉 Foundry is installed! 🎉

Setup

make
# OR #
make setup

Build

make build

Run Tests

make test

Configure Foundry

Using foundry.toml, Foundry is easily configurable.

License

AGPL-3.0-only

Acknowledgements

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.