Skip to content

Add CLI Command for Creating Arcade Tokens#9

Merged
gitteri merged 2 commits intomainfrom
cli-create-arcade-token
Jul 29, 2025
Merged

Add CLI Command for Creating Arcade Tokens#9
gitteri merged 2 commits intomainfrom
cli-create-arcade-token

Conversation

@gitteri
Copy link
Copy Markdown
Collaborator

@gitteri gitteri commented Jul 29, 2025

Add CLI Command for Creating Arcade Tokens

Overview

This PR adds a new CLI command mosaic create arcade-token that enables developers to easily create arcade tokens with gaming-specific Token-2022 extensions directly from the command line.

What's New

  • New CLI Command: mosaic create arcade-token with comprehensive options for token configuration
  • Gaming-Focused Token Creation: Streamlined creation of tokens designed for arcade and gaming applications
  • Enhanced SDK Integration: Improved type safety and transaction signer handling in the arcade token template

Features

The new command creates tokens with the following extensions enabled by default:

  • Metadata Extension: Rich gaming metadata support
  • Pausable: Authority-controlled pause/unpause functionality
  • Default Account State: Built-in allowlist capabilities for closed-loop token economies
  • Permanent Delegate: Enhanced control and management features

CLI Usage

# Basic arcade token creation
mosaic create arcade-token -n "GameCoin" -s "GAME"

# Advanced options with custom authorities
mosaic create arcade-token \
  -n "ArcadeCoin" \
  -s "ARC" \
  -d 2 \
  --mint-authority <address> \
  --pausable-authority <address> \
  --metadata-authority <address>

Changes Made

  1. New CLI Command (packages/cli/src/commands/create/arcade-token.ts)

    • Comprehensive option handling for all token configuration
    • Rich console output with color-coded success messages
    • Proper error handling and user feedback
    • Automatic keypair generation or custom keypair loading
  2. SDK Template Improvements (packages/sdk/src/templates/arcadeToken.ts)

    • Enhanced type safety with TransactionSigner support
    • Better handling of mint and fee payer signers
    • Improved transaction return types
  3. CLI Integration (packages/cli/src/index.ts)

    • Added arcade token command to the create command group

Target Use Cases

  • Gaming developers building on-chain economies
  • Arcade operators creating allowlist-controlled tokens
  • Projects requiring pausable token functionality
  • Applications needing rich metadata for gaming assets

Note for Users

⚠️ Important: Arcade tokens are created with a default account state that requires allowlisting. You must add addresses to the allowlist for your arcade token to be usable by end users.


Important

Adds a new CLI command for creating arcade tokens with Token-2022 extensions, improves SDK integration, and updates CLI to include the new command.

  • New CLI Command:
    • Adds mosaic create arcade-token in arcade-token.ts for creating arcade tokens with Token-2022 extensions.
    • Supports options for token configuration, including authorities and metadata URI.
    • Provides console output for success and error handling.
  • SDK Template Improvements:
    • Enhances createArcadeTokenInitTransaction in arcadeToken.ts with better type safety and transaction handling.
    • Supports TransactionSigner for mint and fee payer.
  • CLI Integration:
    • Adds createArcadeTokenCommand to index.ts under the create command group.
    • Updates CLI to manage arcade tokens with enhanced options for gaming applications.

This description was created by Ellipsis for 140ac95. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 140ac95 in 1 minute and 44 seconds. Click for details.
  • Reviewed 264 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/cli/src/commands/create/arcade-token.ts:80
  • Draft comment:
    Confirm that enforcing decimals between 0 and 9 is intentional for arcade tokens.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This comment violates several rules. It's asking for confirmation/verification rather than pointing out a clear issue. It starts with "Confirm that..." which is explicitly called out as a red flag in the rules. Without seeing the SDK implementation or arcade token spec, we can't definitively say if this range is wrong. Maybe there's a legitimate concern about the decimal range being too restrictive compared to normal tokens? The comment could be highlighting a real architectural issue. Even if there is a legitimate concern, the comment should state it directly rather than asking for confirmation. Additionally, we don't have enough context about arcade token requirements to judge if this range is incorrect. The comment should be deleted as it violates the rule against asking for confirmations and doesn't clearly identify an issue that needs fixing.
2. packages/cli/src/commands/create/arcade-token.ts:86
  • Draft comment:
    Defaulting authority options to the signer (mintAuthority) is clear; ensure documentation reflects these fallbacks.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. packages/cli/src/commands/create/stablecoin.ts:86
  • Draft comment:
    Verify that the stablecoin decimals validation (0-9) meets protocol expectations, similar to arcade tokens.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/sdk/src/templates/arcadeToken.ts:55
  • Draft comment:
    Using createNoopSigner for mint and feePayer conversion is pragmatic; double-check that it aligns with security and signing requirements in production.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to double-check if the use of createNoopSigner aligns with security and signing requirements in production. This violates the rule against asking the author to double-check things. The comment does not provide a specific suggestion or point out a specific issue with the code.

Workflow ID: wflow_tjKTRh8UUBIlTs9M

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@gitteri gitteri merged commit 88f0434 into main Jul 29, 2025
2 checks passed
@gitteri gitteri deleted the cli-create-arcade-token branch July 29, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant