Fix Eligere executeLawAmendment to always create Federal-level laws
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 <noreply@anthropic.com>
This commit is contained in:
parent
30b3be30ce
commit
9f97b39617
|
|
@ -865,16 +865,12 @@ func (e *Eligere) executeLawAmendment(ic *interop.Context, proposal *state.Propo
|
||||||
// The Lex contract's ratifyAmendment method will be called
|
// The Lex contract's ratifyAmendment method will be called
|
||||||
// This creates or updates a law based on the proposal
|
// This creates or updates a law based on the proposal
|
||||||
if e.Lex != nil {
|
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
|
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
|
// 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)
|
e.Lex.RatifyAmendmentInternal(ic, proposal.ID, proposal.ContentHash, lawCategory, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue