BMAD-METHOD/.claude/rules/xian-smart-contracts-cursor.../README.md

2.3 KiB

Xian Smart Contracts

Introduction

Xian is a modern blockchain platform that enables developers to write smart contracts in native Python. Unlike other blockchain platforms that require specialized languages or transpilation, Xian supports direct Python coding, making it accessible to the millions of Python developers worldwide.

What Xian Can Be Used For

  • DeFi Applications: Create decentralized finance applications including token exchanges, lending protocols, and yield farming platforms
  • NFTs and Digital Collectibles: Develop NFT marketplaces and digital collectible platforms with ease
  • DAOs: Build decentralized autonomous organizations with voting mechanisms and treasury management
  • Supply Chain Solutions: Create transparent supply chain tracking systems
  • Identity Management: Develop self-sovereign identity solutions
  • Gaming: Build blockchain-based games with in-game economies

Key Features

  • Native Python Smart Contracts: Write contracts in pure Python without transpilation
  • Event-Driven Architecture: Use events to track state changes and trigger actions
  • Rich Standard Library: Access cryptographic functions, hashing utilities, and more
  • Comprehensive Testing Framework: Test contracts using familiar Python unittest patterns
  • State Management: Simple yet powerful state management with Variables and Hashes

Getting Started

To start developing on Xian:

  1. Set up a development environment with Python 3.11+
  2. Clone xian-contracting
  3. Install Xian Contracting cd xian-contracting && pip install -e ./
  4. Create your first smart contract using the provided templates
  5. Test your contract using the testing framework
  6. Deploy to the Xian network

Learn More

For more information about Xian and smart contract development:

About This Cursor Rules File

This .cursorrules file provides guidance to Cursor AI when developing Xian smart contracts, ensuring best practices are followed for contract structure, state management, event handling, and testing.