Skip to content

Do not merge - just showing what changes we have made since forking from foundry #6

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

Draft
wants to merge 1,963 commits into
base: foundry-rs-original-commit-hash
Choose a base branch
from

Conversation

glitch003
Copy link

This PR is just to see our changes

byteshijinn and others added 30 commits November 22, 2024 17:58
… cache` to trace with local artifacts (foundry-rs#7359)

* add RunArgs generate_local_signatures to enable trace with local contracts functions and events

* make generate_local_signatures as a helper function

* rename generate_local_signatures to cache_local_signatures
merge project signatures with exists cached local signatures instead of
just override them

* extract duplicate method for CachedSignatures

* fix cache load path

* fix for lint

* fix fot lint

* remove unnecessary `let` binding

* fix for format check

* fix for clippy check

* fix for clippy check

* Move cache in forge selectors, use local artifacts for cast run and send traces

* Add test

* Review changes:
- compile without quiet, fix test
- merge local sources with etherscan

* Update crates/evm/traces/src/debug/sources.rs

Co-authored-by: Arsenii Kulikov <[email protected]>

---------

Co-authored-by: grandizzy <[email protected]>
Co-authored-by: grandizzy <[email protected]>
Co-authored-by: Arsenii Kulikov <[email protected]>
Locking 36 packages to latest compatible versions
    Updating async-compression v0.4.17 -> v0.4.18
    Updating bytemuck v1.19.0 -> v1.20.0
    Updating const-hex v1.13.1 -> v1.13.2
      Adding core-foundation v0.10.0
    Updating cpufeatures v0.2.15 -> v0.2.16
    Updating h2 v0.4.6 -> v0.4.7
    Updating hyper v1.5.0 -> v1.5.1
    Updating impl-trait-for-tuples v0.2.2 -> v0.2.3
    Updating interprocess v2.2.1 -> v2.2.2
    Updating itoa v1.0.11 -> v1.0.13
    Updating litemap v0.7.3 -> v0.7.4
    Updating op-alloy-consensus v0.6.5 -> v0.6.8
    Updating op-alloy-rpc-types v0.6.5 -> v0.6.8
    Updating portable-atomic v1.9.0 -> v1.10.0
    Updating proc-macro2 v1.0.89 -> v1.0.92
    Updating quick-junit v0.5.0 -> v0.5.1
    Updating quick-xml v0.36.2 -> v0.37.1
    Updating rustix v0.38.40 -> v0.38.41
    Updating rustls v0.23.17 -> v0.23.18
    Updating rustls-native-certs v0.8.0 -> v0.8.1
    Updating scale-info v2.11.5 -> v2.11.6
    Updating scale-info-derive v2.11.5 -> v2.11.6
    Updating schannel v0.1.26 -> v0.1.27
      Adding security-framework v3.0.1
    Updating semver-parser v0.10.2 -> v0.10.3
    Updating syn v2.0.87 -> v2.0.89
    Updating sync_wrapper v1.0.1 -> v1.0.2
    Updating unicode-ident v1.0.13 -> v1.0.14
    Updating url v2.5.3 -> v2.5.4
    Updating wasmtimer v0.4.0 -> v0.4.1
    Updating webpki-roots v0.26.6 -> v0.26.7
    Updating yoke v0.7.4 -> v0.7.5
    Updating yoke-derive v0.7.4 -> v0.7.5
    Updating zerofrom v0.1.4 -> v0.1.5
    Updating zerofrom-derive v0.1.4 -> v0.1.5
    Updating zip v2.2.0 -> v2.2.1
note: pass `--verbose` to see 18 unchanged dependencies behind latest

Co-authored-by: mattsse <[email protected]>
…as alias (foundry-rs#9406)

remove duplicate gas_limit field, declare as alias
Revert "feat: remove ethers (foundry-rs#8826)"

This reverts commit d739704.
* adhere to --quiet flag

* revert case-specific handling of writing to progress, redundant

* handle writing to multiprogress, previously panic

* make verification process compatible with --json flag

* revert verifaction --json flow, too messy

* clean up

* revert

* handle json correctly for script deployment logs, incl. receipts

* avoid incompatible lines with json output

* revert unnecessary change

* add json and quiet test

* address feedback

* fix incorrect ordering
…foundry-rs#9420)

* add --broadcast flag to forge create, default to dry run

* nits

* fix tests

* add dry run tests incl --json

* minor fixes, failing test due to minor bytecode difference
…`-vvvvv` (foundry-rs#9013)

* Add options for state changes output and json output in cast run command

* fix test

* add back serde_json in Cargo.lock

* format using nightly

* rename parameter

* update revm-inspectors

* supress clippy warning and merge master

* add serde_json

* disable some stdout print when --json option is used

* remove unnecessary check

* replace with sh_println

* replace with shell::is_json

* Show storage for verbosity > 1, add test

* Change verbosity to > 4 for both cast and forge test, add test, fix ci

---------

Co-authored-by: grandizzy <[email protected]>
* feat: rewrite inline config using figment

* wip

* wip

* fix: use same GasLimit type

* wip

* fixes

* tests

* test fixes

* fmt

* test update
…dry-rs#9424)

* script: evm_opts -> evm_args

Signed-off-by: jsvisa <[email protected]>

* forge: evm_opts -> evm_args

Signed-off-by: jsvisa <[email protected]>

* chisel: evm_opts -> evm_args

Signed-off-by: jsvisa <[email protected]>

* forge: evm_opts -> evm_args

Signed-off-by: jsvisa <[email protected]>

---------

Signed-off-by: jsvisa <[email protected]>
This pull request addresses a minor but important syntax issue in the conditional statement used to check for the presence of libusb on macOS.
* feat: add timeouts to fuzz testing

Adds --fuzz-timeout-secs to fuzz tests which will cause a property
test to timeout after a certain number of seconds. Also adds
--fuzz-allow-timeouts so that timeouts are optionally not
considered to be failures.

* simplify timeout implementation

* use u32 for timeout

* switch back to failing for timeouts

* clippy

* Nits:
- move logic to interrupt invariant test in depth loop
- add and reuse start_timer fn and TEST_TIMEOUT constant
- add fuzz and invariant tests
- fix failing test

* Fix fmt

* Changes after review: introduce FuzzTestTimer

---------

Co-authored-by: grandizzy <[email protected]>
…oundry-rs#9428)

* feat(cast): Add custom error decoding support

* Review changes

* Changes after review: decode with Openchain too, add test

* Review changes: nit, handle incomplete selectors
* use alloy-chains' is_arbitrum

* clean up
* feat: specify `rpc_headers` in cast and config

* test
* script: add --create2-deployer

Signed-off-by: jsvisa <[email protected]>

* script: add create2 deployer

Signed-off-by: jsvisa <[email protected]>

* evm/constants: add get_create2_deployer from env or default

Signed-off-by: jsvisa <[email protected]>

* evm/core: use env's create2

Signed-off-by: jsvisa <[email protected]>

* script: fetch create2_deployer from env or default

Signed-off-by: jsvisa <[email protected]>

* fmt

Signed-off-by: jsvisa <[email protected]>

* docs

Signed-off-by: jsvisa <[email protected]>

* evm/constants: use sync::LazyLock

Signed-off-by: jsvisa <[email protected]>

* evm/inspector: add fn create2_deployer

Signed-off-by: jsvisa <[email protected]>

* config: add create2_deployer

Signed-off-by: jsvisa <[email protected]>

* evm/inpector: set create2 deployer

Signed-off-by: jsvisa <[email protected]>

* evm-opts: add create2_deployer

Signed-off-by: jsvisa <[email protected]>

* script: pass deployer2-creater from cli or config

Signed-off-by: jsvisa <[email protected]>

* script: use create2 address to fill tx meta

Signed-off-by: jsvisa <[email protected]>

* config: create2 address ,no Option

Signed-off-by: jsvisa <[email protected]>

* script/runner: set inspector.create2_deployer with evm_opts

Signed-off-by: jsvisa <[email protected]>

* clippy

Signed-off-by: jsvisa <[email protected]>

* doc typo

Signed-off-by: jsvisa <[email protected]>

* fix/evm-opts: default value of create2_deployer

Signed-off-by: jsvisa <[email protected]>

* evm/core: no need to extract create2 deployer from env

Signed-off-by: jsvisa <[email protected]>

* evm/core: implement Default for EvmOpts.create2_deployer

Signed-off-by: jsvisa <[email protected]>

* evm/core: use constants::DEFAULT create2 deployer

Signed-off-by: jsvisa <[email protected]>

* evm/core: output create2 deployer

Signed-off-by: jsvisa <[email protected]>

unit test

Signed-off-by: jsvisa <[email protected]>

* evm/evm: set create2 deployer for trace and stack

Signed-off-by: jsvisa <[email protected]>

* cast/{run,call}: set create2 deployer

Signed-off-by: jsvisa <[email protected]>

* forge/runner: set create2 deployer

Signed-off-by: jsvisa <[email protected]>

* script: set create2 deployer for stack

Signed-off-by: jsvisa <[email protected]>

* verify: set create2 deployer

Signed-off-by: jsvisa <[email protected]>

* clipy

Signed-off-by: jsvisa <[email protected]>

* fmt

Signed-off-by: jsvisa <[email protected]>

* script: use executor's create2 deployer

Signed-off-by: jsvisa <[email protected]>

* script: wrap create2_deployer inside executor

Signed-off-by: jsvisa <[email protected]>

* script: add custom create2 test

Signed-off-by: jsvisa <[email protected]>

* script: add nonexist create2

Signed-off-by: jsvisa <[email protected]>

* all: set EvmOpts.create2_deployer

Signed-off-by: jsvisa <[email protected]>

* script: no need to pass create2_deployer in fill_metadata

Signed-off-by: jsvisa <[email protected]>

* evm/executor: duplicate set create2's deployer address

Signed-off-by: jsvisa <[email protected]>

* evm: check create2 codehash

Signed-off-by: jsvisa <[email protected]>

* tests/script: test with notmatched create2 deployer

Signed-off-by: jsvisa <[email protected]>

* clipy

Signed-off-by: jsvisa <[email protected]>

* evm: skip serialize create2_deployer if none

Signed-off-by: jsvisa <[email protected]>

* test: add test of deployer2 address

Signed-off-by: jsvisa <[email protected]>

* Update crates/script/src/lib.rs

---------

Signed-off-by: jsvisa <[email protected]>
Co-authored-by: Arsenii Kulikov <[email protected]>
…oundry-rs#9438)

* feat(coverage): add function line end to LCOV, clean ups

* fix(coverage): store normalized source code

* fix(coverage): add a Line item for functions too

* test: update snapshots

* clean
Locking 52 packages to latest compatible versions
    Updating alloy-dyn-abi v0.8.12 -> v0.8.14
    Updating alloy-eip7702 v0.4.1 -> v0.4.2
    Updating alloy-json-abi v0.8.12 -> v0.8.14
    Updating alloy-primitives v0.8.12 -> v0.8.14
    Updating alloy-sol-macro v0.8.12 -> v0.8.14
    Updating alloy-sol-macro-expander v0.8.12 -> v0.8.14
    Updating alloy-sol-macro-input v0.8.12 -> v0.8.14
    Updating alloy-sol-type-parser v0.8.12 -> v0.8.14
    Updating alloy-sol-types v0.8.12 -> v0.8.14
    Updating bon v3.0.2 -> v3.1.1
    Updating bon-macros v3.0.2 -> v3.1.1
    Updating bytes v1.8.0 -> v1.9.0
    Updating cargo-platform v0.1.8 -> v0.1.9
    Updating cc v1.2.1 -> v1.2.2
    Updating const-hex v1.13.2 -> v1.14.0
    Updating divan v0.1.15 -> v0.1.16
    Updating divan-macros v0.1.15 -> v0.1.16
    Updating errno v0.3.9 -> v0.3.10
    Updating foundry-fork-db v0.7.1 -> v0.7.2 (available: v0.8.0)
    Updating gix-config-value v0.14.9 -> v0.14.10
    Updating gix-date v0.9.1 -> v0.9.2
    Updating gix-path v0.10.12 -> v0.10.13
    Updating gix-sec v0.10.9 -> v0.10.10
    Updating gix-validate v0.9.1 -> v0.9.2
    Updating hashbrown v0.15.1 -> v0.15.2
    Updating http-range-header v0.4.1 -> v0.4.2
    Updating itoa v1.0.13 -> v1.0.14
    Updating jiff v0.1.14 -> v0.1.15
    Updating js-sys v0.3.72 -> v0.3.74
    Updating libc v0.2.164 -> v0.2.167
    Updating mdbook v0.4.42 -> v0.4.43
    Updating miette v7.2.0 -> v7.4.0
    Updating miette-derive v7.2.0 -> v7.4.0
    Updating mio v1.0.2 -> v1.0.3
    Updating rustc-hash v2.0.0 -> v2.1.0
    Updating rustls v0.23.18 -> v0.23.19
    Updating socket2 v0.5.7 -> v0.5.8
    Updating syn v2.0.89 -> v2.0.90
    Updating syn-solidity v0.8.12 -> v0.8.14
    Updating terminal_size v0.4.0 -> v0.4.1
    Updating tracing v0.1.40 -> v0.1.41
    Updating tracing-attributes v0.1.27 -> v0.1.28
    Updating tracing-core v0.1.32 -> v0.1.33
    Updating tracing-error v0.2.0 -> v0.2.1
    Updating tracing-subscriber v0.3.18 -> v0.3.19
    Updating wasm-bindgen v0.2.95 -> v0.2.97
    Updating wasm-bindgen-backend v0.2.95 -> v0.2.97
    Updating wasm-bindgen-futures v0.4.45 -> v0.4.47
    Updating wasm-bindgen-macro v0.2.95 -> v0.2.97
    Updating wasm-bindgen-macro-support v0.2.95 -> v0.2.97
    Updating wasm-bindgen-shared v0.2.95 -> v0.2.97
    Updating web-sys v0.3.72 -> v0.3.74
note: pass `--verbose` to see 43 unchanged dependencies behind latest

Co-authored-by: mattsse <[email protected]>
@glitch003 glitch003 force-pushed the foundry-rs-original-commit-hash branch from 8e6224e to f64fe13 Compare February 6, 2025 23:13
turbocrime and others added 27 commits February 7, 2025 16:05
…s#9710)

* feat: gas snapshot emit config

* review change comment

---------

Co-authored-by: turbocrime <[email protected]>
Locking 38 packages to latest compatible versions
    Updating alloy-chains v0.1.58 -> v0.1.59
    Updating alloy-trie v0.7.8 -> v0.7.9
    Updating aurora-engine-modexp v1.1.0 -> v1.2.0
    Updating aws-config v1.5.15 -> v1.5.16
    Updating aws-runtime v1.5.4 -> v1.5.5
    Updating aws-sdk-kms v1.58.0 -> v1.59.0
    Updating aws-sdk-sso v1.57.0 -> v1.58.0
    Updating aws-sdk-ssooidc v1.58.0 -> v1.59.0
    Updating aws-sdk-sts v1.58.0 -> v1.59.0
    Updating aws-sigv4 v1.2.7 -> v1.2.8
    Updating aws-smithy-runtime v1.7.7 -> v1.7.8
    Updating aws-smithy-types v1.2.12 -> v1.2.13
    Updating aws-types v1.3.4 -> v1.3.5
   Unchanged axum v0.7.9 (available: v0.8.1)
   Unchanged backtrace v0.3.71 (available: v0.3.74)
    Updating bytes v1.9.0 -> v1.10.0
    Updating cc v1.2.11 -> v1.2.13
    Updating clap v4.5.27 -> v4.5.28
    Updating clap_derive v4.5.24 -> v4.5.28
    Updating comfy-table v7.1.3 -> v7.1.4
      Adding const_format v0.2.34
      Adding const_format_proc_macros v0.2.34
   Unchanged derive_more v1.0.0 (available: v2.0.1)
   Unchanged evmole v0.6.2 (available: v0.7.0)
    Updating gcloud-sdk v0.26.2 -> v0.26.3
    Updating jiff v0.1.28 -> v0.1.29
    Updating jsonwebtoken v9.3.0 -> v9.3.1
    Updating once_cell v1.20.2 -> v1.20.3
    Updating op-alloy-consensus v0.10.0 -> v0.10.2
    Updating op-alloy-rpc-types v0.10.0 -> v0.10.2
    Updating parity-scale-codec v3.6.12 -> v3.7.4
    Updating parity-scale-codec-derive v3.6.12 -> v3.7.4
    Updating pin-project v1.1.8 -> v1.1.9
    Updating pin-project-internal v1.1.8 -> v1.1.9
   Unchanged proptest v1.5.0 (available: v1.6.0)
   Unchanged protobuf v3.3.0 (available: v3.7.1)
   Unchanged protobuf-support v3.3.0 (available: v3.7.1)
   Unchanged rand v0.8.5 (available: v0.9.0)
    Updating rustc-hash v2.1.0 -> v2.1.1
    Updating scc v2.3.0 -> v2.3.3
    Updating sdd v3.0.5 -> v3.0.7
   Unchanged solang-parser v0.3.3 (available: v0.3.4)
   Unchanged strum v0.26.3 (available: v0.27.0)
    Updating toml v0.8.19 -> v0.8.20
    Updating uuid v1.12.1 -> v1.13.1
   Unchanged vergen v8.3.2 (available: v9.0.4)
    Updating wait-timeout v0.2.0 -> v0.2.1
    Updating which v7.0.1 -> v7.0.2
    Updating winnow v0.7.0 -> v0.7.1
note: to see how you depend on a package, run `cargo tree --invert --package <dep>@<ver>`

Co-authored-by: mattsse <[email protected]>
* feat(forge): add watch mode to forge fmt

* keen fmt run sync
* feat(`common`): `PathOrContractInfo`

* fix

* docs

* nit

* test

* move find abi helper to ContractsByArtifact

* nit

* fix

* nit

* fix

* nit

* ensure sol file

* account for vyper contracts

* nit
…oundry-rs#9861)

* add --alloy-rev, marked as conflicting with --alloy-version, updated --alloy-version to use crates.io whereas rev uses git

* fix forge bind upon re-run after crate was built

* clarify github / crates target

* minor doc fixes

* dedupe dep check

* fix fmt
…s#9883)

* return nonce and signature for deposit tx type

* fix clippy
* feat(`forge`)!: flip `no_commit` to `commit` + don't commit installations by default

* fix tests + always commit when initialized via template

* fix

* nit
* fix(inspect): do not strip comments when yul print

* Update crates/forge/bin/cmd/inspect.rs

Co-authored-by: DaniPopes <[email protected]>

---------

Co-authored-by: DaniPopes <[email protected]>
…s#9890)

* log error if request response fails

* use warning as it is not a server side failure but a failing client request

* prefer using node_info! macro

* improve error format
* add test for inline isolate configuration

* clean up docs

* clarify

* prefer config, add comment
…files (foundry-rs#9901)

* fix(config): enable optimizer if optimizer runs > 0 in additional profiles

* Improved test
…compatibility (foundry-rs#9913)

clarify block timestamp is always UTC
* fix(`forge`): catch test contract deployment failures

* nit

* test

* fix

* nit

* Revert "nit"

This reverts commit 5712a93.

* Revert "fix"

This reverts commit 9f6bee1.

* fix test

* cleaner

* nit

Co-authored-by: zerosnacks <[email protected]>

---------

Co-authored-by: zerosnacks <[email protected]>
…codes (foundry-rs#9845)

* feat: add foundryVersionCmp and foundryVersionAtLeast cheatcode

* fix: change the acceptable version string in version cmp cheatcodes to major.minor.patch

---------

Co-authored-by: grandizzy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.