Skip to content

Commit e681609

Browse files
committed
1 parent c30a2e4 commit e681609

File tree

4 files changed

+9
-56
lines changed
  • system-parachains
    • asset-hubs
      • asset-hub-kusama/src/weights/xcm
      • asset-hub-polkadot/src/weights/xcm
    • bridge-hubs
      • bridge-hub-kusama/src/weights/xcm
      • bridge-hub-polkadot/src/weights/xcm

4 files changed

+9
-56
lines changed

system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,8 @@ impl<Call> XcmWeightInfo<Call> for AssetHubKusamaXcmWeight<Call> {
6161
fn withdraw_asset(assets: &MultiAssets) -> Weight {
6262
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
6363
}
64-
// Currently there is no trusted reserve (`IsReserve = ()`),
65-
// but we need this hack for `pallet_xcm::reserve_transfer_assets`
66-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7424
67-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7546
6864
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
69-
// TODO: if we change `IsReserve = ...` then use this line...
70-
// TODO: or if remote weight estimation is fixed, then remove
71-
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
72-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
73-
hardcoded_weight.min(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
65+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
7466
}
7567
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
7668
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
@@ -127,10 +119,7 @@ impl<Call> XcmWeightInfo<Call> for AssetHubKusamaXcmWeight<Call> {
127119
}
128120

129121
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
130-
// Hardcoded till the XCM pallet is fixed
131-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
132-
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
133-
hardcoded_weight.min(weight)
122+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
134123
}
135124
fn deposit_reserve_asset(
136125
assets: &MultiAssetFilter,

system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,8 @@ impl<Call> XcmWeightInfo<Call> for AssetHubPolkadotXcmWeight<Call> {
6161
fn withdraw_asset(assets: &MultiAssets) -> Weight {
6262
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
6363
}
64-
// Currently there is no trusted reserve (`IsReserve = ()`),
65-
// but we need this hack for `pallet_xcm::reserve_transfer_assets`
66-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7424
67-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7546
6864
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
69-
// TODO: if we change `IsReserve = ...` then use this line...
70-
// TODO: or if remote weight estimation is fixed, then remove
71-
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
72-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
73-
hardcoded_weight.min(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
65+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
7466
}
7567
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
7668
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
@@ -127,10 +119,7 @@ impl<Call> XcmWeightInfo<Call> for AssetHubPolkadotXcmWeight<Call> {
127119
}
128120

129121
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
130-
// Hardcoded till the XCM pallet is fixed
131-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
132-
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
133-
hardcoded_weight.min(weight)
122+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
134123
}
135124
fn deposit_reserve_asset(
136125
assets: &MultiAssetFilter,

system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,8 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubKusamaXcmWeight<Call> {
6161
fn withdraw_asset(assets: &MultiAssets) -> Weight {
6262
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
6363
}
64-
// Currently there is no trusted reserve (`IsReserve = ()`),
65-
// but we need this hack for `pallet_xcm::reserve_transfer_assets`
66-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7424
67-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7546
6864
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
69-
// TODO: if we change `IsReserve = ...` then use this line...
70-
// TODO: or if remote weight estimation is fixed, then remove
71-
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
72-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
73-
hardcoded_weight.min(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
65+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
7466
}
7567
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
7668
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
@@ -127,10 +119,7 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubKusamaXcmWeight<Call> {
127119
}
128120

129121
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
130-
// Hardcoded till the XCM pallet is fixed
131-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
132-
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
133-
hardcoded_weight.min(weight)
122+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
134123
}
135124
fn deposit_reserve_asset(
136125
assets: &MultiAssetFilter,

system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,8 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubPolkadotXcmWeight<Call> {
6161
fn withdraw_asset(assets: &MultiAssets) -> Weight {
6262
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
6363
}
64-
// Currently there is no trusted reserve (`IsReserve = ()`),
65-
// but we need this hack for `pallet_xcm::reserve_transfer_assets`
66-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7424
67-
// (TODO) fix https://github.com/paritytech/polkadot/pull/7546
6864
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
69-
// TODO: if we change `IsReserve = ...` then use this line...
70-
// TODO: or if remote weight estimation is fixed, then remove
71-
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
72-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
73-
hardcoded_weight.min(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
65+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
7466
}
7567
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
7668
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
@@ -127,10 +119,7 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubPolkadotXcmWeight<Call> {
127119
}
128120

129121
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
130-
// Hardcoded till the XCM pallet is fixed
131-
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
132-
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
133-
hardcoded_weight.min(weight)
122+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
134123
}
135124
fn deposit_reserve_asset(
136125
assets: &MultiAssetFilter,
@@ -154,10 +143,7 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubPolkadotXcmWeight<Call> {
154143
_dest: &MultiLocation,
155144
_xcm: &Xcm<()>,
156145
) -> Weight {
157-
// Hardcoded till the XCM pallet is fixed
158-
let hardcoded_weight = Weight::from_parts(200_000_000_u64, 0);
159-
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
160-
hardcoded_weight.min(weight)
146+
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
161147
}
162148
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight {
163149
XcmGeneric::<Runtime>::report_holding()

0 commit comments

Comments
 (0)