alloy-rs / core

High-performance, well-tested & documented core libraries for Ethereum, in Rust
https://alloy.rs
Apache License 2.0
790 stars 155 forks source link

[Bug] Unsupported Array Indexing in `sol!` Macro #802

Open rkdud007 opened 3 weeks ago

rkdud007 commented 3 weeks ago

Component

sol! macro

What version of Alloy are you on?

├── alloy v0.5.4

Operating System

macOS (Apple Silicon)

Describe the bug

I've encountered two issues related to array indexing in the sol! macro, both of which lead to compilation errors. Here’s a breakdown of each issue and where they occur in the codebase:

  1. First Error:

    • Location: Emu.sol#L39
    • Error Message: generic expressions are not supported in array type sizes
  2. Second Error:

    • Location: Emu.sol#L128
    • Error Message: unexpected token, expected ']'
    • Description: This issue arises when declaring a bool[64 * 32] array.