mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
[xcm] Fix SovereignPaidRemoteExporter and DepositAsset handling (#3157)
This PR addresses two issues: - It modifies `DepositAsset`'s asset filter from `All` to `AllCounted(1)` to prevent potentially charging excessive weight/fees. This adjustment avoids situations where fees could be calculated based on the count of assets, as illustrated [here](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs#L38-L46). - It encapsulates `DepositAsset` with `SetAppendix` to ensure that `fees` are not trapped in any case. For instance, this prevents issues when `ExportXcm::validate` encounters an error during the processing of `ExportMessage`.
This commit is contained in:
@@ -578,6 +578,10 @@ where
|
||||
fees: Asset { id: AssetId(Location::new(1, [])), fun: Fungible(34333299) },
|
||||
weight_limit: Unlimited,
|
||||
},
|
||||
SetAppendix(Xcm(vec![DepositAsset {
|
||||
assets: Wild(AllCounted(1)),
|
||||
beneficiary: Location::new(1, [Parachain(1000)]),
|
||||
}])),
|
||||
ExportMessage {
|
||||
network: Polkadot,
|
||||
destination: [Parachain(1000)].into(),
|
||||
@@ -614,7 +618,6 @@ where
|
||||
]),
|
||||
]),
|
||||
},
|
||||
DepositAsset { assets: Wild(All), beneficiary: Location::new(1, [Parachain(1000)]) },
|
||||
SetTopic([
|
||||
36, 224, 250, 165, 82, 195, 67, 110, 160, 170, 140, 87, 217, 62, 201, 164, 42, 98, 219,
|
||||
157, 124, 105, 248, 25, 131, 218, 199, 36, 109, 173, 100, 122,
|
||||
|
||||
Reference in New Issue
Block a user