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 8 commits into
base: main
Choose a base branch
from
Open

Realm #297

wants to merge 8 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

import createProposalAction from "./realm-governance/create-proposal";
import getVoterHistoryAction from "./realm-governance/voter-history";
import getTokenOwnerRecordAction from "./realm-governance/owner-record";

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove unnecessary white spaces/lines from any files that may have them

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this file is going to be empty please remove it

@@ -181,6 +204,9 @@ import {
getSmartTwitterAccountStats,
} from "../tools/elfa_ai";



Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary white space

@@ -785,6 +814,119 @@ export class SolanaAgentKit {
return `Transaction: ${tx}`;
}


Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary white space

return updateCouncilMemberWeight(this, realm, councilMint, memberConfig);
}


Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary white space

@@ -35,6 +35,9 @@ export * from "./switchboard";
export * from "./elfa_ai";
export * from "./debridge";
export * from "./fluxbeam";
export * from "./realm-governance";


Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary white space

@0xNoushad
Copy link
Author

Will do everything in my final push !

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