Skip to content

feat: x/council — Token-gated collective execution module#47

Open
trevormil wants to merge 1 commit intomasterfrom
feat/x-council
Open

feat: x/council — Token-gated collective execution module#47
trevormil wants to merge 1 commit intomasterfrom
feat/x-council

Conversation

@trevormil
Copy link
Copy Markdown
Collaborator

Summary

  • New x/council module for token-gated collective execution of arbitrary sdk.Msg
  • Membership defined by x/tokenization credential token ownership — no manual member management
  • Vote weight = credential token balance
  • Full lifecycle: create council → propose messages → vote → execute after delay
  • Derived council account addresses for message execution
  • Replaces the 5% of x/group (deprecated) that derivatives can't handle

Key features

  • Re-voting support (subtracts old weight, adds new)
  • Configurable voting threshold (% of total credential supply)
  • Execution delay (time-lock after vote passes)
  • Optional msg type restrictions per council
  • 12 unit tests with mock keepers

Backlog

Implements autopilot backlog #0157

Test plan

  • Create council successfully
  • Propose with/without credential
  • Vote with credential, weight = balance
  • Vote without credential (rejected)
  • Vote reaches threshold → status = passed
  • Execute before delay → rejected
  • Execute after delay → success
  • Execute wrong status → rejected
  • Disallowed msg type → rejected
  • Re-vote updates weights correctly
  • Integration test with real x/tokenization keeper
  • Wire into app.go and test on local testnet

🤖 Generated with Claude Code

Implements a new Cosmos SDK module that enables token-gated collective
execution of arbitrary sdk.Msg. Membership is defined by ownership of
an x/tokenization credential token with vote weight equal to token
balance. Supports configurable voting threshold, execution delay,
and optional msg type allowlists. Includes 12 passing tests covering
all message handlers and edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant