ITADN

[Bug] Compilation Error: Invalid hex literal in EIP7702_CLEARED_DELECATION constant

#33Closeddispensable1988 创建于 2025-03-25
bug
D
dispensable1988commented
### What version of Alloy are you on? alloy-eip7702 v0. 5.1 ### Operating System None ### Describe the bug When compiling alloy-eip7702 v0.5.1, a const evaluation panic occurs due to invalid hex syntax in the hex! macro usage. `error[E0080]: evaluation of constant value failed --> .../alloy-eip7702-0.5.1/src/constants.rs:38:5 38 | hex!("?xef010000000000000000000000000000000000000000000000000000”); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | the evaluated program panicked at 'Encountered invalid ASCII character'` https://github.com/alloy-rs/eips/blob/ace19c509587b16e528ec441ffcd29cd9d4f2acd/crates/eip7702/src/constants.rs#L34 https://github.com/alloy-rs/eips/blob/ace19c509587b16e528ec441ffcd29cd9d4f2acd/crates/eip7702/src/constants.rs#L37C4-L37C5 The constants defined by the macro hex! in these two lines cannot start with 0x, otherwise it will cause panic: `0..=127 => panic!("Encountered invalid ASCII character")`
关闭于 2025-03-25 1 条评论