Developer reference
SDK and subgraph
Reading and writing the protocol from code, and the indexed data model.
Loading…
Browse documentation
Developer reference
Reading and writing the protocol from code, and the indexed data model.
Loading…
Developer reference
Reading and writing the protocol from code, and the indexed data model.
Everything the interface shows can be read and reproduced from two open sources: a typed SDK over the contracts and a subgraph that indexes every launch.
The @glazecorp/sdk package (packages/sdk in the repository) wraps the contracts for TypeScript clients built on viem. Its main modules:
| Module | What it provides |
|---|---|
abis and generated-abis | ABIs for every core contract, generated from the compiled artifacts. |
launchpad | Reading launch records and the byte bounds on launch inputs. |
readers | Typed reads of Launchpad, FundController, Mine, Auction, Resonance, Bribe and SignalCoin state, and withdrawal previews. |
actions | Prepared write calls: launch, mine, buy, add and remove allocations, withdraw (redeem), claim, and FundController settings. |
math | The protocol's arithmetic: price decay, payment splits, withdrawal payouts, and every constant. |
signal-planner and signal-allocations | Turning a desired split into addSignalMany and removeSignalMany allocations. |
deployment and chains | Loading a deployment manifest and chain configuration. |
full-range, fullRangeProtocol, fullRangeIndexed | Building launches, reading full-range pools, and quoting swaps, deposits and withdrawals. |
uniswap-routing | Swap calls through the Uniswap Universal Router and Permit2 approvals. |
subgraph | Typed queries against the subgraph. |
The interface quotes mining payments, launch seeds and LP withdrawals with these same SDK functions, so those quotes match what the panel shows.
The subgraph (packages/subgraph) indexes every Launchpad launch and everything that happens inside each graph. The principal entities:
| Entity | Contents |
|---|---|
Launchpad, Protocol, ProtocolDailyData | Global counters and daily aggregates. |
FundInstance | One per Coin: every component address, supply, treasury and mining aggregates. |
MiningSlot, MiningPayment, PaymentClaim, PendingMiningAllocation | The Mine's current state, each takeover with its split, and claims. |
Strategy, StrategyEpoch, StrategyPurchase | Each strategy's configuration, live epoch, and every fill. |
RevenueGraph, RevenueStream, SignalPosition, GraphSignalAccount | The Resonance (allocation mode, allocation managers, allocation reward share and routed, notified and distributed revenue), each revenue notification, and per-account allocations. |
RewardCampaign, BribeRewardStream, BribeRewardPayment | Bribe reward tokens, each stream and each claim. |
RedemptionBatch, Redemption | Each withdrawal and its per-asset payouts. |
Token, LiquidityPool, Swap, LiquidityEvent | Asset metadata, each full-range LP token, its swaps and its deposits and withdrawals. |
FullRangeMarket, FullRangeBalance, FullRangeSwap | Each Uniswap V4 market, LP token balances by holder, and every native swap. |
FullRangeHook, FullRangeFeeEvent | The protocol swap-fee recipient, and each swap-fee credit and claim. |
TreasuryAsset, Account, FundAccount | Each treasury holding, and wallet totals across all funds and per fund. |
MetadataUpdate, FeeRecipientUpdate, ControllerOwnershipUpdate, ComponentOwnershipUpdate | Controller actions and component ownership changes. |
Everything the subgraph reports is derivable from events; the interface falls back to direct RPC reads for the authoritative state of anything you are about to sign.
/api/health on the interface reports the configured chain, RPC reachability and indexer state, so you can tell when a displayed number may be stale.