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

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

Open
StackOverflowExcept1on opened this issue Jan 5, 2025 · 0 comments
Labels
A-internals Area: internals T-feature Type: feature

Comments

@StackOverflowExcept1on
Copy link
Contributor

StackOverflowExcept1on commented Jan 5, 2025

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

@StackOverflowExcept1on StackOverflowExcept1on added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Jan 5, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 5, 2025
@zerosnacks zerosnacks added A-internals Area: internals and removed T-needs-triage Type: this issue needs to be labelled labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-internals Area: internals T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

2 participants