Everything the site shows comes from public views and events. You can read the same things.
| Call | Returns |
|---|
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 |
Read claimable USDG with viemimport { 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");
| Contract | Events |
|---|
| FairCore | Shot, Awarded, RolledOver, Claimed, Burned, BoughtForVault, AlmsReleased, AlmsCarried, FairSet, SalesPaused |
| LastArrow | RoundOpened, ShotFired, RoundSettled |
| SheriffsSeat | SeatTaken, DaySettled |
| FairPass | Locked, Unlocked |
| RobinAmongThieves | OutlawRegistered, OperatorSet, Deposited, Withdrawn, Retired, Entered |