Build + tests verde: governance 42 + runtime 27. Verificacion adversarial ultracode (2 skeptics): 2 confirmed/low, sin blockers. Cierra el hallazgo HIGH de FIX-5: treasury_disbursement era simbolico (solo decrementaba un contador u128 desconectado de pallet_balances). Ahora: - governance Config: type Currency (fungible Inspect+Mutate) + type TreasuryPalletId (pallet::constant). - Eliminado el contador Treasury<StorageValue<u128>> (0 referencias colgantes). - treasury_account() = PalletId.into_account_truncating() — vault keyless deterministico (nadie lo controla por wallet; honor Inmutable #16). - treasury_balance() lee el balance REAL (Inspect::balance), no un contador. - treasury_disbursement: T::Currency::transfer real desde el vault al recipient (ensure_root + proposal Approved). treasury_deposit: signed, dona del propio balance del caller (cualquiera fondea, no requiere Root, imposible robar). - runtime configs.rs: Currency=Balances + GovernanceTreasuryPalletId(og/gvtry). - mock con pallet_balances + scenario_4 prueba que el RECIPIENT recibe OGC REAL en pallet_balances (bob 100M -> 100M+300k), no solo que el contador baja. Decision constitucional (FIX-6 V2-CA3): David ratifico sub_mult = ORTOGONALES (la suscripcion premium NO reduce el subsidio anti-clasista de hardware, #16). Input para el OnChargeTransaction de Stage 2. Registrado en KG. FOLLOW-UPS (low, documentados, no bloquean): - genesis mainnet: rutear los 250M Foundation a la cuenta og/gvtry (hoy van a FNDT) — detalle de pre-launch que David ratifica. El vault arranca en 0 hasta fondear. - treasury_disbursement no vincula amount/recipient al proposal Approved, y el mismo proposal es reusable (no se marca disbursed). Check ceremonial, no autorizacion per-desembolso. Sin escalada nueva (Root ya puede todo via sudo). Endurecer antes del sunset sudo->governance. FIX-6 Stage 1 restante (next): emision que paga Aura authors (cierra V2-CA2) + remover APR falso del staking contract. Stage 2: NPoS + fee unificado (OnChargeTransaction con el sub_mult ortogonal). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
59 lines
1.9 KiB
TOML
59 lines
1.9 KiB
TOML
[package]
|
|
name = "origin-chain-governance"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
homepage.workspace = true
|
|
description = "Foundation governance on-chain canonical: Proposal + Vote + Tally per CHN-4 AI-Driven Human-Guarded. Phase 5.1 v0.0.28 scaffold — humans-only vote enforced canonical, 5 AI advisor agents advise-only canonical."
|
|
|
|
[dependencies]
|
|
# Origin Chain canonical types (ProposalId + VoteStance + Vote source-of-truth)
|
|
origin-chain-types = { workspace = true }
|
|
|
|
# FRAME canonical pallet macro + storage + dispatch + events + errors
|
|
frame-support = { workspace = true }
|
|
frame-system = { workspace = true }
|
|
|
|
# Runtime API canonical (v0.0.31 — GovernanceApi.query_proposal read-only RPC)
|
|
sp-api = { workspace = true }
|
|
|
|
# Substrate primitives canonical (BLAKE2 hashing canonical para derive_proposal_id)
|
|
sp-core = { workspace = true }
|
|
sp-runtime = { workspace = true }
|
|
|
|
# SCALE codec canonical
|
|
parity-scale-codec = { workspace = true }
|
|
scale-info = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
# Mock runtime canonical para integration tests v0.0.30 — Pattern v0.0.26 mirror.
|
|
sp-core = { workspace = true, default-features = true }
|
|
sp-io = { workspace = true, default-features = true }
|
|
sp-runtime = { workspace = true, default-features = true }
|
|
# FIX-6: pallet_balances en el mock para testear la tesorería real (transfers).
|
|
pallet-balances = { workspace = true, default-features = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"origin-chain-types/std",
|
|
"frame-support/std",
|
|
"frame-system/std",
|
|
"sp-api/std",
|
|
"sp-core/std",
|
|
"sp-runtime/std",
|
|
"parity-scale-codec/std",
|
|
"scale-info/std",
|
|
]
|
|
runtime-benchmarks = [
|
|
"frame-support/runtime-benchmarks",
|
|
"frame-system/runtime-benchmarks",
|
|
]
|
|
try-runtime = [
|
|
"frame-support/try-runtime",
|
|
"frame-system/try-runtime",
|
|
]
|