ParaSpell XCM SDK Phase 3 innovations & upgrades.

Dudo50
Networks @ FIIT STU
5 min readApr 26, 2023

This is a follow-up article Development of ParaSpell — XCM & XCMP tool & SDK meant to unify cross-chain experience on Polkadot — Paraspell XCM SDK.

What is ParaSpell

ParaSpell is XCM & XCMP tool serving developers and innovators in the Polkadot/Kusama ecosystem. ParaSpell consists of three main repositories:

XCM SDK

The main repository of ParaSpell. SDK serves many purposes and is very versatile. As its name suggests it mainly focuses on unifying the XCM experience on Polkadot & Kusama. This is very needed because most of Parachains customize their XCM pallets to fit their needs. This can then cause confusion when developers wish to implement XCM into their dApp because they have to do research for each Parachain. The good news is, they do not need to do this anymore because there is ParaSpell XCM SDK that wraps most of the Parachains XCM Pallets into one unified pattern so implementation is really simple.

SDK also feature a famous builder pattern with suggestions so you always construct your messages right.

It also features logging into the console so before you confirm your message you can check out if it was constructed correctly.

SDK also has some other beneficial features for developers:

  • You can query and do operations with Assets that are registered on compatible nodes. You can explore these here: link
  • You can query XCM pallets that compatible nodes implement. This can be explored here.
  • It implements HRMP operations (Opening/Closing channels between Parachains). More on that here.
  • XYK Pallet implemented by Basilisk for playing with pools and pool operations. Can be explored here: link.

XCM UI

This simple front—end dApp serves as an example of SDK implementation as well as a playground for students learning about XCM or Parachain developers that wish to try their Parachains with other Parachains. This is now much more intuitive because most of the projects now use the Zombienet library for launching a network. ParaSpell added the Zombienet network startup library in this phase to be along with the already implemented Parachain-launch library. Playing with XCM is very easy, you only have to start your localhost network because UI is also deployed on netlify so you can interact with it without the need of launching it locally also.

One screenshot from UI:

This is where users can use XCM transfers in all three scenarios on one screen:

  • UMP (Upwards message passing)
  • DMP (Downward message passing)
  • HRMP (Horizontal relay routed message passing)

They can either login with their own wallet or use one of prefunded dev accounts.

Other useful features UI allows with the implementation of XCM SDK are:

  • XYK Pool operations — (Creating pools, Slashing pools, adding currencies to pools, buying/selling from pools)
  • HRMP Channels — (opening/ closing)
  • Night mode (If you are an owl)
  • Comprehensive login module (That can be used in any other dApp as it is part of the Sub-Scaffold template to which the ParaSpell team contributed)
  • Comprehensive asset manager module (It won't allow you to transfer Asset if it is not registered on both Origin and Destination Parachains)

Docs

This repository holds our official documentation. We always strive to make our documentation as easy to read and understand as possible. The documentation contains important guidance on implementing XCM SDK into your dApp or how to operate XCM UI and start the localhost network along it for testing. The newest improvement is an addon of Video guides that teach us how different features work.

As we can see, documentation is really broad and we try to explain everything we think is necessary. We also added interesting links at the bottom so users can have easy access to repositories that interest them.

Updates we brought in this Phase

  • We have solved the issue with currency & currencyId — users had to fill them both in order to construct messages. Now they only fill whichever one is required by the node they wish to transfer from. It is now constructed with currency only which accepts both String(Currency symbol) or number (currency ID) parameters.
  • We added the Zombienet network startup library along with the already implemented Parachain-launch so developers can choose the startup library of their choice.
  • We included support for new XCM-compatible Parachains
  • We reconstructed the logic of message construction (Before it was handled by a colossal switch now it is more efficiently looking & working)
  • We have added video guides to our official docs for a better understanding of usage.
  • We have added the GitHub pipeline for SDK to ensure each release is correct and run through checks.

Future work for ParaSpell

As technology always progresses we strive to bring the newest and freshest features. One of the recent updates to XCM technology was support for NFT (Non-fungible) tokens. We wish to research this topic more and include full support for it.

Another future work that stays the same from the previous article is including support for XCMP once it comes out. XCMP is still in active development and we currently use its simplified version called HRMP.

We wish to continually support this SDK through a maintenance proposal that is planned to be proposed very soon.

Thanks for making this possible belongs to:

Special thanks to Web3 Foundation Team, Kusama community & excellent Paraspell developers.

--

--

Dudo50
Networks @ FIIT STU

University student, blockchain developer, creator of ParaSpell