Skip to content

Commit

Permalink
remove abstraction atribute from runtime api
Browse files Browse the repository at this point in the history
  • Loading branch information
KitHat committed Nov 21, 2024
1 parent f77a14e commit 205eadb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion procedural/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ mod apis {
// block type
type Block = Block;

#[abstraction]
mod assets {
type TransactionPayment = TransactionPayment;
type RuntimeCall = RuntimeCall;
Expand Down
1 change: 0 additions & 1 deletion procedural/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ pub fn openzeppelin_construct_runtime(_: TokenStream, tokens: TokenStream) -> To
/// // block type
/// type Block = Block;
///
/// #[abstraction]
/// mod assets {
/// type TransactionPayment = TransactionPayment;
/// type RuntimeCall = RuntimeCall;
Expand Down
15 changes: 1 addition & 14 deletions procedural/src/runtime_apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,7 @@ pub fn impl_openzeppelin_runtime_apis(input: TokenStream) -> TokenStream {
block = Some(fetch_ident(&ty.ty));
}
}
Item::Mod(m) => {
let is_abstraction = m.attrs.iter().any(|f| {
let Ok(path) = f.meta.require_path_only() else {
return false;
};
let Ok(ident) = path.require_ident() else {
return false;
};
ident == "abstraction"
});
if is_abstraction {
abstractions.push(m)
}
}
Item::Mod(m) => abstractions.push(m),
Item::Impl(im) => {
inner.extend(im.to_token_stream());
}
Expand Down

0 comments on commit 205eadb

Please sign in to comment.