Streamlined template for getting started with Foundry and Solmate.
You will need a copy of Foundry installed before proceeding. See the installation guide for details.
$ git clone https://github.com/transmissions11/foundry-template.git
$ cd foundry-template
$ git submodule init
$ forge build
$ forge test
$ forge snapshot
$ forge install
$ forge install transmissions11/solmate -->
$ forge install Openzeppelin/openzeppelin-contracts -->
$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable --no-commit -->
$ forge test
$ forge fmt
$ forge snapshot
$ forge fmt --check
$ forge snapshot --check
$ git push
$ forge create {{contract}} --rpc-url=$GOERLI_PRIVATE_KEY --private-key=$GOERLI_PRIVATE_KEY
$ forge create {{contract}} --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY --constructor-args <name> <symbol>
$ forge create --rpc-url <your_rpc_url> --private-key <your_private_key> src/MyContract.sol:MyContract
$ forge create --rpc-url <your_rpc_url> --constructor-args "ForgeUSD" "FUSD" 18 1000000000000000000000 --private-key <your_private_key> src/MyToken.sol:MyToken --etherscan-api-key <your_etherscan_api_key> --verify
$ cast send --rpc-url=$GOERLI_PRIVATE_KEY $TARGET_ADDRESS {{method}} {{args}} --private-key=$GOERLI_PRIVATE_KEY
$ cast call --rpc-url=$GOERLI_PRIVATE_KEY $TARGET_ADDRESS {{method}} {{args}}
$ forge debug --debug {{file}} --sig {{method}} {{args}} {{args1}}
$ forge debug --debug src/SomeContract.sol --sig "myFunc(uint256,string)" 123 "hello"
$ forge test --debug "testSomething()"