Skip to content

A grants program integrated with chainhooks to listen to blockchain events

License

Notifications You must be signed in to change notification settings

Aman-zishan/sDAO-with-chainhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sDAO WITH CHAINHOOKS 🔗🪝

Screenshot 2023-12-14 at 5 34 15 AM

milestone based funded decentralized grants program

features:

build on top of sDAO

  • Contract tests
  • Server status badges (sDAO server and devnet)
  • Server hooked with chainhook to know for sure if transaction went through
  • notification service by making use of websocket to notify frontend about the chain state change
  • Server side database insertion for chainhook events instead of assuming request went through
  • alerts the user if the trasaction went through or not

short video demo (7 mins)

sDAO with chainhooks demo link: https://youtu.be/KWVWjxDbCxw

sDAO demo link: https://youtu.be/aDuB2fzSNM8

Bootstrap screen Write and deploy new proposals screen
Screenshot 2023-12-18 at 8 50 00 PM Screenshot 2023-12-20 at 4 49 50 PM

Getting Started

To get the application running, follow these steps:

  1. Clone the repository: git clone https://github.com/Aman-zishan/sDAO-with-chainhook.git
  2. Navigate into the directory: cd sDAO-with-chainhook
  3. Install the dependencies: yarn install
  4. Start the development server: yarn dev
  5. In another terminal run the server: node sdao-api/server.js (should be run from root directory)

Tests

Run yarn test to run the contract tests

Setup

Before getting into testing the application you need to spin up the devnet. This applications uses devnet to interact with the smart contract. To spin up the devnet, follow these steps:

In a new terminal session run the command:

  1. clarinet integrate
  2. Once the devnet is up and running, import wallets to different browser accounts
  3. Import deployer wallet, go to settings/Devnet.toml and copy the mnemonic of the deployer account
  4. Similarly import the mnemonic of any other wallet to be the member of DAO make sure the account you import has membership token balance

Demo

Untitled-2023-12-05-1121

  1. Connect the deployer wallet to the application

  2. Go to Bootstrap DAO page and follow the instructions listed in bootstrap page one by one (user should be deployer for this action)

  3. Once the bootstrap is completed you can deploy and propose grant via new grant proposal page

  4. After proposing new grant you will recieve a notification if the proposal was submitted succesfully, find the grant under your proposals , vote and conclude. You can also connect via another wallet and vote for the grant

  5. click on conclude to conclude and execute the proposal

  6. once successful go ahead and repeat the process for claiming the milestone, make sure to change the contract in boilerplate .grant-proposal to your newly deployed grant contract

  7. vote and conclude just like grant proposal

  8. You should be able to see the stx transfer event from the contract wallet to the provided recipient

  9. During each transaction you should be able to see the hooks triggered and server logs like shown in the above screenshot

About

A grants program integrated with chainhooks to listen to blockchain events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published