Repository navigation
Fix: Reject $ inside new token class keys and cap FetchBalances - #940
Merged
Merged
Conversation
…parts A token class key field may contain $ only as its first character, so a class that could not be transferred is rejected when it is created. An empty string key part may only be the last part, so a + "" + b cannot match a + $b. Co-Authored-By: Claude Opus 5.5 <[email protected]>
FetchBalances keeps returning an array of balances. It returns at most 1000 of them and stays deprecated in favor of a paginated balance query. Internal balance lookups are not capped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
$only as its first character.createTokenClassrejects a$later in a field, naming the field in the error. Without the check, such a class could be created, and then every transfer and balance operation on it would fail while building its string key. A leading$, as in existing tokens, still works.a+""+banda+$bwould both producea$$b. Every real caller (token class, token instance, mint request, mint allowance request, burn counter) builds its key from required, non-empty fields.FetchBalanceskeeps its array response instead of switching to a page object. It returns at most 1000 balances (FetchBalancesDto.MAX_RESULTS) and stays deprecated in favor of a paginated balance query. The cap applies only at the contract endpoint.fetchBalances()itself is not capped, because allowance logic uses it internally and needs every balance.docs/exchange-integration.md.