explaingit

fuellabs/sway-standards

Analysis updated 2026-05-18

167SwayAudience · developerComplexity · 3/5Setup · moderate

TLDR

A library of official Sway language standards (like SRC-20 for tokens) that developers import to make Fuel blockchain smart contracts interoperable.

Mindmap

mindmap
  root((sway-standards))
    What it does
      Sway language standards
      Contract interoperability
      SRC numbered specs
    Tech stack
      Sway
      Fuel
      forc
    Use cases
      Native asset tokens
      Mint and burn
      Asset vaults
    Audience
      Fuel developers
      Smart contract authors
      Sway contributors

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a standard interface like SRC-20 to a Sway smart contract for token creation.

USE CASE 2

Build a vault contract that follows the SRC-6 vault standard for holding assets.

USE CASE 3

Look up example implementations for a given standard before writing a contract.

What is it built with?

SwayFuelforc

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires the forc toolchain (v0.70.2) and familiarity with Sway smart contract development.

In plain English

This repository defines official standards for Sway, which is the smart contract programming language used on the Fuel blockchain. A smart contract is a program that runs automatically on a blockchain and controls things like digital assets or agreements. Standards like these serve a similar role to standards in any other industry: they give developers a shared set of rules so that different contracts and tools can work together predictably. The standards here cover things like how to define a digital asset (called a Native Asset on Fuel), how to handle minting and burning tokens, how to build a vault that holds assets for others, and how to attach metadata to a token. Each standard is identified by a code like SRC-20 or SRC-3, following a naming pattern similar to standards on other blockchain platforms. To use one of these standards in a Sway project, you add it as a dependency in your project's configuration file using a command-line tool called forc, then import the relevant interface into your contract code. The README includes short examples showing exactly how to do this. Some standards are still drafts, meaning they are proposed but not finalized. The project encourages developers to try drafts and give feedback. If a developer needs a standard that does not exist yet, they can open an issue to propose one. Sway itself is still being actively developed, so the standards are expected to be refined over time.

Copy-paste prompts

Prompt 1
Explain what SRC-20 and SRC-3 are and how to add them to my Sway smart contract with forc.
Prompt 2
Show me an example of implementing the SRC-6 vault standard from this repo.
Prompt 3
Walk me through adding a Sway standard as a dependency in Forc.toml.
Prompt 4
What is the difference between the SRC-20 single asset and multi asset examples here?

Frequently asked questions

What is sway-standards?

A library of official Sway language standards (like SRC-20 for tokens) that developers import to make Fuel blockchain smart contracts interoperable.

What language is sway-standards written in?

Mainly Sway. The stack also includes Sway, Fuel, forc.

How hard is sway-standards to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is sway-standards for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.