This repo contains template files for a new Foundry project.
This is not a Foundry project but contains the files that can be copied into a new project after running forge init
.
Think of the example spaceship created by Hactar for Krikkit in the Hitchhiker's Guide to the Galaxy - Life, the Universe, and Everything. This is the model ship, not a working ship itself 🚀🏏
git clone https://github.com/EridianAlpha/foundry-template.git
This should happen automatically when first running a command, but the installation can be manually triggered with the following commands:
git submodule init
git submodule update
make install
Use the .env.example
file as a template to create a .env
file.
make test
make test-v
make test-summary
make coverage
make coverage-report
Deploys SimpleSwap and all modules to the Anvil chain specified in the .env
file.
Chain | Command |
---|---|
Anvil | make deploy anvil |
Holesky | make deploy holesky |
Base Sepolia | make deploy base-sepolia |
Base Mainnet | make deploy base-mainnet |
Interactions are defined in ./script/Interactions.s.sol
If DEPLOYED_CONTRACT_ADDRESS
is set in the .env
file, that contract address will be used for interactions.
If that variable is not set, the latest deployment on the specified chain will be used.
Send ETH to the contract using a intermediate selfdestruct contract.
This does not call the receive
function on the contract.
Input value in ETH e.g. 0.15
.
Chain | Command |
---|---|
Anvil | make forceSendEth anvil |
Holesky | make forceSendEth holesky |
Base Sepolia | make forceSendEth base-sepolia |
Base Mainnet | make forceSendEth base-mainnet |