src20_sdk 0.0.3

Sway token standard SRC-20 rust sdk
Documentation
  • Coverage
  • 17.24%
    5 out of 29 items documented0 out of 22 items with examples
  • Size
  • Source code size: 18.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2m 2s Average build duration of successful builds.
  • all releases: 2m 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • chlenc

Fuel network Fungible token standard: SWAY-GANG-TOKEN

INTRODUCTION

What is a Token?

Tokens can represent virtually anything in Fuel ⚡️:

  • reputation points in an online platform
  • skills of a character in a game
  • lottery tickets
  • financial assets like a share in a company
  • a fiat currency like USD
  • an ounce of gold
  • and more...

Such a powerful feature of Fuel must be handled by a robust standard, right? That's exactly where the SWAY-GANG-TOKEN plays its role! This standard allows developers to build token applications that are interoperable with other products and services.

What is ERC-20?

The SWAY-GANG-TOKEN introduces a standard for Fungible Tokens, in other words, they have a property that makes each Token be exactly the same (in type and value) as another Token. For example, a SWAY-GANG-TOKEN Token acts just like the ETH, meaning that 1 Token is and will always be equal to all the other Tokens.

BODY

The SWAY-GANG-TOKEN, proposed by the SWAY GANG TEAM on December 2022, is a Token Standard that implements an API for tokens within Smart Contracts.

Example functionalities SWAY-GANG-TOKEN provides:

  • transfer tokens from one account to another
  • get the current token balance of an account
  • get the total supply of the token available on the network (soon)
  • approve whether an amount of token from an account can be spent by a third-party account

If a Smart Contract implements the following methods and events it can be called an SWAY-GANG-TOKEN Contract and, once deployed, it will be responsible to keep track of the created tokens on Fuel.