When can we use FORK_URL as Alchemy API key during foundry test? I am trying to learn how to use foundry, but seems like a youtuber is using FORK_URL as Alchemy API key. Is FORK_URL depends on a mainnet or testnet?

1 Answer 1


Depends on your app in Alchemy; if it's on mainnet - you can use it on mainnet, if it's on Sepolia - you can use it on Sepolia.

--fork-url just gives you an option to "live" testing your code on a network, rather than locally on your machine.

You can read more about it in Foundry's Docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.