- Go to Alchemy.
- Create an API key for Alchemy by creating a new app.
For Docker:
docker pull ghcr.io/foundry-rs/foundry:latest
docker run --rm -v $PWD:/shared/ -it --entrypoint /bin/sh ghcr.io/foundry-rs/foundry
For Foundry:
curl -L https://foundry.paradigm.xyz | bash
and then restart your terminal and run foundryup
.
You should be able to run successfully the following command:
forge test --fork-url https://eth-mainnet.alchemyapi.io/v2/<API_KEY> --match Fork
vm.prank(address)
: execute the next call as an arbitrary addressvm.startPrank(address)
vm.stopPrank()
function foo(fuzzedValue)
vm.assume(bool)
forge test --fork-url https://eth-mainnet.alchemyapi.io/v2/<API_KEY> --match <test_name>