Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

XCM Workshop Setup Script #86

Open
bernardoaraujor opened this issue Nov 14, 2022 · 0 comments
Open

XCM Workshop Setup Script #86

bernardoaraujor opened this issue Nov 14, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bernardoaraujor
Copy link
Contributor

bernardoaraujor commented Nov 14, 2022

Motivation

The XCM Workshop slide deck has been circulating a lot. It's been a great introductory resource for many people (DS & external) to learn the basics of XCM.

In the reserve-based transfer secion, the slides accumulate unnecessary complexity in the form of extra steps that are necessary to configure the chains before the XCM calls can be executed. For example, simply creating a sufficient asset (xUSD) on Statemine requires all these steps:

  1. Creating the Asset
  2. Minting xUSD
  3. Reading chain-state (for dmpQueue/maxIndividual and asset/minBalance)
  4. Sending a paraSudoWrapper of a forceCreate encoded call

Although still arguably a learning experience (however not necessarily XCM-related), all these steps introduce a lot of room for human error and confusion, especially for a less-experienced and naive audience.

Ideally, we should have some mechanism that not only launches the XCM Playground, but also bootstraps the chains with all the necessary conditions, abstracting away the non-XCM-related operations. Those can still be mentioned on the slides for awareness, but the human steps should focus on XCM calls only.

Suggested Solution

We need some helper utility that will:

  • Create xUSD on Statemine
  • Make xUSD sufficient on Statemine (this can be achieved in the same call that creates it)
  • Mint xUSD on Statemine
  • Create txUSD on Trappist
  • Registers xUSD<>txUSD on AssetRegistry (or maybe not? this step might still be a good learning exercise to be done manually)
  • Create pxUSD on parachain 3000

This helper utility can be based on one of the following:

  • CAPI - TypeScript - Downside: introduces deno as extra dependency to the audience
  • PolkadotJS API - JavaScript - Downside: introduces node/npm/yarn as extra dependency to the audience
  • subxt - Rust - Upside: no extra dependencies to the audience

Then some shell script would orchestrate the launch of Zombienet and call the helper utility, making the playground ready for the audience to perform the XCM calls.

Alternatives

We also have the following alternatives:

  • Simply using parachains-integration-tests. Downside is the introduction of yet another dependency for the audience to install locally, and the potential for confusion since that's not the main purpose for the tool.
  • Using Zombienet's test functionality with JS calls. However that feels a bit like a hack, since we don't really want to test anything (we know the calls work), and showing test results on the Zombienet's logs might further confuse the audience.
@bernardoaraujor bernardoaraujor added the enhancement New feature or request label Nov 14, 2022
@stiiifff stiiifff added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 14, 2022
@stiiifff stiiifff added this to the Trappist M2 / XCM v3 milestone Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants