Skip to content

Latest commit

 

History

History
86 lines (66 loc) · 4.76 KB

README.md

File metadata and controls

86 lines (66 loc) · 4.76 KB

➡️ Development setup

  • create a .env file with supabase url and anon key
  • make sure devnet is running
  • run these commands in terminal
$ pnpm install
$ pnpm dev

➡️ Database setup

  • create a supabase account
  • Create a new organization and project
  • Go to project settings and copy the url and anon key
  • Create a new table called Proposals (P capital) with the following columns
Column Type Default To Notes
created_at text null Change the existing supabase column to all lower snake case
contractAddress text null Stores the contract address of the proposal contract
proposer text null Stores the principal of the proposer
type text null Type of proposal (for future extension page)
transactionId text null Stores the transaction hash
title text null Title of the proposal
description text null Description of the proposal
executionDelay numeric null Delay to execute a proposal in block heights
startBlockHeight numeric null Starting block height of the proposal
endBlockHeight numeric null Ending block height of the proposal
submitted boolean false Status of submission
concluded boolean false If the proposal was concluded or not
disabled boolean false status of submission
votesFor numeric null Number of for votes
votesAgainst numeric null Number of against votes
  • create a .env file in the root directory and add the following
NEXT_PUBLIC_SUPABASE_URL=your supabase url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your supabase anon key

🧪 Tests analysis

User Stories Expected Behaviour Current Behaviour Status
A user with 0 MEGA balance should not be allowed to propose User blocked / redirected with a appropriate toast message 🟩
Header shows user balance Main header should show vault STX balance, total proposals and MEGA balance of user 🟩
Deposit option for admin Admin can deposit STX to vault from UI 🟩
Fetch balance on account switch The user balance should refetch if account switched 🟩
State management for smart contract code Smart contract code value should not change during the creation 4 step process 🟩
User should be able to deploy contract Proper loading and deployment status information (success & failure) 🟩
Contract proposal Update DB proposal to submitted once on-chain function is called to propose 🟩
Proposal Card card UI to show status of proposal 🟩
Vault Page a vault page to list all the assets holding 🟩
Proposal Page user should be able to vote to ✅ / ❎ with a table containing proposal information such as vote start vote end 🟩
Proposal conclude status user should be able to know if the proposal was passed or rejected by the DAO 🟩
Proposal to transfer STX full flow of test proposal to transfer STX from vault to a recipient 🟩
Proper proposal management in DB edge should be handled if deployment fails 🟨
Proper transaction status user should get status of their submitted transaction 🟨
Delegation governance with delegation 🟥
Governance page a dedicated page for governance where user can add their delegates 🟥
Extensions page a dedicated page for managing extensions more effectively and treat proposals different from extension proposal 🟥
Migration to using ⛓️ chainhook service migration to chainhook service for more accurate blockchain data 🟥

Reference

🟩 refers to test cases which works as expected

🟨 refers to test cases that works but are prone to errors and edge cases which can be solved using chainhook service in future

🟥 refers to test cases that has not been conducted and does not include in this version of Dapp

Screenshots

Screenshot 2024-01-11 at 1 55 42 PM

Screenshot 2024-01-11 at 1 55 28 PM