We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4ffd95 commit 88f49e5Copy full SHA for 88f49e5
contracts/Lottery.sol
@@ -1,5 +1,5 @@
1
// SPDX-License-Identifier: MIT
2
-pragma solidity ^0.8.12;
+pragma solidity ^0.8.20;
3
4
import "@openzeppelin/contracts/utils/Strings.sol";
5
@@ -63,7 +63,7 @@ contract Lottery {
63
* @return index of the player within our list
64
*/
65
function random() private view returns (uint) {
66
- return uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp, players)));
+ return uint(keccak256(abi.encodePacked(block.prevrandao, block.timestamp, players)));
67
}
68
69
/**
0 commit comments