Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 467 Bytes

select-fork.md

File metadata and controls

28 lines (17 loc) · 467 Bytes

selectFork

Signature

function selectFork(uint256 forkId) external;

Description

Takes a fork identifier created by createFork and sets the corresponding forked state as active.

Examples

Select a previously created fork:

uint256 forkId = vm.createFork(MAINNET_RPC_URL);

vm.selectFork(forkId);

assertEq(vm.activeFork(), forkId);

SEE ALSO