Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realm #297

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Realm #297

wants to merge 12 commits into from

Conversation

0xNoushad
Copy link

@0xNoushad 0xNoushad commented Feb 25, 2025

Pull Request Description

Related Issue

Fixes #205

Changes Made

This PR adds comprehensive SPL Governance integration to the Solana Agent Kit, enabling programmatic DAO governance:

  • Added Governance Tools:

    • Implemented complete SPL Governance program interactions in /src/tools/realm-governance/governance.ts
    • Created council management utilities in /src/tools/realm-governance/council.ts
    • Added real-time governance monitoring in /src/tools/realm-governance/monitor.ts
  • Created Six New Governance Actions:

    • SPL_CREATE_REALM: Create new DAO realms with community/council configuration
    • SPL_CREATE_PROPOSAL: Create governance proposals with customizable voting options
    • SPL_CAST_VOTE: Cast votes on proposals with approve/deny/abstain choices
    • SPL_GET_REALM_INFO: Retrieve detailed realm configuration and status
    • SPL_GET_TOKEN_OWNER_RECORD: Get member voting power and participation records
    • SPL_GET_VOTER_HISTORY: Retrieve complete voting history for participants
Screenshot 2025-02-26 at 1 57 44 AM Screenshot 2025-02-26 at 1 18 07 AM

Verification

https://explorer.solana.com/tx/5L3HFEKHyB6LMGVvpjArx971M6QL9cdNeeEaqR6nDL64CZaB485NzTZdKab2xUzycvMrjj3AfR5LuoJtYSypaisH?cluster=devnet

Prompt Used

  • "Create a new DAO realm with specified configuration"
  • "Create a new proposal in a DAO realm"
  • "Cast a vote on a proposal"
  • "Get information about a DAO realm"
  • "Get token owner record for a member in a DAO realm"
  • "Get voting history for a specific voter"

Checklist

  • I have tested these changes locally
  • I have updated the documentation
  • I have added transaction links for verification
  • I have added the prompts used to test the implementation

Copy link
Collaborator

@michaelessiet michaelessiet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @0xNoushad , this PR doesn't follow the correct file structure and contents for action and tool files. Please reference other action and tool files in the project

@0xNoushad
Copy link
Author

Will do everything in my final push !

@michaelessiet
Copy link
Collaborator

Will do everything in my final push !

Ok, please let me know once it's ready for review

@0xNoushad
Copy link
Author

Will do everything in my final push !

Ok, please let me know once it's ready for review

Done !!

@michaelessiet
Copy link
Collaborator

Hi @0xNoushad please fix the error returned by the github action

remove duplicate all domains too
@michaelessiet
Copy link
Collaborator

Please do not remove any actions/tools unrelated to your tools from exports. Consider renaming your tools instead

@@ -287,7 +288,6 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) {
new ElfaGetTopMentionsTool(solanaKit),
new ElfaAccountSmartStatsTool(solanaKit),
new SolanaFluxbeamCreatePoolTool(solanaKit),
new SolanaApproveProposal2by2Multisig(solanaKit),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check line 229

@michaelessiet
Copy link
Collaborator

Looks good! Only thing missing is the screenshots, please can you provide screenshots of the agent completing these prompts, as well as their transaction links

  • "Create a new DAO realm with specified configuration"
  • "Create a new proposal in a DAO realm"
  • "Cast a vote on a proposal"
  • "Get information about a DAO realm"
  • "Get token owner record for a member in a DAO realm"
  • "Get voting history for a specific voter"

@0xNoushad
Copy link
Author

Looks good! Only thing missing is the screenshots, please can you provide screenshots of the agent completing these prompts, as well as their transaction links

  • "Create a new DAO realm with specified configuration"

  • "Create a new proposal in a DAO realm"

  • "Cast a vote on a proposal"

  • "Get information about a DAO realm"

  • "Get token owner record for a member in a DAO realm"

  • "Get voting history for a specific voter"

Check description!

@michaelessiet
Copy link
Collaborator

Screenshot 2025-03-05 at 13 54 31 You did not provide the information the agent needed to carry out the actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants