Skip to content

Commit 40e3fcb

Browse files
yrongbkonturacatangiu
authored
Snowbridge: Unpaid execution when bridging to Ethereum (#8599)
### Context Currently we use [SovereignPaidRemoteExporter](https://github.com/paritytech/polkadot-sdk/blob/ff5c67c8a3d60ccb3f0af114a07db8f4bec485a0/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs#L457-L464), which is unnecessary since all fees in Snowbridge V2 will be estimated on the fly and injected into the XCM. Resolves: https://linear.app/snowfork/issue/SNO-1510 --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io>
1 parent 4b74df3 commit 40e3fcb

14 files changed

Lines changed: 64 additions & 503 deletions

File tree

bridges/snowbridge/runtime/runtime-common/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,5 @@
44
//!
55
//! Common traits and types shared by runtimes.
66
#![cfg_attr(not(feature = "std"), no_std)]
7-
#[cfg(test)]
8-
mod tests;
9-
pub mod v1;
107
pub mod v2;
11-
pub use v1::fee_handler::XcmExportFeeToSibling;
128
pub use v2::register_token::{ForeignAssetOwner, LocalAssetOwner};

bridges/snowbridge/runtime/runtime-common/src/tests.rs

Lines changed: 0 additions & 171 deletions
This file was deleted.

bridges/snowbridge/runtime/runtime-common/src/v1/fee_handler.rs

Lines changed: 0 additions & 146 deletions
This file was deleted.

bridges/snowbridge/runtime/runtime-common/src/v1/mod.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

bridges/snowbridge/runtime/test-common/src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ pub fn send_unpaid_transfer_token_message<Runtime, XcmConfig>(
306306
+ pallet_collator_selection::Config
307307
+ cumulus_pallet_parachain_system::Config
308308
+ snowbridge_pallet_outbound_queue::Config
309+
+ snowbridge_pallet_system::Config
309310
+ pallet_timestamp::Config,
310311
XcmConfig: xcm_executor::Config,
311312
ValidatorIdOf<Runtime>: From<AccountIdOf<Runtime>>,
@@ -319,12 +320,9 @@ pub fn send_unpaid_transfer_token_message<Runtime, XcmConfig>(
319320
.with_tracing()
320321
.build()
321322
.execute_with(|| {
322-
let asset_hub_sovereign_account =
323-
snowbridge_core::sibling_sovereign_account::<Runtime>(assethub_parachain_id.into());
324-
325-
<pallet_balances::Pallet<Runtime>>::mint_into(
326-
&asset_hub_sovereign_account,
327-
4000000000u32.into(),
323+
<snowbridge_pallet_system::Pallet<Runtime>>::initialize(
324+
runtime_para_id.into(),
325+
assethub_parachain_id.into(),
328326
)
329327
.unwrap();
330328

@@ -370,8 +368,7 @@ pub fn send_unpaid_transfer_token_message<Runtime, XcmConfig>(
370368
RuntimeHelper::<Runtime>::xcm_max_weight(XcmReceivedFrom::Sibling),
371369
Weight::zero(),
372370
);
373-
// check error is barrier
374-
assert_err!(outcome.ensure_complete(), XcmError::Barrier);
371+
assert_ok!(outcome.ensure_complete());
375372
});
376373
}
377374

0 commit comments

Comments
 (0)