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(forge/cheatcodes): "server" feature flag to disable sys env var reads #9038

Open
Tracked by #9012
nhtyy opened this issue Oct 5, 2024 · 0 comments
Open
Tracked by #9012
Labels
A-cheatcodes Area: cheatcodes A-internals Area: internals A-library Area: library T-feature Type: feature

Comments

@nhtyy
Copy link
Contributor

nhtyy commented Oct 5, 2024

Component

Forge

Describe the feature you would like

Tracked by #9012

In order to safely run tests on untrusted contracts in the server setting, currently users must fork to disable system env reads.

I propose adding a feature flag to the forge library crate and the cheatcodes crate to use a provided Hashmap<String, String> as an "injected environment".

I think this should be set on the MultiContractRunnerBuilder and then passed to the cheat codes config

Additional context

No response

@nhtyy nhtyy added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Oct 5, 2024
@zerosnacks zerosnacks added A-cheatcodes Area: cheatcodes A-library Area: library A-internals Area: internals and removed T-needs-triage Type: this issue needs to be labelled labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes A-internals Area: internals A-library Area: library T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

2 participants