fuel-champions / technical-writing-bounty

Have an idea for a new in-depth technical article? Here's your chance at claiming a bounty reward and getting promoted through the Champions technical writing bounty!
https://fuel.mirror.xyz/
7 stars 6 forks source link

Article Idea: Building a decentralized dao on the fuel blockchain #1

Closed Phenzic closed 6 months ago

Phenzic commented 7 months ago

Article Title

How to build a DAO with sway on the Fuel blockchain

Article Summary

This tutorial centers around building a basic (minimal) Decentralized Autonomous Organization application built and deployed on the fuel blockchain, The tutorial teaches developers on how to build a Dao, with all the basic functionalities a Dao exhibits

Relevance to Fuel

Having this tutorial helps developers looking to build similar apps, like in this Dao this tutorial, It teaches how to go about it in basic tutorial steps, Helps developers get started with building and deploying sway smart contracts on the fuel blockchain, Integrating sway contracts with react (or similar frontend languages/frameworks), and
also touch down on wallet integration on dapps

Current Project

As a developer I only just started out playing around with sway and other FuelVM tools, Hence considered building a DAO for starters using the current fuel dev tools and resources available on the docs

Fuel Developer Champion Status

Yes

Understanding of Requirements

Payment Agreement

hummusonrails commented 6 months ago

Hi @Phenzic -

Thanks for submitting your bounty idea!

This one has been selected for consideration. The next step is to produce a draft and add it to the drafts folder in this repository as a new pull request. You can follow the instructions here: https://github.com/fuel-champions/technical-writing-bounty/tree/main/drafts.

Once you have submitted the draft, the team will work with you on getting it to a production state, and once we're ready to publish, we'll reach out for payment details to send you the 500 USDC!

Good luck and thank you!

hummusonrails commented 6 months ago

Hey @Phenzic - Any update on this? We'd love to help you get to a draft if you need assistance.

Phenzic commented 6 months ago

Apologies for the delay on this piece. 🥂 I'll have the first draft ready during the week, and I'll be sure to reach out when I need help. Arigato @hummusonrails

Phenzic commented 6 months ago

Hi @hummusonrails Apologies for the delay I got held back by some other hackathon I was working on I’m almost done with the article I’ve just been help back trying to build the frontend for the Dao contract I’d appreciate any help

hummusonrails commented 6 months ago

@Phenzic Do you want to share a repo with the frontend code so far? Glad to get the team to give you a hand!

Phenzic commented 6 months ago

Sure thing Here it is

hummusonrails commented 6 months ago

Awesome, can you describe the issue(s) you are experiencing so we can lend a hand?

Phenzic commented 6 months ago

After deploying, compiling and generating my typescript instance on the frontend directory, I’ve made the contract calls on my react app

But while trying to run my react app it doesn’t recognize typescript contract instance in the frontend directory image

sarahschwartz commented 6 months ago

@Phenzic can you try regenerating your types with fuels? You can see how to do that in the quickstart for your reference. Once you've done that, check if the folder name matches your import (in the quickstart example it's called "sway-api" vs. "contract_api").

Phenzic commented 6 months ago

Hi @sarahschwartz @hummusonrails still working on this and I’ve completed the frontend could you check this out (here)[https://github.com/Phenzic/FuelDemoDAO]

Just I more thing and I’m done A fuel error I keep getting while calling functions on the contract instance

image

sarahschwartz commented 6 months ago

@Phenzic, this error is happening because the asset.value and call_data.id.value inside proposalTransaction are empty strings.

On another note, it looks like the packages installed in the root folder should actually be installed in the frontend folder, where the node_modules are correctly ignored. It would also be great if you can add a README.md file with instructions for running the project locally.