Skip to content

Add Igra Network (chain 38833) support #1

Description

@emdin

Summary

Add support for Igra Network — an EVM-compatible L2 settled on Kaspa L1 PoW. Chain ID 38833, native currency iKAS.

Network Details

Chain ID 38833 (0x97B1)
Currency iKAS (18 decimals)
RPC https://rpc.igralabs.com:8545
WebSocket wss://rpc.igralabs.com:8545
Explorer https://explorer.igralabs.com
Docs https://igra-labs.gitbook.io/igralabs-docs/

DeFi Ecosystem

Igra has two live DEXes — both Uniswap V2 forks with standard router/factory interfaces:

ZealousSwap

Contract Address
Factory 0x98Bb580A77eE329796a79aBd05c6D2F2b3D5E1bD
Router 0xA5B0946D31aD2d251e0fe2dfEA8808BFd475e607
WiKAS 0x17Ec7E1768c813E2a3a9b0f94A35605CA520C242

KaspaCom DEX

Contract Address
Factory 0x21350BcDa9E81731CF4cDE3DbC457e3de2739c01
Router 0x771dfB21e1CD8EA3e8B68cB2469eDaF9548c2523

Additional infra:

  • Account Abstraction (ERC-4337 + EIP-7702)
  • Quex Oracle for price feeds
  • DAO governance (on-chain)
  • Blockscout explorer with contract verification

Implementation Notes

  • Full Ethereum JSON-RPC compatibility — works with viem out of the box
  • Timestamp quirk: block.timestamp runs ~2-2.5 min ahead of wall clock (derived from Kaspa DAA score). DEX swap deadlines should be set relative to block.timestamp, not Date.now()
  • No aggregator support (1inch, 0x, etc.) — DEX integration would need direct Uni V2 Router calls
  • Testnets available: Galleon testnet (chain 38836)

Proposed Changes

  1. rpc-provider.ts — add chain definition, RPC endpoints, chain name mappings
  2. endpoint-allowlist.ts — add rpc.igralabs.com, explorer.igralabs.com
  3. contract-registry.ts — add ZealousSwap addresses
  4. dex-aggregator.ts — add direct Uni V2 swap path (bypassing aggregator APIs)
  5. gas-estimator.ts — add Igra gas handling
  6. token-decimals.ts — add iKAS

Happy to submit a PR for this. Would start with basic chain support (RPC + balance + transfer) and follow up with ZealousSwap DEX integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions