Solidity-Pathshala icon indicating copy to clipboard operation
Solidity-Pathshala copied to clipboard

Update lottery.sol: `block.difficulty` is deprecated

Open 0xScratch opened this issue 2 years ago • 1 comments

🛠️ Fixes Issue

Actually, the use of block.difficulty has been deprecated since the VM version Paris. Now, block.prevrandao is used which returns a random number based on the beacon chain

✔️ Check List (Check all the applicable boxes)

  • [x] My code follows the code style of this project.
  • [x] This PR does not contain plagiarized content.
  • [x] The title of my pull request is a short description of the requested changes.

0xScratch avatar Oct 10 '23 14:10 0xScratch

Our team will soon review your PR. Thanks @Aryan9592 :)

github-actions[bot] avatar Oct 10 '23 14:10 github-actions[bot]