diff --git a/framework/base/src/derive_imports.rs b/framework/base/src/derive_imports.rs new file mode 100644 index 0000000000..64f45ead1d --- /dev/null +++ b/framework/base/src/derive_imports.rs @@ -0,0 +1,7 @@ +pub use crate::{ + codec, + codec::derive::{ + NestedDecode, NestedEncode, TopDecode, TopDecodeOrDefault, TopEncode, TopEncodeOrDefault, + }, + derive::{type_abi, ManagedVecItem, TypeAbi}, +}; diff --git a/framework/base/src/imports.rs b/framework/base/src/imports.rs new file mode 100644 index 0000000000..016aa7bb4e --- /dev/null +++ b/framework/base/src/imports.rs @@ -0,0 +1,22 @@ +pub use crate::{ + abi::TypeAbi, + api::{ErrorApiImpl, ManagedTypeApi, VMApi}, + arrayvec::ArrayVec, + codec::{ + multi_types::*, CodecFrom, CodecFromSelf, CodecInto, DecodeError, Empty, IntoMultiValue, + NestedDecode, NestedEncode, TopDecode, TopEncode, + }, + contract_base::{ContractBase, ProxyObjBase, ProxyObjNew}, + err_msg, + io::*, + non_zero_usize, + non_zero_util::*, + require, sc_format, sc_panic, sc_print, + storage::mappers::*, + types::{system_proxy::*, *}, +}; + +pub use core::ops::{ + Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Div, DivAssign, + Mul, MulAssign, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign, +}; diff --git a/framework/base/src/imports_reexport.rs b/framework/base/src/imports_reexport.rs deleted file mode 100644 index e023525e9d..0000000000 --- a/framework/base/src/imports_reexport.rs +++ /dev/null @@ -1,41 +0,0 @@ -/// Conveniently groups all framework imports required by a smart contract form the framework. -pub mod imports { - pub use crate::{ - abi::TypeAbi, - api::{ErrorApiImpl, ManagedTypeApi, VMApi}, - arrayvec::ArrayVec, - codec::{ - multi_types::*, CodecFrom, CodecFromSelf, CodecInto, DecodeError, Empty, - IntoMultiValue, NestedDecode, NestedEncode, TopDecode, TopEncode, - }, - contract_base::{ContractBase, ProxyObjBase, ProxyObjNew}, - err_msg, - io::*, - non_zero_usize, - non_zero_util::*, - require, sc_format, sc_panic, sc_print, - storage::mappers::*, - types::{system_proxy::*, *}, - }; - pub use core::ops::{ - Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Div, - DivAssign, Mul, MulAssign, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign, - }; -} - -/// Conveniently groups all imports required for deriving framework-related traits for types. -pub mod derive_imports { - pub use crate::{ - codec, - codec::derive::{ - NestedDecode, NestedEncode, TopDecode, TopDecodeOrDefault, TopEncode, - TopEncodeOrDefault, - }, - derive::{type_abi, ManagedVecItem, TypeAbi}, - }; -} - -/// Conveniently groups all imports required for generated proxies. -pub mod proxy_imports { - pub use super::{derive_imports::*, imports::*}; -} diff --git a/framework/base/src/lib.rs b/framework/base/src/lib.rs index b5aaecd378..043ba4bebb 100644 --- a/framework/base/src/lib.rs +++ b/framework/base/src/lib.rs @@ -38,6 +38,13 @@ pub use hex_call_data::*; pub use hex_literal; pub use storage::{storage_clear, storage_get, storage_get_len, storage_set}; -// not to be used internally -mod imports_reexport; -pub use imports_reexport::{derive_imports, imports, proxy_imports}; +/// Conveniently groups all framework imports required by a smart contract form the framework. +pub mod imports; + +/// Conveniently groups all imports required for deriving framework-related traits for types. +pub mod derive_imports; + +/// Conveniently groups all imports required for generated proxies. +pub mod proxy_imports { + pub use super::{derive_imports::*, imports::*}; +}