Skip to content

Add Arcade Token Template Support#5

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

Add Arcade Token Template Support#5
gitteri merged 2 commits intomainfrom
arcade-token-template

Conversation

@gitteri
Copy link
Copy Markdown
Collaborator

@gitteri gitteri commented Jul 29, 2025

Add Arcade Token Template Support

Summary

This PR introduces a new arcade token template to the Mosaic SDK, providing developers with a pre-configured template for creating arcade tokens (close-loop tokens with explicit allowlists) on Solana.

Changes Made

🏗️ Code Refactoring

  • Moved Token class implementation: Relocated the complete Token class and related utilities from packages/sdk/src/issuance/index.ts to packages/sdk/src/issuance/createMint.ts for better code organization
  • Updated exports: Simplified the issuance index file to export from the new createMint.ts module

New Feature: Arcade Token Template

  • Added createArcadeTokenInitTransaction: New template function in packages/sdk/src/templates/arcadeToken.ts
  • Arcade token features: Pre-configured with the following Token-2022 extensions:
    • 📄 Metadata support (name, symbol, URI)
    • ⏸️ Pausable functionality for emergency controls
    • 🔒 Default account state set to initialized. This will be set to frozen by default when we integrate w/Tiago's compliance program.
    • 🕵️ Confidential balances for privacy
    • 👤 Permanent delegate for administrative control
  • Updated template exports: Added arcade token exports to the templates index

Key Characteristics of Arcade Tokens

Arcade tokens are designed as close-loop tokens with explicit allowlists, making them ideal for:

  • Gaming ecosystems with controlled token distribution
  • Loyalty programs with restricted access
  • Private or permissioned token economies

Important

Add arcade token template to Mosaic SDK with specific features and refactor Token class location.

  • New Feature:
    • Added createArcadeTokenInitTransaction in arcadeToken.ts for initializing arcade tokens with metadata, pausable functionality, default account state, confidential balances, and permanent delegate.
    • Arcade tokens are close-loop tokens with explicit allowlists.
  • Code Refactoring:
    • Moved Token class from index.ts to createMint.ts.
    • Updated exports in index.ts to reflect the new file structure.
  • Misc:
    • Updated templates/index.ts to export arcade token template.

This description was created by Ellipsis for c1393da. 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.

Caution

Changes requested ❌

Reviewed everything up to 74c1294 in 2 minutes and 13 seconds. Click for details.
  • Reviewed 631 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 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/sdk/src/issuance/createMint.ts:125
  • Draft comment:
    Clarify or remove the TODO about adding post-initialize transfer hooks if not needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. packages/sdk/src/issuance/createMint.ts:269
  • Draft comment:
    Explicitly typing the returned metadata tuple instead of using an assertion could improve type safety.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. packages/sdk/src/issuance/createMint.ts:213
  • Draft comment:
    Double-check that rent is calculated over the full mint space while createAccount uses a reduced space; ensure this matches program requirements.
  • 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 something, which violates the rule against asking for confirmation or verification. It doesn't provide a specific suggestion or point out a clear issue with the code.
4. packages/sdk/src/templates/arcadeToken.ts:29
  • Draft comment:
    RPC type mismatch: Rpc is passed here but Token.buildTransaction expects Rpc. Verify type compatibility.
  • 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% Without seeing the Token class implementation or the gill package types, I cannot verify if there's actually a type mismatch. The code imports SolanaRpcApi which suggests that's the correct type. The comment is making an assumption about Token.buildTransaction's type requirements without providing clear evidence. I could be wrong if the Token class documentation or implementation explicitly requires SolanaRpcApiMainnet. The comment author might have access to that information. However, following the principle that we need strong evidence to keep a comment, and given that the code imports and uses SolanaRpcApi consistently, we should err on the side of removing the comment. Delete the comment as there isn't strong evidence of a type mismatch, and we don't have access to the Token class implementation to verify the claim.
5. packages/sdk/src/templates/arcadeToken.ts:61
  • Draft comment:
    Ensure that using createNoopSigner for 'mint' and 'feePayer' is appropriate for production signing needs.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the author to ensure that a specific function is appropriate for production use. This falls under the rule of not asking the author to ensure behavior is intended or to double-check things. Therefore, this comment should be removed.
6. packages/sdk/src/templates/arcadeToken.ts:17
  • Draft comment:
    Typographical suggestion: Consider changing "close loop tokens" to "closed-loop tokens" for clarity.
  • 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% While this is technically correct and the suggested term is more proper, the rules state not to make purely informative comments or comments that are obvious/unimportant. This is a very minor documentation fix that doesn't impact code functionality or clarity significantly. The meaning is clear either way. The term "closed-loop" might be an important technical term in this context, and having it written incorrectly could cause confusion for developers. While technically correct, this is still just a minor documentation typo that doesn't significantly impact understanding. The rules explicitly say to avoid purely informative comments. This comment should be deleted as it's a minor documentation suggestion that doesn't require a code change and falls under the category of "obvious or unimportant" comments that should be avoided.

Workflow ID: wflow_q55GGMg9aifZapdI

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

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 c1393da in 51 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 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/sdk/src/templates/arcadeToken.ts:27
  • Draft comment:
    Updated JSDoc '@returns' text now correctly references the arcade token mint.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_A3JACrNMwCMZV9ip

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

@gitteri gitteri merged commit 20aadf1 into main Jul 29, 2025
2 checks passed
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