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(foundry): update from upstream #187

Merged
merged 239 commits into from
Dec 12, 2023
Merged

Conversation

Deniallugo
Copy link
Collaborator

@Deniallugo Deniallugo commented Dec 8, 2023

What πŸ’»

  • Updates foundry-zksync with upstream changes
  • Support zkforge test

Why βœ‹

  • Work in progress to support tests

Evidence πŸ“·

Tests pass

ZePedroResende and others added 30 commits October 20, 2023 00:21
* feat(anvil): Fix `ots_getInternalOperations`

* Motivation

The otterscan `ots_getInternalOperations` was given incorrect values and
fully crashing when `SELFDESTRUCTS` where present.
The `type` field in the response for this endpoint is incorrectly serialized.

* Solution

Use the `MinedTransaction` instead of a parity traces to have more
granular controll on the specific transactions that we want to filter
out in the internal operations and the specific parameters that we want
to have access to.

Fix the serialization for the`type` field in the response.

* feat(anvil): fix create2 handling in `ots_getInternalOperations`
* fix `forge verify-contract` etherscan cloudflare bug

Etherscan verification for non-mainnet chains requires a question
mark at the end of the verifier url in order to prevent a forward slash
from being added to the url which trips a cloudflare rule on requests
from ec2 boxes.

Verification on both Goerli and Sepolia both fails without this
character present.

Hardhat-verify does not add the extra forward slash to the verifier url
and has no issues verifying contracts on etherscan.

Fixes #4865, #5251, #5741

* run cargo +nightly fmt -- --check

* check if the api url already ends with ?

Also apply the fix to --verifier-url urls
Adds documentation of `disable-start` and `disable-end`. See foundry-rs/foundry#4998
* feat: find and replace all ethers_solc mentions outside anvil

* chore: keep resolving errors as fuzz is getting migrated

* feat: fuzz/trace changes

* feat: partial trace migration

* chore: use temporal sol! macro in diff file for decode migration

* feat: use proptest traits instead of custom impl

* chore: address comments

* chore: remove alloy console bindings

* feat: introduce foundry-block-explorers

* chore: partial common abi helpers migration

* feat: partial decode migration

* feat: re-introduce block-explorers

* feat: fix compiler errors

* chore

* chore: tentative inspector migration

* feat: switch to using static decoder to decode errors

* chore: clippy

* feat: migrate trace types temporarily

* chore: replace ethers tracing types for local tracing types

* fix: handle decoding with static decoder, tests

* chore: use JsonAbi for console/hardhat/hevm abis

* chore: add todo

* chore: replace types downstream and remove glue

* feat: fix last evm issues, start fixing downstream type issues

* chore: cargo

* chore: more downstream error fixes

* chore: fix test files

* chore: more downstream fixes

* chore: fmt

* feat: migrate unit utils, replace

* chore: fix tests, fmt

* compiles

* clippy

* chore: clippy

* chore: last fixes

* chore: update block explorers

* chore: actually coerce values correctly

* chore: fix broken test

* chore: fix estimation test, parse values as alloy nums

* chore: fix abi parsing

* chore: selector tests

* chore: fix more tests, remove more glue

* chore: properly decode logs

* chore: use selector_type to handle tuples correctly

* chore: clippy and fix another test

* chore: fix remaining abi tests

* chore: use proptest traits for fuzzer

* more test fixes ongod

* clippy

* chore: use abigen for console logs for now

* fix: generate valid values in fuzzer

* chore: clippy

* chore: readd settings

* chore: various fixes

* chore: fix script arguments decoding

* chore: fix more tests

* chore: last ots fixes

* fix: decoding

* chore: clippy

* chore: fmt

* chore: fix deny check

* chore: deny fixes

* chore: force default features off

* chore: update block-explorers

* chore: doc fixes

* chore: ignore invariant storage test due to flakyness

* chore: update foundry-block-explorers

* chore: cleanup, config migration

* chore: resolve comments, more cleanup, remove unwraps

* chore: remove last mentions of ethers::etherscan

* chore: remove ethers-solc feat

* chore: use alloy master again

* chore: readd NameOrAddress

* chore: clippy/fmt

* chore: readd support on storage

* fix: add remappings on settings

* chore: address comments (remove create2, noop map, remove eyre from decode.rs)

