Hash Rangers // protocol reference
How Hash Rangers works, in the same terms as the contract enforces it. Every number reflects the rules that determine a valid mint.
The mint
There is no allowlist, no admin mint, no dev allocation. All 2222 Hash Rangers come from proof-of-work mining. Your browser searches for a nonce such that:
hash = keccak256(abi.encodePacked(minterAddress, nonce, lastWorkHash, recentBlockHash)) require(uint256(hash) < currentTarget)
lastWorkHash is the winning hash of the previous successful mint. Chaining each mint to the one before it means nobody can precompute an answer before the previous mint lands. minterAddress is your wallet, baked into every attempt, so nobody can steal a hash you found.
recentBlockHash is blockhash(block.number - 2), read on-chain at mint time. The frontend tells the contract which block it mined against; the contract re-derives the hash itself and reverts if that block has fallen outside Solidity’s 256-block blockhash() window — if your mine attempt takes long enough for that to happen, the miner automatically re-fetches a fresh block and keeps searching.
Finding a valid hash and sending the mint transaction assigns you a uniformly random unused image index from the 2222 pieces still unminted — you don’t choose which Ranger you get.
Difficulty
currentTarget — the number a hash has to land under — is retargeted every 4 successful mints by four independent rules:
Epoch floor. Supply is split into 5 fixed price/difficulty epochs (see the price table below). Each epoch fixes a minimum difficulty floor stated in required leading-zero bits — a hash needs at least that many leading zero bits to win, and each extra bit is roughly 2x harder. A retarget can never loosen difficulty below the active epoch’s floor; crossing into a new epoch immediately raises it.
Entry price
Price and difficulty floor are both fixed per epoch, by cumulative supply — not a continuously growing curve. Epoch 0 is free; each epoch after that costs more and requires more leading-zero bits to win.
Price is read from currentPrice() at mint time — the frontend re-checks it right before sending your transaction, in case the epoch changed between finding a hash and submitting.
Network
Not available yet.
Network details and contract addresses will be published when mining opens.
FAQ
Can I lose gas without getting a Ranger?
If you send mine() with a nonce that no longer satisfies the current target (someone else’s mint landed first, or the block you referenced went stale), the transaction reverts. This is why the frontend searches entirely client-side and only sends a transaction once it already has a hash that passed the check locally — but revert risk from a last-second race is real and the gas for a reverted attempt isn’t refunded.
Can I mine faster with a GPU or a script?
Nothing stops you from running the same keccak256 search outside the browser — the algorithm is public, above. The official frontend runs in a Web Worker, which is fair game for anyone to reimplement.
What happens at exactly 2222 mints?
Minting closes. There is no re-mint, no second collection, no admin lever to extend supply.