---
name: megapot-contracts-reference
description: Full Megapot contract reference — addresses across Base mainnet/staging/Base Sepolia, full parseAbi blocks for all 13 contracts, and key protocol constants. Use when an agent needs deep contract-level detail that task skills don't cover.
---

# Megapot Contract Reference

Megapot is an on-chain lottery protocol deployed on Base. It consists of 13 contracts covering the full lifecycle of ticket purchasing, LP liquidity provision, randomness-sourced drawings, prize payouts, and NFT-based ticket ownership. This reference provides the complete deployment address table across three environments (Base mainnet, Base mainnet staging, and Base Sepolia testnet), ready-to-use `parseAbi` blocks for all 13 contracts, and key protocol constants that govern lottery mechanics.

## Networks

| Network | Chain ID | RPC |
|---|---|---|
| Base mainnet | 8453 | `https://mainnet.base.org` |
| Base Sepolia testnet | 84532 | `https://sepolia.base.org` |

Staging runs on Base mainnet (chain ID 8453) with a separate deployment at different contract addresses.

## Addresses

| Contract | Mainnet (8453) | Staging (8453) | Testnet (84532) |
|---|---|---|---|
| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` |
| Jackpot | `0x3bAe643002069dBCbcd62B1A4eb4C4A397d042a2` | `0xCd43b692e005A69aB066F62e92551D5EFD8B69B6` | `0x465dA3c859f193A3807386387bEE941B2A4c3279` |
| BatchPurchaseFacilitator | `0x01774B531591b286b9f02C6Bc02ab3fD9526Aa76` | `0x38D4EAaEEF6a4D422E982992d16082e12d6b5bEA` | `0xe582dD908Ca5bd51C743DFdda37C93bBaCD27c56` |
| JackpotAutoSubscription | `0x02A58B725116BA687D9356Eafe0fA771d58a37ac` | `0x422AaE51Fff3Ec5d905e23e53E532E55dc85483a` | `0x054a61E2FC77BAb3c9D94C3f835FB7ADE97a2F90` |
| JackpotLPManager | `0xE63E54DF82d894396B885CE498F828f2454d9dCf` | `0x9FfD9BfEb907894A8991956E4A261Bf16615900B` | `0x36408921aB820305F109150003C0F90aE1CB1766` |
| JackpotTicketNFT | `0x48FfE35AbB9f4780a4f1775C2Ce1c46185b366e4` | `0x60890F14cE35C404bDA8316e5128d86791F2c6Fa` | `0x45084829ac63f9dC6a3D4981A46FA896f9180ECd` |
| TicketAutoCompoundVault | `0x3E22Ea60A1206A4BfEefBCff04D5E9d0A2D9B3Fc` | `0x5d2a808Cc2E17D8053Be4Cd2cf2c5D9D3DC8CD37` | `0xB6A51530B4d772bCfE58fF67b54edE161e789c8C` |
| GuaranteedMinimumPayoutCalculator | `0x97a22361b6208aC8cd9afaea09D20feC47046CBD` | `0x3cBcb6DF913BD3c2D21b65d2EB8ca662E28D7655` | `0xE9542aC6FaDC47be2Bc42Fc075c1f481529D28cB` |
| JackpotBridgeManager | `0x7FD89658D8B4dD42FA2c1acDe0B6b877Bea03A80` | `0x8145fADbaEddE3Bf41F77aA4f5bA062e3d1E1ADB` | `0x1B2c906c3b29239f4dE0d9979128E49908F0976C` |
| ScaledEntropyProvider | `0x5D030DEC2e0d38935e662C0d2feD44B050c8Ae51` | `0xc64c7F9d278Edf837438aA8F6e5f35c14e863371` | `0x595B993C8E4365Bce5433359F129783Ef9Ea3d4e` |
| TicketNFTArt | `0xb41d8679772995e3b72bbaDDA4909eCa9DFF70fB` | `0x27caB131f9245cbEC99c0f610D8cD292974BD4d3` | `0xbd5fFdA2579d6E15535e523e678A79EF35c33099` |
| JackpotRandomTicketBuyer | `0xb9560b43b91dE2c1DaF5dfbb76b2CFcDaFc13aBd` | `0x4D55EE33D22b1C5a62FfF84D80dDf8b07bFf5a1a` | `0x53c04e7e5044B28Ea8A4F9c4b26E3Ac1aeb63746` |
| FisherYatesRejection | `0x9a9de5b407ceB9EBBf6A58256DFb350a32D52850` | `0x1705eD646B56fB49De880CD5Ab8c373d2D758d25` | `0x701a34b1D35a67A0532cF58FeA264fBDB61F7E36` |

## Key Constants

- **USDC decimals:** 6
- **Batch purchase threshold:** 10 tickets (minimum for `BatchPurchaseFacilitator`)
- **Read-dynamic constants** (fetched from `Jackpot` contract at runtime):
  - `normalBallMax` — upper bound for normal ball selections (protocol config)
  - `bonusballMin` — **protocol config only** — internal lower bound used to set each drawing's `bonusballMax`; NOT the user-facing pick lower bound
  - `bonusballSoftCap` — **protocol config only** — internal soft cap used to set each drawing's `bonusballMax`
  - `bonusballHardCap` — **protocol config only** — internal hard cap used to set each drawing's `bonusballMax`; NOT the user-facing pick upper bound
  - `drawingDurationInSeconds` — seconds between drawings
  - `maxReferrers` — maximum referrers per ticket purchase
  - `ticketPrice` — current ticket price in USDC (6 decimals)

**Ticket validation ranges:**
- Normal balls: `[1, drawingState.ballMax]` — read `getDrawingState(currentDrawingId).ballMax`
- Bonus ball: **`[1, drawingState.bonusballMax]`** — read `getDrawingState(currentDrawingId).bonusballMax`

The bonusball pick range always starts at 1. `bonusballMin`, `bonusballSoftCap`, and `bonusballHardCap` are protocol configuration parameters used internally to determine what `bonusballMax` gets set to for each drawing — they do NOT define the user-facing pick range.

**Ball range dual values:** The Jackpot contract exposes both *config-level* constants (`normalBallMax()`, `bonusballMin()`, `bonusballSoftCap()`, `bonusballHardCap()`) and *per-drawing* values (`getDrawingState().ballMax`, `getDrawingState().bonusballMax`). The per-drawing values are locked at drawing creation. If config changes between drawings, older drawings retain their original ball ranges. For current-drawing work, always use the per-drawing values from `getDrawingState()` to determine valid pick ranges.

## Prize Tiers

The Megapot lottery uses a 12-tier prize system. The tier ID is computed as:

```
tierId = normalMatches * 2 + bonusballMatch
```

where `bonusballMatch` is `1` if the bonusball matched, `0` otherwise.

| Tier ID | Normal Matches | Bonusball | Payout? | Description |
|---|---|---|---|---|
| 0 | 0 | No | No | No match |
| 1 | 0 | Yes | Yes | Bonusball only |
| 2 | 1 | No | No | 1 match, no payout |
| 3 | 1 | Yes | Yes | 1 match + bonusball |
| 4 | 2 | No | Yes | 2 matches |
| 5 | 2 | Yes | Yes | 2 matches + bonusball |
| 6 | 3 | No | Yes | 3 matches |
| 7 | 3 | Yes | Yes | 3 matches + bonusball |
| 8 | 4 | No | Yes | 4 matches |
| 9 | 4 | Yes | Yes | 4 matches + bonusball |
| 10 | 5 | No | Yes | 5 matches (grand prize runner-up) |
| 11 | 5 | Yes | Yes | **Jackpot** (5 matches + bonusball) |

**Note:** Tiers 0 and 2 do NOT pay out. `getExpectedDrawingTierPayouts` returns `uint256[12]` where index N is the USDC payout (6 decimals) for tier N. Indices 0 and 2 will always be `0`. `getTicketTierIds` returns these same tier IDs — a result of `0n` or `2n` means the ticket is not a winner.

## Contracts

### Primary (developer-facing)

#### Jackpot

Core lottery contract. Buy tickets, claim winnings, claim referral fees, LP deposit/withdraw.

```ts
import { parseAbi } from 'viem';
export const jackpotAbi = parseAbi([
  "constructor(uint256 _drawingDurationInSeconds, uint8 _normalBallMax, uint8 _bonusballMin, uint8 _bonusballSoftCap, uint8 _bonusballHardCap, uint256 _lpEdgeTarget, uint256 _reserveRatio, uint256 _referralFee, uint256 _referralWinShare, uint256 _ticketPrice, uint256 _maxReferrers, uint32 _entropyBaseGasLimit)",
  "error ContractAlreadyInitialized()",
  "error ContractNotInitialized()",
  "error DepositAmountZero()",
  "error DrawingNotDue()",
  "error EmergencyEnabled()",
  "error EmergencyModeAlreadyEnabled()",
  "error EmergencyModeNotEngaged()",
  "error InsufficientEntropyFee()",
  "error InvalidBonusball()",
  "error InvalidBonusballHardCap()",
  "error InvalidBonusballMin()",
  "error InvalidBonusballSoftCap()",
  "error InvalidDrawingDuration()",
  "error InvalidDrawingId()",
  "error InvalidGovernancePoolCap()",
  "error InvalidLpEdgeTarget()",
  "error InvalidMaxReferrers()",
  "error InvalidNormalBallMax()",
  "error InvalidNormalsCount()",
  "error InvalidProtocolFee()",
  "error InvalidRecipient()",
  "error InvalidReferralFee()",
  "error InvalidReferralSplitBps()",
  "error InvalidReferralWinShare()",
  "error InvalidReserveRatio()",
  "error InvalidTicketCount()",
  "error InvalidTicketPrice()",
  "error JackpotAlreadyInitialized()",
  "error JackpotLocked()",
  "error JackpotNotInitialized()",
  "error JackpotNotLocked()",
  "error LPDepositsAlreadyInitialized()",
  "error LPDepositsNotInitialized()",
  "error NoLPDeposits()",
  "error NoPrizePool()",
  "error NoReferralFeesToClaim()",
  "error NoTicketsProvided()",
  "error NoTicketsToClaim()",
  "error NotTicketOwner()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error ReentrancyGuardReentrantCall()",
  "error ReferralSplitLengthMismatch()",
  "error ReferralSplitSumInvalid()",
  "error SafeERC20FailedOperation(address token)",
  "error TicketFromFutureDrawing()",
  "error TicketNotEligibleForRefund()",
  "error TicketPurchasesAlreadyDisabled()",
  "error TicketPurchasesAlreadyEnabled()",
  "error TicketPurchasesDisabled()",
  "error TooManyReferrers()",
  "error Uint8OutOfBounds()",
  "error UnauthorizedEntropyCaller()",
  "error WithdrawAmountZero()",
  "error ZeroAddress()",
  "event BonusballHardCapHit(uint256 indexed drawingId, uint256 uncappedValue, uint8 hardCapValue)",
  "event BonusballHardCapUpdated(uint256 indexed drawingId, uint8 oldValue, uint8 newValue)",
  "event BonusballMinUpdated(uint256 indexed drawingId, uint8 oldValue, uint8 newValue)",
  "event BonusballSoftCapUpdated(uint256 indexed drawingId, uint8 oldValue, uint8 newValue)",
  "event DrawingDurationUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event EmergencyModeDisabled(uint256 indexed drawingId)",
  "event EmergencyModeEnabled(uint256 indexed drawingId)",
  "event EntropyBaseGasLimitUpdated(uint256 indexed drawingId, uint32 oldValue, uint32 newValue)",
  "event EntropyUpdated(uint256 indexed drawingId, address oldEntropy, address newEntropy)",
  "event EntropyVariableGasLimitUpdated(uint256 indexed drawingId, uint32 oldValue, uint32 newValue)",
  "event GovernancePoolCapUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event JackpotLocked(uint256 indexed drawingId)",
  "event JackpotRunRequested(uint256 indexed drawingId, uint256 entropyGasLimit, uint256 fee)",
  "event JackpotSettled(uint256 indexed drawingId, uint256 lpEarnings, uint256 userWinnings, uint8 winningBonusball, uint256 winningNumbers, uint256 newDrawingAccumulator)",
  "event JackpotUnlocked(uint256 indexed drawingId)",
  "event LpEarningsUpdated(uint256 indexed drawingId, uint256 amount)",
  "event LpEdgeTargetUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event MaxReferrersUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event NewDrawingInitialized(uint256 indexed drawingId, uint256 lpPoolTotal, uint256 prizePool, uint256 ticketPrice, uint256 normalBallMax, uint8 bonusballMax, uint256 referralWinShare, uint256 drawingTime)",
  "event NormalBallMaxUpdated(uint256 indexed drawingId, uint8 oldValue, uint8 newValue)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event PayoutCalculatorUpdated(uint256 indexed drawingId, address oldPayoutCalculator, address newPayoutCalculator)",
  "event ProtocolFeeAddressUpdated(uint256 indexed drawingId, address indexed oldAddress, address indexed newAddress)",
  "event ProtocolFeeCollected(uint256 indexed drawingId, uint256 amount)",
  "event ProtocolFeeThresholdUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event ProtocolFeeUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event ReferralFeeCollected(address indexed referrer, uint256 amount)",
  "event ReferralFeeUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event ReferralFeesClaimed(address indexed userAddress, uint256 amount)",
  "event ReferralSchemeAdded(bytes32 indexed referralSchemeId, address[] referrers, uint256[] referralSplit)",
  "event ReferralWinShareUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event ReserveRatioUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event TicketOrderProcessed(address indexed buyer, address indexed recipient, uint256 indexed currentDrawingId, uint256 numberOfTickets, uint256 lpEarnings, uint256 referralFees)",
  "event TicketPriceUpdated(uint256 indexed drawingId, uint256 oldValue, uint256 newValue)",
  "event TicketPurchased(address indexed recipient, uint256 indexed currentDrawingId, bytes32 indexed source, uint256 userTicketId, uint8[] normals, uint8 bonusball, bytes32 referralScheme)",
  "event TicketPurchasesDisabled(uint256 indexed drawingId)",
  "event TicketPurchasesEnabled(uint256 indexed drawingId)",
  "event TicketRefunded(uint256 indexed ticketId)",
  "event TicketWinningsClaimed(address indexed userAddress, uint256 indexed drawingId, uint256 userTicketId, uint256 matchedNormals, bool bonusballMatch, uint256 winningsAmount)",
  "event WinnersCalculated(uint256 indexed drawingId, uint256[] winningNormals, uint256 winningBonusball, uint256[] uniqueResult, uint256[] dupResult)",
  "function acceptOwnership()",
  "function allowTicketPurchases() view returns (bool)",
  "function bonusballHardCap() view returns (uint8)",
  "function bonusballMin() view returns (uint8)",
  "function bonusballSoftCap() view returns (uint8)",
  "function buyTickets((uint8[] normals, uint8 bonusball)[] _tickets, address _recipient, address[] _referrers, uint256[] _referralSplit, bytes32 _source) returns (uint256[] ticketIds)",
  "function checkIfTicketsBought(uint256 _drawingId, (uint8[] normals, uint8 bonusball)[] _tickets) view returns (bool[])",
  "function claimReferralFees()",
  "function claimWinnings(uint256[] _userTicketIds)",
  "function currentDrawingId() view returns (uint256)",
  "function disableTicketPurchases()",
  "function drawingDurationInSeconds() view returns (uint256)",
  "function emergencyMode() view returns (bool)",
  "function emergencyRefundTickets(uint256[] _userTicketIds)",
  "function emergencyWithdrawLP()",
  "function enableEmergencyMode()",
  "function enableTicketPurchases()",
  "function entropy() view returns (address)",
  "function entropyBaseGasLimit() view returns (uint32)",
  "function entropyVariableGasLimit() view returns (uint32)",
  "function finalizeWithdraw()",
  "function getDrawingState(uint256 _drawingId) view returns ((uint256 prizePool, uint256 ticketPrice, uint256 edgePerTicket, uint256 referralWinShare, uint256 referralFee, uint256 globalTicketsBought, uint256 lpEarnings, uint256 drawingTime, uint256 winningTicket, uint8 ballMax, uint8 bonusballMax, address payoutCalculator, bool jackpotLock))",
  "function getDrawingTierPayouts(uint256 _drawingId) view returns (uint256[12])",
  "function getEntropyCallbackFee() view returns (uint256 fee)",
  "function getReferralScheme(bytes32 _referralSchemeId) view returns ((address[] referrers, uint256[] referralSplit))",
  "function getSubsetCount(uint256 _drawingId, uint8[] _normals, uint8 _bonusball) view returns ((uint128 count, uint128 dupCount))",
  "function getTicketTierIds(uint256[] _ticketIds) view returns (uint256[] tierIds)",
  "function getUnpackedTicket(uint256 _drawingId, uint256 _packedTicket) view returns (uint8[] normals, uint8 bonusball)",
  "function governancePoolCap() view returns (uint256)",
  "function initialize(address _usdc, address _jackpotLPManager, address _jackpotNFT, address _entropy, address _payoutCalculator, address _protocolFeeAddress, uint256 _protocolFee, uint256 _protocolFeeThreshold)",
  "function initializeJackpot(uint256 _initialDrawingTime)",
  "function initializeLPDeposits(uint256 _governancePoolCap)",
  "function initialized() view returns (bool)",
  "function initiateWithdraw(uint256 _amountToWithdrawInShares)",
  "function jackpotLPManager() view returns (address)",
  "function jackpotNFT() view returns (address)",
  "function lockJackpot()",
  "function lpDeposit(uint256 _amountToDeposit)",
  "function lpEdgeTarget() view returns (uint256)",
  "function maxReferrers() view returns (uint256)",
  "function normalBallMax() view returns (uint8)",
  "function owner() view returns (address)",
  "function payoutCalculator() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function protocolFee() view returns (uint256)",
  "function protocolFeeAddress() view returns (address)",
  "function protocolFeeThreshold() view returns (uint256)",
  "function referralFee() view returns (uint256)",
  "function referralFees(address) view returns (uint256)",
  "function referralWinShare() view returns (uint256)",
  "function renounceOwnership()",
  "function reserveRatio() view returns (uint256)",
  "function runJackpot() payable",
  "function scaledEntropyCallback(bytes32, uint256[][] _randomNumbers, bytes)",
  "function setBonusballHardCap(uint8 _bonusballHardCap)",
  "function setBonusballMin(uint8 _bonusballMin)",
  "function setBonusballSoftCap(uint8 _bonusballSoftCap)",
  "function setDrawingDurationInSeconds(uint256 _drawingDurationInSeconds)",
  "function setEntropy(address _entropy)",
  "function setEntropyBaseGasLimit(uint32 _entropyBaseGasLimit)",
  "function setEntropyVariableGasLimit(uint32 _entropyVariableGasLimit)",
  "function setGovernancePoolCap(uint256 _governancePoolCap)",
  "function setLpEdgeTarget(uint256 _lpEdgeTarget)",
  "function setMaxReferrers(uint256 _maxReferrers)",
  "function setNormalBallMax(uint8 _normalBallMax)",
  "function setPayoutCalculator(address _payoutCalculator)",
  "function setProtocolFee(uint256 _protocolFee)",
  "function setProtocolFeeAddress(address _protocolFeeAddress)",
  "function setProtocolFeeThreshold(uint256 _protocolFeeThreshold)",
  "function setReferralFee(uint256 _referralFee)",
  "function setReferralWinShare(uint256 _referralWinShare)",
  "function setReserveRatio(uint256 _reserveRatio)",
  "function setTicketPrice(uint256 _ticketPrice)",
  "function ticketPrice() view returns (uint256)",
  "function transferOwnership(address newOwner)",
  "function unlockJackpot()",
  "function usdc() view returns (address)",
]);
```

#### BatchPurchaseFacilitator

Bulk ticket purchases (more than 10). Keeper-executed batch orders.

```ts
import { parseAbi } from 'viem';
export const batchPurchaseFacilitatorAbi = parseAbi([
  "constructor(address _jackpot, address _usdc, uint256 _minimumTicketCount)",
  "error ActiveBatchOrderExists()",
  "error AllowedAlreadyAdded()",
  "error AllowedNotFound()",
  "error EmptyArray()",
  "error InvalidMinimumTicketCount()",
  "error InvalidNormalBallCount()",
  "error InvalidReferralSplitBps()",
  "error InvalidStaticTicket()",
  "error InvalidTicketCount()",
  "error JackpotLocked()",
  "error JackpotNotInitialized()",
  "error NoActiveBatchOrder()",
  "error NotAllowed()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error ReentrancyGuardReentrantCall()",
  "error ReferralSplitLengthMismatch()",
  "error ReferralSplitSumInvalid()",
  "error RepeatedNormalBall()",
  "error SafeERC20FailedOperation(address token)",
  "error TooManyReferrers()",
  "error ZeroAddress()",
  "event AllowedAdded(address indexed allowed)",
  "event AllowedRemoved(address indexed allowed)",
  "event BatchOrderCancelled(address indexed recipient, uint8 indexed executionAction, uint256 refundAmount)",
  "event BatchOrderCreated(address indexed payer, address indexed recipient, uint256 indexed drawingId, uint256 totalCost, uint256 dynamicTicketCount, uint256 staticTicketCount)",
  "event BatchOrderExecuted(address indexed user, uint256 indexed drawingId, uint256[] ticketIds, uint256 ticketsExecuted, uint256 remainingTickets, uint256 remainingUSDC)",
  "event BatchOrderRemoved(address indexed recipient)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event StaticTicketAdded(address indexed recipient, uint8[] normals, uint8 bonusball)",
  "event StaticTicketValidated(address indexed recipient, uint8[] normals, uint8 bonusball)",
  "function acceptOwnership()",
  "function addAllowed(address _allowed)",
  "function addAllowedBatch(address[] _allowed)",
  "function batchOrders(address) view returns (uint256 orderDrawingId, uint64 remainingUSDC, uint64 remainingTickets, uint64 totalTicketsOrdered, uint64 dynamicTicketCount)",
  "function cancelBatchOrder()",
  "function createBatchOrder(address _recipient, uint64 _dynamicTicketCount, (uint8[] normals, uint8 bonusball)[] _userStaticTickets, address[] _referrers, uint256[] _referralSplit)",
  "function executeBatchOrder(address _recipient, uint256 _maxTicketsPerBatch)",
  "function executionNonce() view returns (uint256)",
  "function getAllowed() view returns (address[])",
  "function getBatchOrderActions(address[] _recipients, uint256 _maxTicketsPerBatch) view returns (uint8[])",
  "function getBatchOrderInfo(address _recipient) view returns (((uint256 orderDrawingId, uint64 remainingUSDC, uint64 remainingTickets, uint64 totalTicketsOrdered, uint64 dynamicTicketCount, address[] referrers, uint256[] referralSplit) batchOrder, (uint8[] normals, uint8 bonusball)[] staticTickets))",
  "function hasActiveBatchOrder(address _recipient) view returns (bool)",
  "function isAllowed(address _allowed) view returns (bool)",
  "function jackpot() view returns (address)",
  "function minimumTicketCount() view returns (uint256)",
  "function owner() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function removeAllowed(address _allowed)",
  "function renounceOwnership()",
  "function setMinimumTicketCount(uint256 _minimumTicketCount)",
  "function staticTickets(address, uint256) view returns (uint8 bonusball)",
  "function transferOwnership(address newOwner)",
  "function usdc() view returns (address)",
]);
```

#### JackpotAutoSubscription

Recurring daily ticket purchases via keeper bots.

```ts
import { parseAbi } from 'viem';
export const jackpotAutoSubscriptionAbi = parseAbi([
  "constructor(address _jackpot, address _usdc, address _batchFacilitator)",
  "error ActiveSubscriptionExists()",
  "error AllowedAlreadyAdded()",
  "error AllowedNotFound()",
  "error EmptyArray()",
  "error InvalidDuration()",
  "error InvalidNormalBallCount()",
  "error InvalidReferralSplitBps()",
  "error InvalidStaticTicket()",
  "error InvalidTicketCount()",
  "error JackpotNotInitialized()",
  "error NoActiveSubscription()",
  "error NotAllowed()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error ReentrancyGuardReentrantCall()",
  "error ReferralSplitLengthMismatch()",
  "error ReferralSplitSumInvalid()",
  "error RepeatedNormalBall()",
  "error SafeERC20FailedOperation(address token)",
  "error TooManyReferrers()",
  "error ZeroAddress()",
  "event AllowedAdded(address indexed allowed)",
  "event AllowedRemoved(address indexed allowed)",
  "event BatchPurchaseFacilitatorSet(address indexed batchPurchaseFacilitator)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event StaticTicketAdded(address indexed recipient, uint8[] normals, uint8 bonusball)",
  "event StaticTicketValidated(address indexed recipient, uint8[] normals, uint8 bonusball)",
  "event SubscriptionCancelled(address indexed recipient, uint8 indexed executionAction, uint64 refundAmount)",
  "event SubscriptionCreated(address indexed payer, address indexed recipient, uint256 totalCost, uint256 totalDays, uint256 drawingStart, uint256 dynamicTicketCount, uint256 staticTicketCount, uint256 ticketPrice)",
  "event SubscriptionExecuted(address indexed recipient, uint256 indexed drawingId, uint256[] ticketIds, uint256 dynamicTicketsPurchased, uint256 staticTicketsPurchased)",
  "event SubscriptionRemoved(address indexed recipient)",
  "event SubscriptionRoutedToBatch(address indexed recipient, uint256 indexed drawingId, uint256 dynamicTicketCount, uint256 staticTicketCount, uint256 totalCost)",
  "event SubscriptionSkipped(address indexed recipient, uint256 indexed drawingId, uint8 indexed executionAction)",
  "function acceptOwnership()",
  "function addAllowed(address _allowed)",
  "function addAllowedBatch(address[] _allowed)",
  "function batchFacilitator() view returns (address)",
  "function cancelSubscription()",
  "function createSubscription(address _recipient, uint64 _totalDays, uint64 _dynamicTicketCount, (uint8[] normals, uint8 bonusball)[] _userStaticTickets, address[] _referrers, uint256[] _referralSplit)",
  "function executeSubscriptions(address[] _subscriptions)",
  "function getAllowed() view returns (address[])",
  "function getSubscriptionInfo(address _recipient) view returns (((uint64 remainingUSDC, uint64 lastExecutedDrawing, uint64 subscribedTicketPrice, uint64 dynamicTicketCount, address[] referrers, uint256[] referralSplit) subscription, (uint8[] normals, uint8 bonusball)[] staticTickets))",
  "function getSubscriptionsAction(address[] _subscriptions) view returns (uint8[])",
  "function isAllowed(address _allowed) view returns (bool)",
  "function jackpot() view returns (address)",
  "function owner() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function removeAllowed(address _allowed)",
  "function renounceOwnership()",
  "function setBatchPurchaseFacilitator(address _batchPurchaseFacilitator)",
  "function staticTickets(address, uint256) view returns (uint8 bonusball)",
  "function subscriptions(address) view returns (uint64 remainingUSDC, uint64 lastExecutedDrawing, uint64 subscribedTicketPrice, uint64 dynamicTicketCount)",
  "function ticketPickerNonce() view returns (uint256)",
  "function transferOwnership(address newOwner)",
  "function usdc() view returns (address)",
]);
```

#### JackpotLPManager

LP position reads — shares, value breakdown, drawing state.

```ts
import { parseAbi } from 'viem';
export const jackpotLPManagerAbi = parseAbi([
  "constructor(address _jackpot)",
  "error ExceedsPoolCap()",
  "error InsufficientShares()",
  "error InvalidLPPoolCap()",
  "error InvalidLPSoftCap()",
  "error NothingToWithdraw()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error UnauthorizedCaller()",
  "error ZeroAddress()",
  "event LpDeposited(address indexed lpAddress, uint256 indexed currentDrawingId, uint256 amount, uint256 totalPendingDeposits)",
  "event LpPoolCapUpdated(uint256 indexed drawingId, uint256 newLpPoolCap)",
  "event LpWithdrawFinalized(address indexed lpAddress, uint256 indexed currentDrawingId, uint256 amount)",
  "event LpWithdrawInitiated(address indexed lpAddress, uint256 indexed currentDrawingId, uint256 amount, uint256 totalPendingWithdrawals)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "function drawingAccumulator(uint256) view returns (uint256)",
  "function emergencyWithdrawLP(uint256 _drawingId, address _user) returns (uint256 withdrawableAmount)",
  "function getDrawingAccumulator(uint256 _drawingId) view returns (uint256)",
  "function getEstimatedNextDrawingLpPool() view returns (uint256)",
  "function getLPDrawingState(uint256 _drawingId) view returns ((uint256 lpPoolTotal, uint256 pendingDeposits, uint256 pendingWithdrawals))",
  "function getLPShares(address _lp) view returns (uint256)",
  "function getLPValueBreakdown(address _lpAddress) view returns ((uint256 activeDeposits, uint256 pendingDeposits, uint256 pendingWithdrawals, uint256 claimableWithdrawals) breakdown)",
  "function getLpInfo(address _lpAddress) view returns ((uint256 consolidatedShares, (uint256 amount, uint256 drawingId) lastDeposit, (uint256 amountInShares, uint256 drawingId) pendingWithdrawal, uint256 claimableWithdrawals))",
  "function initializeDrawingLP(uint256 _drawingId, uint256 _initialLPValue)",
  "function initializeLP()",
  "function jackpot() view returns (address)",
  "function lpInfo(address) view returns (uint256 consolidatedShares, (uint256 amount, uint256 drawingId) lastDeposit, (uint256 amountInShares, uint256 drawingId) pendingWithdrawal, uint256 claimableWithdrawals)",
  "function lpPoolCap() view returns (uint256)",
  "function owner() view returns (address)",
  "function processDeposit(uint256 _drawingId, address _lpAddress, uint256 _amount)",
  "function processDrawingSettlement(uint256 _drawingId, uint256 _lpEarnings, uint256 _userWinnings, uint256 _protocolFeeAmount) returns (uint256 newLPValue, uint256 newAccumulator)",
  "function processFinalizeWithdraw(uint256 _drawingId, address _lpAddress) returns (uint256 withdrawableAmount)",
  "function processInitiateWithdraw(uint256 _drawingId, address _lpAddress, uint256 _amountToWithdrawInShares)",
  "function renounceOwnership()",
  "function setLPPoolCap(uint256 _drawingId, uint256 _lpSoftCap, uint256 _lpPoolCap)",
  "function transferOwnership(address newOwner)",
]);
```

#### JackpotTicketNFT

Ticket ownership NFT + decoded ticket data.

```ts
import { parseAbi } from 'viem';
export const jackpotTicketNFTAbi = parseAbi([
  "constructor(address _jackpot, address _ticketArt)",
  "error AccountBalanceOverflow()",
  "error BalanceQueryForZeroAddress()",
  "error NotOwnerNorApproved()",
  "error NotTicketOwner()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error TicketDoesNotExist()",
  "error TokenAlreadyExists()",
  "error TokenDoesNotExist()",
  "error TransferFromIncorrectOwner()",
  "error TransferToNonERC721ReceiverImplementer()",
  "error TransferToZeroAddress()",
  "error UnauthorizedCaller()",
  "error ZeroAddress()",
  "event Approval(address indexed owner, address indexed account, uint256 indexed id)",
  "event ApprovalForAll(address indexed owner, address indexed operator, bool isApproved)",
  "event ContractURIUpdated(string newContractURI)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event TicketArtUpdated(address indexed newTicketArt)",
  "event Transfer(address indexed from, address indexed to, uint256 indexed id)",
  "function acceptOwnership()",
  "function approve(address account, uint256 id) payable",
  "function balanceOf(address owner) view returns (uint256 result)",
  "function burnTicket(uint256 _ticketId)",
  "function contractURI() view returns (string)",
  "function getApproved(uint256 id) view returns (address result)",
  "function getExtendedTicketInfo(uint256 _ticketId) view returns ((uint256 ticketId, (uint256 drawingId, uint256 packedTicket, bytes32 referralScheme) ticket, uint8[] normals, uint8 bonusball))",
  "function getTicketInfo(uint256 _ticketId) view returns ((uint256 drawingId, uint256 packedTicket, bytes32 referralScheme))",
  "function getUserTickets(address _userAddress, uint256 _drawingId) view returns ((uint256 ticketId, (uint256 drawingId, uint256 packedTicket, bytes32 referralScheme) ticket, uint8[] normals, uint8 bonusball)[])",
  "function isApprovedForAll(address owner, address operator) view returns (bool result)",
  "function jackpot() view returns (address)",
  "function mintTicket(address _recipient, uint256 _ticketId, uint256 _drawingId, uint256 _packedTicket, bytes32 _referralScheme)",
  "function name() pure returns (string)",
  "function owner() view returns (address)",
  "function ownerOf(uint256 id) view returns (address result)",
  "function pendingOwner() view returns (address)",
  "function renounceOwnership()",
  "function safeTransferFrom(address from, address to, uint256 id) payable",
  "function safeTransferFrom(address from, address to, uint256 id, bytes data) payable",
  "function setApprovalForAll(address operator, bool isApproved)",
  "function setContractURI(string _contractURI)",
  "function setTicketArt(address _ticketArt)",
  "function supportsInterface(bytes4 interfaceId) view returns (bool result)",
  "function symbol() pure returns (string)",
  "function ticketArt() view returns (address)",
  "function tickets(uint256) view returns (uint256 drawingId, uint256 packedTicket, bytes32 referralScheme)",
  "function tokenURI(uint256 tokenId) view returns (string)",
  "function transferFrom(address from, address to, uint256 id) payable",
  "function transferOwnership(address newOwner)",
]);
```

#### TicketAutoCompoundVault

Claim winnings and re-buy tickets atomically in one transaction.

```ts
import { parseAbi } from 'viem';
export const ticketAutoCompoundVaultAbi = parseAbi([
  "constructor(address _jackpot, address _jackpotNFT, address _usdc, address _batchFacilitator)",
  "error ActiveBatchOrderExists()",
  "error EmptyTicketArray()",
  "error InvalidClaimedAmount()",
  "error InvalidReferralSplitBps()",
  "error JackpotLocked()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error ReentrancyGuardReentrantCall()",
  "error ReferralSplitLengthMismatch()",
  "error ReferralSplitSumInvalid()",
  "error SafeERC20FailedOperation(address token)",
  "error TooManyReferrers()",
  "error ZeroAddress()",
  "event BatchPurchaseFacilitatorUpdated(address indexed batchPurchaseFacilitator)",
  "event Compounded(address indexed user, uint256 ticketsClaimed, uint256 usdcClaimed, uint256 ticketsBought, uint256 usdcSpent, uint256 usdcRemaining, bool useBatchPurchase, address[] referrers, uint256[] referralSplit)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "function acceptOwnership()",
  "function batchFacilitator() view returns (address)",
  "function depositAndCompound(uint256[] _ticketIds, address[] _referrers, uint256[] _referralSplit)",
  "function getUserPendingUSDC(address _user) view returns (uint256)",
  "function jackpot() view returns (address)",
  "function jackpotNFT() view returns (address)",
  "function owner() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function renounceOwnership()",
  "function setBatchPurchaseFacilitator(address _batchFacilitator)",
  "function ticketPickerNonce() view returns (uint256)",
  "function transferOwnership(address newOwner)",
  "function usdc() view returns (address)",
  "function userPendingUSDC(address) view returns (uint256)",
]);
```

#### JackpotRandomTicketBuyer

Immediate random ticket purchases — up to 10 per call, no ticket selection needed. USDC approval to this contract. Use when you want quick random tickets without specifying normals/bonusball. Calls `buyTickets(count, recipient, referrers, referralSplit, source)` and executes immediately (not keeper-based).

```ts
import { parseAbi } from 'viem';
export const jackpotRandomTicketBuyerAbi = parseAbi([
  "constructor(address _jackpot, address _usdc)",
  "error InvalidRecipient()",
  "error InvalidTicketCount()",
  "error ReentrancyGuardReentrantCall()",
  "error SafeERC20FailedOperation(address token)",
  "event RandomTicketsBought(address indexed recipient, uint256 indexed drawingId, uint256 count, uint256 cost, uint256[] ticketIds)",
  "function buyTickets(uint256 _count, address _recipient, address[] _referrers, uint256[] _referralSplitBps, bytes32 _source) returns (uint256[] ticketIds)",
  "function jackpot() view returns (address)",
  "function nonce() view returns (uint256)",
  "function usdc() view returns (address)",
]);
```

#### GuaranteedMinimumPayoutCalculator

Read-only prize tier payout calculations.

```ts
import { parseAbi } from 'viem';
export const guaranteedMinimumPayoutCalculatorAbi = parseAbi([
  "constructor(address _jackpot, uint256 _minimumPayout, uint256 _premiumTierMinAllocation, bool[12] _minPayoutTiers, uint256[12] _premiumTierWeights)",
  "error InvalidDrawingId()",
  "error InvalidMinPayoutTiers()",
  "error InvalidPremiumTierMinimumAllocation()",
  "error InvalidPremiumTierWeights()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error UnauthorizedCaller()",
  "error ZeroAddress()",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event PrizeTierPayoutsCalculated(uint256 drawingId, uint256[12] tierPayouts)",
  "function PRECISE_UNIT() view returns (uint256)",
  "function acceptOwnership()",
  "function calculateAndStoreDrawingUserWinnings(uint256 _drawingId, uint256 _prizePool, uint8 _normalMax, uint8 _bonusballMax, uint256[] _uniqueResult, uint256[] _dupResult) returns (uint256 totalPayout)",
  "function drawingTierInfo(uint256) view returns (uint256 minPayout, uint256 premiumTierMinAllocation)",
  "function getDrawingTierInfo(uint256 _drawingId) view returns ((uint256 minPayout, uint256 premiumTierMinAllocation, bool[12] minPayoutTiers, uint256[12] premiumTierWeights))",
  "function getDrawingTierPayouts(uint256 _drawingId) view returns (uint256[12])",
  "function getExpectedDrawingTierPayouts(uint256 _drawingId, uint256 _prizePool, uint8 _normalMax, uint8 _bonusballMax) view returns (uint256[12] drawingTierPayouts)",
  "function getMinPayoutTiers() view returns (bool[12])",
  "function getPremiumTierWeights() view returns (uint256[12])",
  "function getTierPayout(uint256 _drawingId, uint256 _tierId) view returns (uint256)",
  "function jackpot() view returns (address)",
  "function minPayoutTiers(uint256) view returns (bool)",
  "function minimumPayout() view returns (uint256)",
  "function owner() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function premiumTierMinAllocation() view returns (uint256)",
  "function premiumTierWeights(uint256) view returns (uint256)",
  "function renounceOwnership()",
  "function setDrawingTierInfo(uint256 _drawingId)",
  "function setMinPayoutTiers(bool[12] _minPayoutTiers)",
  "function setMinimumPayout(uint256 _minimumPayout)",
  "function setPremiumTierMinAllocation(uint256 _premiumTierMinAllocation)",
  "function setPremiumTierWeights(uint256[12] _premiumTierWeights)",
  "function transferOwnership(address newOwner)",
]);
```

#### USDC

ERC-20 approve/transfer target for all Megapot write operations. 6 decimals.

```ts
import { parseAbi } from 'viem';
export const usdcAbi = parseAbi([
  "function balanceOf(address account) view returns (uint256)",
  "function allowance(address owner, address spender) view returns (uint256)",
  "function approve(address spender, uint256 amount) returns (bool)",
  "function decimals() view returns (uint8)",
  "function symbol() view returns (string)",
  "event Transfer(address indexed from, address indexed to, uint256 value)",
  "event Approval(address indexed owner, address indexed spender, uint256 value)",
]);
```

### Reference-only

#### JackpotBridgeManager

Cross-chain ticket purchases and winnings claims via EIP-712 + Relay. Reference only in v1; task skill deferred to v1.1.

```ts
import { parseAbi } from 'viem';
export const jackpotBridgeManagerAbi = parseAbi([
  "constructor(address _jackpot, address _jackpotTicketNFT, address _usdc, address _relayDepository, string _name, string _version)",
  "error ECDSAInvalidSignature()",
  "error ECDSAInvalidSignatureLength(uint256 length)",
  "error ECDSAInvalidSignatureS(bytes32 s)",
  "error InvalidBridgeAmount()",
  "error InvalidClaimedAmount()",
  "error InvalidRecipient()",
  "error InvalidShortString()",
  "error NoTicketsToClaim()",
  "error NotTicketOwner()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error ReentrancyGuardReentrantCall()",
  "error SafeERC20FailedOperation(address token)",
  "error StringTooLong(string str)",
  "error ZeroAddress()",
  "event EIP712DomainChanged()",
  "event FundsBridged(bytes32 indexed _bridgeId, uint256 _amount)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event TicketsBought(address indexed _recipient, uint256 indexed _drawingId, uint256[] _ticketIds)",
  "event WinningsClaimed(address indexed _winner, uint256[] _ticketIds, uint256 _amount)",
  "function CLAIM_TICKET_TYPEHASH() view returns (bytes32)",
  "function CLAIM_WINNINGS_TYPEHASH() view returns (bytes32)",
  "function RELAY_TYPEHASH() view returns (bytes32)",
  "function acceptOwnership()",
  "function buyTickets((uint8[] normals, uint8 bonusball)[] _tickets, address _recipient, address[] _referrers, uint256[] _referralSplitBps, bytes32 _source) returns (uint256[])",
  "function claimTickets(uint256[] _ticketIds, address _recipient, bytes _signature)",
  "function claimWinnings(uint256[] _userTicketIds, (bytes32 bridgeId, uint256 amount) _bridgeDetails, bytes _signature)",
  "function createClaimTicketEIP712Hash(uint256[] _ticketIds, address _recipient) view returns (bytes32)",
  "function createClaimWinningsEIP712Hash(uint256[] _userTicketIds, (bytes32 bridgeId, uint256 amount) _bridgeDetails) view returns (bytes32)",
  "function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
  "function getUserTickets(address _user, uint256 _drawingId) view returns (uint256[])",
  "function jackpot() view returns (address)",
  "function jackpotTicketNFT() view returns (address)",
  "function owner() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function relayDepository() view returns (address)",
  "function renounceOwnership()",
  "function ticketOwner(uint256) view returns (address)",
  "function transferOwnership(address newOwner)",
  "function usdc() view returns (address)",
]);
```

#### ScaledEntropyProvider

Pyth-backed randomness source for drawings. Reference only.

```ts
import { parseAbi } from 'viem';
export const scaledEntropyProviderAbi = parseAbi([
  "constructor(address _entropy, address _entropyProvider)",
  "error AllowedAlreadyAdded()",
  "error AllowedNotFound()",
  "error CallbackFailed(bytes4 selector)",
  "error EmptyArray()",
  "error InsufficientFee()",
  "error InvalidCallback()",
  "error InvalidRange()",
  "error InvalidRequests()",
  "error InvalidSamplesCount()",
  "error InvalidSelector()",
  "error NotAllowed()",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "error ReentrancyGuardReentrantCall()",
  "error UnknownSequence()",
  "error ZeroAddress()",
  "error ZeroAddress()",
  "event AllowedAdded(address indexed allowed)",
  "event AllowedRemoved(address indexed allowed)",
  "event EntropyFulfilled(uint64 indexed sequence, bytes32 randomNumber)",
  "event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event ScaledRandomnessDelivered(uint64 indexed sequence, address indexed callback, uint256 samples)",
  "function _entropyCallback(uint64 sequence, address provider, bytes32 randomNumber)",
  "function acceptOwnership()",
  "function addAllowed(address _allowed)",
  "function addAllowedBatch(address[] _allowed)",
  "function getAllowed() view returns (address[])",
  "function getEntropyContract() view returns (address)",
  "function getEntropyProvider() view returns (address)",
  "function getFee(uint32 _gasLimit) view returns (uint256)",
  "function getPendingRequest(uint64 _sequence) view returns ((address callback, bytes4 selector, bytes context, bytes32 userRandomNumber, (uint8 samples, uint256 minRange, uint256 maxRange, bool withReplacement)[] setRequests))",
  "function isAllowed(address _allowed) view returns (bool)",
  "function owner() view returns (address)",
  "function pendingOwner() view returns (address)",
  "function removeAllowed(address _allowed)",
  "function renounceOwnership()",
  "function requestAndCallbackScaledRandomness(uint32 _gasLimit, (uint8 samples, uint256 minRange, uint256 maxRange, bool withReplacement)[] _requests, bytes4 _selector, bytes _context) payable returns (uint64 sequence)",
  "function setEntropyProvider(address _entropyProvider)",
  "function transferOwnership(address newOwner)",
]);
```

#### TicketNFTArt

On-chain NFT metadata / art rendering. Reference only.

```ts
import { parseAbi } from 'viem';
export const ticketNFTArtAbi = parseAbi([
  "constructor(address _jackpot)",
  "error InvalidDigit(uint256 number)",
  "error InvalidPosition(uint256 position)",
  "error OwnableInvalidOwner(address owner)",
  "error OwnableUnauthorizedAccount(address account)",
  "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
  "event PathCacheUpdated(uint256 indexed number, string path, int256 xOffset, int256 yOffset)",
  "event PathPositionsUpdated(uint256 indexed position, uint256 anchor)",
  "function generateTokenURI((uint256 ticketId, (uint256 drawingId, uint256 packedTicket, bytes32 referralScheme) ticket, uint8[] normals, uint8 bonusball) _ticket) view returns (string)",
  "function getPathPositions(uint256 _position) view returns ((uint256 position, uint256 anchor))",
  "function jackpot() view returns (address)",
  "function owner() view returns (address)",
  "function pathCache(uint256) view returns (uint256 number, string path, int256 xOffset, int256 yOffset)",
  "function pathPositions(uint256) view returns (uint256 position, uint256 anchor)",
  "function renounceOwnership()",
  "function transferOwnership(address newOwner)",
  "function updatePathCaches((uint256 number, string path, int256 xOffset, int256 yOffset)[] _pathCaches)",
  "function updatePathPositions((uint256 position, uint256 anchor)[] _pathPositions)",
]);
```

### Internal

#### FisherYatesRejection

Library for Fisher-Yates shuffle with rejection sampling. Not developer-facing.

```ts
import { parseAbi } from 'viem';
export const fisherYatesRejectionAbi = parseAbi([
  "function draw(uint256 minRange, uint256 maxRange, uint256 count, uint256 seed) pure returns (uint256[] result)",
]);
```
