mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 21:15:41 +00:00
Direct XCM ExportMessage fees for different bridges to different receiver accounts (#2021)
This commit is contained in:
@@ -18,12 +18,12 @@ use xcm::prelude::*;
|
||||
|
||||
/// Handle stuff to do with taking fees in certain XCM instructions.
|
||||
pub trait FeeManager {
|
||||
/// Determine if a fee which would normally payable should be waived.
|
||||
/// Determine if a fee should be waived.
|
||||
fn is_waived(origin: Option<&MultiLocation>, r: FeeReason) -> bool;
|
||||
|
||||
/// Do something with the fee which has been paid. Doing nothing here silently burns the
|
||||
/// fees.
|
||||
fn handle_fee(fee: MultiAssets, context: Option<&XcmContext>);
|
||||
fn handle_fee(fee: MultiAssets, context: Option<&XcmContext>, r: FeeReason);
|
||||
}
|
||||
|
||||
/// Context under which a fee is paid.
|
||||
@@ -42,7 +42,7 @@ pub enum FeeReason {
|
||||
/// When the `QueryPallet` instruction is called.
|
||||
QueryPallet,
|
||||
/// When the `ExportMessage` instruction is called (and includes the network ID).
|
||||
Export(NetworkId),
|
||||
Export { network: NetworkId, destination: InteriorMultiLocation },
|
||||
/// The `charge_fees` API.
|
||||
ChargeFees,
|
||||
/// When the `LockAsset` instruction is called.
|
||||
@@ -55,5 +55,6 @@ impl FeeManager for () {
|
||||
fn is_waived(_: Option<&MultiLocation>, _: FeeReason) -> bool {
|
||||
false
|
||||
}
|
||||
fn handle_fee(_: MultiAssets, _: Option<&XcmContext>) {}
|
||||
|
||||
fn handle_fee(_: MultiAssets, _: Option<&XcmContext>, _: FeeReason) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user