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
--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -9,7 +9,7 @@
     runtime_common::{
 		constants::*,
         dispatch::CollectionDispatchT,
-        ethereum::{EvmSponsorshipHandler},
+        ethereum::sponsoring::EvmSponsorshipHandler,
 		config::sponsoring::DefaultSponsoringRateLimit,
         DealWithFees,
     },
modifiedruntime/common/config/mod.rsdiffbeforeafterboth
22pub mod xcm;22pub mod xcm;
23pub mod orml;23pub mod orml;
24
25pub use {
26 substrate::*,
27 ethereum::*,
28 sponsoring::*,
29 pallets::*,
30 parachain::*,
31 self::xcm::*,
32 orml::*,
33};
3424
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::*;