Skip to content

SAC Admin #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brozorec opened this issue Apr 29, 2025 · 0 comments · May be fixed by #215
Open

SAC Admin #207

brozorec opened this issue Apr 29, 2025 · 0 comments · May be fixed by #215
Assignees
Labels
Small 1-2 days

Comments

@brozorec
Copy link
Collaborator

brozorec commented Apr 29, 2025

The current token::StellarAssetClient in "soroban_sdk" provides built-in support for managing SAC (Stellar Asset Contract) administrative tasks. However, some use cases require more flexible or customized logic.

To address this, we will implement a dedicated SAC Admin module to which the admin tasks can be delegated to and that replicates the admin functionality of token::StellarAssetClient. This allows developers to define custom rules on top of that (e.g., role-based access, 2-step admin transfers, mint rate limits, upgradeability) while maintaining compatibility with SACs.

Interface

pub trait SACAdmin {
  fn admin(env: Env) -> Address;
  fn set_admin(env: Env, new_admin: Address);
  fn set_authorized(env: Env, id: Address, authorize: bool);
  fn mint(env: Env, to: Address, amount: i128);
  fn clawback(env: Env, from: Address, amount: i128);
}

Events

  • ["set_admin", admin: Address, sep0011_asset: String], data = new_admin: Address
  • ["set_authorized", admin: Address, id: Address, sep0011_asset: String], data = authorize: bool
  • ["mint", admin: Address, to: Address, sep0011_asset: String], data = amount: i128
  • ["clawback", admin: Address, from: Address, sep0011_asset: String], data = amount: i128

Notes

This module is incompatible with our stellar_contracts::fungible which is meant only for "pure" contract tokens, while this one must be used only for SACs.


For more context, see:

@brozorec brozorec added the Small 1-2 days label Apr 29, 2025
@brozorec brozorec added this to the Release v0.3.0 milestone Apr 29, 2025
@brozorec brozorec self-assigned this Apr 30, 2025
@brozorec brozorec linked a pull request May 7, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Small 1-2 days
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

1 participant