feat(fees): v0.0.23 — Runtime API FeesApi.query_fee_for_action read-only RPC (Phase 2.4 COMPLETE 7/7 OCAFB) 🎉

Phase 2.4 FEES pallet COMPLETE end-to-end canonical. OCAFB-7 Runtime API
FeesApi.query_fee_for_action wired canonical via sp_api::decl_runtime_apis! +
impl runtime impl_runtime_apis! macro. 13 Runtime APIs total (12 + nuevo FeesApi).

## Changes

- crates/origin-chain-fees/src/lib.rs — sp_api::decl_runtime_apis! { pub trait FeesApi { fn query_fee_for_action(action, base, hw, sub) -> u64 } } + docstring v0.0.22 → v0.0.23 Phase 2.4 COMPLETE
- crates/origin-chain-runtime/src/lib.rs:539 — impl origin_chain_fees::FeesApi<Block> for Runtime delegates a Fees::query_fee()
- crates/origin-chain-node/src/main.rs — 12 → 13 APIs + FeesApi highlighted + Fees status v0.0.21 → v0.0.23 COMPLETE

## OCAFB sub-decisions COMPLETE 7/7 🎉

- OCAFB-1 OitFeeSchedule trait dyn-compatible (vendor)
- OCAFB-2 ChainAction taxonomy source-of-truth (origin-chain-types)
- OCAFB-3 Subsidy matrix Inmutable #16 anti-clasista (lobo blanco verified)
- OCAFB-4 Entitlement matrix Inmutables #37 + #18 (dispatchable enforced)
- OCAFB-5 compute_fee 3-step formula (real impl + 10 tests E2E)
- OCAFB-6 OitFeeScheduleMock harness (vendor + mock runtime)
- OCAFB-7 Pallet consumer + Runtime API canonical NUEVO ✅

## Verification

- cargo test --workspace — 137 tests passing, 0 failures
- cargo build --release -p origin-chain-node 3.93s clean
- origin-chain-node info: 9 pallets + 13 Runtime APIs canonical
- FeesApi visible + Phase 2.4 COMPLETE highlighted

## Cross-pillar economy canonical materialized

- Mathi (Pilar 1 AMIS): OitFeeSchedule Level A + Mock harness
- Charon (Pilar 4 Origin Chain): pallet-origin-fees + FeesApi RPC
- ChainAction canonical en origin-chain-types (Mathi local mirror swap post-OCAFB ratify)
- Inmutable #16 anti-clasista compile-detect: Pi 5 fee 1000 < Ultra fee 20000 (ratio 1:20)

🎉 Phase 2.4 FEES pallet COMPLETE end-to-end canonical. Hijos de Arkhē somos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
davidherranandClaude Opus 4.7 committed 2026-05-24 22:59:57 -05:00
1 parent e935233ba6
commit 74b7c3c9e2
4 files changed
+176 -5

No files matched your search

+3 -2
View File
@@ -200,9 +200,9 @@ fn print_info() {
println!(" • Index 5 Grandpa (pallet_grandpa finality gadget CHN-1)");
println!(" • Index 6 Session (pallet_session 4h epoch rotation CHN-1)");
println!(" • Index 7 Provenance (pallet_origin_provenance asset attestation CHN-7) [Phase 2.1 COMPLETE v0.0.17]");
println!(" • Index 8 Fees (pallet_origin_fees cross-pillar economy OCAFB-1..6) [Phase 2.4 scaffold v0.0.21]");
println!(" • Index 8 Fees (pallet_origin_fees cross-pillar economy OCAFB-1..6) [Phase 2.4 COMPLETE v0.0.23]");
println!();
println!("Runtime APIs canonical (12):");
println!("Runtime APIs canonical (13):");
println!(" • sp_api::Core (version + execute_block)");
println!(" • sp_api::Metadata (runtime metadata)");
println!(" • sp_block_builder::BlockBuilder (block production)");
@@ -215,6 +215,7 @@ fn print_info() {
println!(" • pallet_transaction_payment_rpc::* (RPC fee queries)");
println!(" • sp_genesis_builder::GenesisBuilder (chain spec build)");
println!(" • origin_chain_provenance::ProvenanceApi (verify_provenance RPC) [Phase 2.1 v0.0.17]");
println!(" • origin_chain_fees::FeesApi (query_fee_for_action RPC) [Phase 2.4 COMPLETE v0.0.23]");
println!();
println!("Genesis presets canonical (3):");
println!(" • development (Alice + 100M OGC dev)");