mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21: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:
@@ -244,6 +244,11 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains BuyExecution")
|
||||
.match_next_inst(|instr| match instr {
|
||||
SetAppendix(_) => Ok(()),
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains SetAppendix")
|
||||
} else {
|
||||
xcm_sent
|
||||
.0
|
||||
|
||||
Reference in New Issue
Block a user