Skip to content

enable setting specific authorities#6

Merged
gitteri merged 1 commit intomainfrom
explicit-authority
Jul 29, 2025
Merged

enable setting specific authorities#6
gitteri merged 1 commit intomainfrom
explicit-authority

Conversation

@gitteri
Copy link
Copy Markdown
Collaborator

@gitteri gitteri commented Jul 29, 2025

Add Granular Authority Control to Token Templates

Summary

This PR enhances the arcade token and stablecoin template functions by introducing granular authority control, allowing developers to specify different authorities for various token functionalities instead of using a single authority for all operations.

🚀 Changes Made

Enhanced Function Signatures

  • Renamed: authority parameter → mintAuthority for clarity
  • Added optional authority parameters:
    • metadataAuthority - Controls token metadata operations
    • pausableAuthority - Controls pause/unpause functionality
    • confidentialBalancesAuthority - Controls confidential balance features
    • permanentDelegateAuthority - Controls permanent delegate operations

Updated Functions

  • createArcadeTokenInitTransaction() in packages/sdk/src/templates/arcadeToken.ts
  • createStablecoinInitTransaction() in packages/sdk/src/templates/stablecoin.ts

🔄 Migration Guide

Existing Code (still works):

createArcadeTokenInitTransaction(rpc, name, symbol, decimals, uri, authority, mint, feePayer)

New Capabilities:

createArcadeTokenInitTransaction(
  rpc, name, symbol, decimals, uri, 
  mintAuthority, mint, feePayer,
  metadataAuthority,      // optional
  pausableAuthority,      // optional  
  confidentialBalancesAuthority, // optional
  permanentDelegateAuthority     // optional
)

Important

Introduces granular authority control to token templates, allowing specific authority assignments for various token operations.

  • Function Signatures:
    • Renamed authority to mintAuthority in createArcadeTokenInitTransaction() and createStablecoinInitTransaction().
    • Added optional parameters: metadataAuthority, pausableAuthority, confidentialBalancesAuthority, permanentDelegateAuthority.
  • Behavior:
    • createArcadeTokenInitTransaction() in arcadeToken.ts and createStablecoinInitTransaction() in stablecoin.ts now support separate authorities for metadata, pausable functionality, confidential balances, and permanent delegate.
    • Default to mintAuthority if specific authorities are not provided.

This description was created by Ellipsis for 37635f5. 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 37635f5 in 55 seconds. Click for details.
  • Reviewed 124 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 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:52
  • Draft comment:
    Consider using the nullish coalescing operator (??) instead of || for authority fallbacks. This avoids inadvertently treating a valid falsy value (e.g. an empty string) as undefined.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. packages/sdk/src/templates/stablecoin.ts:51
  • Draft comment:
    Consider using the nullish coalescing operator (??) instead of || for authority fallbacks. This ensures that intentionally falsy values (if ever valid) aren’t overridden.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_uV6iqNUhd9BhMihw

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

@gitteri gitteri merged commit ed6466d into main Jul 29, 2025
2 checks passed
@gitteri gitteri deleted the explicit-authority branch July 29, 2025 18: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