Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PREVRANDAO Support #3372

Closed
mattdesl opened this issue Sep 20, 2022 · 5 comments
Closed

PREVRANDAO Support #3372

mattdesl opened this issue Sep 20, 2022 · 5 comments
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@mattdesl
Copy link

Describe the Feature

Looking for a way to access PREVRANDAO (the mix of the RANDAO from the previously confirmed block).

This might already exist in the field mixHash (which is not exposed in Ethers last I tried), this field should now be renamed to prevRandao as of the merge.

The goal of this would be to give application and game developers access to a strong verifiable PRNG.

For details on this:
https://eips.ethereum.org/EIPS/eip-4399

Code Example

No response

@mattdesl mattdesl added the enhancement New feature or improvement. label Sep 20, 2022
@zemse
Copy link
Collaborator

zemse commented Sep 21, 2022

Yep it makes sense to include it in the Block interface. cc: @ricmoo

If you are looking for a temp work-around:

const block = await provider.send('eth_getBlockByNumber', [ethers.utils.hexValue(15581032), false])
block.mixHash // "0x1d5c6617045ff0d163123b8dbc0f4c55f91057139973def38ec0e1164f215c04"

@ricmoo ricmoo added the on-deck This Enhancement or Bug is currently being worked on. label Jan 18, 2023
@ricmoo
Copy link
Member

ricmoo commented Jan 18, 2023

Thanks! I'll add this to v6. :)

@ricmoo ricmoo added the v6 Issues regarding v6 label Jan 18, 2023
@forhas
Copy link

forhas commented Apr 10, 2024

@ricmoo
Was this added by any chance? Can't find a way to get PREVRANDAO yet

@ricmoo ricmoo added minor-bump Planned for the next minor version bump. next-patch Issues scheduled for the next arch release. labels Apr 10, 2024
@ricmoo
Copy link
Member

ricmoo commented Apr 10, 2024

Thanks for the bump. I have a minor bump going out this week and will investigate this. :)

ricmoo added a commit that referenced this issue Apr 12, 2024
@ricmoo
Copy link
Member

ricmoo commented Apr 17, 2024

Added in v6.12.0.

Thanks! :)

@ricmoo ricmoo closed this as completed Apr 17, 2024
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. next-patch Issues scheduled for the next arch release. minor-bump Planned for the next minor version bump. labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

4 participants