git.delta.rocks / unique-network / refs/commits / 07fe7b5a5c87

difftreelog

refactor optimize common runtime imports

Daniel Shiposha2022-08-08parent: #8a2ef94.patch.diff
in: master

7 files changed

modifiedruntime/common/config/ethereum.rsdiffbeforeafterboth
9 runtime_common::{9 runtime_common::{
10 constants::*,10 constants::*,
11 dispatch::CollectionDispatchT,11 dispatch::CollectionDispatchT,
12 ethereum::{EvmSponsorshipHandler},12 ethereum::sponsoring::EvmSponsorshipHandler,
13 config::sponsoring::DefaultSponsoringRateLimit,13 config::sponsoring::DefaultSponsoringRateLimit,
14 DealWithFees,14 DealWithFees,
15 },15 },
modifiedruntime/common/config/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/mod.rs
+++ b/runtime/common/config/mod.rs
@@ -21,13 +21,3 @@
 pub mod parachain;
 pub mod xcm;
 pub mod orml;
-
-pub use {
-    substrate::*,
-    ethereum::*,
-    sponsoring::*,
-    pallets::*,
-    parachain::*,
-    self::xcm::*,
-    orml::*,
-};
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -14,10 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{
-    // weights::{Weight, constants::WEIGHT_PER_SECOND},
-    parameter_types,
-};
+use frame_support::parameter_types;
 use sp_runtime::traits::AccountIdConversion;
 use crate::{
     runtime_common::{
modifiedruntime/common/ethereum/mod.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/mod.rs
+++ b/runtime/common/ethereum/mod.rs
@@ -17,9 +17,3 @@
 pub mod sponsoring;
 pub mod transaction_converter;
 pub mod self_contained_call;
-
-pub use {
-    sponsoring::*,
-    transaction_converter::*,
-    self_contained_call::*,
-};
modifiedruntime/common/instance.rsdiffbeforeafterboth
--- a/runtime/common/instance.rs
+++ b/runtime/common/instance.rs
@@ -1,7 +1,7 @@
 use crate::{
     runtime_common::{
         config::ethereum::CrossAccountId,
-        ethereum::TransactionConverter
+        ethereum::transaction_converter::TransactionConverter
     },
     Runtime,
 };
modifiedruntime/common/mod.rsdiffbeforeafterboth
--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -14,26 +14,16 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-mod constants;
-mod construct_runtime;
-mod dispatch;
-mod runtime_apis;
-mod sponsoring;
-mod weights;
-mod config;
-mod instance;
-mod ethereum;
-mod scheduler;
-
-pub use {
-    constants::*,
-    dispatch::*,
-    sponsoring::*,
-    weights::*,
-    config::*,
-    instance::*,
-    ethereum::*,
-};
+pub mod constants;
+pub mod construct_runtime;
+pub mod dispatch;
+pub mod runtime_apis;
+pub mod sponsoring;
+pub mod weights;
+pub mod config;
+pub mod instance;
+pub mod ethereum;
+pub mod scheduler;
 
 use sp_core::H160;
 use frame_support::traits::{Currency, OnUnbalanced, Imbalance};
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -50,6 +50,11 @@
             Runner, account::CrossAccountId as _,
             Account as EVMAccount, FeeCalculator,
         };
+        use runtime_common::{
+            sponsoring::{SponsorshipPredict, UniqueSponsorshipPredict},
+            dispatch::CollectionDispatch,
+            config::ethereum::CrossAccountId,
+        };
         use up_data_structs::*;