Skip to content

SHAFactory — The Key-Cutter

One-line pitch: SHAFactory is the contract that mints new SHA tokens on demand. Infrastructure — you never call it.

What this is

A factory contract with one job: New(name, symbol, MathLib) deploys a fresh SHA instance with the right owner wired up. It's called by YI during player onboarding and whenever else the system needs a new key.

If you've played a web3 game before

  • Closest analogy: CREATE2 factory — deploys new contracts from a template.
  • Or: the ERC-6551 registry — a universal "spawn me a token-bound thing" endpoint.
  • Or: a Gnosis Safe factory — one call, one fully-configured safe out the other end.
Dysnomia term What it maps to
SHAFactory Deployer contract for SHA tokens
New(...) The deploy function — returns a new SHA

What you actually do with it

  • Nothing. It's used only by other contracts during setup.

Rewards / costs

  • Cost: none to the player (system pays deploy gas when bootstrapping).
  • Reward: none.

Requirements & gating

  • None for players; New is callable but with no privileged effect on users.

Where it connects

Produces SHA instances. Used by YI during account creation and by ZHENG indirectly.

Quick FAQ

Q: Why a factory instead of inline deployment? A: Reusability and ownership wiring. The factory ensures every new SHA has consistent ownership setup.


Want the Solidity? The contract reference lives at technical/docs/core/02c_SHAFACTORY.md.