rollSlot
Signature
Section titled “Signature”function rollSlot(uint64 newSlotNumber) external;Description
Section titled “Description”Sets block.slotnum, the consensus-layer slot number that EIP-7843 exposes through the SLOTNUM opcode. Unlike roll and warp, it doesn’t change the block number or timestamp.
This cheatcode is only available from the Amsterdam hardfork onwards, and reverts on earlier hardforks.
Examples
Section titled “Examples”uint256 blockNumber = block.number;vm.rollSlot(100);assertEq(vm.getSlotNumber(), 100);assertEq(block.number, blockNumber); // unchanged