Template foundry repository for ad-hoc smart contracts development.
First, install foundryup
(foundry toolchain installer)
curl -L https://foundry.paradigm.xyz | bash
Second, install Foundry itself. This will download forge
, cast
, anvil
, and chisel
binaries
foundryup
Third, use make
to install local dependencies:
make install
It is recommended to use the VSCode Dev Containers
extension for development. After installing it, open the Command Palette (Ctrl+Shift+P)
and select the Dev Containers: Rebuild and Reopen in Container
command.
The template works out of the box. To clean up the repo, you may need to delete the mock contracts and tests.
Also check out relevant dependencies in the Makefile
.
To run the tests, execute the following command:
make test
Or to see the coverage, run:
make coverage
To deploy the contracts locally, run the following commands (in the different terminals):
make private-network
make deploy-localhost
- The template comes with presetup
prettier
andsolhint
that lint the project viahusky
before compilation hook. - The
.env.example
file is provided to check what is required as ENVs - Preinstalled
@openzeppelin/contracts
and@solarity/solidity-lib