Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 383 Bytes

difficulty.md

File metadata and controls

23 lines (14 loc) · 383 Bytes

difficulty

Signature

function difficulty(uint256) external;

Description

Sets block.difficulty.

If used with a post-merge EVM version (Paris and onwards), it will revert. In that case, use vm.prevrandao instead.

Examples

vm.difficulty(25);
emit log_uint(block.difficulty); // 25