Split up the token interface trait #1012
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Separate admin functions in the token interface out to a separate trait.
Why
The primary standard interface of tokens won't include the admin functions. Although many tokens on Soroban will have the admin functions because all Stellar Asset Contracts will have them.
We still want it to be convenient for folks to follow that same admin pattern if its a fit, but contracts shouldn't have to implement them if their follow a different pattern for admin operations.
This issue was discussed on Discord, and some folks suggested allowances should also be broken into a separate trait. However this seemed more controversial and there were also opinions that they shouldn't be separated, so I've kept them in for now.
Note that the Spec value in the SDK will continue to hold the entire token interface. It's not particularly useful to split that up, as the only user of it is the soroban-cli when interacting with Stellar Asset Contracts. I've hidden it from docs since it isn't routinely useful to most.
Close #965