Search Apps Documentation Source Content File Folder Download Copy Actions Download

params.gno

1.52 Kb · 30 lines
 1// Package memba_market_core holds the frozen, cross-engine money math and event
 2// schema for the Memba NFT marketplace engines. It is a PURE package (no chain/
 3// realm imports): split math returns values, event helpers return ordered arg
 4// slices, and the importing engine performs chain.Emit / banker / MarketTransfer.
 5//
 6// Constants are copied verbatim from memba_nft_market_v3 (the deployed reference).
 7// SplitProceeds must stay behaviorally identical to v3's splitProceeds so every
 8// engine pays out identically (fee/royalty conformance).
 9package memba_market_core_v2
10
11import "strconv"
12
13const (
14	FeeBPS        = int64(200)                   // 2.0% default platform fee (matches v3)
15	MaxFeeBPS     = int64(500)                   // 5% hard ceiling on any per-lane fee (DAO cannot exceed)
16	MaxRoyaltyBPS = int64(1000)                  // 10% royalty clamp (defense-in-depth)
17	MinPrice      = int64(1000)                  // 0.001 GNOT — prevents fee truncation to zero at FeeBPS
18	MaxPrice      = int64(1_000_000_000_000_000) // 1 billion GNOT
19
20	// SettlementDenom is carried on every settlement event for forward-compat with
21	// the GRC20 settlement desk (PHASE 3+). Engines settle in ugnot today.
22	SettlementDenom = "ugnot"
23
24	// SchemaVersion stamps every event so the indexer can branch parsing
25	// deterministically and the schema can evolve without ambiguity. Bump ONLY
26	// when an event's key set changes; never reuse a version for a different shape.
27	SchemaVersion = "1"
28)
29
30func itoa(n int64) string { return strconv.FormatInt(n, 10) }