Skip to content

feat(cheatcodes): add ability to switch between proptest::test_runner::TestRng and rand::rngs::StdRng #9626

Open
@StackOverflowExcept1on

Description

@StackOverflowExcept1on

Component

Forge

Describe the feature you would like

In #8882, StdRng has been replaced by TestRng, but TestRng does not implement the CryptoRng trait. Because of this I can't just pass TestRng in some places and I have to explicitly use rand_chacha::ChaChaRng? For example, I want to port some crypto library from Rust to Solidity and I have to go into the proptest code, understand that TestRng does not implement CryptoRng and then copy the code from proptest which is based on rand_chacha::ChaChaRng. Maybe it makes sense to create a crate like forge-rng that would also implement CryptoRng and other traits. It might also make sense to allow switching between forge-rng and StdRng.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions