Skip to content

feat: vm.depth() cheatcode to return the depth of the current invariant run #2985

@mds1

Description

@mds1

Component

Forge

Describe the feature you would like

Two enables two use cases that I can't think of good workarounds for:

  1. Logging all sequences for all runs to a file with vm.writeLine()
  2. Skipping checks on depth=0, i.e. skip the "invariant must hold at the start" check. The use case here is testing that a variable monotonically increases and before any calls are made, since at the start "last value" and "current value" are the same.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Next Up

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions