Sway Standards
Just like many other smart contract languages, usage standards have been developed to enable cross compatibility between smart contracts.
For more information on using a Sway Standard, please refer to the Sway-Standards Repository.
Standards
Native Asset Standards
- SRC-20; Native Asset Standard defines the implementation of a standard API for Native Assets using the Sway Language.
- SRC-3; Mint and Burn is used to enable mint and burn functionality for Native Assets.
- SRC-7; Arbitrary Asset Metadata Standard is used to store metadata for Native Assets, usually as NFTs.
- SRC-9; Metadata Keys Standard is used to store standardized metadata keys for Native Assets in combination with the SRC-7 standard.
- SRC-6; Vault Standard defines the implementation of a standard API for asset vaults developed in Sway.
Predicate Standards
- SRC-13; Soulbound Address Standard defines a specific
Address
as a Soulbound Address for Soulbound Assets to become non-transferable.
Access Control Standards
- SRC-5; Ownership Standard is used to restrict function calls to admin users in contracts.
Contract Standards
- SRC-12; Contract Factory defines the implementation of a standard API for contract factories.
Bridge Standards
- SRC-8; Bridged Asset defines the metadata required for an asset bridged to the Fuel Network.
- SRC-10; Native Bridge Standard defines the standard API for the Native Bridge between the Fuel Chain and the canonical base chain.
Documentation Standards
- SRC-2; Inline Documentation defines how to document your Sway files.
Standards Support
Libraries have also been developed to support Sway Standards. These can be in Sway-Libs.