Skip to content

Add HYPE (Hyperliquid) as a launch spoke - #635

Merged
LandynDev merged 2 commits into
testfrom
feat/hype-spoke
Aug 11, 2026
Merged

Add HYPE (Hyperliquid) as a launch spoke#635
LandynDev merged 2 commits into
testfrom
feat/hype-spoke

Conversation

@LandynDev

@LandynDev LandynDev commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Adds SOL ↔ HYPE. Stacked on #637merge that first; this PR's diff is only the chain itself.

HyperEVM is a plain EVM JSON-RPC chain, so the pair is a registry row plus a binding of the shared EvmCoin. No contract, DB, or consumer changes.

allways/chains.py              CHAIN_HYPE row                       + 21
allways/assets/evm.py          HYPERLIQUID network (chain ids, RPC)  + 12
allways/assets/hyperliquid.py  class Hype(EvmCoin)                   + 12
allways/assets/__init__.py     registry row                          +  3
allways/constants.py           LAUNCH_SPOKES                         +  1

Everything else in the diff is .env.example, README, and tests.

Chain parameters

Field Value Why
decimals 18 Native gas coin on HyperEVM
seconds_per_block 1 ~1s small blocks; transfers never need the 60s big blocks (those carry >2M gas)
min_confirmations 2 HyperBFT finalizes the block sequence on inclusion — no reorgs. 2 is a one-block margin against an endpoint serving an unsealed head
min_onchain_amount 1e14 wei Rate-sanity floor: 0.0001 HYPE covers a 21k-gas transfer below ~4.7 gwei
replay_grace_secs 60 Hub-clock vs spoke-clock skew allowance, as on Arbitrum
networks / testnet_network mainnet, testnet / testnet chain id 999 / 998, checked against HYPE_NETWORK at startup

Default keyless RPC ladders ship for both networks (rpc.hyperliquid.xyz, drpc); those are capped at 100 req/min per IP, so HYPE_RPC_URLS should point at a keyed endpoint (e.g. Dwellir) in production.

The one shared-code change: evm_coin.py gains a hard ceiling on the deposit scanner's block walk. At 1s blocks the existing 5-minute lookback would be ~300 sequential eth_getBlockByNumber calls on a first scan. The bound never binds on ~12s chains, so ETH behaviour is unchanged.

Verification

  • uv run pytest tests/ -q1108 passed; ruff format + check clean.
  • tests/test_hype_provider.py (26 cases) covers network selection, the wrong-network startup rejection, inclusion vs settlement, receipt/timestamp unavailability raising rather than reading as absent, the full signed payload (chain id, EIP-1559 fees, estimated gas), send guards, and the scanner's bound + cursor parking.
  • The pinned CLI contract from Share EVM coin behaviour and derive chain CLI config #637 (tests/test_cli_chain_networks.py) required a conscious update here — hype-network in the settable keys, hype: testnet in the testnet bundle, hype: mainnet in the mainnet bundle. A new chain cannot slip into the CLI unnoticed.
  • Live read-only pass on both networks: startup chain-id check, tip, a real settled transfer verified through an UPPERCASED recipient with the sender pinned, underpayment / wrong-sender / unknown-tx all rejected, balance read.
  • alw miner quotes --help shows --hype-price/--hype-address; alw config shows the hype-network row; alw config set --help lists mainnet | testnet — all derived, none hand-written.

Notes

  • The program needs nothing: chains are opaque strings, and an unlisted chain gets the 600s default fulfillment grace, far above 2 × 1s confirmations.
  • A fifth spoke dilutes the zero-volume emission floor to (1−α)/pairs, as with every added pair.
  • das-allways companion: entrius/das-allways#86. Its CI drift gate stays red until this merges (it reads chains.py from test); verified green against this branch with ALLWAYS_BRANCH=feat/hype-spoke.

@LandynDev
LandynDev changed the base branch from test to refactor/evm-coin-and-chain-cli August 10, 2026 21:51
@LandynDev
LandynDev force-pushed the feat/hype-spoke branch 2 times, most recently from a8e6037 to 55494a0 Compare August 10, 2026 22:11
@LandynDev
LandynDev force-pushed the refactor/evm-coin-and-chain-cli branch from 113b991 to e060176 Compare August 10, 2026 22:21
@LandynDev
LandynDev force-pushed the refactor/evm-coin-and-chain-cli branch from e060176 to 0743697 Compare August 10, 2026 22:29
HyperEVM is a plain EVM JSON-RPC chain, so the pair is a registry row plus a
binding of the shared EvmCoin — no contract, DB or consumer changes.

- chains.py: hype, 18 decimals, 1s blocks, 2 confirmations (HyperBFT
  finalizes on inclusion), mainnet 999 / testnet 998.
- assets/hyperliquid.py: the Hype binding, 8 lines.
- evm_coin.py: the deposit scanner's block walk gains a hard ceiling so a
  sub-second chain cannot spend hundreds of RPC calls per pass.
- Verified live on both networks: startup chain-id check, settled-transfer
  verification through mixed-case recipients with the sender pinned,
  underpayment and unknown-tx rejection, balance reads.
@LandynDev
LandynDev changed the base branch from refactor/evm-coin-and-chain-cli to test August 10, 2026 22:38
@LandynDev
LandynDev merged commit e0f129d into test Aug 11, 2026
3 checks passed
@anderdc
anderdc deleted the feat/hype-spoke branch August 12, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant