-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
In 0fe0484#diff-5ded4b43c234d6f2d43aff2b2b63adfde7a5ba2dd9fc591cd818335e20b6303b I tested with the new extrinsic The main issue is the limitation mentioned here it can't take fees separately. Say we have 2 assets [(weth_location,1),(weth_location,1)], with the fee index as 0, the intention is to use the first asset as remote fee and send the second to beneficiary. But there is some deduplicated logic here the 2 assets will be merged into a single one (weth_location,2) and prevent us for taking fees separately. The extrinsic |
I may be wrong, but my high-level understanding from reading the documentation for Or in other words, the fee amount can be deducted from the asset specified by the user. In any case, in the new fee design I'm working on, users will most likely pay fees in DOT instead of WETH. The existence of a DEX on AssetHub does make fee currencies other than DOT a bit unnecessary. |
That's not possible as demonstrated in 14894a1, for
Yeah, with the AssetExchanger config it's possible. FYI there is one PR for that in paritytech#4375 I'm reviewing. |
Close in favor of #160 |
origin: OriginFor<T>, | ||
beneficiary: H160, | ||
asset: Box<VersionedAsset>, | ||
fee: Box<VersionedAsset>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically just mirror the reserve_transfer_assets
extrinsic from pallet_xcm
with an explicit fee specified here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
SendXcmFeeToAccount<Self::AssetTransactor, TreasuryAccount>, | ||
), | ||
>; | ||
type MessageExporter = ( | ||
crate::bridge_to_westend_config::ToBridgeHubWestendHaulBlobExporter, | ||
crate::bridge_to_bulletin_config::ToRococoBulletinHaulBlobExporter, | ||
crate::bridge_to_ethereum_config::SnowbridgeExporter, | ||
crate::bridge_to_ethereum_config::SnowbridgeExporterV2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems better to migrate to the dynamic fee mode while still support the legacy mode(i.e. reserve transfer with static fee configured on chain), the SnowbridgeExporterV2
should work side by side with the previous version.
So we can run tests for:
- v1
cargo test -p bridge-hub-rococo-integration-tests --lib tests::snowbridge::send_weth_asset_from_asset_hub_to_ethereum -- --nocapture
- v2
cargo test -p bridge-hub-rococo-integration-tests --lib tests::snowbridge_transfer_v2::send_weth_asset_from_asset_hub_to_ethereum -- --nocapture
and both should work as expected.
Resolves: https://linear.app/snowfork/issue/SNO-1084#comment-0d5970ee
XcmExportFeeToSibling
on BridgeHub which is unnecessary.transfer_to_ethereum
for transfer from AH to Ethereum.