Skip to content

Commit

Permalink
fix merge and build
Browse files Browse the repository at this point in the history
  • Loading branch information
joepetrowski committed Jun 6, 2024
1 parent 5ab9908 commit 28bfe29
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions system-parachains/people/people-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ use frame_support::{
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{
ConstBool, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, EverythingBut,
InstanceFilter, TransformOrigin,
tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains,
EitherOfDiverse, EverythingBut, InstanceFilter, TransformOrigin,
},
weights::{ConstantMultiplier, Weight},
PalletId,
Expand All @@ -43,7 +43,6 @@ use frame_system::{
};
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use parachains_common::{
impls::DealWithFees,
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO,
HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
Expand All @@ -69,8 +68,8 @@ use system_parachains_constants::polkadot::{consensus::*, currency::*, fee::Weig
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
use xcm::latest::prelude::BodyId;
use xcm_config::{
FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, XcmConfig,
XcmOriginToTransactDispatchOrigin,
FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, StakingPot,
XcmConfig, XcmOriginToTransactDispatchOrigin,
};

/// The address format for describing accounts.
Expand Down Expand Up @@ -234,7 +233,7 @@ parameter_types! {
impl pallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction =
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
pallet_transaction_payment::FungibleAdapter<Balances, ResolveTo<StakingPot, Balances>>;
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
Expand Down
17 changes: 11 additions & 6 deletions system-parachains/people/people-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@
// limitations under the License.

use super::{
AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm,
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
AccountId, AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem,
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
};
use crate::{TransactionByteFee, CENTS};
use frame_support::{
parameter_types,
traits::{ConstU32, Contains, Equals, Everything, Nothing},
traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing},
};
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use parachains_common::{
impls::ToStakingPot,
xcm_config::{
AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains,
RelayOrOtherSystemParachains,
Expand Down Expand Up @@ -69,6 +68,7 @@ parameter_types! {
pub RelayTreasuryPalletAccount: AccountId =
LocationToAccountId::convert_location(&RelayTreasuryLocation::get())
.unwrap_or(TreasuryAccount::get());
pub StakingPot: AccountId = CollatorSelection::account_id();
}

pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice<
Expand Down Expand Up @@ -227,8 +227,13 @@ impl xcm_executor::Config for XcmConfig {
RuntimeCall,
MaxInstructions,
>;
type Trader =
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToStakingPot<Runtime>>;
type Trader = UsingComponents<
WeightToFee,
RelayLocation,
AccountId,
Balances,
ResolveTo<StakingPot, Balances>,
>;
type ResponseHandler = PolkadotXcm;
type AssetTrap = PolkadotXcm;
type AssetClaims = PolkadotXcm;
Expand Down

0 comments on commit 28bfe29

Please sign in to comment.