XION
DiscordGithub
  • Welcome to XION
  • XION'S Core
    • Concepts
      • Generalized Chain Abstraction
      • Intro to Account Abstraction
      • XION's Meta Accounts
      • Meta Accounts Design
      • Architecture & Tech Glossary
      • Use Cases
  • developers
    • XION Quick Start
      • Zero to App in 5 Minutes
        • Launch a User Map App on XION in 5 Minutes
        • React Native Mobile App on XION in 5 Minutes
        • Todo App
          • Build a TODO App using the Collection-Document Storage Smart Contract
          • Build a TODO Mobile App using the DocuStore Contract
    • Mobile App Development
      • Set up your XION Mobile Development Environment
      • Build a TODO Mobile App using the DocuStore Contract
      • Create Mobile App and Integrate Meta Account Authentication
      • Building a React Native Mobile App with Abstraxion (Xion.js)
    • Getting Started (Advanced)
      • Set Up Local Environment
        • Setting up your Local Smart Contract Development Environment for XION
          • Setting up your XION Smart Contract Development Environment on Windows (WSL2 + Ubuntu)
        • Set Up an Integrated Development Environment (IDE)
        • Interacting with Xion Chain using Xion Daemon
      • Your First Contract
        • Deploying Your First Smart Contract on XION
      • Gasless UX & Permission Grants
        • Enabling Gasless Transactions with Treasury Contracts
      • App Development
        • Account Abstraction with Gasless Transactions
        • Interact with XION via your Backend Service
    • Re-using Existing Contracts
      • Deployed Contracts on XION
      • Non-Fungible Tokens (NFTs)
      • Fungible Tokens
      • Marketplace
      • Multisig
      • Proxy Contracts
      • Membership Management
      • Governance
      • Valuts
      • SCV Audited Contracts
    • Web3 for Web2 Developers
      • Web2 vs Web3 App Architecture: A Comparison
      • Misconceptions and Misapplied Web2 Patterns
      • Recommended Architecture for Apps on XION
    • Building for Mainnet
      • Xion Testnet: Your Development Playground
      • Building with Audited & Battle-Tested Contracts
      • Community Engagement: Building Support for Your app
      • Deploying to Xion Mainnet
        • Smart Contract Audits: Process, Costs & Support
        • Governance Process to Deploying Smart Contracts to Mainnet
    • Learn & Build
      • Token Factory
        • Creating, Minting, and Interacting with a Token Factory Token
        • Building a React dApp to Interact with Token Factory Tokens
        • Integrating a Token Factory Token in a Smart Contract
      • Websockets
        • WebSockets with Xion: Real-Time Communication
      • Oracles
        • Creating a Smart Contract with Pyth Oracle Integration
      • Indexers: Optimized Data Retrieval
        • SubQuery
      • Use Cases
        • Building a Per-User Data Storage App
        • Build a TODO App using the Collection-Document Storage Smart Contract
      • Crossmint Integration
        • Crossmint Digital Collectibles Checkout via Credit Card
    • Reference and Resources
      • Requesting XION Testnet Tokens
      • Public Endpoints & Resources
      • Block Explorers
      • Governance
        • Deploying Smart Contracts to Mainnet
      • Developer Tools: Abstract
      • IBC Denoms on XION Networks
      • Frequently Asked Questions
      • XION Token Contract Addresses on EVM Chains
  • Nodes & Validators
    • Run a Node
      • System Specifications
      • Build the Xion Daemon
      • Download the Xion Daemon
      • Configure the Xion Daemon
        • app.toml
        • client.toml
        • config.toml
      • Join the XION Network
        • xion-testnet-1
      • Confirm node is running
    • Become a Validator
      • Initial Setup
      • Obtain a XION Wallet Address
      • Obtain Funds
        • Testnet
      • Create Validator
    • IBC Relayers and Tokens
  • Others
    • Resources
Powered by GitBook
On this page
  • Contracts: Build and Deploy
  • Bootstrap Codebase: Abstract Module Template
  • Test contracts: CW-Orchestrator
  • Generate Schemas: `just schema`
  • Client
  • Client <> Contract
  • Debugging

