Snowbridge: enforce fee when registering Polkadot native asset#8725
Snowbridge: enforce fee when registering Polkadot native asset#8725acatangiu merged 26 commits intoparitytech:masterfrom
Conversation
|
@claravanstaden Please check this commit, looks like we missed applying the burn fee when adding a tip? |
|
@yrong good catch, I definitely missed that. 🫤 |
cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs
Outdated
Show resolved
Hide resolved
cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs
Outdated
Show resolved
Hide resolved
…adot-sdk into register-pna-with-fee
| let remote_xcm = Self::build_remote_xcm(&call); | ||
| let message_id = Self::send_xcm(origin_location, dest.clone(), remote_xcm.clone()) | ||
| .map_err(|error| Error::<T>::from(error))?; | ||
| let ether_gained = Self::swap_fee_asset_and_burn(origin_location.clone(), fee_asset)?; |
There was a problem hiding this comment.
This will fail for Root origin when fee_asset is non-zero.
| let ether_gained = Self::swap_fee_asset_and_burn(origin_location.clone(), fee_asset)?; | |
| let ether_gained = if origin_location.is_here() { | |
| // Root origin/location does not pay any fees/tip. | |
| 0 | |
| } else { | |
| Self::swap_fee_asset_and_burn(origin_location.clone(), fee_asset)? | |
| }; |
There was a problem hiding this comment.
I would still prefer not to call this function at all for Root, but not going to block on it.
claravanstaden
left a comment
There was a problem hiding this comment.
Looks like you need to fix the PR doc versions, otherwise looks good!
I've added I remember Adrian mentioned that since we're the only end user of these packages, the semver check does't really matter. |
| decimals: 12, | ||
| }; | ||
|
|
||
| let fee_asset = Asset::from((Location::parent(), 1_000_000u128)); |
There was a problem hiding this comment.
nit: maybe 1_000_000u128 should be a const with some descriptive name?
36c3039
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-8725-to-stable2503
git worktree add --checkout .worktree/backport-8725-to-stable2503 backport-8725-to-stable2503
cd .worktree/backport-8725-to-stable2503
git reset --hard HEAD^
git cherry-pick -x 36c3039007866480be258d9645626c56ab168d69
git push --force-with-lease |
|
Backport failed for |
Backport #8725 into `stable2503` from yrong. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* master: (62 commits) release/build-macos-binaries: add missing FEATURES argument (#8816) Add XCM Precompile to `pallet-xcm` (#8693) [Release|CI/CD] Exclude test runtimes from the runtimes build (#8820) Add freebsd sysinfo for telemetry (#7985) release-reusable-rc-build: add optional `features` input that can be considered for nodes building (#8755) [Staking] Cleanups and some improvements (#8701) Fix typos in 3 files in Implementers Guide (#8799) Update `RemoteExporter` docs to reflect removal of `forward_id_for` (#8795) Snowbridge: enforce fee when registering Polkadot native asset (#8725) Bump the ci_dependencies group across 1 directory with 7 updates (#8788) Docker hub 'master' image short sha (#8790) [Release|CI/CD] Combine branch-off and RC automation flows (#8754) Move Transaction depth limit checks (#8750) Add genesis presets for remaining runtimes in polkadot-parachain-bin (#8426) Do not make pallet-identity benchmarks signature-dependent (#8179) Introduction of Approval Slashes [Disabling Strategy Stage 4] (#6827) [AHM] Prepare For Westend Cleanup (#8715) Actually use RP offset in YAP parachain (#8745) [AHM] Relax the requirement for RC-Client to receive +1 session reports (#8702) Don't read storage items in logging (#8749) ...
Backport paritytech#8725 into `stable2503` from yrong. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Resolves: https://linear.app/snowfork/issue/SNO-1497