Source Code

;; Title: SIP-010 Fungible Token Trait
;; Version: 1.0.0
;; Summary: Standard trait for fungible tokens on Stacks
;; Description: Enables multi-token support in BlockPay

(define-trait sip-010-trait
    (
        ;; Transfer from the caller to a new principal
        (transfer (uint principal principal (optional (buff 34))) (response bool uint))

        ;; Get the token balance of a principal
        (get-balance (principal) (response uint uint))

        ;; Get the total supply of the token
        (get-total-supply () (response uint uint))

        ;; Get the token name
        (get-name () (response (string-ascii 32) uint))

        ;; Get the token symbol
        (get-symbol () (response (string-ascii 32) uint))

        ;; Get the number of decimals
        (get-decimals () (response uint uint))

        ;; Get the URI for token metadata
        (get-token-uri () (response (optional (string-utf8 256)) uint))
    )
)