bug(bind
): all_derives skipped for custom solidity structs
#10353
Labels
C-forge
Command: forge
Cmd-forge-bind
Command: forge bind
T-bug
Type: bug
T-to-reproduce
Type: requires reproduction
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge Version: 1.0.0-nightly Commit SHA: 7a7ad4e Build Timestamp: 2025-04-01T06:03:16.218549398Z (1743487396) Build Profile: maxperf
What version of Foundryup are you on?
No response
What command(s) is the bug in?
forge bind
Operating System
Linux
Describe the bug
Since #10099
forge bind
generates extra derives#[derive(Default, Debug, PartialEq, Eq, Hash)]
for events, but only if they don't use custom solidity types.There is an example here
https://github.com/EspressoSystems/espresso-network/blob/e005d4449eb5487f94f7e2cd9629bcf8b5d14c0d/contracts/rust/adapter/src/bindings/staketable.rs#L4659
To reproduce, the affected file above can be generated with
in a checkout of https://github.com/EspressoSystems/espresso-network
At least in this case (but probably always?) the custom types also derive all of
Default, Debug, PartialEq, Eq, Hash
already. So I think so we should be able to derive them.For example
G2Point
here: https://github.com/EspressoSystems/espresso-network/blob/87302f0cca4dcffa5a226fcbe55ff5065978a11b/contracts/rust/adapter/src/bindings/staketable.rs#L308The text was updated successfully, but these errors were encountered: