Files
davidherran 8634be5b87 feat(contracts): v0.0.45 — Slice 3.5 origin-staking template SCAFFOLD (3 stake kinds + slashing) 🎉
Ship Slice 3.5 v0.0.45 — fourth foundational template del Origin Contract Atelier.
Multi-purpose staking patterns: validator (CHN-3 NPoS Phase 2 prep) + beacon
(Pillar 6 featured visibility) + reputation (AGI commercial reputation per BM V2 §6.4).

Cambios:
- contracts/origin-staking/{Cargo.toml,lib.rs,README.md}: full template
- 3 StakeKind variants canonical: Validator + Beacon + Reputation
- 4 StakeState lifecycle: Active → Unbonding → Withdrawable + Slashed branch
- Storage canonical: config per kind (min_stake + lockup + reward_rate) + state +
  per-kind totals + staker indices
- 4 events: Staked, UnbondRequested, Withdrawn, Slashed
- 8 error variants + Result type
- 2 constructors: new (full params) + default_chn3 (NPoS Phase 2 prep defaults
  100 OGC validator min + 28 días lockup + 8% APR)
- 5 reads canonical (Inmutable #37 gratis): stake, stakes_of, total_staked,
  min_stake, lockup_blocks
- 4 writes: stake_tokens (payable per kind), unbond_request (transitions Unbonding),
  withdraw (post-lockup), slash (slashing_authority Tribunal-only, 50/50 treasury/burn)
- 3 unit tests canonical

Inmutables compliance:
- #16 HTS: min_stake graduated HardwareTier inclusion canonical Pi 5
- #37 Free perpetua: 5 reads sin payment
- #26 Content-Addressed: reason_hash BLAKE3 inmutable slash events
- #41 AGI Cross-Species: AGI stake canonical (especially Reputation kind)

Slashing canonical: 50% Treasury + 50% Burn (BM V2 burn matrix Pillar 3).
Tribunal Pillar 6 = slashing_authority typical (governance Phase 5 assigned).

Cross-pillar wire:
- Pillar 4 Charon: validator stake compose pallet-session NPoS Phase 2
- Pillar 6 Mathi/Tribunal: beacon stake + slashing authority
- BM V2 Pillar 4 §6.4: AGI reputation stake/slash mechanics

Próximo Ship Slice 3.6 v0.0.46: origin-mdk-reconciliation design study
(ink! ↔ origin-mdk WASM boundary architectural design + cross-pillar Marihan coord).

⚓ Path A Slice 3.5 SCAFFOLD shipped. Templates 4/5 complete + CHN-3 NPoS prep.

🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 09:08:52 -05:00

38 lines
1.2 KiB
TOML

[package]
name = "origin-staking"
version = "0.1.0"
edition = "2021"
authors = [
"Charon <charon@originmetaverse.com>",
"David Herran <david@dreamhousestudios.com>",
"Origin Metaverse community",
]
license = "MIT OR Apache-2.0"
description = "Origin Chain Staking contract template — validator + beacon + reputation patterns. CHN-3 NPoS Phase 2 prep. Fourth foundational template del Origin Contract Atelier."
homepage = "https://originmetaverse.com"
repository = "https://git.originmetaverse.com/Origin_Metaverse/arkhe-origin-chain"
keywords = ["smart-contract", "staking", "ink", "polkavm", "origin-metaverse"]
categories = ["cryptography::cryptocurrencies", "no-std", "wasm"]
[dependencies]
ink = { version = "6.0.0-beta.1", default-features = false }
scale = { package = "parity-scale-codec", version = "3.7", default-features = false, features = ["derive"] }
scale-info = { version = "2.11", default-features = false, features = ["derive"] }
[lib]
path = "lib.rs"
[features]
default = ["std"]
std = ["ink/std", "scale/std", "scale-info/std"]
ink-as-dependency = []
e2e-tests = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = false
codegen-units = 1
strip = "symbols"