Was this helpful?

Edit on GitHub
  1. developers
  2. Reference and Resources

Developer Tools: Abstract

PreviousDeploying Smart Contracts to MainnetNextIBC Denoms on XION Networks

Last updated 6 months ago

Was this helpful?

Abstract is an application development platform specially built for applications that are chain-agnostic (or abstracted šŸ˜‰). The best place to read more about Abstract would be their documentation at:

In this page we will be introducing the tools provided by Abstracted that can help you speedrun through development on Xion

If you’re a brand new dev, Abstract infrastructure may be overwhelming to start with, so we recommend just checking out the CosmWasm documentation and starting with the basic CosmWasm template.

Smart contracts = Modules (in Abstract lingo)

Contracts: Build and Deploy

Abstract provides tools to build a re-usable or a standalone contract. Re-usable contracts are also referred as "Modules".

Bootstrap Codebase: Abstract Module Template

The Abstract Module Template is a starting point for developing composable smart-contracts, or "Modules" on the Abstract platform. To learn more about Abstract Accounts, please see the abstract accounts documentation. To read more about modules, please see the module documentation.

Spin up a new project using:

cargo generate --git https://github.com/AbstractSDK/templates.git

Refer the repository for latest updates and instructions on spinning up. This documentation and the repository's updates might go out of sync.

Test contracts: CW-Orchestrator

cw-orchestrator is an advanced testing and deployment tool for CosmWasm smart-contracts. It’s designed to make it easy to test and deploy contracts in a variety of environments including cw-multi-test, local, testnet, and mainnet.

Read more here

If you bootstrap the codebase using the Abstract module template mentioned above you should have cw-orchestrator setu up already.

Generate Schemas: `just schema`

just is a command line tool to manage and execute project specific commands. A project bootstrapped using Abstract Module Template (above) comes with handy just commands defined. eg., just schema will generate schema files in the project (should be executed if any changes are made to messages and responses)

See /justfile in project root for all commands

Client

Abstract's JS SDK works well with both Xion's meta-accounts and EOAs.

Abstract provides templates to build and debug using regular EOAs on the Xion chain. However in production environment we highly recommend using meta-accounts to be able to leverage the true power of the chain and UX :)

Documentation:

The app templates repo includes a frontend folder scaffolded with React, next.js, and graz as the Cosmos wallet connector.

Example Frontend

An example frontend of a betting app deployed on XION can be found here: https://github.com/AbstractSDK/abstract.js/tree/believathon/examples/wagemos-xion-nextjs

Notes:

  • This example has a ā€œdev modeā€ which uses EOAs as the executor using grazProvider. This should be used when developing the application else you will run into permissions errors.

  • The example also demonstrates a ā€œuser modeā€ using the XION modal. We recommend having separate AbstractProviders for developer and user routes.

Client <> Contract

  1. Codegen

    1. When your contract devs have defined the messages for your contracts, run just schema to make the schemas available for codegen.

    2. Ensure that the abstract.config.js is configured with the proper folders

    3. Run abstract generate (CLI docs here).

  2. Use the generated code (src/_generated) to interact with your app. There is already an example for use of cw20 contract. Refer the wagemos examples: https://github.com/AbstractSDK/abstract.js/tree/believathon/examples

  3. Use the autogenerated module code to interact with the contracts

Debugging

  1. Get ready to publish

    1. Add a seed phrase in the TEST_MNEMONIC in .env

      1. This can be from Keplr or another Cosmos Wallet. Add XION here or by connecting to the Abstract Console.

    2. Ensure that you have funds in the address. On testnet, new XION Meta accounts all have 1 XION so sign-in to the XION dashboard and send funds to this address.

  2. Publish your contract onchain with just publish

    1. This will create a new Abstract Account, claim the namespace (configured in your app), and publish the contracts on-chain to the contract registry.

  3. Publish your schemas with just publish-schemas <namespace> <name> <version> . This will give your contract auto-generated UIs in the Console.

Introduction - Abstract Money
Abstract Money Documentation
Logo
Docs
Abstract's Javascript / Typescript SDK Documentation