This is a guide to get you started with refcell/femplate.
Click use this template
to create a new repository with this repo as the initial state.
Or, if your repo already exists, run:
forge init --template https://github.com/refcell/femplate
git submodule update --init --recursive
forge install
Run ./utils/rename.sh
to rename all instances of femplate
with the name of your project/repository.
See the official Foundry installation instructions.
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! 🎉
With Foundry, all tests are written in Solidity! 🥳
Create a test file for your contract in the test/
directory.
For example, src/Greeter.sol
has its test file defined in ./test/Greeter.t.sol
.
To learn more about writing tests in Solidity for Foundry, reference Rari Capital's solmate repository created by @transmissions11.
Using foundry.toml, Foundry is easily configurable.
For a full list of configuration options, see the Foundry configuration documentation.
Now you are all set up to start building your project with femplate!
Navigate back to the Readme to resume your setup!