About Me
DevRel@ Fuel Labs
Prev:
-Lead ML Engineer @LucidityFinance
-Head of Devrel @ Pesto Tech
-Dev Rel advocate @ Polygon
-Senior Software Dev @Goldman Sachs
-1x Founder @RadarFi
How is Fuel different?
-Uses Fuel Virtual Machine (FuelVM)
-Leverages a unspent transaction output (UTXO) model - which enables
parallel transaction execution.
-Designed for minimizing blockchain state
-Designed for interoperability with Ethereum wallets, assets and smart contract
paradigms
UTXO Model
Basics First
●Fuel - The architecture (which we call a rollup operating system)
●Sepolia Testnet - The Fuel L2 test network on Ethereum.
●Sway - Rust-like smart contract programming language.
●Forc (Fuel orchestrator). All in one toolchain. Equivalent of cargo or npm.
●Fuels - SDKs to develop on and connect to Fuel blockchains
●Fuelup - Toolchain manager for fuel (similar to nvm or rustup)
How are Fuel Dapps different?
EVM Fuel
Solidity Sway
EVM FuelVM
Indexer: The Graph Indexer: Envio / Subsquid
Development and deployment: Hardhat,
Foundry
Fuel Orchestrator: forc
SDKs: Web3.js, ethers.js SDK: Fuels TS and RS
Solidity Sway
The language most of us
started with on EVM
-Javascript-like syntax
-Has inheritance
-Designed to target the
EVM
-Single context
Rust based (DSL = domain specific
language) designed for blockchain
development
-Rust-like syntax
-Has traits paradigm
-Designed to target any
blockchain (but currently only the
FuelVM is supported)
-Multi-context
-Influenced by C++, Python and JS
-Opt-out storage access
-Storage manipulation relies on built in
language concepts
-No built-in support for namespacing
or storage slot placement
Sway
-Based on Rust
-Opt in storage access permissions
-Storage manipulation is based on
standard library and user defined
types
-First-class storage namespacing
-Built in syntax to place storage slots
where you want them
Standard Library
Solidity
-No standard library
-Has Open-Zeppelin and other popular
modules
Sway
-Has a standard library
-Has a core library
-Prelude gives you essentials out of
the box
-Import without worrying about
versions
Fungible Tokens
Solidity
-No native assets other than ETH
-Only has application level tokens
-Utilise ERC-20 contract from Open
Zeppelin
-Requires: approve and transfer behavior
Sway
-Can leverage the FuelVM native asset
system under the hood
-Can also build application level tokens
-Utilise Sway SRC-20 standard
-All smart contracts in Fuel can mint /
burn native assets by default
-Calls in Fuel can transfer any native
asset
-Fuel has scripts which enable approve +
transfers in the same transaction
What are sway standards?
●The Sway Standards repository is your go-to for importing and using
standards in the Sway Language. Here, you'll find standards at various stages
of development.
●Find the relevant standard and implement the standard ABI into your contract.
Sway standards: Native Assets
●SRC-20 Defines the implementation of a standard API for Native Assets using the
Sway Language.
●SRC-3 Mint and Burn to enable mint and burn functionality for fungible assets.
●SRC-7 Arbitrary Asset Metadata Standard used to store metadata for Native Assets.
●SRC-9 Metadata Keys Standard 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.
●SRC-13 Soulbound Address provides a predicate interface to lock Native Assets as
soulbound.
Using a standard
Add this to the project's Forc.toml file under [dependencies] with the most recent release:
Import your desired standard in your Sway Smart Contract
On the Fuel Network, all NFTs are Native Assets. They are commonly associated
with artwork / collectibles however there are many greater utilities beyond that
which have yet to be written for the Fuel Network.
Basics First
What standards to use?
●SRC-20: Native Asset
●SRC-3: Mint and Burn
●SRC-7: Metadata standards
Native Asset Library: To implement the basic functionality behind the standards.