Commit 089bfb8
feat: add Ink (57073) support (#694)
Phase 3 of the Ink DutchV3 rollout. The reactor and OrderQuoter are
deployed and verified (Uniswap/UniswapX#375) and the SDK mappings are
published in @uniswap/uniswapx-sdk 3.1.0 (Uniswap/sdks#682).
- ChainId.INK added to SUPPORTED_CHAINS (lib/util/chain.ts). Each entry
needs an RPC resolvable by getRpcUrl(chainId), which appends the chainId
to RPC_PREFIX_URL — no per-chain env var required.
- OLDEST_BLOCK_BY_CHAIN[INK] = 52464000. The V3 reactor
(0x000000007A1C8e570011EeDF86A2A35593013cBA) was created in block
52464395 on Ink; verified on-chain that the address has 0 bytes of code
at 52464000 and 17206 bytes at 52464395, so the seed sits just below the
earliest block any UniswapX fill could appear on, per the map's
convention.
- swagger.json's ChainId enum gains 57073, which test/unit/swagger.test.ts
asserts stays in sync with SUPPORTED_CHAINS.
- @uniswap/uniswapx-sdk bumped 3.0.10 -> 3.1.0.
The SDK bump ships with the chain entry because 3.0.10 has no 57073
mappings: order parsing/validation would throw MissingConfiguration out of
getPermit2/getReactor rather than degrade.
No PRIORITY_ORDER_TARGET_BLOCK_BUFFER or HYBRID_ORDER_TARGET_BLOCK_BUFFER
entry is needed. Both are Partial<Record<ChainId, number>> and
OffChainUniswapXOrderValidator.validateReactorAddress rejects
priority/hybrid orders for chains absent from the SDK's reactor mapping
before the buffers are consulted, so a missing entry is unreachable rather
than a build break. No block-time constant either: BLOCKS_IN_24_HOURS
derives from sdk-core's getAverageBlockTimeSecs, which registers Ink at 1s.
Tests: 547 pass. The 14 remaining failures are pre-existing — clean main
reports the identical 14 (field-validator cosigner, order-validator v3).
Before the swagger fix this branch showed 15, i.e. exactly the one
legitimate new failure, now resolved. tsc build clean.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5c1c497 commit 089bfb8
5 files changed
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4702 | 4702 | | |
4703 | 4703 | | |
4704 | 4704 | | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
| 4714 | + | |
| 4715 | + | |
| 4716 | + | |
| 4717 | + | |
| 4718 | + | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
4705 | 4722 | | |
4706 | 4723 | | |
4707 | 4724 | | |
| |||
4738 | 4755 | | |
4739 | 4756 | | |
4740 | 4757 | | |
4741 | | - | |
4742 | | - | |
4743 | | - | |
4744 | | - | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
4745 | 4762 | | |
4746 | 4763 | | |
4747 | 4764 | | |
4748 | 4765 | | |
4749 | 4766 | | |
4750 | | - | |
| 4767 | + | |
4751 | 4768 | | |
4752 | 4769 | | |
4753 | 4770 | | |
| |||
0 commit comments