Enable teleport of native token to Assethub#553
Conversation
There was a problem hiding this comment.
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-teleportwith 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.
|
@copilot please address the unresolved comments of this thread in a new PR. |
…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>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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