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 ignore (multiple) specific and partial reverts in fuzz and invariant tests #9179

Merged
merged 13 commits into from
Jan 22, 2025

Conversation

emo-eth
Copy link
Contributor

@emo-eth emo-eth commented Oct 23, 2024

Motivation

As raised in #4271, sometimes the fuzzer dictionary will uncover real but irrelevant errors in contract code, especially when testing against stateful forks. Runs that encounter anticipated errors should be thrown out and count towards the global assume counter.

Closes #4271.

Solution

This PR adds overloaded and related function definitions to vm.assumeNoRevert, introduced in #8780, as follows:

    /// Represents a "potential" revert reason from a single subsequent call when using `vm.assumeNoReverts`.
    /// Reverts that match will result in a FOUNDRY::ASSUME rejection, whereas unmatched reverts will be surfaced
    /// as normal.
    struct PotentialRevert {
        /// The allowed origin of the revert opcode; address(0) allows reverts from any address
        address reverter;
        /// When true, only matches on the beginning of the revert data, otherwise, matches on entire revert data
        bool partialMatch;
        /// The data to use to match encountered reverts
        bytes revertData;
    }

    /// Discard this run's fuzz inputs and generate new ones if next call reverts with the potential revert parameters.
    #[cheatcode(group = Evm, safety = Safe)]
    function assumeNoRevert(PotentialRevert calldata potentialRevert) external pure;

    /// Discard this run's fuzz inputs and generate new ones if next call reverts with the any of the potential revert parameters.
    #[cheatcode(group = Evm, safety = Safe)]
    function assumeNoRevert(PotentialRevert[] calldata potentialReverts) external pure;

Behavior

  • it should be possible to to reject any specific error without data (by encoding a 4-byte selector as revertData)
  • it should be possible to reject any specific error with arbitrary data (by encoding a signature including data as revertData)
  • it should be possible to reject any specific of error regardless of extra data (by encoding a 4-byte selector and specifying partialMatch as true)
  • it should be possible to reject multiple errors that a single call may produce (overloaded array param)
  • it should be possible to restrict these rejections to a specific reverter (the optional overloaded address reverter param)
  • anticipated reverts should reset after next non-cheatcode external call
  • combining a catch-all vm.assumeNoRevert() with a vm.assumeNoRevert(args) call should result in an error

(Currently an invariant dict related test is failing)

@emo-eth emo-eth force-pushed the emo/expand-assume-no-revert branch 2 times, most recently from 23bb2c6 to 3d057c1 Compare October 24, 2024 00:33
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! left couple of comments, going to move back in draft until fix added

@grandizzy grandizzy marked this pull request as draft October 24, 2024 05:56
@grandizzy
Copy link
Collaborator

@mds1 would be great to have your thoughts re new proposed cheatcodes. Thanks!

@emo-eth emo-eth force-pushed the emo/expand-assume-no-revert branch from 59efe2d to 3800b7a Compare November 2, 2024 00:02
@emo-eth
Copy link
Contributor Author

emo-eth commented Nov 2, 2024

@grandizzy should be in a good state now – apologies, had a hectic week. let me know if anything else looks off.

@jenpaff jenpaff marked this pull request as ready for review November 4, 2024 10:05
@jenpaff
Copy link
Collaborator

jenpaff commented Nov 4, 2024

@grandizzy should be in a good state now – apologies, had a hectic week. let me know if anything else looks off.

moving PR to ready for review

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, left couple of comments.

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good! I pushed a change to simplify test and have one more nit re assume_no_revert fn. @zerosnacks @yash-atreya @klkvr pls chime in when time permits. thank you!

@emo-eth emo-eth requested a review from grandizzy November 6, 2024 22:57
@emo-eth emo-eth force-pushed the emo/expand-assume-no-revert branch from ac4a7d5 to c215515 Compare November 7, 2024 05:23
grandizzy
grandizzy previously approved these changes Nov 7, 2024
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thank you! Pending additional review before merging

@mds1
Copy link
Collaborator

mds1 commented Nov 7, 2024

In general UX LGTM! One thing is let's make sure the behavior between this and the various expectRevert cheats is consistent, e.g. if you pass a 4byte selector does it only match if the revert data is exact, or do partials match also? Given that this cheat is assumeNoRevert for partial match I think it's inconsistent as spec'd in the PR description

/~https://github.com/foundry-rs/forge-std/blob/da591f56d8884c5824c0c1b3103fbcfd81123c4c/src/Vm.sol#L2102-L2124

@emo-eth
Copy link
Contributor Author

emo-eth commented Nov 8, 2024

In general UX LGTM! One thing is let's make sure the behavior between this and the various expectRevert cheats is consistent, e.g. if you pass a 4byte selector does it only match if the revert data is exact, or do partials match also? Given that this cheat is assumeNoRevert for partial match I think it's inconsistent as spec'd in the PR description

/~https://github.com/foundry-rs/forge-std/blob/da591f56d8884c5824c0c1b3103fbcfd81123c4c/src/Vm.sol#L2102-L2124

@mds1 apologies, i can update the description (pending final decision) – @grandizzy suggested having the default behavior to accept partial matches.

having the granularity of assumeNoRevert vs assumeNoPartialRevert would be useful in the scenario of colliding selectors – but that's pretty rare unless intentional. i am having a hard time thinking of cases where a test might be pulling in (arbitrary) external or random revert bytes that might have collisions – but there are possibly some, and it might be worth having the disambiguation.

i do appreciate the explicitness, though i do think assumeNoRevert is already kind of a counter-intuitive name, and assumeNoPartialRevert adds onto that complexity. eg assumeNoRevertPartial is maybe slightly less confusing, but breaks with the expectPartialRevert naming convention...

happy to add back in if there's consensus

@mds1
Copy link
Collaborator

mds1 commented Nov 8, 2024

Thanks for those details, so my thoughts are:

  • We already have expectRevert(bytes4) and expectPartialRevert(bytes4). To this point—"would be useful in the scenario of colliding selectors – but that's pretty rare unless intentional"—I'm unsure of the motivation for this split
  • The least surprising assume behavior would therefore be analogous meaning assumeNoRevert(bytes4) and assumeNoPartialRevert(bytes4)
  • It sounds like there are some breaking change considerations here, which I am not fully up to speed on, in which case that is suitable rationale for having inconsistent behavior between the expect and assume cheats
  • Therefore I'll defer to you and @grandizzy to decide
  • But, we should track this and unify / simplify for foundry v1

@grandizzy
Copy link
Collaborator

It looks like the CI is failing related to the proposed changes:
/~https://github.com/foundry-rs/foundry/actions/runs/12635122448/job/35204363739?pr=9179#step:12:361

weird, I don't see why this test would fail with proposed changes and cannot reproduce the test failure locally either ... 🤔

Likewise not sure why my changes would affect it - but does seem to consistently be failing for polygon between runs 🤔

I rebased PR with master containing fixes for other flaky tests (was thinking that failure could be an effect of those) but same test failing, checking some more why's that

@grandizzy grandizzy added T-feature Type: feature C-forge Command: forge labels Jan 13, 2025
@grandizzy grandizzy force-pushed the emo/expand-assume-no-revert branch 9 times, most recently from 131c1bf to 8e6f3e4 Compare January 13, 2025 16:17
@grandizzy grandizzy force-pushed the emo/expand-assume-no-revert branch from 8e6f3e4 to 31f1e43 Compare January 13, 2025 16:28
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, lgtm! had to rework the failing test and split tested contracts and test contract in different files as they were affecting outcome. waiting for one more review before merging

@grandizzy grandizzy self-assigned this Jan 20, 2025
@emo-eth
Copy link
Contributor Author

emo-eth commented Jan 21, 2025

@zerosnacks @yash-atreya @klkvr would love to get this merged if there aren't any more blockers

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @emo-eth!

LGTM

@zerosnacks zerosnacks merged commit aa04294 into foundry-rs:master Jan 22, 2025
22 checks passed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks unused?

This comment was marked as outdated.

Copy link
Collaborator

@grandizzy grandizzy Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, tests within test_cmd.rs are not importing this file but rather adding same source inline, so this can be removed

zerosnacks added a commit that referenced this pull request Jan 22, 2025
zerosnacks added a commit that referenced this pull request Jan 22, 2025
remove redundant test.sol, follow up of #9179
Jrigada added a commit to matter-labs/foundry-zksync that referenced this pull request Jan 30, 2025
* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of foundry-rs/foundry#9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

* Track foundry-zksync version

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Lubov66 <radolevanja@gmail.com>
Co-authored-by: Nisheeth Barthwal <nisheeth.barthwal@gmail.com>
Jrigada added a commit to matter-labs/foundry-zksync that referenced this pull request Jan 31, 2025
* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of foundry-rs/foundry#9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

* Make it build, then make it pretty

* Add note zk about op-alloy-consensus dep

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Lubov66 <radolevanja@gmail.com>
Co-authored-by: Nisheeth Barthwal <nisheeth.barthwal@gmail.com>
Jrigada added a commit to matter-labs/foundry-zksync that referenced this pull request Feb 5, 2025
* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of foundry-rs/foundry#9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

