TakerConfig
createTakerClient(config) takes one object and binds everything to it. Config is injected; nothing in the SDK reads globals or environment variables.
parlays.live relayer base URL. The relayer prices from Hyperliquid, signs the maker side, and pays gas on submit. Trailing slashes are stripped.
ParlayEscrow contract address on the host chain. Holds both sides’ funds, verifies both EIP-712 signatures, and pays out on settlement. Also the EIP-712 verifyingContract for taker signatures.The USDC (6 decimals) ERC-20 the escrow pulls stakes in. Used for the allowance and approve call builders.
HyperEVM chain id the contracts live on:
998 testnet, 999 mainnet. Used in the EIP-712 domain and every writeContract call.Network matrix
Two axes are independent: where the contracts live (HyperEVM chain id) and which Hyperliquid environment prices the legs (a relayer deployment flag,HL_TESTNET).
| Stack | Contracts | Pricing source | Who runs it |
|---|---|---|---|
| parlays.live testnet (shared) | HyperEVM testnet, chain 998 | HL mainnet HIP-4 (HL_TESTNET="false") | Public shared stack |
| Dev env, HL testnet pricing | HyperEVM testnet, chain 998 | HL testnet HIP-4 (HL_TESTNET="true") | Your own relayer + contracts |
| Mainnet | HyperEVM mainnet, chain 999 | HL mainnet HIP-4 | Configured when contracts deploy |
HIP-4 outcome markets live on HL mainnet, so the shared testnet stack prices real HL mainnet markets while settling test USDC on HyperEVM testnet. The pricing source is never a client-side option: the
TakerConfig only decides which relayer you talk to.Shared testnet addresses
| What | Value |
|---|---|
| Chain id | 998 (HyperEVM testnet) |
| Relayer | https://sparrow-relayer.dennis-furrer.workers.dev |
| ParlayEscrow | 0x77DeFc3E3B66bE01B8468Eb696Ec9F330D24332a |
| MakerVault | 0x807c7cb41573b8B7d3E52E3F37410A0a8eDA4fc0 |
| USDC (test, 6 dp) | 0x75b69d0E8fA3CdB644b0f069E4e876B85A76E137 |
| Explorer | https://explore-testnet.hyperpc.app |
Multi-network hosts
If your app has a network toggle, resolve it before module load and export a single module-level client (this is what parlays.live does):src/lib/taker.ts
ensureChain to the write hooks (useSubmitParlay, useCashOut) so the wallet is switched by your logic instead of the default wagmi switchChain. See Analytics and callbacks.
Money convention: raw bigint USDC, 6 decimals
Every amount that crosses the SDK boundary is a rawbigint with 6 decimals: stakes, payouts, collateral, cash-out values, pots. Relayer JSON carries them as decimal strings; convert with BigInt(...) at the boundary and only ever format for display.
Where addresses come from
- Shared testnet: the table above (also the defaults baked into the parlays.live app config).
- Your own deployment: the escrow, vault, and USDC addresses come out of your Foundry deploy scripts; the relayer’s
wrangler.tomlmust be configured with the sameESCROWandVAULT, plusHL_TESTNETfor the pricing source. The client’sescrowandchainIdmust match the relayer’s, since both sides derive the same EIP-712 domain (name: "Sparrow", version: "1"); a mismatch makes signature verification fail on-chain. - Mainnet: contracts are configured via environment at build time and read as “not deployed” (zero address) until they exist. Gate your UI on a configured escrow the way the reference app does:
const isConfigured = !/^0x0+$/.test(escrow).

