Files
arkhe-origin-chain/crates/origin-chain-runtime/src
davidherranandClaude Opus 4.7 e6a7feecae feat(governance): v0.0.31 — Runtime API GovernanceApi.query_proposal + query_vote (Phase 5.1 FOUNDATION COMPLETE) 🎉
Phase 5.1 GOVERNANCE pallet FOUNDATION COMPLETE end-to-end canonical. Runtime
API GovernanceApi.query_proposal + query_vote wired canonical via
sp_api::decl_runtime_apis! + impl runtime impl_runtime_apis! macro. 15 Runtime
APIs total (14 + nuevo GovernanceApi con 2 methods read-only).

## Changes

- crates/origin-chain-runtime/src/lib.rs:574 — impl origin_chain_governance::GovernanceApi<Block> for Runtime con query_proposal + query_vote (AccountId conversion ChainAccountId::from(voter.0))
- crates/origin-chain-node/src/main.rs — 14 → 15 APIs + GovernanceApi highlighted + Index 10 Governance v0.0.29 → v0.0.31 FOUNDATION COMPLETE

## Phase 5.1 FOUNDATION COMPLETE 🎉

- Proposal struct + ProposalStatus enum + storage (Proposals + Votes)
- 3 dispatchables real impl: submit_proposal (7-step) + cast_vote (6-step) + finalize_proposal (5-step)
- 8 Errors canonical + 3 Events canonical
- BLAKE2-256 derive_proposal_id pure fn (Inmutable #16)
- 10 integration tests E2E lifecycle complete
- Runtime API canonical GovernanceApi NUEVO ✅

## Phase 5.2-5.8 next refinements

- 5.2 pallet_collective Technical Council
- 5.3 OIP stake validation runtime config
- 5.4 Stake-weighted voting via pallet_balances integration
- 5.5 Technical Council veto + override 2/3
- 5.6 5 AI advisor agents (AdvisorMayNotVote enforcement)
- 5.7 Emergency referendum 48h
- 5.8 Treasury disbursement

## Verification

- cargo build --release -p origin-chain-node 8.63s clean
- cargo test --workspace — 177 tests passing, 0 failures
- origin-chain-node info: 11 pallets + 15 Runtime APIs canonical
- GovernanceApi visible + Phase 5.1 FOUNDATION COMPLETE highlighted

🎉 Phase 5.1 FOUNDATION COMPLETE end-to-end canonical. 4 Phase 2.x+5.1 COMPLETE sesión 3+.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 12:48:56 -05:00
..