Contract directory
Explore deployed game, ledger and settlement contracts and verify onchain records.
Actions and states
How do I participate?
Connect your wallet, fund your platform balance, choose numbers and confirm your purchase.
When can I claim?
After results are confirmed and prizes settled, claim winnings in your account.
What happens during a dispute?
The round awaits UMA resolution. A countdown ending does not confirm the result.
What are public records?
The result sources, draw transactions and settlement records for a round.
Protocol core 6
- Unified ledgerunifiedLedger
0x2cebB7E73eD7C1ccf9d7B6f62C8Bfc25bBC1BF4C- Stablecoin reservestablecoinReserve
0xe17Cf23162Ec55cae5aA44AF01b256C0931e024c- Game registrygameRegistry
0x75F6c8A4cc359E07729bc80C476f7a47434733dD- Protocol revenue routerprotocolRevenueRouter
0x4bB741c745628720c14e2638ab0a866fBE307804- Lotto3D DAT vaultdatRevenueVault3d
0x2ED15296dE7aD9c9cE831b77D28DACD3bD342A1A- World Lotto DAT vaultdatRevenueVaultUma
0xaF3800F23f84671b65C84034b4b88e3D2Ab77258
Game assets 2
Lotto3D 3
- Treasurytreasury
0x7Ec7d08AEAaa2b8636403e5375E2AD1b2919a6F2- VRF adaptervrfAdapter
0x106Df7fe447Dae204A14EadCf6d05385c7aAB200
World Lotto 4
- Roundsrounds
0xA38887f40D244158ED544a7eD293F581F28a14D5- Treasurytreasury
0x8bc31a57EAdDD22EF282E5605aE8248E956e94DD- Settlementsettlement
0x1c5eB61D84d3210d839163554Fc7af3C921F9A03- Oracle adapteroracleAdapter
0x30dCe2bD0029264565D579F25Bff659E0A9438f7
External dependencies & governance 3
Oracle and governance addresses referenced by this deployment.
- Chainlink VRF coordinatorcoordinator
0xec0Ed46f36576541C75739E915ADbCb3DE24bD77- UMA Optimistic Oracle V3optimisticOracleV3
0x5953f2538F613E05bAED8A5AeFa8e6622467AD3D- Governance Safesafe
0x0144fbA97f8fb31C07C77eEd7FFF80Fb688A54b7
Read full technical documentation
Deployment facts
The address table on this page is informational and links to the configured block explorer. The chain remains authoritative for bytecode, state, permissions, and transaction outcomes.
Signing boundary
- The frontend requests wallet signatures for user actions; it does not receive or store private keys.
- Automation workers may submit protocol maintenance transactions, but their identities and permissions are separate from a user's wallet.
- Never sign a transaction after switching to a network that does not match the deployment shown here.
ABI and SDK contract
The public package @wf-protocol/contract-sdk exports the active deployment, typed address map, generated ABIs, and helpers for constructing readContract/writeContract descriptors. The ABI files are generated from the contract build; integrations should pin the package version and deploymentId together.
import { contractAddresses, getContractDescriptor } from "@wf-protocol/contract-sdk";
import { lotto3dGameAbi } from "@wf-protocol/contract-sdk/abis";
const descriptor = getContractDescriptor("lotto3dGame");
// descriptor.address, descriptor.abi, descriptor.chainId, descriptor.deploymentId
console.log(contractAddresses.lotto3dGame, lotto3dGameAbi);Unified ledger and reserve interfaces
Standalone UnifiedLedgerV4 has no V2/V3 purchase or operator-allowance entry points. Only StablecoinReserve credits or debits liability. Purchases debit the authorized owner; protocol accounts can transfer only their own balance. New deployments require fresh addresses, not upgrades of inherited Ledger storage.
| Contract | Function | Mutability | Caller / purpose |
|---|---|---|---|
| UnifiedLedgerV4 | balanceOf(address) | view | Read a user's USD balance |
| UnifiedLedgerV4 | executePurchaseV4 / executePurchaseWithAuthorizationV4 | write | Direct or EIP-712 authorized purchase |
| UnifiedLedgerV4 | protocolTransfer(address,uint256) | write | Protocol account transfers its own balance |
| UnifiedLedgerV4 | fundProtocolAccount(address,uint256,bytes) | write | Atomic treasury funding; receiver validates the funder |
| StablecoinReserve | deposit(address,uint256,uint256,uint256,uint256,uint256,bytes) | write | User deposits a whitelisted token with EIP-712 authorization |
| StablecoinReserve | withdraw(address,uint256,uint256,address) | write | User burns USD and receives a supported token |
Game entry and claim interfaces
The entry points above describe standalone V4. For delegated purchases use Ledger.executePurchaseWithAuthorizationV4 with the owner's EIP-712 signature. Read the round state, quote the purchase, and simulate against the matching ABI before requesting a wallet transaction.
| Game | Entry | Claim / refund | Proof |
|---|---|---|---|
| Lotto3D | Ledger.executePurchaseV4(request, purchaseData) | game.claim(ticketId); game.refundTicket(ticketId) | Chainlink VRF |
| World Lotto | Ledger.executePurchaseV4(request, purchaseData) | settlement.claim(ticketId); rounds.refundTicket(ticketId) | UMA optimistic assertion |
| BTC 5M | Outside the standalone V4 release | No standalone V4 integration | See feature status above |
BTC 5M condition market contracts
BTC 5M is outside the standalone V4 release and is not enabled by local-v4. Its archived CTF, collateral adapter and exchange interfaces must not be used with the standalone Ledger. Enabling it requires a separate contract and service integration review.
| Contract | Purpose | User boundary |
|---|---|---|
| WFConditionalTokens | Prepare condition, split/merge, report payouts, redeem | ERC-1155 approval and user redemption |
| BtcMarketFactory | UTC-aligned market creation and status | Read market snapshot |
| Btc5mOracle | Verified BTC/USD result or void | Read result/evidence hash |
| WusdMarketCollateralAdapter | Ledger operator escrow and release | One-time USD operator approval |
| WFExchange | Signed order validation and matching | EIP-712 order signature |
Events for reconciliation
Indexers derive their rows from contract events. A production integration should retain the transaction hash, block number, log index, and deploymentId so a row can be rebuilt from the chain. Do not use an indexer-generated id as a substitute for the onchain event identity.
| Domain | Authoritative events |
|---|---|
| Ledger / Reserve | PurchaseExecutedV4, ReserveCredit, ReserveDebit, BalanceTransferred, Deposited, Withdrawn |
| Lotto3D | RoundCreated, TicketPurchased, RoundSettled, PrizeClaimed, TicketRefunded |
| World Lotto | DrawAssertionRequested, DrawAssertionResolved, DrawSubmitted, SettlementPosted, PrizeClaimed, TicketRefunded |
| BTC 5M | Outside the standalone V4 release |
Reverts and simulation
Decode custom errors from the matching ABI instead of parsing human-readable RPC strings. Standalone V4 purchase errors include InsufficientBalance, InvalidPurchaseNonce, InvalidPurchaseSignature, PurchaseExpired, GameNotActive, PurchaseDataHashMismatch, and WfOrderAlreadyUsed.
const { request } = await publicClient.simulateContract({
...getContractDescriptor("lotto3dGame"),
functionName: "claim",
args: [ticketId],
account: userAddress,
});
await walletClient.writeContract(request);