getSlotNumber
Signature
Section titled “Signature”function getSlotNumber() external view returns (uint64 slotNumber);Description
Section titled “Description”Gets the current block.slotnum, the consensus-layer slot number that EIP-7843 exposes through the SLOTNUM opcode.
This cheatcode is only available from the Amsterdam hardfork onwards, and reverts on earlier hardforks.
Examples
Section titled “Examples”vm.rollSlot(100);assertEq(vm.getSlotNumber(), 100);