Skip to content

The game is not on mainnet yet and contract addresses are not published.

Open app

Build · Game of Splits docs

Reading state and events

Everything the site shows comes from public views and events. You can read the same things.

Views

CallReturns
FairLens.configNow()Play token, pass amount, buy token, the split and any queued change
FairLens.greenwood()Fair status, pending Bonfire, Vault and Toll amounts, Vault holdings
FairLens.arrowNow()Current Last Arrow round, price, time left, Purse, last shots
FairLens.seatNow()Current Seat day, holder, price, Purse, top 3
FairLens.player(address)Pass status and unlock time, claimable, played this Fair
FairCore.claimable(address)USDG waiting to be claimed
GameConfig.tokens()playToken, passLock, buyToken

Example

Read claimable USDG with viem
import { createPublicClient, http, parseAbi, formatUnits } from "viem";

const client = createPublicClient({
  transport: http("https://rpc.mainnet.chain.robinhood.com"),
});

const FAIR_CORE = "0x..."; // TBD after deploy

const owed = await client.readContract({
  address: FAIR_CORE,
  abi: parseAbi(["function claimable(address) view returns (uint256)"]),
  functionName: "claimable",
  args: ["0xYourWallet"],
});

console.log(formatUnits(owed, 6), "USDG");

Events

ContractEvents
FairCoreShot, Awarded, RolledOver, Claimed, Burned, BoughtForVault, AlmsReleased, AlmsCarried, FairSet, SalesPaused
LastArrowRoundOpened, ShotFired, RoundSettled
SheriffsSeatSeatTaken, DaySettled
FairPassLocked, Unlocked
RobinAmongThievesOutlawRegistered, OperatorSet, Deposited, Withdrawn, Retired, Entered