Technical Reference

SHAFactory

Source updated:
Last updated:
Source Revision 0x53768885…7a4d82
Property Value
Source Revision 0x5376888581e85e2d9f79459f4ceb8c4be0d256103e5e76485270d545b87a4d82
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/10e0bda9d99502c2d9125b37bbe56a111a5b2bb7/solidity/dysnomia/02c_shafactory.sol
Source commit 10e0bda9d99502c2d9125b37bbe56a111a5b2bb7
Source Status Source snapshot; source hashes do not establish deployed bytecode equivalence.
Compiler solc 0.8.21; optimizer enabled with 200 runs
Compiler Configuration {"evmVersion":"compiler-default","optimizer":{"enabled":true,"runs":200},"version":"0.8.21+commit.d9974bed.Linux.g++"}
Compilation Closure Hash 0x5272896dbc4b1a635bbd5f26c1663931b95ca2b85a70b8a8559099d9891b1411
Compilation Closure Files 6
Hash Generated 2026-04-20T02:38:19Z

SHAFactory is a factory contract for deploying new SHA token instances. It handles ownership setup and transfer during creation.

  • Kind: Contract
  • License: Sharia
  • Solidity: ^0.8.21
  • Source: 02c_shafactory.sol
Contract address:
0x4208333D65A90577E3da39B84D6A95eb9db717D2

No base contracts; this contract has no parents.

None (root of its hierarchy).

Plain English Summary: SHAFactory is like a key-cutting machine - it creates new SHA tokens (your cryptographic keys) on demand. When the game needs a new SHA for a player or operation, it asks the factory to make one. Players don’t use this directly; it works automatically when you create your account.

Real-World Analogy: Think of a hardware store that cuts keys. You don’t operate the machine yourself - you just ask for a key and it gets made for you. SHAFactory works the same way: other game contracts ask it to make SHA tokens, and it produces them with the right ownership already set up.

How It Affects Your Gameplay:

  • Automatic key creation - When you join, SHA tokens are created for you automatically
  • Proper ownership - The factory ensures you own your keys, not the system
constructorconstructor
constructor()
Newfunction
function New(string memory name, string memory symbol, address MathLib) public returns (SHA Eta)

Open this function to load its call form.

  • Visibility: public
  • Parameters: string memory name, string memory symbol, address MathLib
  • Returns: SHA Eta
  • SHA - Contract being deployed
  • YI - Uses factory to create SHA tokens
  • ZHENG - Uses factory indirectly through YI
1. Factory deploys SHA
2. Factory adds msg.sender as owner
3. Factory adds tx.origin as owner
4. Factory renounces its own ownership

This ensures:

  • The calling contract becomes an owner
  • The human initiator becomes an owner
  • The factory retains no control
// From YI contract
SHA Rod = SHAFactoryInterface.New("Shio Rod", "SROD", MathLib);
SHA Cone = SHAFactoryInterface.New("Shio Cone", "SCONE", MathLib);

The compiled ABI below is produced by solc 0.8.21 from the exact source bytes recorded in Source details. Consumers can paste it directly into ethers/web3/viem.

Click to expand JSON ABI
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "MathLib",
"type": "address"
}
],
"name": "New",
"outputs": [
{
"internalType": "contract SHA",
"name": "Eta",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]