* feat: Cache invalidation on zksolc version change (#871)

---------

Co-authored-by: elfedy <federico@moonsonglabs.com>
Co-authored-by: Jrigada <jrigada@frba.utn.edu.ar>

* Make it build, then make it pretty

* Add note zk about op-alloy-consensus dep

* chore(main): release foundry-zksync 0.0.5 (#868)

* chore(main): release foundry-zksync 0.0.5

* chore: update Cargo.lock

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>

* feat: implement compiler backwards compatibility policy (#843)

---------

Co-authored-by: Nisheeth Barthwal <nbaztec@gmail.com>

* fix: trim tag name to obtain version (#885)

* trim tag name to obtain version

* include "v" in semantic versions

* chore(main): release foundry-zksync 0.0.6 (#884)

* chore(main): release foundry-zksync 0.0.6

* chore: update Cargo.lock

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>

* fix: fix installation script for v0.0.6 (#887)

* chore: fix script download url

* fix: address script issue

* chore: fix file path

* fix: foundry man artifact name (#886)

fix foundry man artifact name

* chore(main): release foundry-zksync 0.0.7 (#888)

* chore(main): release foundry-zksync 0.0.7

* chore: update Cargo.lock

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>

* chore: fix manpage installation (#889)

chore: fix man script

* chore: update openssl (#894)

* refactor: more dedicated modules for zksync-specific code (#891)

* refactor(cast): move `ZkCast` to dedicated module

* refactor(compile): extract zksync methods

* chore: fmt

* feat(create): move zksync code to dedicated module

* chore: fmt

* chore: clippy

* chore: moar fmt

* Fix tests

* Add zksync configuration in test

* Clippy fix

* Fix erroneous paths in test

* Remove extra space

* Add comments clarifying

* Update crates/forge/tests/cli/config.rs

Co-authored-by: Karrq <francesco@moonsonglabs.com>

* retrieve forge binary

* Add tests for expect revert in zksync

* chore: fix base gas limit test (#9826)

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Lubov66 <radolevanja@gmail.com>
Co-authored-by: Nisheeth Barthwal <nisheeth.barthwal@gmail.com>
Co-authored-by: Tincho <MBerguer@users.noreply.github.com>
Co-authored-by: elfedy <federico@moonsonglabs.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
Co-authored-by: Nisheeth Barthwal <nbaztec@gmail.com>
Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com>
Co-authored-by: Karrq <francesco@moonsonglabs.com>
Jrigada added a commit to matter-labs/foundry-zksync that referenced this pull request Feb 5, 2025
* chore: initial merge conflict resolution for update up to 9f11e6df (#880)

* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of /~https://github.com/foundry-rs/foundry/pull/9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

* Track foundry-zksync version

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Lubov66 <radolevanja@gmail.com>
Co-authored-by: Nisheeth Barthwal <nisheeth.barthwal@gmail.com>

* chore: Fix compilation on upstream 9f11e6df (#882)

* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of /~https://github.com/foundry-rs/foundry/pull/9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

* Make it build, then make it pretty

* Add note zk about op-alloy-consensus dep

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Lubov66 <radolevanja@gmail.com>
Co-authored-by: Nisheeth Barthwal <nisheeth.barthwal@gmail.com>

* chore: Fix tests for upstream merge 9f11e6df (#896)

* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of /~https://github.com/foundry-rs/foundry/pull/9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

* feat: Cache invalidation on zksolc version change (#871)

---------

Co-authored-by: elfedy <federico@moonsonglabs.com>
Co-authored-by: Jrigada <jrigada@frba.utn.edu.ar>

* Make it build, then make it pretty

* Add note zk about op-alloy-consensus dep

* chore(main): release foundry-zksync 0.0.5 (#868)

* chore(main): release foundry-zksync 0.0.5

* chore: update Cargo.lock

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>

* feat: implement compiler backwards compatibility policy (#843)

---------

Co-authored-by: Nisheeth Barthwal <nbaztec@gmail.com>

* fix: trim tag name to obtain version (#885)

* trim tag name to obtain version

* include "v" in semantic versions

* chore(main): release foundry-zksync 0.0.6 (#884)

* chore(main): release foundry-zksync 0.0.6

* chore: update Cargo.lock

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>

* fix: fix installation script for v0.0.6 (#887)

* chore: fix script download url

* fix: address script issue

* chore: fix file path

* fix: foundry man artifact name (#886)

fix foundry man artifact name

* chore(main): release foundry-zksync 0.0.7 (#888)

* chore(main): release foundry-zksync 0.0.7

* chore: update Cargo.lock

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>

* chore: fix manpage installation (#889)

chore: fix man script

* chore: update openssl (#894)

* refactor: more dedicated modules for zksync-specific code (#891)

* refactor(cast): move `ZkCast` to dedicated module

* refactor(compile): extract zksync methods

* chore: fmt

* feat(create): move zksync code to dedicated module

* chore: fmt

* chore: clippy

* chore: moar fmt

* Fix tests

* Add zksync configuration in test

* Clippy fix

* Fix erroneous paths in test

* Remove extra space

* Add comments clarifying

* Update crates/forge/tests/cli/config.rs

Co-authored-by: Karrq <francesco@moonsonglabs.com>

* retrieve forge binary

* Add tests for expect revert in zksync

* chore: fix base gas limit test (#9826)

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: …
Jrigada added a commit to matter-labs/foundry-zksync that referenced this pull request Feb 5, 2025
* fix(ens): don't resolve addr if doesn't contain . (#9635)

* fix(ens): don't resolve addr if doesn't contain .

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix invalid ens name

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* feat(`verify`): default to sourcify if etherscan key not provided (#9630)

* feat(`verify`): default to sourcify if etherscan key not provided

* clippy

* nit

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore(`forge`): rm regex for --debug and --decode-internal (#9572)

* chore(`forge`): rm regex for --debug and --decode-internal

* fix

* fix tests

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* fix(cheatcode): use storage access address instead account access (#9646)

* fix(cheatcode): use storage access address instead account access

* Update crates/cheatcodes/src/evm.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Fix fmt

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Feat: Add `cast chain` support for `ink` & `ink-sepolia` (#9652)

feat: add `cast chain` support for `ink` & `ink-sepolia`

* chore(deps): bump `alloy-chains` (#9653)

* fix: do not remove `snapshots` directory before running the test suite (#9645)

* do not remove snapshots directory before running the test suite, the side effect is that any custom group names or file name changes are not reflected - this is delegated to the end user

* do not remove the `snapshots` directory upon running `forge clean`

* fix(cheatcodes): record state diff only if balance changed (#9658)

* fix(config): disable optimizer by default (#9657)

* fix: disable optimizer by default

* Set default optimizer runs to 200

* fix: incorrect repo link in readme for foundry-compilers (#9660)

fix: incorrect repo link

* feat: add arm64 docker image (#9614)

* feat(docker): build arm64 image

Signed-off-by: jsvisa <delweng@gmail.com>

* wip

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "wip"

This reverts commit a152a4c30b7aa510b95d32d5dc8d8d655e90d7f0.

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "feat(docker): build arm64 image"

This reverts commit 09adcbc0f4129f74831588a7e1665a7064eea2f6.

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): add cross docker build

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(make): multi tags

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(github): use cross build

Signed-off-by: jsvisa <delweng@gmail.com>

* add Dockerfile.cross

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(make): don't recreate cross-builder

Signed-off-by: jsvisa <delweng@gmail.com>

* make: add log

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: missing \

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

* Update docker-publish.yml

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* chore: fix test isolate, different address for caller (#9663)

* fix: set debug none for release profile (#9664)

* chore(deps): weekly `cargo update` (#9668)

Locking 41 packages to latest compatible versions
    Updating alloy-chains v0.1.54 -> v0.1.55
    Updating async-trait v0.1.84 -> v0.1.85
    Updating aws-sdk-sts v1.54.0 -> v1.54.1
    Updating bitflags v2.6.0 -> v2.7.0
    Updating cc v1.2.7 -> v1.2.8
    Updating clap v4.5.23 -> v4.5.26
    Updating clap_builder v4.5.23 -> v4.5.26
    Updating clap_complete v4.5.40 -> v4.5.42
    Updating clap_derive v4.5.18 -> v4.5.24
    Updating handlebars v6.2.0 -> v6.3.0
    Updating inferno v0.12.0 -> v0.12.1
    Updating instability v0.3.6 -> v0.3.7
      Adding itertools v0.14.0
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating nybbles v0.3.3 -> v0.3.4
    Updating op-alloy-consensus v0.9.0 -> v0.9.2
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.2
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Updating phf_generator v0.11.2 -> v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Updating phf_shared v0.11.2 -> v0.11.3
    Updating pin-project v1.1.7 -> v1.1.8
    Updating pin-project-internal v1.1.7 -> v1.1.8
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating prettyplease v0.2.25 -> v0.2.27
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating revm v19.0.0 -> v19.2.0
    Updating rustix v0.38.42 -> v0.38.43
    Updating rustls v0.23.20 -> v0.23.21
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating serde_json v1.0.134 -> v1.0.135
      Adding siphasher v1.0.1
    Updating syn v2.0.94 -> v2.0.96
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating uuid v1.11.0 -> v1.11.1
    Updating winnow v0.6.22 -> v0.6.24
note: pass `--verbose` to see 12 unchanged dependencies behind latest

Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>

* chore(clippy): use next_back instead of last for DoubleEndedIterator (#9666)

* chore(clippy): use next_back instead of last for DoubleEndedIterator

Signed-off-by: jsvisa <delweng@gmail.com>

* more cases

Signed-off-by: jsvisa <delweng@gmail.com>

* last -> next_back

Signed-off-by: jsvisa <delweng@gmail.com>

* len ==0 => is_empty

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix: error handling with retries when waiting for receipt (#9650)

* fix: error handling with retries when waiting for receipt

* Add RetryError::Continue variant, rework receipts tx check

* chore: use "full" for debug (#9670)

* chore: don't warn in RetryError::Continue (#9671)

* test: increase nextest backoff (#9672)

* fix(`script`): use fork_block_number for init sender nonce (#9669)

* fix(`script`): use fork_block_number for init sender nonce

* test

* feat(foundryup): add foundryup self-update (#9609)

* feat(foundryup):: add self-update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* renmae to --update

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* download to tmp file first

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>

* fix(`config`): enable `optimizer` when `optimizer_runs` set in config (#9673)

* fix(`config`): enable optimizer if `optimizer_runs` has been set

* test

* fix(`config`): change optimizer properties to Option

* fix

* nit

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix

* nit

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* fix: propagate color config to TraceWriter (#9679)

* feat(foundryup): check for running processes (#9680)

* chore: add version number to `foundryup` (#9681)

* add version number, display using --version

* use say instead of echo

* add input box for foundryup version to bug template

* fix(config): normalize optimizer settings (#9689)

* ci: use reusable cargo update workflow (#9690)

* chore(deps): bump svm 0.5.10 (#9700)

* fix(verify): strip profile from contract name (#9699)

* feat(`forge`): `--watch` coverage (#9702)

* feat: filter by profile in `vm.getCode` (#9714)

feat: filter by profile in getCode

* feat(chisel): determine proper path to Vm.sol based on proj remappings (#9703)

* chore(deps): weekly `cargo update` (#9715)

* Fix rewrite of User-Agent header (#9707)

* Fix rewrite of User-Agent header

* add test

* add axym to dev deps

* format

* format

* format

* cleanup

* cleanup

* review fixes

* use localhost address

* refactor: properly handle config load errors (#9713)

* refactor: properly handle config load errors

* fix

* doc

* chore: bump version to 0.3.1 to make it easier to identify non-stable builds (#9718)

* bump version number

* bump lockfile

* fix(invariant): handle simple contract names in metrics table (#9724)

* chore: display warning to user if running `nightly` version (#9683)

* use shared compile time version builder

* add warning message on nightly builds

* display warning on nightly builds

* derive nightly build from tag name

* no need to pass IS_NIGHTLY in, derive from tag name

* update warning message

* fix rustfmt

* fix clippy

* clean up, default to always use `-dev` if not on tag

* provide way for users to mute the warning by setting a FOUNDRY_DISABLE_NIGHTLY_WARNING environment variable

* fix fmt

* add profile to version

* fix clippy

* fix fmt

* remove redundant build_timestamp as it is unused

* unify build scripts, update cheatcodes build script, fix vm.getFoundryVersion() cheatcode

* fix clippy

* build timestamp not needed anymore, move to use single build script in foundry_common and export from there

* clean up

* add timestamp due to users / documentation relying on it

* use verbose message format for cli --version, use SemVer compatible unix timestamp for cheatcode, fix nits

* make IS_NIGHTLY_VERSION conditional

* use semver for cheatcode

* fix test

* fix value

* forge fmt

* nits, update getFoundryVersion cheatcode docs

* fix incorrect version passed to forge cli, add unix timestamp to human readable --version

* add tests, add short version / long version, address feedback

* prefer build_timestamp for short version too

* fixes, add anvil tests for parsing

* add back unix timestamp in full version

* fix semver test

* fix(forge): allow install private deps with https and gh token (#9726)

fix(forge): allow install deps with https and gh token

* fix: release process (#9728)

* fix env variable of tag name location

* make tag name more robust, not just matching on strict "nightly" but containing nightly

* prefer using short version in foundryup to avoid cluttering stdout

* pass in tag name (cast to `nightly` if nightly build) during Docker build process

* requires prepare step

* use with instead of env

* env not available in step

* fix build tag

* add test tag for Docker

* pass down tag_name into Dockerfile.cross

* revert docker specific changes, do that as a follow up to unblock

* avoid whitespace diff

* feat: allow remapping of solidity files (#9604)

* feat(remapping): support remapping of .sol files

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(remapping): add testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* typo

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>

* fix(`forge`): disable artifacts for coverage (#9692)

* feat(`forge`): diff artifacts dir for coverage

* nit

* nit

* flip `no_artifacts` to true

* nit

* fix: respect `disable_block_gas_limit` config key (#9732)

fix

* chore: bump compilers (#9735)

* feat(cheatcodes): add ability to ignore (multiple) specific and partial reverts in fuzz and invariant tests (#9179)

* initial pass

add support for multiple reasons, add tests

appease clippy

fix broken tests; fix some assume behavior

remove comment and bad error-surfacing logic

remove redundant param, rename revert.rs, create sol test file

remove unnecessary tests from both test_cmd and AssumeNoRevert.t.sol

use empty vec instead of option<vec>; remove commented test

remove assumeNoPartialRevert; update assumeNoPartialRevert

Simplify test, use snapbox assertion

Redact number of runs

implement assume_no_revert change

* rebase and refactor

* fix tests for overloaded; original failing

* remove erroneous return type

* appease clippy

* allow combining expectRevert with assumeNoRevert

* Apply suggestions from code review

nit

* remove magic string const

* fix error string

* improve invariant selectors weight test

* nit

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>

* fix: use custom build profile in --version (#9733)

* feat(script): show the broadcasted transactions when verbose>=4 (#9655)

* feat(script): add --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): implement the tx print

Signed-off-by: jsvisa <delweng@gmail.com>

* no newline if no args

Signed-off-by: jsvisa <delweng@gmail.com>

* clippy

Signed-off-by: jsvisa <delweng@gmail.com>

* add --dry-run --broadcast testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* lossy stdout test

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): print txs if --dry-run

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): make dry-run as the default behavior

Signed-off-by: jsvisa <delweng@gmail.com>

* fix

Signed-off-by: jsvisa <delweng@gmail.com>

* use writeln instead of push_str

Signed-off-by: jsvisa <delweng@gmail.com>

* implment UIfmt for TransactionMaybeSigned

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: use UIfmt instead

Signed-off-by: jsvisa <delweng@gmail.com>

* dryrun: print contract only if call

Signed-off-by: jsvisa <delweng@gmail.com>

* use [..] to test

Signed-off-by: jsvisa <delweng@gmail.com>

* update testcase

Signed-off-by: jsvisa <delweng@gmail.com>

* feat(script): --dry-run --resume

Signed-off-by: jsvisa <delweng@gmail.com>

* no long input

Signed-off-by: jsvisa <delweng@gmail.com>

* no double newline

Signed-off-by: jsvisa <delweng@gmail.com>

Revert "no double newline"

This reverts commit 6337995e4735b7cb2965962d6a7cd29addf367f7.

Signed-off-by: jsvisa <delweng@gmail.com>

wip

Signed-off-by: jsvisa <delweng@gmail.com>

* print transaction if -vvvv

Signed-off-by: jsvisa <delweng@gmail.com>

* Revert "update testcase"

This reverts commit ed5201c78e61863a32cec46a5b52c8934ab539d7.

Signed-off-by: jsvisa <delweng@gmail.com>

* update test for -vvvv broadcast

Signed-off-by: jsvisa <delweng@gmail.com>

* no dryrun module

Signed-off-by: jsvisa <delweng@gmail.com>

* test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>

* chore: remove redundant `test.sol` (#9736)

remove redundant test.sol, follow up of foundry-rs/foundry#9179

* chore: pass and read tag as `CARGO_TAG_NAME` for cross build (#9738)

* chore: pass and read tag as CARGO_TAG_NAME for cross build

* Nit

* fix(remappings): ignore conflicting remappings (#9521)

* fix(remappings): ignore conflicting remappings

* Fix test, redundant remappings are not allowed anymore

* feat(`forge`): inspect - default to pretty output (#9705)

* fix(`forge`): inspect - mk --pretty default

* print_table helper

* print table method-identifier

* print table errors

* print errors events

* nit

* fix

* rm pretty

* fix

* print abi as table

* fix test

* test

* nit

* clippy

* dedup helpers and tests

* fix

* fix(invariant): lookup fuzz interface abi by name or identifier (#9744)

* feat(foundryup): manage custom built versions (#9746)

* fix(foundryup): set proper version for use call (#9750)

* chore: stop supporting legacy console.sol signatures (#8910)

* feat: stop supporting legacy console.sol signatures

* chore: update console.sol in tests

* Fix test

---------

Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>

* chore(deps): weekly `cargo update` (#9755)

* fix(cheatcode): expect revert only for calls with greater depth than test (#9537)

* fix(cheatcode): expect revert only for calls with greater depth

* Add config to allow expect revert for internal calls

* Fix default config test

* Update crates/cheatcodes/src/inspector.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(`forge bind`): prefix keyword mod names with `r#` (#9761)

* fix(`forge bind`): prefix keyword mod names with r#

* nit

* is_ok

* feat(`cast source`): support alternative explorers (#9762)

* feat(`cast`): support alternative explorers in `source`

* fix

* fix

* feat: override the eyre display handler globally (#9766)

* feat: override the eyre display handler globally

* chore: install handler in anvil

* msg

* ci: set RUST_BACKTRACE=full (#9767)

* perf(coverage): use u32 for IDs, improve analysis (#9763)

* refactor(debugger): renames, less clones

* perf(coverage): use u32 for IDs, improve analysis

* perf: don't keep source maps around, shrink_to_fit

* chore: clippy

* fmt

* fix(coverage): keep EVM version when normalizing for ir-minimum (#9768)

* chore: update README for `1.0` (#9540)

* start adding new benchmarks and recording

* add benchmarks

* add solady compilation benchmark

* crop demo gif to scale better

* clean up

* fix morpho-blue integration test, skewed because of create2 mining

* add compilation comparison for openzeppelin

* add very basic getting started

* add basic examples for each tool

* clean up

* clean up

* use default MIT and Apache 2.0 licenses for auto-recognition by Github

* apply default format of license, using existing fields

* clean up, point to book as primary source rather than crates

* clean up dev docs

* spell fix

* clean up

* nits

* nits

* revert to previous license version, updated format was not necessary - possibly Github related data issue yesterday

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* note dual support

* fix link to actions

Co-authored-by: Lubov66 <radolevanja@gmail.com>

* link directly to existing references rather than overviews

* add designed benchmarks

* improve size slightly

* use center alignment

* fix spacing

* fix spacing

* update image paths

* remove outdated Foundry docs, users should refer to the book

* remove outdated docs, Foundry book should serve as primary source until we actually focus on Foundry as a library

* move demo.gif, remove unused logo

* fix build

* update table in fmt, restore docs for crate

* try fixing rpc that is down

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lubov66 <radolevanja@gmail.com>

* chore: remove ahash (#9769)

* chore(deps): breaking bumps (#9773)

* chore: install deps and create foundry user in cross built image (#9775)

* chore: fix isolate tests (#9776)

* fix: correctly set `gas_limit` reported by Anvil (#9774)

fix gas_limit reported by anvil

* fix(docker): revert to use ubuntu:22.04 as base image (#9777)

fix: use ubuntu:22.04

* fix(cheatcode): support new 7702 spec (#9779)

fix(cheatcode): update revm with support for updated 7702

* fix: avoid returning None for library addresses during fuzzing (#9771)

* avoid returning None for library addresses during fuzzing

* cargo fmt

* randomize address if it belongs to a deployed lib

* return early in happy path

---------

Signed-off-by: 9547 <29431502+9547@users.noreply.github.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Marquis Shanahan <29431502+9547@users.noreply.github.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Cruz Molina <cruz.adam.molina@gmail.com>
Co-authored-by: Drake Evans <31104161+DrakeEvans@users.noreply.github.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: Vladimir <bobahbdb@gmail.com>
Co-authored-by: James <james.wenzel@bridge.xyz>
Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Lubov66 <radolevanja@gmail.com>
Co-authored-by: Nisheeth Barthwal <nisheeth.barthwal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-feature Type: feature
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

feat(cheatcodes): add ability to exclude certain custom errors and revert reason strings from failing tests
7 participants