feat: SIP-010 fungible token support for multi-asset tipping#190
Merged
feat: SIP-010 fungible token support for multi-asset tipping#190
Conversation
Add send-token-tip function accepting any SIP-010 compliant token via trait reference. Includes token whitelist system controlled by admin, separate token-tips map for tracking, and token tip counter. New contract functions: - send-token-tip: Transfer SIP-010 tokens as tips with whitelisting - whitelist-token: Admin-only token approval/revocation - get-token-tip: Read token tip data by ID - is-token-whitelisted: Check token approval status - get-total-token-tips: Read total token tips count New error codes: err-token-transfer-failed (u112), err-token-not-whitelisted (u113)
Cover token whitelist enforcement, admin whitelist management, non-admin rejection, successful token tip via TIPS token, and token tip counter tracking. 5 new tests, 42 total passing.
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.
Closes #87
Changes
Contract (tipstream.clar)
send-token-tipfunction accepting any SIP-010 compliant token via trait referencewhitelist-tokenadmin function for token approval/revocationtoken-tipsmap andtotal-token-tipscounter for trackingget-token-tip,is-token-whitelisted,get-total-token-tipserr-token-transfer-failed(u112),err-token-not-whitelisted(u113)Tests
Security