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
    • 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
  • Diverse Chains, Uniform Contracts
  • Inter-Blockchain Contracts
  • Seamless Integration

Was this helpful?

Edit on GitHub
  1. developers
  2. Reference and Resources
  3. CosmWasm Resources

Architecture of Multi-Chain Contracts

CosmWasm is purpose-built to serve as a multi-chain solution for smart contracts, distinctively crafted within the Cosmos ecosystem. Unlike isolated chains, it's tailored for networks of interconnected blockchains. But what precisely does "multi-chain" signify?

Diverse Chains, Uniform Contracts

All CosmWasm code is deliberately crafted to remain agnostic regarding the specific details of the underlying blockchain. When you develop a CosmWasm contract, it becomes compatible with various chains within the expansive Cosmos ecosystem.

Inter-Blockchain Contracts

CosmWasm contracts leverage the Inter-Blockchain Communication protocol (IBC), enabling seamless authentication and data exchange between different blockchains. IBC offers an open and permissionless method for transmitting data packets across blockchains, empowering you to write code on one chain that can execute transactions on another. To facilitate this capability, CosmWasm fully adopts the actor model, ensuring that code is inherently designed for IBC utilization. Consequently, messages in CosmWasm operate on a "fire-and-forget" principle, eliminating the need to await promises and mitigating concerns related to race conditions and reentrancy attacks. By incorporating IBC primitives into CosmWasm's libraries, you can unleash the extensive potential of inter-chain messaging and execution.

Seamless Integration

CosmWasm's design leans towards that of a library rather than a comprehensive framework, resulting in minimal API dependencies. This flexibility empowers you to harness the capabilities of CosmWasm without becoming overly reliant on it.

This approach offers two noteworthy advantages:

  1. Simplified Support for Multiple Languages: The design simplifies the process of adding support for multiple programming languages when creating smart contracts.

  2. Versatility Beyond Cosmos SDK: Because it imposes minimal requirements on the host system, CosmWasm can be seamlessly integrated into various frameworks, not limited solely to the Cosmos SDK. The core runtime logic, cosmwasm-vm, is coded in Rust, with wasmvm providing a versatile Go binding. This adaptability allows CosmWasm to serve as a robust foundation for your smart contracts and decentralized applications, ensuring they can be effortlessly migrated to different blockchains and programming languages.

Last updated 1 year ago

Was this helpful?