Skip to content
Discussion options

You must be logged in to vote

Your trace shows the test did run on the fork: block: 11991875, On ChainId: 11155111 (Sepolia), and the raffleEntered steps run before fulfillRandomWords. Modifiers run in order, so with skipFork raffleEntered, a working skipFork would have returned before anything else ran. That means your skipFork isn't skipping.

Compare it with the course version (RaffleTest.t.sol):

modifier skipFork() {
    if (block.chainid != 31337) {   // or LOCAL_CHAIN_ID from your HelperConfig
        return;
    }
    _;
}

Common mistakes: == instead of !=, comparing against the wrong chain ID (for example 11155111), or leaving out the return;, so _; runs anyway.

Why it reverts on the fork: on Sepolia, vrfCoordi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@0xfryex
Comment options

Answer selected by 0xfryex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants