-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(cast): add abi-encode-event command #11300
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
base: master
Are you sure you want to change the base?
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.
Hi! Thanks for this PR, sorry for the delay; I've left a review with some suggestions.
6911e03
to
ca9a558
Compare
ca9a558
to
44e4180
Compare
44e4180
to
39fed42
Compare
@onbjerg Thanks for the review! Pushed the changes. But CI is failing due to another reason? |
@onbjerg following up |
Hi, apologies for dropping the ball here. Will retrigger CI, since it was flaky last week, and then go from there. |
/// ); | ||
/// # Ok::<_, eyre::Report>(()) | ||
/// ``` | ||
pub fn abi_encode_event(sig: &str, args: &[impl AsRef<str>]) -> Result<(Vec<B256>, Vec<u8>)> { |
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.
maybe we return a LogData
struct here instead to of a tuple? https://docs.rs/alloy/latest/alloy/primitives/struct.LogData.html
Solution
Implemented
cast abi-encode-event
command that encodes event signatures & args into topics and data.Example Usage
Output
PR Checklist
Closes #10905