alloy-rs / core

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

[Bug] Cannot derive `Default` from sol macros due to no default label of generated enum types #618

Closed erikreppel closed 3 months ago

erikreppel commented 4 months ago

Component

contract

What version of Alloy are you on?

├── alloy v0.1.0 (https://github.com/erikreppel/alloy?rev=1d2d411#1d2d4118)

Operating System

macOS (Apple Silicon)

Describe the bug

Currently sol! { #[derive(Default)] ...} fails to compile because derives are alloyed to ally types generated, included the events enum. Because there is no #[default] set on the enum compilation fails.