Skip to content

Instantly share code, notes, and snippets.

@jim-toth
Last active July 18, 2023 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jim-toth/7ed2c9073fb31392e2bbf45632b1d397 to your computer and use it in GitHub Desktop.
Save jim-toth/7ed2c9073fb31392e2bbf45632b1d397 to your computer and use it in GitHub Desktop.
SWS-3 Multi-Token Standard

SWS-3 Multi-Token Standard

Token Interface

totalSupply() => { totalSupply: number }

balanceOf(address: string) => { address: string, balance: number }

transfer(to: string, amount: number) => void

Multi-Token Interface

totalSupply(tokenId?: string) => { totalSupply: number, tokenId?: string }

balanceOf(address: string, tokenId?: string) => { address: string, balance: number, tokenId?: string }

transfer(to: string, amount: number, tokenId?: string) => void
  • If tokenId is undefined, return default/primary token balance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment