Updated 29 days ago

XION DApp Starter Template - Integraion of Xion into Warp CLI

Adding native support for Xion to Warp CLI to provide a starter template for dapp developers on Xion

  • Crypto / Web3
  • CosmosHub
  • Gnosis Chain / xDAI
  • Secret Network
  • Juno
  • Infra / API

This time around I undertook the task of adding support for Xion in Warp CLI - my command line tool for creating, building, testing, and deploying CosmWasm smart contracts with ease and at scale.

The official Warp repo can be found here: https://github.com/archway-warp/warp-cli

All the work required to integrate Xion in warp can be found here.

Project Scope

For the Xion hackathon I had a few ambitious goals:

  • De-couple the main Warp logic from Archway-related functionality
  • Create an abstraction layer to easily integrate further Cosmos-based chains into Warp with as little friction as possible
  • Add native support for Xion using the new abstraction layer

Originally, Warp was a tool primarily designed for Secret Network. Then, during the Archway Hackathon, a fork of Warp was created to speed up the development of our Archway hackathon entry. Now I have gone a step further. I have modularized Warp to be able to support multiple chains and their unique feature sets independently of other chains.

This allows Warp to conquer the entire Cosmos one zone at a time.

Deliverable

The hackathon deliverable is a project template that can be easily scaffolded with just a simple command using Warp:

warp init project_name --chain xion

That's all that is needed to start building out your Xion project.

Now that the workspace is ready, to create a new contract all you need to do is call the following command:

warp new contract_name

With this a new contract is going to get scaffolded with cargo schema set up.

Now you can build and deploy to the testnet with the following command:

warp deploy -r

Ready to start building a fullstack Dapp around your contracts? We've got you covered! Quickly create a starter template with the following command:

warp frontend

Conclusions

Adding Xion to Warp is a huge step forward for the tool, because it has now gained the ability to be used to develop cross-chain applications. Not unlike IBC, Warp can now be considered a sort of "glue" between different chains. Deploying your codebase to a different chain is just a matter of re-running three commands.

This integration gives builders on Xion an easy way to draft and prototype their projects, as well as a solid starter for the next hackathon.

What didn't go so well?

Integrating a local testnet is the main issue as of right now. It sometimes works, sometimes doesn't - unfortunately, the time constraints and other projects have made it difficult to cleanly wrap everything up.