-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sol-macro): add event filters to contracts #563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supportive once we have it in
quote! { | ||
#[doc = #doc] | ||
pub fn #name(&self) -> alloy_contract::Event<N, T, &P, #event_name> { | ||
self.event_filter::<#event_name>() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make these default snake case? I realize that for function doStuff
we codegen foo.doStuff().send()
atm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we default everything to the same name as declared in solidity/ABI. It's possible in the future to implement renaming like in serde but currently there is no real demand.
Companion to alloy-rs/alloy#274
Example usage: https://github.com/alloy-rs/alloy/blob/14a797b42cbfbdc857f0b0265e7c562df63d7f98/crates/contract/src/event.rs#L165