Skip to content

Enable teleport of native token to Assethub#553

Open
ebma wants to merge 10 commits intomainfrom
allow-native-token-teleport-to-assethub
Open

Enable teleport of native token to Assethub#553
ebma wants to merge 10 commits intomainfrom
allow-native-token-teleport-to-assethub

Conversation

@ebma
Copy link
Member

@ebma ebma commented Feb 24, 2026

Adds a new pallet xcm-teleport which is used for teleporting native tokens to AssetHub. This extra pallet is necessary because Pendulum's polkadot-sdk dependencies are so old that they don't have access to 'transfer_assets_using_type_and_then'. Using polkadotXcm.send() is not viable either because it adds an instruction that messes up the processing on Assethub. More context can be found in this file.

Xcm Teleport Investigation.md

@ebma ebma marked this pull request as ready for review February 27, 2026 09:00
@ebma ebma requested a review from Copilot February 27, 2026 09:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a dedicated pallet-xcm-teleport to teleport Pendulum’s native token (PEN) to AssetHub using a manually constructed XCM program whose instruction ordering is compatible with AssetHub’s barrier rules, and wires it into the Pendulum runtime/XCM configuration.

Changes:

  • Added new pallet-xcm-teleport with an extrinsic that burns PEN locally and sends an ordered XCM sequence to AssetHub (Withdraw DOT → BuyExecution → ReceiveTeleportedAsset(PEN) → deposits).
  • Updated Pendulum runtime wiring (runtime config + construct_runtime!) and dependencies to include the new pallet.
  • Tightened XCM teleport controls in Pendulum via destination/asset filters and transactor interception.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
runtime/pendulum/src/xcm_config.rs Adds AssetHub/native asset locations, enables limited teleporter trust, and restricts teleport destinations/assets.
runtime/pendulum/src/lib.rs Registers the new pallet in the runtime and allows its calls via BaseFilter.
runtime/pendulum/Cargo.toml Adds the new pallet dependency and enables it under std / benchmarks / try-runtime features.
runtime/common/src/custom_transactor.rs Extends the custom transactor wrapper to validate teleport checkout destinations.
runtime/common/Cargo.toml Adds log dependency needed by new logging in custom_transactor.
pallets/xcm-teleport/src/lib.rs New pallet implementing the custom XCM teleport extrinsic and message construction.
pallets/xcm-teleport/Cargo.toml New crate manifest for the teleport pallet.
Cargo.toml Adds the new pallet to workspace members.
Cargo.lock Locks the newly added crate and dependency graph updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ebma
Copy link
Member Author

ebma commented Feb 27, 2026

@copilot please address the unresolved comments of this thread in a new PR.

Copy link

Copilot AI commented Feb 27, 2026

@ebma I've opened a new pull request, #554, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 27, 2026 10:51
…update comments (#554)

* Initial plan

* Address review comments: remove unused deps, fix comment, handle imbalance properly

Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>

* Clarify comment about refund limitations

Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
@ebma ebma requested a review from gianfra-t February 27, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants