A template for solidity smart contract development with foundry.
Full article: https://olich.me//post/smart-contract-solidity-development-with-foundry
Click Use this template
on Github to create a new repository with this repo as the initial state.
Or run (also works for existing projects):
forge init --template https://github.com/olich97/solidity-foundry-template
git submodule update --init --recursive
forge install
$ forge build
$ forge test -vvv
# with gas report
$ forge test -gas-report
$ forge fmt
$ forge snapshot
$ anvil
# To load the variables in the .env file
$ source .env
# To deploy and verify our contract
$ forge script script/DeployMyToken.sol:DeployMyTokenScript --rpc-url $SEPOLIA_URL --broadcast --verify -vvvv
$ cast <subcommand>
$ forge --help
$ anvil --help
$ cast --help