Skip to content

Commit

Permalink
remove xcm rate limiter from runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
apopiak committed Jul 12, 2023
1 parent 4d2f1ab commit 1119b13
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 265 deletions.
1 change: 0 additions & 1 deletion integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mod otc;
mod polkadot_test_net;
mod transact_call_filter;
mod vesting;
mod xcm_rate_limiter;

#[macro_export]
macro_rules! assert_balance {
Expand Down
244 changes: 0 additions & 244 deletions integration-tests/src/xcm_rate_limiter.rs

This file was deleted.

3 changes: 1 addition & 2 deletions runtime/hydradx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,8 @@ construct_runtime!(
OmnipoolLiquidityMining: pallet_omnipool_liquidity_mining = 63,
OTC: pallet_otc = 64,
CircuitBreaker: pallet_circuit_breaker = 65,
// DCA = 66

Router: pallet_route_executor = 67,
XcmRateLimiter: pallet_xcm_rate_limiter = 68,

// ORML related modules
Tokens: orml_tokens = 77,
Expand Down
20 changes: 2 additions & 18 deletions runtime/hydradx/src/xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use hydradx_adapters::{MultiCurrencyTrader, ToFeeReceiver};
use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key};
pub use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::{RelayChainBlockNumber, Sibling};
use polkadot_parachain::primitives::Sibling;
use polkadot_xcm::v3::prelude::*;
use polkadot_xcm::v3::Weight as XcmWeight;
use primitives::Price;
Expand Down Expand Up @@ -136,7 +136,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type ExecuteDeferredOrigin = EnsureRoot<AccountId>;
type MaxDeferredMessages = ConstU32<100>;
type RelayChainBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
type XcmDeferFilter = XcmRateLimiter;
type XcmDeferFilter = ();
}

impl cumulus_pallet_dmp_queue::Config for Runtime {
Expand Down Expand Up @@ -206,22 +206,6 @@ impl pallet_xcm::Config for Runtime {
#[cfg(feature = "runtime-benchmarks")]
type ReachableDest = ReachableDest;
}

parameter_types! {
pub DeferDuration: RelayChainBlockNumber = 600; // 1 hour
pub MaxDeferDuration: RelayChainBlockNumber = 600 * 24 * 10; // 10 days
}

impl pallet_xcm_rate_limiter::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AssetId = AssetId;
type DeferDuration = DeferDuration;
type MaxDeferDuration = MaxDeferDuration;
type RelayBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
type CurrencyIdConvert = CurrencyIdConvert;
type RateLimitFor = pallet_asset_registry::XcmRateLimitsInRegistry<Runtime>;
}

pub struct CurrencyIdConvert;
use primitives::constants::chain::CORE_ASSET_ID;

Expand Down

0 comments on commit 1119b13

Please sign in to comment.