This template is inspired by Cleanunicorn's template.
It requires Foundry installed to run. You can find instructions here Foundry installation.
It's easiest to start a new project by clicking the "Use this template".
Then clone the templated repository locally and cd into it and run the following commands:
$ npm install
$ forge install
$ forge update
$ git submodule update --init --recursiveIf you want to create your project manually, run the following commands:
$ forge init --template https://github.com/llama-community/llama-forge-template <my-repo>
$ cd <my-repo>
$ npm install
$ forge install
$ forge update
$ git submodule update --init --recursiveDuplicate .env.example and rename to .env:
- Add a valid mainnet URL for an Ethereum JSON-RPC client for the
RPC_MAINNET_URLvariable. - Add a valid Private Key for the
PRIVATE_KEYvariable. - Add a valid Etherscan API Key for the
ETHERSCAN_API_KEYvariable.
make build- build the projectmake test [optional](V={1,2,3,4,5})- run tests (with different debug levels if provided)make match MATCH=<TEST_FUNCTION_NAME> [optional](V=<{1,2,3,4,5}>)- run matched tests (with different debug levels if provided)
make deploy-contract- deploy and verify contract on mainnet
To confirm the deploy was successful, re-run your test suite but use the newly created contract address.