Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
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
To reproduce, the affected file above can be generated with
forge bind --skip test --skip script --use "0.8.28" --alloy --alloy-version "0.13.0" --contracts ./contracts/src/ --module --bindings-path contracts/rust/adapter/src/bindings --select "^StakeTable\$" --overwrite --force
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#L308
Metadata
Metadata
Assignees
Type
Projects
Status