Practical overview
When it fits
Use Sway Farm when you want to inspect or locally develop a small Fuel game project and can work with its Sway contract, TypeScript frontend and wallet configuration.
Who it is for
- Developers exploring a simple farming-game contract and frontend on Fuel.
- Builders seeking a documented local setup for deploying a Sway contract alongside a TypeScript interface.
Documented uses
- Explore a farming game built with Sway on Fuel.
- Start a local Fuel node and deploy the game contract.
- Run the frontend locally alongside the local contract setup.
- Use the project as a starting point for a Fuel farming-game build.
Requirements & limits
- The documented local workflow requires fuelup with the latest toolchain and a Fuel-compatible wallet extension.
- The wallet must be set to the local network for the local setup.
- The configured asset ID needs updating after each contract redeployment.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Sway Farm locally
Start the local Fuel node, deploy the game contract and run the frontend.
Before you start
- Install fuelup and use the latest toolchain.
- Install a Fuel-compatible wallet extension.
- Have the project repository available and npm installed.
- Use a wallet address in b256 format, beginning with 0x.
Steps
In frontend/src/chainConfig.json, replace the configured owner address with your wallet’s b256 address.
From the frontend folder, run npx fuels dev to start a local node, generate TypeScript types and deploy the contract.
Run npm start in the frontend folder to start the frontend locally.
Connect the wallet to the local network rather than the testnet.
Expected outcome
A local node and contract deployment with the frontend running locally.
Guide limitations
- The asset ID must be updated whenever the contract is redeployed; the contract ID is updated automatically.
- The README documents local setup, not production deployment.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- FuelLabs/sway-farm · Official homepage title · retained in its source language

