SHAFactory
0x4208333D65A90577E3da39B84D6A95eb9db717D20x53768885…7a4d82Source details
| Property | Value |
|---|---|
| Keccak256 Hash | 0x5376888581e85e2d9f79459f4ceb8c4be0d256103e5e76485270d545b87a4d82 |
| Source URL | https://raw.githubusercontent.com/busytoby/atropa_pulsechain/58607494f7741b80525953e4a85bc99e66fd20fc/solidity/dysnomia/02c_shafactory.sol |
| Source Revision | 58607494f7741b80525953e4a85bc99e66fd20fc |
| Source Status | Canonical source snapshot; deployed bytecode equivalence is only established where a deployment record says so. |
| 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-09-14T19:33:32Z |
Overview
Section titled “Overview”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
Inheritance Chain (C3 Linearized)
Section titled “Inheritance Chain (C3 Linearized)”No base contracts; this contract has no parents.
Immediate Parents
Section titled “Immediate Parents”None (root of its hierarchy).
What This Means For Players
Section titled “What This Means For Players”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
Constructor
Section titled “Constructor”constructor
Section titled “constructor”constructorconstructor
constructor()Functions
Section titled “Functions”External & Public
Section titled “External & Public”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
Contract Interactions
Section titled “Contract Interactions”Depends On
Section titled “Depends On”- SHA - Contract being deployed
Depended On By
Section titled “Depended On By”Ownership Pattern
Section titled “Ownership Pattern”1. Factory deploys SHA2. Factory adds msg.sender as owner3. Factory adds tx.origin as owner4. Factory renounces its own ownershipThis ensures:
- The calling contract becomes an owner
- The human initiator becomes an owner
- The factory retains no control
Usage Example
Section titled “Usage Example”// From YI contractSHA Rod = SHAFactoryInterface.New("Shio Rod", "SROD", MathLib);SHA Cone = SHAFactoryInterface.New("Shio Cone", "SCONE", MathLib);Compiled ABI
Section titled “Compiled ABI”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" }]