Pin a Sui season to immutable scoring rules

If scoring must remain reproducible for completed matches, an immutable rules object provides a stable reference. A new season can point at a different rules ID.

Freeze a newly constructed rules object

In the module defining SeasonRules, create the object, capture its ID and freeze it by value. Store the captured ID in the season configuration and verify that callers supply the matching rules object when calculating results.

let rules = SeasonRules { id: object::new(ctx), points_per_win: 3 };
let rules_id = object::id(&rules);
transfer::freeze_object(rules);

Test changes across season boundaries

Season A with three points per win and season B with four can coexist as separate objects. A score for season A should reject B’s ID even though it has the correct Move type. Freezing permanently removes mutation and transfer paths for the object, so release corrections through a newly identified rule set and an explicit season-level decision.

Sources