Skip to content

Commit

Permalink
chore: Create ImplMtHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
jawoznia committed Jan 31, 2024
1 parent 17bd43c commit e0b89c8
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 177 deletions.
16 changes: 6 additions & 10 deletions sylvia-derive/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::message::{
ContractApi, ContractEnumMessage, EnumMessage, GlueMessage, InterfaceApi, MsgVariants,
StructMessage,
};
use crate::multitest::MultitestHelpers;
use crate::multitest::{ContractMtHelpers, ImplMtHelpers};
use crate::parser::{ContractArgs, ContractErrorAttr, Custom, MsgType, OverrideEntryPoints};
use crate::querier::{ContractQuerier, ImplQuerier, TraitQuerier};
use crate::remote::{ContractRemote, InterfaceRemote};
Expand Down Expand Up @@ -292,14 +292,10 @@ impl<'a> ImplInput<'a> {
let contract_module = self.attributes.module.as_ref();
let generic_params = &self.generics;

MultitestHelpers::new(
item,
generic_params,
custom,
override_entry_points,
interfaces,
&contract_module,
)
.emit()
if is_trait(item) {
ImplMtHelpers::new(item, generic_params, custom, interfaces, &contract_module).emit()
} else {
ContractMtHelpers::new(item, generic_params, custom, override_entry_points).emit()
}
}
}
Loading

0 comments on commit e0b89c8

Please sign in to comment.