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

chore: patches alloy-chains to use version 0.1.57 #45

Closed
wants to merge 2 commits into from

Conversation

dutterbutter
Copy link
Collaborator

Description

Alloy version = "0.9.2" ships with alloy-chains 0.1.53 which was causing the following error when attempting to use in matter-labs/anvil-zksync#559. You can see the error output below.

Alloy version "0.10.0" is not available on crates.io yet so temporarily patching alloy-chains to make use of "0.1.57".

New release / publish of alloy-zksync required for matter-labs/anvil-zksync#559

Error output from 0.1.53:

error[E0080]: evaluation of constant value failed
    --> /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hex-literal-0.4.1/src/lib.rs:17:24
     |
17   |             0..=127 => panic!("Encountered invalid ASCII character"),
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'Encountered invalid ASCII character', /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hex-literal-0.4.1/src/lib.rs:17:24
     |
note: inside `hex_literal::next_hex_char`
    --> /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hex-literal-0.4.1/src/lib.rs:17:24
     |
17   |             0..=127 => panic!("Encountered invalid ASCII character"),
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `hex_literal::next_byte`
    --> /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hex-literal-0.4.1/src/lib.rs:30:30
     |
30   |     let (half2, pos) = match next_hex_char(string, pos) {
     |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `alloy_primitives::hex_literal::len`
    --> /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hex-literal-0.4.1/src/lib.rs:46:40
     |
46   |         while let Some((_, new_pos)) = next_byte(strings[i], pos) {
     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `NamedChain::wrapped_native_token::LEN`
    --> /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alloy-chains-0.1.53/src/named.rs:1628:25
     |
1628 |             Treasure => address!("0x263d8f36bb8d0d9526255e205868c26690b04b88"),
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `address` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
    --> /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alloy-chains-0.1.53/src/named.rs:1628:25
     |
1628 |             Treasure => address!("0x263d8f36bb8d0d9526255e205868c26690b04b88"),
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: this note originates in the macro `$crate::hex` which comes from the expansion of the macro `address` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0080`.
error: could not compile `alloy-chains` (lib) due to 1 previous error

@dutterbutter
Copy link
Collaborator Author

Turns out this is not needed 😅

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.

1 participant