Skip to content

Implement vm.envOr(...) cheatcodes #68

@RaoulSchaffranek

Description

@RaoulSchaffranek

Simbolik fails when it runs into a vm.envOr(...) cheat code.

Simbolik doesn't have access to environment variables, due to its client-server architecture, and copying env vars from the user system to mock a server environment may impose security risks. For example, consider an env var that contains some private keys - we certainly don't want to expose them anywhere.

In the case of vm.envOr, however, we could always return the default value given in the second argument.

This is needed, for example, to debug Optimism's EthLockbox.t.sol contracts (and most tests that inherit from CommonTest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions