From 9f97b39617840555eb4c81689319c2aeb3b15af3 Mon Sep 17 00:00:00 2001 From: Tutus Development Date: Sat, 20 Dec 2025 06:35:00 +0000 Subject: [PATCH] Fix Eligere executeLawAmendment to always create Federal-level laws MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Constitutional rights (RightLife, RightLiberty, etc.) are immutable in Lex code and cannot be amended. Constitutional proposals still require 67% supermajority but create Federal-level laws since Lex.RatifyAmendmentInternal correctly panics when given LawCategoryConstitutional. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- pkg/core/native/eligere.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg/core/native/eligere.go b/pkg/core/native/eligere.go index 8ce7fdd..7acdef9 100644 --- a/pkg/core/native/eligere.go +++ b/pkg/core/native/eligere.go @@ -865,16 +865,12 @@ func (e *Eligere) executeLawAmendment(ic *interop.Context, proposal *state.Propo // The Lex contract's ratifyAmendment method will be called // This creates or updates a law based on the proposal if e.Lex != nil { - // Determine law category based on proposal category + // All amendments create Federal-level laws + // Constitutional rights (RightLife, RightLiberty, etc.) are immutable in code + // Constitutional proposals require 67% supermajority but still create Federal laws lawCategory := state.LawCategoryFederal - if proposal.Category == state.ProposalCategoryConstitutional { - // Note: Constitutional rights are immutable in Lex - // This would create a constitutional-level law, not modify core rights - lawCategory = state.LawCategoryConstitutional - } // Call Lex to ratify the amendment - // The Lex contract needs to have ratifyAmendment method added e.Lex.RatifyAmendmentInternal(ic, proposal.ID, proposal.ContentHash, lawCategory, 0) } }