Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 403 Bytes

prevrandao.md

File metadata and controls

23 lines (14 loc) · 403 Bytes

prevrandao

Signature

function prevrandao(bytes32) external;

Description

Sets block.prevrandao.

If used with an EVM version previous to the Paris hard fork, it will revert. In that case, use vm.difficulty instead.

Examples

vm.prevrandao(bytes32(uint256(42)));
emit log_uint(block.prevrandao); // 42