The Fuel Rust SDK
1.
Getting Started
1.1.
Setup and Run
1.2.
Terminology
2.
Connecting to a Fuel node
2.1.
Connecting to the Testnet or an external node
2.2.
Running a short-lived Fuel node with the SDK
2.3.
Querying the blockchain
3.
Managing wallets
3.1.
Creating a wallet from a private key
3.2.
Creating a wallet from mnemonic phrases
3.3.
Wallet Access
3.4.
Encrypting and storing wallets
3.5.
Checking balances and coins
3.6.
Setting up test wallets
3.7.
Signing
3.8.
Transferring assets
4.
Generating bindings with abigen!
4.1.
The JSON ABI file
4.2.
The abigen! macro
5.
Deploying contracts
5.1.
Configurable constants
5.2.
Interacting with contracts
5.3.
The FuelVM Binary file
6.
Calling contracts
6.1.
Connecting wallets
6.2.
Transaction parameters
6.3.
Call parameters
6.4.
Custom asset transfer
6.5.
Call response
6.6.
Logs
6.7.
Variable outputs and messages
6.8.
Read-only calls
6.9.
Calling other contracts
6.10.
Multiple contract calls
6.11.
Transaction dependency estimation
6.12.
Estimating cost
7.
Running scripts
8.
Predicates
8.1.
Predicate data
8.2.
Signatures example
9.
Types
9.1.
Bytes32
9.2.
Address
9.3.
ContractId
9.4.
AssetId
9.5.
Converting native types
9.6.
Bech32
9.7.
Structs and enums
9.8.
String
9.9.
Bits256
9.10.
B512
9.11.
EvmAddress
9.12.
Vectors
10.
API Reference
11.
Testing
11.1.
Testing basics
11.2.
The setup_contract_test! macro
11.3.
Tweaking the blockchain
12.
Cookbook
12.1.
Custom consensus parameters
12.2.
Deposit and Withdraw
12.3.
Transfer all assets
13.
Debugging
13.1.
The Function selector
14.
Contributing
14.1.
Integration tests structure
15.
Command Line Interfaces
15.1.
fuels-abi-cli
Light (default)
Rust
Coal
Navy
Ayu
The Fuel Rust SDK
Getting Started
This section gives some pointers for using the Fuel SDK for smart contract development.