* chore: use NameOrAddress
Updating git repository `https://github.com/alloy-rs/core/`
    Updating git repository `https://github.com/gakonst/ethers-rs`
    Updating git repository `https://github.com/foundry-rs/block-explorers`
    Updating git repository `https://github.com/foundry-rs/compilers`
    Updating ahash v0.8.5 -> v0.8.6
    Updating alloy-dyn-abi v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating alloy-json-abi v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating alloy-primitives v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating alloy-sol-macro v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating alloy-sol-type-parser v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating alloy-sol-types v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating clap v4.4.6 -> v4.4.7
    Updating clap_builder v4.4.6 -> v4.4.7
    Updating clap_complete v4.4.3 -> v4.4.4
    Updating clap_complete_fig v4.4.1 -> v4.4.2
    Updating clap_derive v4.4.2 -> v4.4.7
    Updating clap_lex v0.5.1 -> v0.6.0
    Removing ethers-solc v2.0.4
    Removing lalrpop v0.19.12
    Removing lalrpop-util v0.19.12
    Updating sct v0.7.0 -> v0.7.1
    Removing solang-parser v0.2.4
    Removing svm-rs v0.2.23
    Removing svm-rs-builds v0.1.15
    Updating syn-solidity v0.4.2 (https://github.com/alloy-rs/core/#d10ab51a) -> #343f799b
    Updating tokio-util v0.7.9 -> v0.7.10
    Updating zerocopy v0.7.11 -> v0.7.15
    Updating zerocopy-derive v0.7.11 -> v0.7.15

Co-authored-by: DaniPopes <[email protected]>
Updating git repository `https://github.com/alloy-rs/core/`
    Updating git repository `https://github.com/gakonst/ethers-rs`
    Updating git repository `https://github.com/foundry-rs/block-explorers`
    Updating git repository `https://github.com/foundry-rs/compilers`
    Updating alloy-dyn-abi v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068
    Updating alloy-json-abi v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068
    Updating alloy-primitives v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068
    Updating alloy-sol-macro v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068
    Updating alloy-sol-type-parser v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068
    Updating alloy-sol-types v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068
    Updating syn-solidity v0.4.2 (https://github.com/alloy-rs/core/#343f799b) -> #393f8068

Co-authored-by: DaniPopes <[email protected]>
…pe` (#6116)

* fix: generate value from arbitrary_from_type and use v as backup

* chore: add test case
* Document BTreeMap lexicographical order

Added short blurbs on Rust's BTreeMap crate ordering system, specifying the caveat that Solidity structs must be declared alphabetically *except that uppercase and lowercase strings are treated differently where uppercase characters precede lowercase ones.

This should add clarity for developers using Foundry's nifty json parsing :)

++Typo/grammar fixes

* Update crates/evm/src/executor/inspector/cheatcodes/ext.rs

* Update crates/evm/src/executor/inspector/cheatcodes/ext.rs

* rustfmt

---------

Co-authored-by: Matthias Seitz <[email protected]>
* refactor: modularize foundry-evm

* sync deps

* chore: clippy

* chore: flatten executor submodules into root

* chore: `foundry-evm-executors` -> `foundry-evm-core`

* docs: touch up descriptions

* chore: nest evm crates into evm/
* Modified git fetch command to method to use correct root folder.

* Added directory test for template initialization

* Updated test comment

* Cargo fmt

---------

Co-authored-by: Alejandro MuΓ±oz-McDonald <[email protected]>
…bi behavior (#6134)

* fix: concat bytecode and constructor call to match old ethabi behavior

* fmt/clippy
* fix: properly parse functions in their usual form

* chore: fmt

* chore: add test

* chore: only fallback to human-readable abi if necessary

* chore: add another function for test
* test: add constructor args test

* clippy

* use resolve

* fix input resolve
@Deniallugo Deniallugo force-pushed the deniallugo-update-from-upstream branch from 739ec8b to 23c9a53 Compare December 8, 2023 19:34
@Deniallugo Deniallugo changed the title Deniallugo update from upstream feat(foundry): update from upstream Dec 11, 2023
@Deniallugo Deniallugo force-pushed the deniallugo-update-from-upstream branch from efa0b2a to 35e4245 Compare December 11, 2023 15:13
@Deniallugo Deniallugo force-pushed the deniallugo-update-from-upstream branch from 66ae96b to 1acdf45 Compare December 12, 2023 08:08
Signed-off-by: Danil <[email protected]>
@Deniallugo Deniallugo force-pushed the deniallugo-update-from-upstream branch from 1acdf45 to 59e7ea9 Compare December 12, 2023 09:07
@nbaztec nbaztec merged commit 31f2f02 into main Dec 12, 2023
11 checks passed
@nbaztec nbaztec deleted the deniallugo-update-from-upstream branch December 12, 2023 12:26
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.