Skip to content

feat(cheatcodes): add vm.foundryVersionAtLeast + vm.foundryVersionCmp to make it easier to write conditional version logic #9725

Closed
@zerosnacks

Description

@zerosnacks

Followup from #9683

vm.getFoundryVersion will now use the format forge 0.3.0-dev+b3d0002118.1737037945.debug

<cargo_version>-<tag>+<git_sha_short>.<unix_build_timestamp>.<profile>

We should provide a function that does the comparison directly like vm.versionAtLeast("1.2.3") and/or vm.versionTimestampAtLeast(unix)

Originally posted by @DaniPopes in #9683 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions