This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
parachains/runtimes/assets
statemine/src/weights/xcm
statemint/src/weights/xcm Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ use crate::Runtime;
2121use frame_support:: weights:: Weight ;
2222use pallet_xcm_benchmarks_fungible:: WeightInfo as XcmFungibleWeight ;
2323use pallet_xcm_benchmarks_generic:: WeightInfo as XcmGeneric ;
24- use sp_std:: prelude:: * ;
24+ use sp_std:: { cmp , prelude:: * } ;
2525use xcm:: {
2626 latest:: { prelude:: * , Weight as XCMWeight } ,
2727 DoubleEncoded ,
@@ -142,7 +142,10 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
142142 _dest : & MultiLocation ,
143143 _xcm : & Xcm < ( ) > ,
144144 ) -> XCMWeight {
145- assets. weigh_multi_assets ( XcmFungibleWeight :: < Runtime > :: initiate_teleport ( ) )
145+ // Hardcoded till the XCM pallet is fixed
146+ let hardcoded_weight = Weight :: from_ref_time ( 200_000_000 as u64 ) . ref_time ( ) ;
147+ let weight = assets. weigh_multi_assets ( XcmFungibleWeight :: < Runtime > :: initiate_teleport ( ) ) ;
148+ cmp:: min ( hardcoded_weight, weight)
146149 }
147150 fn query_holding (
148151 _query_id : & u64 ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ use crate::Runtime;
2121use frame_support:: weights:: Weight ;
2222use pallet_xcm_benchmarks_fungible:: WeightInfo as XcmFungibleWeight ;
2323use pallet_xcm_benchmarks_generic:: WeightInfo as XcmGeneric ;
24- use sp_std:: prelude:: * ;
24+ use sp_std:: { cmp , prelude:: * } ;
2525use xcm:: {
2626 latest:: { prelude:: * , Weight as XCMWeight } ,
2727 DoubleEncoded ,
@@ -142,7 +142,10 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
142142 _dest : & MultiLocation ,
143143 _xcm : & Xcm < ( ) > ,
144144 ) -> XCMWeight {
145- assets. weigh_multi_assets ( XcmFungibleWeight :: < Runtime > :: initiate_teleport ( ) )
145+ // Hardcoded till the XCM pallet is fixed
146+ let hardcoded_weight = Weight :: from_ref_time ( 200_000_000 as u64 ) . ref_time ( ) ;
147+ let weight = assets. weigh_multi_assets ( XcmFungibleWeight :: < Runtime > :: initiate_teleport ( ) ) ;
148+ cmp:: min ( hardcoded_weight, weight)
146149 }
147150 fn query_holding (
148151 _query_id : & u64 ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ use crate::Runtime;
2121use frame_support:: weights:: Weight ;
2222use pallet_xcm_benchmarks_fungible:: WeightInfo as XcmFungibleWeight ;
2323use pallet_xcm_benchmarks_generic:: WeightInfo as XcmGeneric ;
24- use sp_std:: prelude:: * ;
24+ use sp_std:: { cmp , prelude:: * } ;
2525use xcm:: {
2626 latest:: { prelude:: * , Weight as XCMWeight } ,
2727 DoubleEncoded ,
@@ -142,7 +142,10 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
142142 _dest : & MultiLocation ,
143143 _xcm : & Xcm < ( ) > ,
144144 ) -> XCMWeight {
145- assets. weigh_multi_assets ( XcmFungibleWeight :: < Runtime > :: initiate_teleport ( ) )
145+ // Hardcoded till the XCM pallet is fixed
146+ let hardcoded_weight = Weight :: from_ref_time ( 200_000_000 as u64 ) . ref_time ( ) ;
147+ let weight = assets. weigh_multi_assets ( XcmFungibleWeight :: < Runtime > :: initiate_teleport ( ) ) ;
148+ cmp:: min ( hardcoded_weight, weight)
146149 }
147150 fn query_holding (
148151 _query_id : & u64 ,
You can’t perform that action at this time.
0 commit comments