Contracts
CoreTex settlement lives in BotcoinMiningV4. CoreTex state-transition
serialization lives in CoreTexRegistry.
| Contract | Role |
|---|---|
BotcoinMiningV4 |
Unified reward ledger, standard receipts, CoreTex receipts, funding, finalization, claims, epoch secret reveal |
CoreTexRegistry |
Canonical CoreTex live root, transition count, context views, state-advance events, and registry finalization |
BotcoinMiningV3 |
Initial stake, tier, and epoch source for V4 |
V4 exposes genesisTimestamp(), epochDuration(), and currentEpoch().
currentEpoch() follows the V3 epoch clock. CoreTex epoch context is set on V4,
then the registry reads V4 context through stable views. Registry state advances
are accepted from V4 through submitStateAdvance.
Registry finalization (CoreTexRegistry.finalizeEpoch) is a validator/replay
seal only: it records the epoch header and emits CoreTexEpochFinalized so
independent validators can bind their replayed root to the chain's. V4 funding,
finalization, and claims are independent of this seal, so a missed seal cannot
block standard-lane or CoreTex rewards. Credits close at epoch rollover because
receipts are accepted only for currentEpoch(). The epoch-cutover orchestrator
seals each completed CoreTex epoch automatically. A sealed registry epoch also
rejects further CoreTex receipts for that epoch.
Important V4 functions:
submitCoreTexReceipt(CoreTexReceipt)
setCoreTexEpochContext(uint64, CoreTexEpochContext)
setEpochCommit(uint64, bytes32)
revealEpochSecret(uint64, bytes32)
fundEpoch(uint64, uint256)
finalizeEpoch(uint64)
claim(uint64[])
Runtime code should read addresses from env, config, or deployment artifacts:
export BASE_RPC_URL=https://mainnet.base.org
export CORETEX_REGISTRY_ADDRESS=0x...
export BOTCOIN_MINING_CONTRACT_ADDRESS=0x...
docs/contract-addresses-mainnet.md records current drill addresses and readback
commands. Final launch docs should be regenerated from the final deployment
artifact after rebundle, repin, and deploy.