Giter Club home page Giter Club logo

sway-farm's Introduction

sway-farm

A simple farming game written in Sway.

Running Locally

Make sure you have fuelup installed and are using the latest toolchain.

Install a Fuel-compatible wallet extension and copy your wallet address in b256 format (it should start with 0x instead of fuel). In the frontend folder, open the src/chainConfig.json file and edit line 7 to use your address. This step will make sure your wallet has test funds on your local network.

{
  "owner": "0xYOUR_ADDRESS_HERE",
  "amount": "0x00000000FFFFFFFF",
  "asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
},

Run the command below inside the frontend folder to start a local node, generate TypeScript types, and deploy the contract locally:

cd frontend
npx fuels dev

You should see the message ๐ŸŽ‰ Dev completed successfully!.

Next, run the frontend locally with npm start.

The contract ID will automatically be updated, but the asset ID won't, so you'll have to make sure that is updated everytime the contract redeploys.

Make sure your wallet is also connected to your local network instead of the testnet.

sway-farm's People

Contributors

sarahschwartz avatar calldelegation avatar bitzoic avatar brandonsurh avatar hummusonrails avatar

Stargazers

7i_k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.