-
Notifications
You must be signed in to change notification settings - Fork 6
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(ser): Trait Abstractions #25
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.
- suggestions
crates/ser/src/types/sync.rs
Outdated
/// | ||
/// [ss]: https://github.com/ethereum-optimism/optimism/blob/develop/op-service/eth/sync_status.go#L5 | ||
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] | ||
pub struct SyncStatus { |
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.
before we introduce these here,
could we instead move all of these
to op-alloy instead and import?
but could also do this in a followup
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.
Looks like someone saw this and already put up a pr :) alloy-rs/op-alloy#35
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.
Happy to wait until that's in and re-use those types.
crates/ser/src/types/transaction.rs
Outdated
fn from(tx: &BatchTransaction) -> Self { | ||
let mut buf: Vec<u8> = Vec::new(); | ||
for frame in tx.frames.iter() { | ||
buf.append(&mut frame.encode()); | ||
} | ||
buf.into() | ||
} |
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.
I'd prefer a function for this
Description
Warning
Follows #22 - don't merge until #22 is in trunk
Adds trait abstractions and associated types to the
ser
crate.Metadata
Closes #20