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:
$ forge install
If 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>
$ forge install
Duplicate .env.example
and rename to .env
:
- Add a valid mainnet URL for an Ethereum JSON-RPC client for the
RPC_MAINNET_URL
variable. - Add a valid Private Key for the
PRIVATE_KEY
variable. - Add a valid Etherscan API Key for the
ETHERSCAN_API_KEY
variable.
forge build
- build the projectforge test
- run tests
just deploy
- deploy and verify contract on mainnet
To confirm the deploy was successful, re-run your test suite but use the newly created contract address.