Skip to content

Instantly share code, notes, and snippets.

@belivenn
Last active December 19, 2023 00:31
Show Gist options
  • Select an option

  • Save belivenn/8099db5ea84dac17fa0ae5f9d6f74941 to your computer and use it in GitHub Desktop.

Select an option

Save belivenn/8099db5ea84dac17fa0ae5f9d6f74941 to your computer and use it in GitHub Desktop.
description
1- Initial Configuration
1.1- Create Config Accounts
- 1.1.a) Proposal Program
- 1.1.b) Voting Program
- 1.1.c) Staking Program
- 1.1.d) Issue Program
- Initiate configuration accounts for each of these programs; Functions location: available in the IDL.
1.2 - DAO Config Initialization
Configure the DAO after setting up the mentioned programs.
1.2.1 - Token Creation
Use the issue_tokens function to create necessary tokens.
2- Staking
2.1- Stake Tokens
2.1.1- Initialize staking acc with init_stake function.
2.1.2- Stake tokens using stake_tokens function.
2.2- Unstake
2.2.1- Withdraw staked tokens using unstake_tokens.
2.3- Close Stake Account
2.3.1 close_stake function for closing a stake account.
3- Proposals
3.1- Create proposal using the create_proposal function.
//Admin panel buttons for these functionalities.
3.2- Cleanup Proposal using the cleanup_proposal function.
3.3 - Execute Proposal using the execute_proposal function.
4- Voting
4.1- Vote using the vote function.
4.2- Remove Vote using the remove_vote function.
4.3- Utilize cleanup_vote to remove a vote after proposal expiration/executed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment