Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreAddresses

Addresses

@symmio/trading-core ships a per-chain registry of every deployment address, endpoint URL, and configured service. It lives in the core package at:

packages/trading-core/src/core/chains/registry.ts

The registry is the single source of truth for chain-specific values. Every action reads it via Config.getChainConfig(chainId) — you never hand-thread addresses through action arguments unless you’re overriding a default.

Runtime access

import { createConfig, SymmioSupportedChainId } from "@symmio/trading-core"; const config = createConfig({ symmioConfig: { [SymmioSupportedChainId.HYPER_EVM]: { addresses: { affiliatesAddress: "0xYourRegisteredAffiliate…" } }, }, getClient: () => publicClient, }); const chain = config.getChainConfig(999); chain.addresses.symmioAddress; chain.addresses.instantLayerAddress; chain.addresses.accountLayerAddress; chain.addresses.affiliatesAddress; chain.addresses.collateralAddress; chain.addresses.collateralDecimals;

Throws UNSUPPORTED_CHAIN when the chain id isn’t in the registry. See Config.

What’s in the registry

Every entry is a SymmioChainConfig — the fully-resolved settings for one chain:

chainIdnumber

Numeric chain id (e.g. 999 for HyperEVM).

addressesSymmioContractAddresses

On-chain contract addresses (detailed below).

subgraphsSymmioSubgraphUrls

GraphQL endpoints — analytics and events.

solverSymmioSolverConfig

Solver / hedger REST API and TP/SL handler.

priceServiceSymmioPriceServiceConfig

Enigma price service (REST + WebSocket).

notificationsSymmioNotificationsConfig

Solver notifications WebSocket + REST search.

muonSymmioMuonConfig

Muon oracle gateway URLs.

The addresses field — the section people usually want:

symmioAddressAddress

SYMMIO diamond contract.

instantLayerAddressAddress

InstantLayer (delegated instant actions).

accountLayerAddressAddress

AccountLayer (SubAccount / VA management).

affiliatesAddressAddress

Your frontend’s affiliate identity (fee attribution). Required per chain via createConfig’s symmioConfig[chainId].addresses.affiliatesAddress — the field must be present (createConfig throws when it is missing). The zero address is accepted as a no-affiliate test placeholder; ` register your affiliate  to earn a share of the trading fees.

collateralAddressAddress

Collateral token (e.g. USDC).

collateralDecimalsnumber

Decimals of the collateral token.

Everything else (solver URL, TP/SL handler, subgraph, notifications WS, Muon gateways) lives on the sibling fields above.

Current chains

Only HyperEVM (999) is deployed today. The registry entry (packages/trading-core/src/core/chains/registry.ts:10-60) carries:

  • symmioAddress0x57331038c21982116EE9b0906E4a5c5cB52dcE2e
  • instantLayerAddress0x72DBF07457b2712b160F67A85D338F860c1CA620
  • accountLayerAddress0x46493c376758Da47823D7E3Ae5d417eA6546eEB3
  • affiliatesAddress0xBcB033C9154401fA000a1Ae60843f79f45741b7c (built-in default; override it per chain via the required symmioConfig[chainId].addresses.affiliatesAddress — set your registered affiliate  to earn a share of the trading fees)
  • collateralAddress0xb88339CB7199b77E23DB6E890353E22632Ba630f (USDC, 6 decimals)
  • solver.address0x76bc5889c0cfcC20960b0D81F541595d81a95122 (Enigma)
  • solver.tpsl.cohWalletAddress0xf2afbb3f13Ca72bfb69749f3bC5EbD6528b1fc31

Plus URLs for solver, TP/SL handler, price service, notifications, subgraphs, and Muon gateways.

Per-chain overrides

Override any field at runtime via createConfig({ symmioConfig }). Deep-merged onto the built-in registry — you can override just the subgraph URL or just one address, keeping the rest.

const config = createConfig({ getClient: () => publicClient, symmioConfig: { 999: { addresses: { affiliatesAddress: "0xYourRegisteredAffiliate…" }, subgraphs: { analytics: "https://staging.example/subgraphs/analytics", }, }, }, });

Useful for staging deployments and new chains that ship before an SDK release.

Adding a chain

  1. Add its id to packages/trading-core/src/core/chains/supported-chains.ts — sourced from viem/chains, never a numeric literal.
  2. Add its entry to CHAIN_CONFIGS in packages/trading-core/src/core/chains/registry.ts — every field of SymmioChainConfig is required.
  3. Colocate tests for getChainConfig if you introduce novel behavior.

Open a PR. New chains follow the existing entries’ conventions.

  • Config — how getChainConfig / symmioConfig plug in.
  • ABI fragments — pair addresses with typed ABIs for viem-direct calls.
  • Shared TypesChainIdParameter mixin on every action.
Last updated on