Function resolve_transfer_type

Source
pub fn resolve_transfer_type<XcmExecutor: XcmAssetTransfers>(
    asset: &Asset,
    dest: &Location,
) -> Option<TransferType>
Expand description

Resolves which reserve model pallet_xcm should use to move asset to dest.

Defers to the XCM executor’s own determination, which is driven by the runtime’s ReserveAssetFilter and teleport filter - the same logic pallet_xcm::transfer_assets runs internally. One case the executor cannot resolve on its own: the relay-native token (DOT, KSM, …) is identified by the bare parent location, but its trusted reserve is Asset Hub rather than the relay chain. For any destination other than Asset Hub itself the executor gives up, so we name Asset Hub as a remote reserve explicitly.

Returns None when no reserve can be determined - the caller should reject the transfer.