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 Dapp in 5 Minutes
        • Launch a User Map Dapp on XION in 5 Minutes
        • React Native Mobile Dapp on XION in 5 Minutes
    • Mobile dapp Development on XION
      • Set up your XION Mobile Development Environment
      • Create Mobile Dapp and Integrate Meta Account Authentication
    • 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
      • Dapp 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 Dapps on XION
    • Building for Mainnet
      • Xion Testnet: Your Development Playground
      • Building with Audited & Battle-Tested Contracts
      • Community Engagement: Building Support for Your dApp
      • 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
      • Mobile Development
        • Building a React Native Mobile App with Abstraxion (Xion.js)
      • Oracles
        • Creating a Smart Contract with Pyth Oracle Integration
      • Indexers: Optimized Data Retrieval
        • SubQuery
      • Use Cases
        • Building a Per-User Data Storage Dapp
    • 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 5 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 and starting with the basic .

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

Spin up a new project using:

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

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.

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:

Example Frontend

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

  2. 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

  2. Publish your contract onchain with just publish

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

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 . To read more about modules, please see the .

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

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

An example frontend of a betting app deployed on XION can be found here:

Run abstract generate (CLI docs ).

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:

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

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

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

abstract accounts documentation
module documentation
repository
Read more here
app templates repo
https://github.com/AbstractSDK/abstract.js/tree/believathon/examples/wagemos-xion-nextjs
here
https://github.com/AbstractSDK/abstract.js/tree/believathon/examples
here
Abstract Console
to the XION dashboard
contract registry
CosmWasm documentation
CosmWasm template
Introduction - Abstract Money
Abstract Money Documentation
Docs
Abstract's Javascript / Typescript SDK Documentation
Logo