difftreelog
refactor optimize common runtime imports
in: master
7 files changed
runtime/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,
},
runtime/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::*,
-};
runtime/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::{
runtime/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::*,
-};
runtime/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,
};
runtime/common/mod.rsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617mod constants;17pub mod constants;18mod construct_runtime;18pub mod construct_runtime;19mod dispatch;19pub mod dispatch;20mod runtime_apis;20pub mod runtime_apis;21mod sponsoring;21pub mod sponsoring;22mod weights;22pub mod weights;23mod config;23pub mod config;24mod instance;24pub mod instance;25mod ethereum;25pub mod ethereum;26mod scheduler;26pub mod scheduler;2728pub use {29 constants::*,30 dispatch::*,31 sponsoring::*,32 weights::*,33 config::*,34 instance::*,35 ethereum::*,36};372738use sp_core::H160;28use sp_core::H160;39use frame_support::traits::{Currency, OnUnbalanced, Imbalance};29use frame_support::traits::{Currency, OnUnbalanced, Imbalance};runtime/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::*;