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
sDAO with chainhooks demo link: https://youtu.be/KWVWjxDbCxw
sDAO demo link: https://youtu.be/aDuB2fzSNM8
Bootstrap screen | Write and deploy new proposals screen |
---|---|
To get the application running, follow these steps:
- Clone the repository:
git clone https://github.com/Aman-zishan/sDAO-with-chainhook.git
- Navigate into the directory:
cd sDAO-with-chainhook
- Install the dependencies:
yarn install
- Start the development server:
yarn dev
- In another terminal run the server:
node sdao-api/server.js
(should be run from root directory)
Run yarn test
to run the contract tests
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:
clarinet integrate
- Once the devnet is up and running, import wallets to different browser accounts
- Import deployer wallet, go to
settings/Devnet.toml
and copy the mnemonic of the deployer account - Similarly import the mnemonic of any other wallet to be the member of DAO make sure the account you import has membership token balance
-
Connect the deployer wallet to the application
-
Go to
Bootstrap DAO
page and follow the instructions listed in bootstrap page one by one (user should be deployer for this action) -
Once the bootstrap is completed you can deploy and propose grant via
new grant proposal
page -
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 -
click on
conclude
to conclude and execute the proposal -
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 -
vote and conclude just like grant proposal
-
You should be able to see the stx transfer event from the contract wallet to the provided recipient
-
During each transaction you should be able to see the hooks triggered and server logs like shown in the above screenshot