# origin-nft-mint β€” NFT Mint Contract Template (Slice 3.2) **First foundational template** del Origin Contract Atelier (Capacidad #10 OCC propuesta David 2026-05-27). Implementa el split BM V2 ratificado 2026-05-18 91% creator / 9% Treasury + transfer royalty 5% (configurable) + Treasury burn 20% (per BM V2 burn matrix Pillar 3). ## Status 🚧 **SCAFFOLD (source-only, v0.0.42)** β€” `lib.rs` shipped + Cargo.toml ready. Real compilation deferred hasta `cargo-contract v6` install autorizado (precedent Slice 2e brew LLVM authorization pattern). El source es: - **Compilable canonical** una vez tooling instalado: `cargo contract build --release` - **Reference architectural** para Contract Atelier visual designer Phase 3.x - **Documentation living** del policy-first contract design pattern Origin ## Inmutables compliance compile-detect | Inmutable | Enforcement canonical en este contract | |-----------|----------------------------------------| | **#16 HTS anti-clasista** | `mint_fee_base` modulated por HardwareTier vΓ­a OitFeeSchedule bridge Phase 3.x integration | | **#25 Seeds Hosting Non-Gatekept** | NFT ownership NO gates base world access β€” purely decorative/economic layer | | **#26 Content-Addressed Immutability** | `asset_hash: AssetHash` BLAKE3 hash compile-detect required (Error::InvalidAssetHash if zero) | | **#37 Free perpetua** | Read methods (`total_supply`, `token_owner`, `balance_of`, etc.) sin payment β€” siempre gratis | | **#41 AGI Co-authorship** | AccountId32 canonical para AGI accounts (Phase 2.7 AgentIdentity) sin distinction de Human accounts | ## Configuration parameters (Contract Atelier UI exposure) | Parameter | Type | Default BM V2 | Range UI canonical | |-----------|------|---------------|---------------------| | `mint_fee_base` | `Balance` (u128) | 1 OGC (10^18 base) | 0.01 - 1000 OGC sliders | | `creator_share_bps` | `u16` | 9_100 (91%) | locked invariant 91% canonical (BM V2 ratified) | | `treasury_share_bps` | `u16` | 900 (9%) | locked invariant 9% canonical (BM V2 ratified) | | `transfer_royalty_bps` | `u16` | 500 (5%) | 0-1000 (0-10%) sliders | | `treasury_burn_bps` | `u16` | 2_000 (20%) | 0-5000 (0-50%) sliders | | `max_supply` | `Option` | None (unlimited) | None OR Some(1..=4_294_967_295) selector | | `lockup_blocks` | `u32` (blocks) | 0 (no lockup) | 0-1_576_800 (β‰ˆ 6 months Pi 5 6s blocks) slider | | `children_safety_strict` | `bool` | false | toggle (Inmutable #35 strict mode) | ## Cross-pillar integration canonical ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ origin-nft-mint contract canonical deployed via pallet-revive β”‚ β”‚ Index 11 Origin Chain runtime (Slice 3.1 SCAFFOLD COMPLETE) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β–Ό β–Ό β–Ό β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Pillar 2 β”‚β”‚ Pillar 4 β”‚β”‚ Pillar 6 β”‚β”‚ Pillar 7 β”‚β”‚ Atelier β”‚ β”‚ OMC β”‚β”‚ Origin β”‚β”‚ Nexus β”‚β”‚ Creator β”‚β”‚ Marihan β”‚ β”‚ Marihan β”‚β”‚ Chain β”‚β”‚ Services β”‚β”‚ Economy β”‚β”‚ Skills β”‚ β”‚ β”‚β”‚ Charon β”‚β”‚ Mathi β”‚β”‚ Larihana β”‚β”‚ β”‚ β”‚ 91/9 β”‚β”‚ pallet- β”‚β”‚ Beacon β”‚β”‚ Hosting β”‚β”‚ Skills β”‚ β”‚ split β”‚β”‚ revive β”‚β”‚ stake + β”‚β”‚ NFT β”‚β”‚ becomen β”‚ β”‚ enforced β”‚β”‚ deploy β”‚β”‚ ONS name β”‚β”‚ anchor β”‚β”‚ NFTs β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ### Pillar 2 OMC Marketplace (Marihan) wire NFT mint contracts compose el marketplace canonical Marihan. Cada skill canonical creada en Atelier Skills (Marihan) puede ser minted como NFT via este template. El 91/9 split BM V2 ratified compile-detect garantizado. ### Pillar 4 Origin Chain (Charon) deploy Deployment vΓ­a `pallet-revive::instantiate` Index 11 (Slice 3.1 SCAFFOLD COMPLETE shipped v0.0.41). Storage deposits per BM V2 economics (mint_fee_base default 1 OGC + storage deposit pallet-revive 1 MILLI_OGC/byte + 1 OGC/item). ### Pillar 6 Nexus Services (Mathi) integration opcional Post-deploy NFT collection puede: - **Beacon stake** canonical: lockup OGC para featured visibility (100-1000 OGC/mes per ONS_PILLAR_6_NEXUS_SERVICES_V1) - **ONS name** registration: human-readable collection name (5-1000 OGC/year per BM V2) - **Oracle KYB**: institutional creators verified Nivel 3+ canonical ### Pillar 7 Creator Economy (Larihana) hosting NFT anchored a world pagado canonical 0.6 OGC/world/mes hosting. NFT transfer canonical preserva world ownership context (NFT changes hands, world hosting continues canonical). ## Deploy instructions (Phase 3.x post cargo-contract v6 install) ```bash # 1. Install ink! v6 toolchain canonical (pending David authorization) cargo install cargo-contract --version "^6.0" --force # 2. Build contract canonical cd contracts/origin-nft-mint cargo contract build --release # 3. Output canonical files: # - target/ink/origin_nft_mint.polkavm (PolkaVM bytecode canonical) # - target/ink/origin_nft_mint.json (ABI metadata canonical para frontends) # - target/ink/origin_nft_mint.contract (combined bundle canonical) # 4. Deploy via Polkadot.js Apps OR Charon Atelier (Phase 3.x maduraciΓ³n): # - upload_code(origin_nft_mint.polkavm) β†’ CodeHash # - instantiate(code_hash, constructor=default_bm_v2, value=storage_deposit) # - Returns contract AccountId32 + H160 mapped address ``` ## Tests canonical (unit tests included) 3 tests canonical en `#[cfg(test)] mod tests`: 1. **`default_bm_v2_constructor_canonical_invariants`** β€” verifica defaults BM V2 ratified (91/9 + 5% royalty + 20% burn + unlimited supply + no pause). 2. **`invalid_share_split_rejected_canonical`** β€” invariant compile-detect: creator_share + treasury_share MUST sum 10_000 bps (100%). 90% + 5% rejected. 3. **`excessive_royalty_rejected_canonical`** β€” invariant: transfer_royalty_bps ≀ 1_000 (10% industry standard). 15% rejected. Run canonical post-install: ```bash cargo test --features ink-as-dependency ``` ## Roadmap follow-up post Slice 3.2 | Ship | Slice | Scope | |------|-------|-------| | v0.0.43 | 3.3 | origin-escrow contract template (multi-party + time-locked) | | v0.0.44 | 3.4 | origin-credential-mint contract (Ed25519 + BLAKE3 Sussi Ethos) | | v0.0.45 | 3.5 | origin-staking contract (validator + beacon + reputation) | | v0.0.46 | 3.6 | origin-mdk-reconciliation (ink! vs origin-mdk WASM boundary) | | Phase 3.x | β€” | cargo-contract v6 install + real compilation + ReviveApi exposure (deferred Slice 3.1) + integration tests E2E reales | --- β€” Charon βš“ (Pilar 4 Origin Chain, Phase 3 Slice 3.2 SCAFFOLD shipped 2026-05-27)