♠️
RACE Protocol
NFT PresaleDiscord
  • ❤️Official Docs & Links
  • ⏳Progress Overview
  • RACE Protocol
    • 🏗️System Architecture
      • Components
      • On-chain Accounts
      • Synchronization
      • Randomization
      • Payment
    • 🎲Game Development
      • Game Handler
      • Effect
      • Event Handling
      • Race API
        • Arweave Integration
      • Race JS SDK
        • Installation and Setup
        • Key Components
          • AppClient
          • SubClient
          • Events
          • Game Context
          • Decryption Cache
        • Advanced Features
          • Getting Revealed Knowledge
          • Exiting and Detaching
          • Submitting Messages
          • Sub-game Interaction
        • Best Practices
        • API Reference
        • Troubleshooting
    • 🧪Testing
      • Race Test Kit
      • Unit Testing
      • Integration Testing
      • Additional Considerations
    • 🧱Modules & Features
      • Encryption Methods
      • Command-line Tools
      • Configuration Options
      • Blockchain Transport Implementations
    • 📃Smart Contract
      • Solana Program
    • 🔦Examples and Use Cases
      • Draw Card Game
      • Raffle Game
      • Other Examples
  • RACE Games
    • ♠️RACE Poker app
      • 🎮Start playing in minutes
        • 💰Cash and sit-n-go
        • 🏆Tournaments
      • 🎨Workshop
        • 🏆Create cash games
        • 🏨Create tourneys
      • 💡Concept introduction
      • 🏗️System architecture
      • 👾Game Flow
      • 🎲Cards shuffling
      • ☎️Communication
      • 🔐Key sharing/decryption
      • 💱Cash flow structure
    • ⚡Solfast
      • 🎲Game modes
  • RACE RESEARCH
    • 👾No-Code Development
      • Brainstorming
      • Implementation Approach
      • Project Status
    • 0️⃣Zero-Knowledge Proofs
      • Brainstorming
      • Integration steps
        • Verifiable Randomness Generation
        • Private Game State Updates
        • Verifiable Settlements
        • Private Player Actions
      • Project Status
    • 🛡️Security Audit Report
      • Executive summary
        • Introduction to Race Protocol
        • Audit Methodology
      • Findings
        • Smart Contract Security
        • WebAssembly Security
        • Client-side Security (Race SDK)
        • Server-side Security
        • Randomization and Encryption
        • On-chain Account Management
        • Synchronization Mechanisms
        • Payment Handling
      • Recommendations
      • Conclusion
  • RACE DAO
    • 😎About
    • 🫂Community
    • 🖼️NFT Collection [!]
Powered by GitBook
On this page
  • Available Commands
  • Usage Examples
  1. RACE Protocol
  2. Modules & Features

Command-line Tools

The race-cli module provides a set of command-line tools that allow developers and players to manage on-chain accounts and interact with Race Protocol games. These tools offer a convenient way to perform various tasks without needing to write custom scripts or interact directly with the blockchain.

Available Commands

The race-cli offers the following commands:

  • publish: This command allows developers to publish their game bundles as NFTs on the blockchain. It takes the game name, symbol, creator address, and path to the WASM bundle as arguments and handles the process of uploading the bundle to decentralized storage and minting the NFT.

  • bundle-info: This command queries the blockchain and displays information about a specific game bundle account, including its name and associated WASM data URI.

  • game-info: This command queries and displays information about a specific game account, including its address, title, bundle address, token address, players, servers, and other relevant data.

  • server-info: This command queries and displays information about a specific server account, including its address and endpoint.

  • create-reg: This command creates a new registration account on the blockchain, which can be either public or private.

  • reg-info: This command queries and displays information about a specific registration account, including its address, ownership status, capacity, and list of registered games.

  • create-game: This command creates a new game account based on a specification file provided as an argument. The specification file contains details like the game title, bundle address, token address, maximum players, and initial game data.

  • close-game: This command allows the game owner to close a game account, provided it is empty.

  • unreg-game: This command removes a game from its associated registration account.

  • create-recipient: This command creates a new recipient account based on a specification file provided as an argument. The specification file defines the slots and initial share distribution within the recipient account.

  • recipient-info: This command queries and displays information about a specific recipient account, including its address, capability address, and details about its slots and shares.

  • claim: This command allows a receiver to claim their share of tokens from a recipient account.

Usage Examples

Here are some examples of how to use the race-cli commands:

  • Publish a game bundle:

race-cli publish MyGame MGN 0x... target/my_game.wasm
  • Query information about a game account:

race-cli game-info solana 0x…
  • Create a new game based on a specification file:

race-cli create-game game_spec.json

These command-line tools provide a convenient and efficient way for developers and players to interact with Race Protocol and manage on-chain accounts, simplifying the development and gameplay experience.

PreviousEncryption MethodsNextConfiguration Options

Last updated 1 year ago

🧱