-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:matter-labs/zksync-era into feat-va…
…lidium-with-da
- Loading branch information
Showing
85 changed files
with
1,995 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.github/release-please/** @RomanBrodetski @perekopskiy @Deniallugo @popzxc | ||
**/CHANGELOG.md @RomanBrodetski @perekopskiy @Deniallugo @popzxc | ||
.github/release-please/** @RomanBrodetski @perekopskiy @Deniallugo @popzxc @EmilLuta | ||
**/CHANGELOG.md @RomanBrodetski @perekopskiy @Deniallugo @popzxc @EmilLuta | ||
CODEOWNERS @RomanBrodetski @perekopskiy @Deniallugo @popzxc | ||
.github/workflows/** @matter-labs/devops |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,4 @@ tracing.workspace = true | |
|
||
[dev-dependencies] | ||
assert_matches.workspace = true | ||
test-casing.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "zksync_node_framework_derive" | ||
version.workspace = true | ||
edition.workspace = true | ||
authors.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
keywords.workspace = true | ||
categories.workspace = true | ||
|
||
[lib] | ||
proc-macro = true | ||
|
||
[dependencies] | ||
syn = { workspace = true, features = ["full"] } | ||
quote.workspace = true | ||
proc-macro2.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
use std::fmt; | ||
|
||
use syn::{GenericArgument, PathArguments, Type}; | ||
|
||
use crate::labels::CtxLabel; | ||
|
||
/// Representation of a single structure field. | ||
pub(crate) struct Field { | ||
/// Name of the field. | ||
pub(crate) ident: syn::Ident, | ||
/// Type of the field. | ||
pub(crate) ty: syn::Type, | ||
/// Parsed label. | ||
pub(crate) label: CtxLabel, | ||
} | ||
|
||
impl fmt::Debug for Field { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
f.debug_struct("Field") | ||
.field("ident", &self.ident) | ||
.field("label", &self.label) | ||
.finish() | ||
} | ||
} | ||
|
||
// Helper function to check if a field is of type Option<T> and extract T | ||
pub(crate) fn extract_option_inner_type(ty: &Type) -> Option<&Type> { | ||
if let Type::Path(type_path) = ty { | ||
// Check if the path is `Option` | ||
if type_path.path.segments.len() == 1 { | ||
let segment = &type_path.path.segments[0]; | ||
if segment.ident == "Option" { | ||
if let PathArguments::AngleBracketed(angle_bracketed_args) = &segment.arguments { | ||
if angle_bracketed_args.args.len() == 1 { | ||
if let GenericArgument::Type(inner_type) = &angle_bracketed_args.args[0] { | ||
return Some(inner_type); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
None | ||
} |
Oops, something went wrong.