@oracle-agent/oracle 0.35.49 → 0.35.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +3 -2
  2. package/artifacts/specialist-packs/oracle-full-crypto.json +11 -0
  3. package/dist/agent-sessions.mjs +19 -19
  4. package/dist/artifacts/token-dashboard.mjs +1 -1
  5. package/dist/assets/profiles/near-agent/SOUL.md +46 -0
  6. package/dist/assets/profiles/near-agent/profile.json +30 -0
  7. package/dist/assets/profiles/oracle/SOUL.md +1 -0
  8. package/dist/assets/skills/oracle-desk-product/SKILL.md +1 -1
  9. package/dist/assets/skills/oracle-near/SKILL.md +66 -0
  10. package/dist/automation-plan.mjs +1 -1
  11. package/dist/bin/desk-server.mjs +33 -33
  12. package/dist/bin/oracle-data-mcp.mjs +16 -16
  13. package/dist/bin/oracle-gateway.mjs +3 -3
  14. package/dist/bin/oracle-launch-radar-shadow.mjs +3 -3
  15. package/dist/bin/oracle-mev-arb-shadow.mjs +4 -4
  16. package/dist/bin/oracle-mev-shadow.mjs +4 -4
  17. package/dist/bin/oracle-public-server.mjs +5 -5
  18. package/dist/bin/oracle-route.mjs +27 -27
  19. package/dist/bin/oracle-scan.mjs +3 -3
  20. package/dist/bin/oracle-telegram-mcp.mjs +1 -1
  21. package/dist/chains.mjs +1 -1
  22. package/dist/cli/commands/account.mjs +22 -22
  23. package/dist/cli/commands/agent-session.mjs +23 -23
  24. package/dist/cli/commands/auth.mjs +16 -15
  25. package/dist/cli/commands/chain.mjs +5 -5
  26. package/dist/cli/commands/chat.mjs +310 -228
  27. package/dist/cli/commands/data.mjs +37 -37
  28. package/dist/cli/commands/doctor.mjs +5 -5
  29. package/dist/cli/commands/eval.mjs +249 -167
  30. package/dist/cli/commands/farm.mjs +1 -1
  31. package/dist/cli/commands/follow.mjs +4 -4
  32. package/dist/cli/commands/harness.mjs +5 -5
  33. package/dist/cli/commands/mint.mjs +11 -11
  34. package/dist/cli/commands/model.mjs +313 -231
  35. package/dist/cli/commands/project.mjs +8 -7
  36. package/dist/cli/commands/quickstart.mjs +2 -2
  37. package/dist/cli/commands/receipt.mjs +2 -2
  38. package/dist/cli/commands/resolve.mjs +4 -4
  39. package/dist/cli/commands/session-vault.mjs +4 -4
  40. package/dist/cli/commands/setup.mjs +53 -52
  41. package/dist/cli/commands/snipe.mjs +13 -13
  42. package/dist/cli/commands/strategy.mjs +5 -5
  43. package/dist/cli/commands/swap.mjs +11 -11
  44. package/dist/cli/commands/telegram.mjs +7 -7
  45. package/dist/cli/commands/venues.mjs +1 -1
  46. package/dist/cli/project-access.mjs +4 -3
  47. package/dist/data/desk-data.mjs +31 -31
  48. package/dist/data/holder-table.mjs +2 -2
  49. package/dist/data/market-tape.mjs +1 -1
  50. package/dist/data/names.mjs +3 -3
  51. package/dist/data/providers/farming.mjs +2 -2
  52. package/dist/data/providers/lp-destination-discovery.mjs +4 -4
  53. package/dist/index.mjs +49 -49
  54. package/dist/launch-radar/index.mjs +5 -5
  55. package/dist/lp/index.mjs +4 -4
  56. package/dist/nft/universal-mint-router.mjs +4 -4
  57. package/dist/notifications/index.mjs +1 -1
  58. package/dist/router/index.mjs +3 -3
  59. package/dist/router/prepare-bridge.mjs +2 -2
  60. package/dist/router/prepare-route.mjs +3 -3
  61. package/dist/scanner/index.mjs +3 -3
  62. package/dist/strategy/index.mjs +4 -4
  63. package/dist/task.mjs +1 -1
  64. package/dist/teams/index.mjs +6 -6
  65. package/dist/telegram/chart-card.mjs +5 -5
  66. package/dist/telegram/market-commands.mjs +1 -1
  67. package/dist/tui/standalone-client.mjs +179 -97
  68. package/package.json +2 -2
  69. package/public/oracle-splash/assets/desktop-app.jpg +0 -0
  70. package/public/oracle-splash/docs/browser-and-web/index.html +2 -2
  71. package/public/oracle-splash/docs/connectors/index.html +2 -2
  72. package/public/oracle-splash/docs/getting-started/index.html +2 -2
  73. package/public/oracle-splash/docs/index.html +3 -3
  74. package/public/oracle-splash/docs/reference/index.html +2 -2
  75. package/public/oracle-splash/docs/security/index.html +2 -2
  76. package/public/oracle-splash/docs/using-oracle/index.html +2 -2
  77. package/public/oracle-splash/download/index.html +219 -5
  78. package/public/oracle-splash/downloads/index.html +1 -1
  79. package/public/oracle-splash/eval/index.html +19 -19
  80. package/public/oracle-splash/eval/releases/oracle-0.35.49.json +852 -0
  81. package/public/oracle-splash/index.html +262 -37
  82. package/public/oracle-splash/pricing/index.html +215 -1
  83. package/public/oracle-splash/security/index.html +215 -1
  84. package/public/oracle-splash/what-it-does/index.html +215 -1
  85. package/public/oracle-splash/where-it-works/index.html +215 -1
  86. package/server.json +2 -2
@@ -1,5 +1,5 @@
1
- var ce=/^0x[0-9a-f]{40}$/;function le(e){let t=String(e||"").trim();if(!t||t.includes("ts.net")||!/^https:\/\//i.test(t))return null;try{return new URL(t)}catch{return null}}function D(e,{chainId:t,token:n,side:a,sizeUsd:r,user:o}={}){let i=le(e);if(!i)return null;let s=Number(t),d=String(n||"").trim().toLowerCase();return!Number.isInteger(s)||s<=0||!ce.test(d)||a!=="buy"&&a!=="sell"?null:(i.searchParams.set("view","spot"),i.searchParams.set("chain",String(s)),i.searchParams.set("token",d),i.searchParams.set("side",a),Number.isFinite(Number(r))&&Number(r)>=1&&i.searchParams.set("size",String(Math.min(1e5,Math.round(Number(r))))),i.searchParams.set("build","1"),o&&/^0x[0-9a-fA-F]{40}$/.test(String(o))&&i.searchParams.set("user",String(o).toLowerCase()),i.toString())}var q=Object.freeze([{key:"ethereum",chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://etherscan.io",dexscreenerSlug:"ethereum",venueKind:"uniswap-v3",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",stableQuoteAssets:["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.71 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}}]},{key:"optimism",chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://optimistic.etherscan.io",dexscreenerSlug:"optimism",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1905.23 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}}]},{key:"bsc",chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],nativeCurrency:{symbol:"BNB",decimals:18},explorer:"https://bscscan.com",dexscreenerSlug:"bsc",venueKind:"uniswap-v3",wrappedNative:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",stableQuoteAssets:["0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d","0x55d398326f99059fF775485246999027B3197955"],venues:[{kind:"quoter",address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WBNB->USDC fee 500 quoted 413.86 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}},{kind:"router",address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}}]},{key:"polygon",chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],nativeCurrency:{symbol:"POL",decimals:18},explorer:"https://polygonscan.com",dexscreenerSlug:"polygon",venueKind:"uniswap-v3",wrappedNative:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",stableQuoteAssets:["0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WMATIC->USDC fee 500 quoted 0.0720 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}}]},{key:"stable",chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],nativeCurrency:{symbol:"USDT0",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x5d442b349590a6048Eb2dC0eC346cAA5F47A9ab5",venues:[{kind:"quoter",address:"0xb070179E7032CdA868b53e6C1742F80c9e940d1A",label:"Uniswap V3 QuoterV2 (canonical)",verified:{method:"Stable is on the OFFICIAL Uniswap v3 Deployments List (governance-recognised 2026-05-12, UAC process completed 2026-04, deployed by Protofire), so this is a canonical deployment rather than a fork. eth_getCode returned 8273 bytes, the same size as the canonical quoter on the seven already-verified chains. Functional probe on a live pool (TOAST -> USDT0, fee 10000): 100 in -> 0.000003, 1000 -> 0.000031, 10000 -> 0.000319 USDT0. Output scales monotonically with input, which is a working quoter answering, not a revert. Two of three sampled pools carry non-zero liquidity. NOTE: the pools discovered so far are thin, so real routing size is limited -- the venue is proved, deep liquidity is not.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:988}},{kind:"router",address:"0x32eaf9B5d5F2CD7361c5012890C943D7de84C22a",label:"Uniswap SwapRouter02 (canonical)",verified:{method:"eth_getCode returned 24497 bytes. Cross-checked on-chain rather than trusted from docs: router.factory() returns 0x88f0a512ef09175d456bc9547f914f48c013e4aa, the same v3 core factory that created the pools quoted above, and router.WETH9() returns the wrappedNative recorded on this chain entry. Address published in the Stable docs DEX reference and the Uniswap deployments list.",source:"docs.stable.xyz/en/reference/dexes + on-chain factory()/WETH9() round-trip",date:"2026-08-05",chainId:988}}]},{key:"hyperevm",chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],nativeCurrency:{symbol:"HYPE",decimals:18},dexscreenerSlug:"hyperevm",venueKind:"uniswap-v3",wrappedNative:"0x5555555555555555555555555555555555555555",venues:[{kind:"quoter",address:"0x03A918028f22D9E1473B7959C927AD7425A45C7C",label:"HyperSwap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle(1 WHYPE -> USDT0) returned live output on all four fee tiers (100: 57.3385, 500: 57.4187, 3000: 57.3237, 10000: 56.1963 USDT0). Decimals read on-chain: WHYPE 18, USDT0 6. Best tier checked against an INDEPENDENT control the same minute -- Hyperliquid allMids put HYPE at 57.3205, so the pool is 0.171% from the perp mid, which is the right shape for fee plus impact rather than a wrong contract or a decimals bug.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}},{kind:"router",address:"0x4E2960a8cd19B467b82d26D83fAcb0fAE26b094D",label:"HyperSwap V3 SwapRouter",verified:{method:"eth_getCode returned 12070 bytes, and it is the router paired with the quoter proved above -- the same pair already shipped in UNI_V3_VENUES[999].hyperswap, which is the map the quote/prepare path actually routes through.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}}]},{key:"abstract",chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x3439153EB7AF838Ad19d56E1571FBD09333C2809",venues:[{kind:"quoter",address:"0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693",label:"Uniswap V3 QuoterV2 (Abstract deployment)",verified:{method:"Abstract is a ZK-stack chain, so CREATE2 addresses differ and the canonical Uniswap addresses are NOT valid here -- probing them returns codesize 0, which is what previously made this chain look like it had no V3 at all. Found the real deployment from live traffic instead: scanned recent Swap(...) logs, took the busiest pool, read pool.factory() = 0xa1160e73b63f322ae88cc2d8e700833e71d0b2a1, then enumerated that factory's deployer (0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e) and probed each of its 56 contracts with a real quoteExactInputSingle call. Exactly one answered: 1 WETH -> 1846.475731 USDC.e at fee 500. Independent sanity check: the pool's own slot0() spot price is 1873.11 USDC.e per WETH, so the quoter sits ~1.4% below spot, the right shape for fee plus price impact on this size.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:2741}},{kind:"router",address:"0x7712FA47387542819d4E35A23f8116C90C18767C",label:"Uniswap SwapRouter02 (Abstract deployment)",verified:{method:"eth_getCode returned 167392 bytes and the runtime contains the exactInputSingle selector. router.factory() matches the factory proved above and router.WETH9() matches the wrappedNative on this entry. Chosen over its byte-identical twin (0xfD6257F4...) because this is the address real users actually route through: it appeared as tx.to on live swaps against the WETH/USDC.e pool.",source:"on-chain factory()/WETH9() round-trip + live swap tx.to sampling",date:"2026-08-05",chainId:2741}}]},{key:"robinhood",chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC","ROBINHOOD_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},dexscreenerSlug:"robinhood",venueKind:"uniswap-v3",wrappedNative:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",stableQuoteAssets:["0x5fc5360d0400a0fd4f2af552add042d716f1d168"],venues:[{kind:"quoter",address:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDG fee 100 quoted 1866.58 USDG, and USDG->CASHCAT fee 10000 quoted a live amount). A contract that correctly prices known pairs IS a working V3 quoter",source:"live eth_call against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"router",address:"0xcaf681a66d020601342297493863e78c959e5cb2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode (24497 bytes) on this chain and the paired quoter at the same deployment passed a live functional quote",source:"live eth_getCode against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"factory",address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",label:"Uniswap V3 Factory",verified:{method:"eth_getCode returned real bytecode (24535 bytes) and a PoolCreated log scan over this factory returned 76 pools in ~9000 recent blocks",source:"live eth_getLogs against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}}]},{key:"base",chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://basescan.org",dexscreenerSlug:"base",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],venues:[{kind:"quoter",address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",label:"Uniswap V3 QuoterV2 (Base)",verified:{method:"functional probe: quoteExactInputSingle returned WETH->USDC at fee 500 = 1908.44 USDC, a live sane price. The canonical mainnet quoter address also has bytecode on Base but does NOT price this pair, which is exactly the false positive a codesize-only check accepts",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router",address:"0x2626664c2603336E57B271c5C0b26F421741e481",label:"Uniswap V3 SwapRouter02 (Base)",verified:{method:"eth_getCode returned real bytecode and the paired Base quoter passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router-v2",address:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",label:"Uniswap V2 Router02 (Base)",verified:{method:"eth_getCode returned 17891 bytes; live getAmountsOut on WETH->USDC round-tripped to 98.75% (2x0.30% fee + impact)",source:"https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments",date:"2026-07-30",chainId:8453}}]},{key:"arbitrum",chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://arbiscan.io",dexscreenerSlug:"arbitrum",venueKind:"uniswap-v3",wrappedNative:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",stableQuoteAssets:["0xaf88d065e77c8cC2239327C5EDb3A432268e5831","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.72 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}}]},{key:"avalanche",chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],nativeCurrency:{symbol:"AVAX",decimals:18},explorer:"https://snowtrace.io",dexscreenerSlug:"avalanche",venueKind:"uniswap-v3",wrappedNative:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",stableQuoteAssets:["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],venues:[{kind:"quoter",address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WAVAX->USDC fee 500 quoted 6.48 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}},{kind:"router",address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}}]}]);var B=Object.freeze({1:"https://eth.blockscout.com",10:"https://explorer.optimism.io",137:"https://polygon.blockscout.com",324:"https://zksync.blockscout.com",8453:"https://base.blockscout.com",42161:"https://arbitrum.blockscout.com",534352:"https://scrollscan.com"}),H=4663,O="https://robinhoodchain.blockscout.com";var ue=/^0x[0-9a-f]{64}$/,de=/^0x[0-9a-f]{40}$/;function F(e){return String(e||"").trim().replace(/\/+$/,"")}function pe(e){let t=Number(e);return!Number.isInteger(t)||t<=0?null:q.find(n=>Number(n.chainId)===t)||null}function V(e){let t=Number(e);if(!Number.isInteger(t)||t<=0)return null;let n=pe(t);return n?.explorer&&/^https:\/\//i.test(String(n.explorer))?F(n.explorer):B[t]?F(B[t]):t===H?F(O):null}function M(e,t){let n=V(e),a=String(t||"").trim().toLowerCase();return!n||!ue.test(a)?null:`${n}/tx/${a}`}function j(e,t){let n=V(e),a=String(t||"").trim().toLowerCase();return!n||!de.test(a)?null:`${n}/token/${a}`}var K=/^0x[0-9a-f]{40}$/,he=Object.freeze([100,50,25]),fe=Object.freeze([100,50,25,10]);function A(e){let t=String(e||"").trim().toLowerCase();if(!t)return"";let n=t.startsWith("0x")?t:`0x${t}`;return K.test(n)?n:""}function me({platform:e="telegram",chainId:t,token:n,owned:a=!1,guest:r=!1,chartsBase:o,buySizes:i=he,sellPcts:s=fe,chartUrl:d,explorerUrl:m}={}){let l=A(n),p=Number(t),c=String(o||"").trim(),u=String(d||"").trim(),h=String(m||"").trim(),f=[];u&&f.push({text:"Chart",url:u}),h&&f.push({text:"Explorer",url:h});let v=[],w=[];if(!r&&Number.isInteger(p)&&p>0&&l&&c)if(a){let C=[];for(let y of s){let g=Math.max(1,Math.min(100,Number(y)||0)),E=D(c,{chainId:p,token:l,side:"sell",sizeUsd:g});E&&C.push({text:g===100?"Sell all":`${g}%`,url:E})}C.length&&(w.push(C.slice(0,2)),C.length>2&&w.push(C.slice(2,4)))}else for(let C of i){let y=Math.max(1,Number(C)||0),g=D(c,{chainId:p,token:l,side:"buy",sizeUsd:y});g&&v.push({text:`Buy $${y}`,url:g})}let x=[f,v,...w].filter(C=>C.length>0),k=a?"Sell opens the graph. CONFIRM there with your wallet. Telegram never sends.":"Buy opens the graph sized. CONFIRM there with your wallet. Telegram never sends.";if(String(e)==="telegram")return{kind:"inline_keyboard",replyMarkup:{inline_keyboard:x},cancelHint:r?"guest \u2014 chart only":k};let R=[],_=0;for(let C of x)for(let y of C)_+=1,R.push(y.url?`${_}. ${y.text}: ${y.url}`:`${_}. ${y.text}`);return{kind:"text_menu",text:R.join(`
2
- `),cancelHint:r?"guest \u2014 chart only":k}}var z=/^0x[0-9a-f]{64}$/,W=/^[a-z0-9-]{4,40}$/i;function Q({platform:e="telegram",artifactId:t,chainId:n,token:a,wallet:r,txHash:o,txUrl:i,tokenUrl:s,chartUrl:d,explorerUrl:m,guest:l=!1,...p}={}){let c=me({platform:e,chainId:n,token:a,chartUrl:d,explorerUrl:m,guest:l,...p}),u=String(t||"").trim().toLowerCase(),h=A(a),f=Number(n),v=Number.isInteger(f)&&f>0,w=String(s||d||"").trim()||v&&h&&j(f,h)||"",x=String(o||"").trim().toLowerCase(),k=String(i||"").trim(),R=v&&z.test(x)&&M(f,x)||"",_=z.test(x)&&String(m||"").trim()?`${String(m).trim().replace(/\/(address|token)\/.*$/,"").replace(/\/$/,"")}/tx/${x}`:"",C=k||_||R,y=K.test(String(r||"").trim().toLowerCase()),g=[];if(w&&g.push({text:"Token",url:w}),!l&&y&&W.test(u)&&g.push({text:"Bag",callback_data:`oracle:card:bag:${u}`}),C&&g.push({text:"Tx",url:C}),!l&&y&&W.test(u)&&g.push({text:"Follow",callback_data:`oracle:card:follow:${u}`}),String(e)==="telegram"){let S=[...c.replyMarkup?.inline_keyboard||[]];return g.length&&S.push(g),{kind:"inline_keyboard",replyMarkup:{inline_keyboard:S},cancelHint:c.cancelHint}}let E=[c.text].filter(Boolean),$=E.length?c.text.split(`
3
- `).length:0;for(let S of g)$+=1,E.push(S.url?`${$}. ${S.text}: ${S.url}`:`${$}. ${S.text}`);return{kind:"text_menu",text:E.join(`
4
- `),cancelHint:c.cancelHint}}var X={robinhood:{chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC"],evm:!0},ethereum:{chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],evm:!0},polygon:{chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],evm:!0},arbitrum:{chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],evm:!0},base:{chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],evm:!0},hyperevm:{chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],evm:!0},bsc:{chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],evm:!0},avalanche:{chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],evm:!0},optimism:{chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],evm:!0},abstract:{chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],evm:!0},stable:{chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],evm:!0}};var b="unknown",N=Object.freeze(["1h","4h","1d"]),Z="oracle:card:chart-iv",J=1e3,T=new Set(N),ee=/^[a-z0-9-]{4,40}$/i,P=/^0x[0-9a-f]{40}$/i,be=/^oracle:card:chart-iv:([a-z0-9-]{4,40}):(1h|4h|1d)$/i,ve=/^\/chart(?:@[\w]+)?(?:\s+(.*))?$/is,Ce=/^[A-Za-z0-9][A-Za-z0-9._-]{0,15}$/,te=/^[A-Za-z0-9][A-Za-z0-9._-]{0,15}[/-][A-Za-z0-9][A-Za-z0-9._-]{0,15}$/;function Y(e){let t=String(e||"");return P.test(t)?`${t.slice(0,6)}\u2026${t.slice(-4)}`:t||b}function L(e,{estimated:t=!1,digits:n=0}={}){if(e===b||e==null)return b;let a=Number(e);if(!Number.isFinite(a))return b;let r=Math.abs(a),o;return r>=1e9?o=`${(r/1e9).toFixed(2)}B`:r>=1e6?o=`${(r/1e6).toFixed(2)}M`:r>=1e3?o=`${(r/1e3).toFixed(1)}K`:r>=1?o=r.toLocaleString("en-US",{maximumFractionDigits:n}):r===0?o="0":o=r.toPrecision(3).replace(/\.?0+$/,""),`${a<0?"-":""}${t?"~":""}$${o}`}function I(e,{estimated:t=!1}={}){if(e===b||e==null)return b;let n=Number(e);if(!Number.isFinite(n))return b;let a=Math.abs(n),r;return a>=1e3?r=a.toLocaleString("en-US",{maximumFractionDigits:0}):a>=1?r=a.toFixed(a>=100?1:3).replace(/\.?0+$/,""):a===0?r="0":r=a.toPrecision(3).replace(/\.?0+$/,""),`${n<0?"-":""}${t?"~":""}${r}`}function ge(e){if(e===b||e==null)return b;let t=Number(e);return Number.isFinite(t)?`${t>=0?"+":""}${t.toFixed(1)}%`:b}function ye(e,t){if(e==null||e===b)return b;let n=typeof e=="number"?e:new Date(e).getTime();if(!Number.isFinite(n))return b;let a=Math.max(0,Math.round((t-n)/1e3));if(a<60)return`${a}s ago`;let r=Math.round(a/60);if(r<60)return`${r}m ago`;let o=Math.round(r/60);return o<24?`${o}h ago`:`${Math.round(o/24)}d ago`}function xe(e,t){return e.length<=t?e:`${e.slice(0,t-1)}\u2026`}function G(e){return String(e).replace(/\*\*/g,"")}function U(e){if(e==null)return{label:b,token:"",pair:"",wallet:""};if(typeof e=="string"){let i=e.trim(),s=A(i);return{label:s?Y(s):i||b,token:s,pair:te.test(i)?i:"",wallet:""}}let t=A(e.token||e.address||""),n=String(e.pair||"").trim(),r=String(e.symbol||e.label||"").trim()||n||(t?Y(t):b),o=P.test(String(e.wallet||""))?String(e.wallet).toLowerCase():"";return{label:r,token:t,pair:n,wallet:o}}function re(e,t){let n=String(e||"").trim().replace(/\/+$/,""),a=String(t||"").trim().toLowerCase();return!/^https?:\/\//i.test(n)||!ee.test(a)?null:`${n}/chart/${a}`}function ne(e={}){let t=[],n=Array.isArray(e?.trades)?e.trades:[];if(n.length){let o=0,i=0;for(let d of n)String(d?.side||"").toLowerCase()==="sell"?i+=1:o+=1;let s=n.some(d=>d?.followed===!0||d?.origin==="follow")?" by followed wallets":"";t.push(`${o} buy${o===1?"":"s"} / ${i} sell${i===1?"":"s"}${s}`)}let a=e?.lp;if(a&&typeof a=="object"){let o=Number(a.low??a.min??a.lower),i=Number(a.high??a.max??a.upper);if(Number.isFinite(o)&&Number.isFinite(i)){let s=a.inRange===!0?" (in range)":a.inRange===!1?" (out of range)":"";t.push(`LP range ${I(o)}\u2013${I(i)}${s}`)}else t.push("LP range unknown")}let r=Array.isArray(e?.levels)?e.levels:[];if(r.length){let o=r.slice(0,4).map(i=>{let s=String(i?.label||i?.kind||"lvl").toUpperCase().slice(0,8),d=i?.price??i?.px;return`${s} ${I(d)}`});t.push(`levels ${o.join(", ")}${r.length>4?` +${r.length-4}`:""}`)}return t.join(" \xB7 ")}function ae(e={},{now:t=Date.now(),chartsBase:n}={}){let a=U(e.subject),r=String(e.chain?.name||"").trim()||(e.chain?.id!=null?`chain ${e.chain.id}`:b),o=T.has(String(e.interval))?String(e.interval):b,i=e.stats&&typeof e.stats=="object"?e.stats:{},s=i.estimated===!0,d=Array.isArray(e.series?.candles)?e.series.candles:[],m=d.length?Number(d[d.length-1]?.[4]):NaN,l=i.priceUsd??(Number.isFinite(m)?m:void 0),p=[];p.push(G(`${a.label} \xB7 ${r} \xB7 ${o}`)),p.push(`price ${l==null?b:`${s||i.priceEstimated===!0?"~":""}$${I(l)}`} \xB7 24h ${ge(i.change24hPct)} \xB7 vol ${L(i.volume24hUsd,{estimated:s||i.volumeEstimated===!0})}`),p.push(`mcap ${L(i.mcapUsd,{estimated:s||i.mcapEstimated===!0})} \xB7 liq ${L(i.liquidityUsd,{estimated:s||i.liquidityEstimated===!0})} \xB7 ${d.length?`${d.length} bars`:"bars unknown"}`);let c=ne(e.overlays);c&&p.push(G(c));let u=e.source,h=typeof u=="string"?u:String(u?.name||u?.id||"").trim(),f=typeof u=="object"&&u?u.observedAt??u.fetchedAt:void 0;return p.push(`src: ${h||b} \xB7 ${ye(f??e.generatedAt,t)}`),p.push("Tap 1h / 4h / 1d to redraw. Open chart is live. Nothing here signs or sends."),xe(p.join(`
5
- `),J)}function we(e,t){return N.map(n=>({text:n===t?`[${n}]`:n,callback_data:`${Z}:${e}:${n}`}))}function ie(e={}){let t=U(e.subject),n=Array.isArray(e.series?.candles)?e.series.candles:[],a=[];for(let c of n){if(!Array.isArray(c)||c.length<5)continue;let[u,h,f,v,w,x]=c.map(Number);[u,h,f,v,w].every(Number.isFinite)&&a.push({t:u,o:h,h:f,l:v,c:w,v:Number.isFinite(x)?x:0})}let r=e.overlays&&typeof e.overlays=="object"?e.overlays:{},o=[];for(let c of Array.isArray(r.trades)?r.trades:[]){let u=Number(c?.t??c?.observedAt),h=Number(c?.px??c?.priceUsd??c?.price);!Number.isFinite(u)||!Number.isFinite(h)||o.push({t:u,px:h,side:String(c?.side||"buy").toLowerCase()==="sell"?"sell":"buy"})}let i=null,s=r.lp;if(s&&typeof s=="object"){let c=Number(s.low??s.min??s.lower),u=Number(s.high??s.max??s.upper);Number.isFinite(c)&&Number.isFinite(u)&&(i={low:Math.min(c,u),high:Math.max(c,u),label:"LP"})}let d=null,m=null,l=[];for(let c of Array.isArray(r.levels)?r.levels:[]){let u=Number(c?.price??c?.px);if(!Number.isFinite(u))continue;let h=String(c?.kind||c?.label||"").toLowerCase();h.includes("avg")||h.includes("entry")?d=d??u:h.includes("stop")?m=m??u:l.push(u)}i&&l.length===0&&l.push(i.low,i.high);let p=String(e.chain?.name||"").trim();return{renderer:"render_ohlc_card",artifactId:String(e.id||"").toLowerCase(),interval:String(e.interval||""),venue:p?p.toLowerCase().replace(/\s+/g,"-"):"evm",symbol:t.label,pair:t.pair||null,market:"SPOT",source:typeof e.source=="string"?e.source:String(e.source?.name||"LIVE"),rows:a,trades:o,band:i,avg_entry:d,targets:l,stop:m}}function oe({artifact:e,chartsBase:t,guest:n=!1,wallet:a,tokenUrl:r,explorerUrl:o,now:i=Date.now()}={}){if(!e||e.kind!=="chart")throw new TypeError("chart artifact required");let s=String(e.id||"").trim().toLowerCase();if(!ee.test(s))throw new TypeError("chart artifact id required");let d=U(e.subject),m=T.has(String(e.interval))?String(e.interval):null,l=re(t,s),p=[];l&&p.push([{text:"Open chart",url:l}]),p.push(we(s,m));let c=P.test(String(a||""))?String(a).toLowerCase():d.wallet,u=Q({artifactId:s,chainId:e.chain?.id,token:d.token,wallet:c,tokenUrl:r,explorerUrl:o,chartsBase:t,guest:n===!0});for(let h of u.replyMarkup?.inline_keyboard||[]){let f=h.filter(v=>v.url||/^oracle:card:(bag|follow):/i.test(String(v.callback_data||"")));f.length&&p.push(f)}return{caption:ae(e,{now:i,chartsBase:t}),replyMarkup:{inline_keyboard:p},pngRequest:ie(e),openUrl:l,interval:m}}function se(e){let t=String(e||"").trim().match(be);return t?{id:t[1].toLowerCase(),interval:t[2].toLowerCase()}:null}function Se(e,t){return e?typeof e.get=="function"?e.get(t)||null:e.artifacts&&typeof e.artifacts=="object"&&e.artifacts[t]||null:null}function Ee(e,t,n){if(e){if(typeof e.set=="function"){e.set(t,n);return}if(typeof e.put=="function"){e.put(t,n);return}e.artifacts&&typeof e.artifacts=="object"&&(e.artifacts[t]=n)}}async function Ae({data:e,store:t,refresh:n,render:a=null,edit:r,message:o=null,chartsBase:i,guest:s=!1,wallet:d,now:m=Date.now()}={}){let l=se(e);if(!l)return null;let p=Se(t,l.id);if(!p||p.kind!=="chart")return null;if(String(p.interval)===l.interval)return{ok:!0,edited:!1,unchanged:!0,interval:l.interval,artifact:p};if(typeof n!="function")return{ok:!1,edited:!1,reason:"refresh unavailable",interval:l.interval};let c;try{c=await n({artifact:p,interval:l.interval})}catch(v){return{ok:!1,edited:!1,reason:`refresh failed: ${String(v?.message||v).slice(0,120)}`,interval:l.interval}}if(!c||c.kind!=="chart")return{ok:!1,edited:!1,reason:"refresh returned no chart",interval:l.interval};let u={...c,id:l.id,interval:l.interval};Ee(t,l.id,u);let h=oe({artifact:u,chartsBase:i,guest:s,wallet:d,now:m}),f=null;if(typeof a=="function")try{f=await a(h.pngRequest)}catch{f=null}return typeof r!="function"?{ok:!1,edited:!1,reason:"edit unavailable",interval:l.interval,artifact:u,caption:h.caption,replyMarkup:h.replyMarkup,png:f}:(await r({message:o,id:l.id,interval:l.interval,caption:h.caption,replyMarkup:h.replyMarkup,png:f}),{ok:!0,edited:!0,interval:l.interval,artifact:u,caption:h.caption,replyMarkup:h.replyMarkup,png:f})}function _e(e,t){let n=String(e||"").trim();if(!n)return null;if(/^\d+$/.test(n)){let r=Number(n);return Number.isSafeInteger(r)&&r>0?{id:r,name:null}:null}if(typeof t=="function"){let r=t(n);if(Number.isInteger(r)&&r>0)return{id:r,name:null}}let a=n.toLowerCase();for(let[r,o]of Object.entries(X))if(r===a||String(o.name||"").toLowerCase()===a)return{id:o.chainId,name:o.name};return null}function ke(e,{resolveChain:t=null,defaultInterval:n="1h"}={}){let a=String(e||"").trim().match(ve);if(!a)return null;let r=(a[1]||"").trim().split(/\s+/).filter(Boolean),o="Usage: /chart <chain> <token|pair> [1h|4h|1d] \u2014 e.g. /chart base 0x\u2026 4h";if(r.length<2||r.length>3)return{cmd:"chart",error:o};let i=_e(r[0],t);if(!i)return{cmd:"chart",error:`Unknown chain "${r[0].slice(0,24)}". ${o}`};let s=r[1],d,m=A(s);if(m)d={token:m};else{if(/^0x/i.test(s))return{cmd:"chart",error:`Bad token or pair "${s.slice(0,24)}". ${o}`};if(te.test(s))d={pair:s.toUpperCase()};else if(Ce.test(s))d={symbol:s.toUpperCase()};else return{cmd:"chart",error:`Bad token or pair "${s.slice(0,24)}". ${o}`}}let l=String(n||"1h").toLowerCase();if(r.length===3){let p=r[2].toLowerCase();if(!T.has(p))return{cmd:"chart",error:`Interval must be one of ${N.join(", ")}. ${o}`};l=p}return{cmd:"chart",chainId:i.id,chainName:i.name,subject:d,interval:l}}var He={CHART_INTERVALS:N,CHART_CALLBACK_PREFIX:Z,MAX_CAPTION:J,chartSubject:U,chartOpenUrl:re,overlaySummary:ne,chartCaption:ae,chartPngRequest:ie,chartCard:oe,parseChartCallback:se,handleChartCallback:Ae,parseChartCommand:ke};export{Z as CHART_CALLBACK_PREFIX,N as CHART_INTERVALS,J as MAX_CAPTION,b as UNKNOWN,ae as chartCaption,oe as chartCard,re as chartOpenUrl,ie as chartPngRequest,U as chartSubject,He as default,Ae as handleChartCallback,ne as overlaySummary,se as parseChartCallback,ke as parseChartCommand};
1
+ var ce=/^0x[0-9a-f]{40}$/;function le(e){let t=String(e||"").trim();if(!t||t.includes("ts.net")||!/^https:\/\//i.test(t))return null;try{return new URL(t)}catch{return null}}function D(e,{chainId:t,token:n,side:a,sizeUsd:r,user:o}={}){let i=le(e);if(!i)return null;let s=Number(t),d=String(n||"").trim().toLowerCase();return!Number.isInteger(s)||s<=0||!ce.test(d)||a!=="buy"&&a!=="sell"?null:(i.searchParams.set("view","spot"),i.searchParams.set("chain",String(s)),i.searchParams.set("token",d),i.searchParams.set("side",a),Number.isFinite(Number(r))&&Number(r)>=1&&i.searchParams.set("size",String(Math.min(1e5,Math.round(Number(r))))),i.searchParams.set("build","1"),o&&/^0x[0-9a-fA-F]{40}$/.test(String(o))&&i.searchParams.set("user",String(o).toLowerCase()),i.toString())}var q=Object.freeze([{key:"ethereum",chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://etherscan.io",dexscreenerSlug:"ethereum",venueKind:"uniswap-v3",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",stableQuoteAssets:["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.71 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}}]},{key:"optimism",chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://optimistic.etherscan.io",dexscreenerSlug:"optimism",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1905.23 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}}]},{key:"bsc",chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],nativeCurrency:{symbol:"BNB",decimals:18},explorer:"https://bscscan.com",dexscreenerSlug:"bsc",venueKind:"uniswap-v3",wrappedNative:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",stableQuoteAssets:["0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d","0x55d398326f99059fF775485246999027B3197955"],venues:[{kind:"quoter",address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WBNB->USDC fee 500 quoted 413.86 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}},{kind:"router",address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}}]},{key:"polygon",chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],nativeCurrency:{symbol:"POL",decimals:18},explorer:"https://polygonscan.com",dexscreenerSlug:"polygon",venueKind:"uniswap-v3",wrappedNative:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",stableQuoteAssets:["0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WMATIC->USDC fee 500 quoted 0.0720 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}}]},{key:"stable",chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],nativeCurrency:{symbol:"USDT0",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x5d442b349590a6048Eb2dC0eC346cAA5F47A9ab5",venues:[{kind:"quoter",address:"0xb070179E7032CdA868b53e6C1742F80c9e940d1A",label:"Uniswap V3 QuoterV2 (canonical)",verified:{method:"Stable is on the OFFICIAL Uniswap v3 Deployments List (governance-recognised 2026-05-12, UAC process completed 2026-04, deployed by Protofire), so this is a canonical deployment rather than a fork. eth_getCode returned 8273 bytes, the same size as the canonical quoter on the seven already-verified chains. Functional probe on a live pool (TOAST -> USDT0, fee 10000): 100 in -> 0.000003, 1000 -> 0.000031, 10000 -> 0.000319 USDT0. Output scales monotonically with input, which is a working quoter answering, not a revert. Two of three sampled pools carry non-zero liquidity. NOTE: the pools discovered so far are thin, so real routing size is limited -- the venue is proved, deep liquidity is not.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:988}},{kind:"router",address:"0x32eaf9B5d5F2CD7361c5012890C943D7de84C22a",label:"Uniswap SwapRouter02 (canonical)",verified:{method:"eth_getCode returned 24497 bytes. Cross-checked on-chain rather than trusted from docs: router.factory() returns 0x88f0a512ef09175d456bc9547f914f48c013e4aa, the same v3 core factory that created the pools quoted above, and router.WETH9() returns the wrappedNative recorded on this chain entry. Address published in the Stable docs DEX reference and the Uniswap deployments list.",source:"docs.stable.xyz/en/reference/dexes + on-chain factory()/WETH9() round-trip",date:"2026-08-05",chainId:988}}]},{key:"hyperevm",chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],nativeCurrency:{symbol:"HYPE",decimals:18},dexscreenerSlug:"hyperevm",venueKind:"uniswap-v3",wrappedNative:"0x5555555555555555555555555555555555555555",venues:[{kind:"quoter",address:"0x03A918028f22D9E1473B7959C927AD7425A45C7C",label:"HyperSwap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle(1 WHYPE -> USDT0) returned live output on all four fee tiers (100: 57.3385, 500: 57.4187, 3000: 57.3237, 10000: 56.1963 USDT0). Decimals read on-chain: WHYPE 18, USDT0 6. Best tier checked against an INDEPENDENT control the same minute -- Hyperliquid allMids put HYPE at 57.3205, so the pool is 0.171% from the perp mid, which is the right shape for fee plus impact rather than a wrong contract or a decimals bug.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}},{kind:"router",address:"0x4E2960a8cd19B467b82d26D83fAcb0fAE26b094D",label:"HyperSwap V3 SwapRouter",verified:{method:"eth_getCode returned 12070 bytes, and it is the router paired with the quoter proved above -- the same pair already shipped in UNI_V3_VENUES[999].hyperswap, which is the map the quote/prepare path actually routes through.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}}]},{key:"abstract",chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x3439153EB7AF838Ad19d56E1571FBD09333C2809",venues:[{kind:"quoter",address:"0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693",label:"Uniswap V3 QuoterV2 (Abstract deployment)",verified:{method:"Abstract is a ZK-stack chain, so CREATE2 addresses differ and the canonical Uniswap addresses are NOT valid here -- probing them returns codesize 0, which is what previously made this chain look like it had no V3 at all. Found the real deployment from live traffic instead: scanned recent Swap(...) logs, took the busiest pool, read pool.factory() = 0xa1160e73b63f322ae88cc2d8e700833e71d0b2a1, then enumerated that factory's deployer (0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e) and probed each of its 56 contracts with a real quoteExactInputSingle call. Exactly one answered: 1 WETH -> 1846.475731 USDC.e at fee 500. Independent sanity check: the pool's own slot0() spot price is 1873.11 USDC.e per WETH, so the quoter sits ~1.4% below spot, the right shape for fee plus price impact on this size.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:2741}},{kind:"router",address:"0x7712FA47387542819d4E35A23f8116C90C18767C",label:"Uniswap SwapRouter02 (Abstract deployment)",verified:{method:"eth_getCode returned 167392 bytes and the runtime contains the exactInputSingle selector. router.factory() matches the factory proved above and router.WETH9() matches the wrappedNative on this entry. Chosen over its byte-identical twin (0xfD6257F4...) because this is the address real users actually route through: it appeared as tx.to on live swaps against the WETH/USDC.e pool.",source:"on-chain factory()/WETH9() round-trip + live swap tx.to sampling",date:"2026-08-05",chainId:2741}}]},{key:"robinhood",chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC","ROBINHOOD_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},dexscreenerSlug:"robinhood",venueKind:"uniswap-v3",wrappedNative:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",stableQuoteAssets:["0x5fc5360d0400a0fd4f2af552add042d716f1d168"],venues:[{kind:"quoter",address:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDG fee 100 quoted 1866.58 USDG, and USDG->CASHCAT fee 10000 quoted a live amount). A contract that correctly prices known pairs IS a working V3 quoter",source:"live eth_call against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"router",address:"0xcaf681a66d020601342297493863e78c959e5cb2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode (24497 bytes) on this chain and the paired quoter at the same deployment passed a live functional quote",source:"live eth_getCode against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"factory",address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",label:"Uniswap V3 Factory",verified:{method:"eth_getCode returned real bytecode (24535 bytes) and a PoolCreated log scan over this factory returned 76 pools in ~9000 recent blocks",source:"live eth_getLogs against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}}]},{key:"base",chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://basescan.org",dexscreenerSlug:"base",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],venues:[{kind:"quoter",address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",label:"Uniswap V3 QuoterV2 (Base)",verified:{method:"functional probe: quoteExactInputSingle returned WETH->USDC at fee 500 = 1908.44 USDC, a live sane price. The canonical mainnet quoter address also has bytecode on Base but does NOT price this pair, which is exactly the false positive a codesize-only check accepts",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router",address:"0x2626664c2603336E57B271c5C0b26F421741e481",label:"Uniswap V3 SwapRouter02 (Base)",verified:{method:"eth_getCode returned real bytecode and the paired Base quoter passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router-v2",address:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",label:"Uniswap V2 Router02 (Base)",verified:{method:"eth_getCode returned 17891 bytes; live getAmountsOut on WETH->USDC round-tripped to 98.75% (2x0.30% fee + impact)",source:"https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments",date:"2026-07-30",chainId:8453}}]},{key:"arbitrum",chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://arbiscan.io",dexscreenerSlug:"arbitrum",venueKind:"uniswap-v3",wrappedNative:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",stableQuoteAssets:["0xaf88d065e77c8cC2239327C5EDb3A432268e5831","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.72 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}}]},{key:"avalanche",chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],nativeCurrency:{symbol:"AVAX",decimals:18},explorer:"https://snowtrace.io",dexscreenerSlug:"avalanche",venueKind:"uniswap-v3",wrappedNative:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",stableQuoteAssets:["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],venues:[{kind:"quoter",address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WAVAX->USDC fee 500 quoted 6.48 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}},{kind:"router",address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}}]}]);var B=Object.freeze({1:"https://eth.blockscout.com",10:"https://explorer.optimism.io",137:"https://polygon.blockscout.com",324:"https://zksync.blockscout.com",8453:"https://base.blockscout.com",42161:"https://arbitrum.blockscout.com",534352:"https://scrollscan.com"}),H=4663,O="https://robinhoodchain.blockscout.com";var ue=/^0x[0-9a-f]{64}$/,de=/^0x[0-9a-f]{40}$/;function F(e){return String(e||"").trim().replace(/\/+$/,"")}function pe(e){let t=Number(e);return!Number.isInteger(t)||t<=0?null:q.find(n=>Number(n.chainId)===t)||null}function V(e){let t=Number(e);if(!Number.isInteger(t)||t<=0)return null;let n=pe(t);return n?.explorer&&/^https:\/\//i.test(String(n.explorer))?F(n.explorer):B[t]?F(B[t]):t===H?F(O):null}function M(e,t){let n=V(e),a=String(t||"").trim().toLowerCase();return!n||!ue.test(a)?null:`${n}/tx/${a}`}function j(e,t){let n=V(e),a=String(t||"").trim().toLowerCase();return!n||!de.test(a)?null:`${n}/token/${a}`}var K=/^0x[0-9a-f]{40}$/,he=Object.freeze([100,50,25]),fe=Object.freeze([100,50,25,10]);function A(e){let t=String(e||"").trim().toLowerCase();if(!t)return"";let n=t.startsWith("0x")?t:`0x${t}`;return K.test(n)?n:""}function me({platform:e="telegram",chainId:t,token:n,owned:a=!1,guest:r=!1,chartsBase:o,buySizes:i=he,sellPcts:s=fe,chartUrl:d,explorerUrl:m}={}){let l=A(n),p=Number(t),c=String(o||"").trim(),u=String(d||"").trim(),h=String(m||"").trim(),f=[];u&&f.push({text:"Chart",url:u}),h&&f.push({text:"Explorer",url:h});let v=[],w=[];if(!r&&Number.isInteger(p)&&p>0&&l&&c)if(a){let C=[];for(let g of s){let y=Math.max(1,Math.min(100,Number(g)||0)),E=D(c,{chainId:p,token:l,side:"sell",sizeUsd:y});E&&C.push({text:y===100?"Sell all":`${y}%`,url:E})}C.length&&(w.push(C.slice(0,2)),C.length>2&&w.push(C.slice(2,4)))}else for(let C of i){let g=Math.max(1,Number(C)||0),y=D(c,{chainId:p,token:l,side:"buy",sizeUsd:g});y&&v.push({text:`Buy $${g}`,url:y})}let x=[f,v,...w].filter(C=>C.length>0),R=a?"Sell opens the graph. CONFIRM there with your wallet. Telegram never sends.":"Buy opens the graph sized. CONFIRM there with your wallet. Telegram never sends.";if(String(e)==="telegram")return{kind:"inline_keyboard",replyMarkup:{inline_keyboard:x},cancelHint:r?"guest \u2014 chart only":R};let k=[],_=0;for(let C of x)for(let g of C)_+=1,k.push(g.url?`${_}. ${g.text}: ${g.url}`:`${_}. ${g.text}`);return{kind:"text_menu",text:k.join(`
2
+ `),cancelHint:r?"guest \u2014 chart only":R}}var z=/^0x[0-9a-f]{64}$/,W=/^[a-z0-9-]{4,40}$/i;function Q({platform:e="telegram",artifactId:t,chainId:n,token:a,wallet:r,txHash:o,txUrl:i,tokenUrl:s,chartUrl:d,explorerUrl:m,guest:l=!1,...p}={}){let c=me({platform:e,chainId:n,token:a,chartUrl:d,explorerUrl:m,guest:l,...p}),u=String(t||"").trim().toLowerCase(),h=A(a),f=Number(n),v=Number.isInteger(f)&&f>0,w=String(s||d||"").trim()||v&&h&&j(f,h)||"",x=String(o||"").trim().toLowerCase(),R=String(i||"").trim(),k=v&&z.test(x)&&M(f,x)||"",_=z.test(x)&&String(m||"").trim()?`${String(m).trim().replace(/\/(address|token)\/.*$/,"").replace(/\/$/,"")}/tx/${x}`:"",C=R||_||k,g=K.test(String(r||"").trim().toLowerCase()),y=[];if(w&&y.push({text:"Token",url:w}),!l&&g&&W.test(u)&&y.push({text:"Bag",callback_data:`oracle:card:bag:${u}`}),C&&y.push({text:"Tx",url:C}),!l&&g&&W.test(u)&&y.push({text:"Follow",callback_data:`oracle:card:follow:${u}`}),String(e)==="telegram"){let S=[...c.replyMarkup?.inline_keyboard||[]];return y.length&&S.push(y),{kind:"inline_keyboard",replyMarkup:{inline_keyboard:S},cancelHint:c.cancelHint}}let E=[c.text].filter(Boolean),$=E.length?c.text.split(`
3
+ `).length:0;for(let S of y)$+=1,E.push(S.url?`${$}. ${S.text}: ${S.url}`:`${$}. ${S.text}`);return{kind:"text_menu",text:E.join(`
4
+ `),cancelHint:c.cancelHint}}var Y={robinhood:{chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC"],evm:!0},ethereum:{chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],evm:!0},polygon:{chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],evm:!0},arbitrum:{chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],evm:!0},base:{chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],evm:!0},hyperevm:{chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],evm:!0},bsc:{chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],evm:!0},avalanche:{chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],evm:!0},optimism:{chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],evm:!0},abstract:{chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],evm:!0},stable:{chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],evm:!0},elysium:{chainId:1339,name:"Elysium",rpcEnv:["ELYSIUM_RPC_URL"],evm:!0,readOnly:!0}};var b="unknown",U=Object.freeze(["1h","4h","1d"]),Z="oracle:card:chart-iv",J=1e3,P=new Set(U),ee=/^[a-z0-9-]{4,40}$/i,T=/^0x[0-9a-f]{40}$/i,be=/^oracle:card:chart-iv:([a-z0-9-]{4,40}):(1h|4h|1d)$/i,ve=/^\/chart(?:@[\w]+)?(?:\s+(.*))?$/is,Ce=/^[A-Za-z0-9][A-Za-z0-9._-]{0,15}$/,te=/^[A-Za-z0-9][A-Za-z0-9._-]{0,15}[/-][A-Za-z0-9][A-Za-z0-9._-]{0,15}$/;function X(e){let t=String(e||"");return T.test(t)?`${t.slice(0,6)}\u2026${t.slice(-4)}`:t||b}function L(e,{estimated:t=!1,digits:n=0}={}){if(e===b||e==null)return b;let a=Number(e);if(!Number.isFinite(a))return b;let r=Math.abs(a),o;return r>=1e9?o=`${(r/1e9).toFixed(2)}B`:r>=1e6?o=`${(r/1e6).toFixed(2)}M`:r>=1e3?o=`${(r/1e3).toFixed(1)}K`:r>=1?o=r.toLocaleString("en-US",{maximumFractionDigits:n}):r===0?o="0":o=r.toPrecision(3).replace(/\.?0+$/,""),`${a<0?"-":""}${t?"~":""}$${o}`}function I(e,{estimated:t=!1}={}){if(e===b||e==null)return b;let n=Number(e);if(!Number.isFinite(n))return b;let a=Math.abs(n),r;return a>=1e3?r=a.toLocaleString("en-US",{maximumFractionDigits:0}):a>=1?r=a.toFixed(a>=100?1:3).replace(/\.?0+$/,""):a===0?r="0":r=a.toPrecision(3).replace(/\.?0+$/,""),`${n<0?"-":""}${t?"~":""}${r}`}function ye(e){if(e===b||e==null)return b;let t=Number(e);return Number.isFinite(t)?`${t>=0?"+":""}${t.toFixed(1)}%`:b}function ge(e,t){if(e==null||e===b)return b;let n=typeof e=="number"?e:new Date(e).getTime();if(!Number.isFinite(n))return b;let a=Math.max(0,Math.round((t-n)/1e3));if(a<60)return`${a}s ago`;let r=Math.round(a/60);if(r<60)return`${r}m ago`;let o=Math.round(r/60);return o<24?`${o}h ago`:`${Math.round(o/24)}d ago`}function xe(e,t){return e.length<=t?e:`${e.slice(0,t-1)}\u2026`}function G(e){return String(e).replace(/\*\*/g,"")}function N(e){if(e==null)return{label:b,token:"",pair:"",wallet:""};if(typeof e=="string"){let i=e.trim(),s=A(i);return{label:s?X(s):i||b,token:s,pair:te.test(i)?i:"",wallet:""}}let t=A(e.token||e.address||""),n=String(e.pair||"").trim(),r=String(e.symbol||e.label||"").trim()||n||(t?X(t):b),o=T.test(String(e.wallet||""))?String(e.wallet).toLowerCase():"";return{label:r,token:t,pair:n,wallet:o}}function re(e,t){let n=String(e||"").trim().replace(/\/+$/,""),a=String(t||"").trim().toLowerCase();return!/^https?:\/\//i.test(n)||!ee.test(a)?null:`${n}/chart/${a}`}function ne(e={}){let t=[],n=Array.isArray(e?.trades)?e.trades:[];if(n.length){let o=0,i=0;for(let d of n)String(d?.side||"").toLowerCase()==="sell"?i+=1:o+=1;let s=n.some(d=>d?.followed===!0||d?.origin==="follow")?" by followed wallets":"";t.push(`${o} buy${o===1?"":"s"} / ${i} sell${i===1?"":"s"}${s}`)}let a=e?.lp;if(a&&typeof a=="object"){let o=Number(a.low??a.min??a.lower),i=Number(a.high??a.max??a.upper);if(Number.isFinite(o)&&Number.isFinite(i)){let s=a.inRange===!0?" (in range)":a.inRange===!1?" (out of range)":"";t.push(`LP range ${I(o)}\u2013${I(i)}${s}`)}else t.push("LP range unknown")}let r=Array.isArray(e?.levels)?e.levels:[];if(r.length){let o=r.slice(0,4).map(i=>{let s=String(i?.label||i?.kind||"lvl").toUpperCase().slice(0,8),d=i?.price??i?.px;return`${s} ${I(d)}`});t.push(`levels ${o.join(", ")}${r.length>4?` +${r.length-4}`:""}`)}return t.join(" \xB7 ")}function ae(e={},{now:t=Date.now(),chartsBase:n}={}){let a=N(e.subject),r=String(e.chain?.name||"").trim()||(e.chain?.id!=null?`chain ${e.chain.id}`:b),o=P.has(String(e.interval))?String(e.interval):b,i=e.stats&&typeof e.stats=="object"?e.stats:{},s=i.estimated===!0,d=Array.isArray(e.series?.candles)?e.series.candles:[],m=d.length?Number(d[d.length-1]?.[4]):NaN,l=i.priceUsd??(Number.isFinite(m)?m:void 0),p=[];p.push(G(`${a.label} \xB7 ${r} \xB7 ${o}`)),p.push(`price ${l==null?b:`${s||i.priceEstimated===!0?"~":""}$${I(l)}`} \xB7 24h ${ye(i.change24hPct)} \xB7 vol ${L(i.volume24hUsd,{estimated:s||i.volumeEstimated===!0})}`),p.push(`mcap ${L(i.mcapUsd,{estimated:s||i.mcapEstimated===!0})} \xB7 liq ${L(i.liquidityUsd,{estimated:s||i.liquidityEstimated===!0})} \xB7 ${d.length?`${d.length} bars`:"bars unknown"}`);let c=ne(e.overlays);c&&p.push(G(c));let u=e.source,h=typeof u=="string"?u:String(u?.name||u?.id||"").trim(),f=typeof u=="object"&&u?u.observedAt??u.fetchedAt:void 0;return p.push(`src: ${h||b} \xB7 ${ge(f??e.generatedAt,t)}`),p.push("Tap 1h / 4h / 1d to redraw. Open chart is live. Nothing here signs or sends."),xe(p.join(`
5
+ `),J)}function we(e,t){return U.map(n=>({text:n===t?`[${n}]`:n,callback_data:`${Z}:${e}:${n}`}))}function ie(e={}){let t=N(e.subject),n=Array.isArray(e.series?.candles)?e.series.candles:[],a=[];for(let c of n){if(!Array.isArray(c)||c.length<5)continue;let[u,h,f,v,w,x]=c.map(Number);[u,h,f,v,w].every(Number.isFinite)&&a.push({t:u,o:h,h:f,l:v,c:w,v:Number.isFinite(x)?x:0})}let r=e.overlays&&typeof e.overlays=="object"?e.overlays:{},o=[];for(let c of Array.isArray(r.trades)?r.trades:[]){let u=Number(c?.t??c?.observedAt),h=Number(c?.px??c?.priceUsd??c?.price);!Number.isFinite(u)||!Number.isFinite(h)||o.push({t:u,px:h,side:String(c?.side||"buy").toLowerCase()==="sell"?"sell":"buy"})}let i=null,s=r.lp;if(s&&typeof s=="object"){let c=Number(s.low??s.min??s.lower),u=Number(s.high??s.max??s.upper);Number.isFinite(c)&&Number.isFinite(u)&&(i={low:Math.min(c,u),high:Math.max(c,u),label:"LP"})}let d=null,m=null,l=[];for(let c of Array.isArray(r.levels)?r.levels:[]){let u=Number(c?.price??c?.px);if(!Number.isFinite(u))continue;let h=String(c?.kind||c?.label||"").toLowerCase();h.includes("avg")||h.includes("entry")?d=d??u:h.includes("stop")?m=m??u:l.push(u)}i&&l.length===0&&l.push(i.low,i.high);let p=String(e.chain?.name||"").trim();return{renderer:"render_ohlc_card",artifactId:String(e.id||"").toLowerCase(),interval:String(e.interval||""),venue:p?p.toLowerCase().replace(/\s+/g,"-"):"evm",symbol:t.label,pair:t.pair||null,market:"SPOT",source:typeof e.source=="string"?e.source:String(e.source?.name||"LIVE"),rows:a,trades:o,band:i,avg_entry:d,targets:l,stop:m}}function oe({artifact:e,chartsBase:t,guest:n=!1,wallet:a,tokenUrl:r,explorerUrl:o,now:i=Date.now()}={}){if(!e||e.kind!=="chart")throw new TypeError("chart artifact required");let s=String(e.id||"").trim().toLowerCase();if(!ee.test(s))throw new TypeError("chart artifact id required");let d=N(e.subject),m=P.has(String(e.interval))?String(e.interval):null,l=re(t,s),p=[];l&&p.push([{text:"Open chart",url:l}]),p.push(we(s,m));let c=T.test(String(a||""))?String(a).toLowerCase():d.wallet,u=Q({artifactId:s,chainId:e.chain?.id,token:d.token,wallet:c,tokenUrl:r,explorerUrl:o,chartsBase:t,guest:n===!0});for(let h of u.replyMarkup?.inline_keyboard||[]){let f=h.filter(v=>v.url||/^oracle:card:(bag|follow):/i.test(String(v.callback_data||"")));f.length&&p.push(f)}return{caption:ae(e,{now:i,chartsBase:t}),replyMarkup:{inline_keyboard:p},pngRequest:ie(e),openUrl:l,interval:m}}function se(e){let t=String(e||"").trim().match(be);return t?{id:t[1].toLowerCase(),interval:t[2].toLowerCase()}:null}function Se(e,t){return e?typeof e.get=="function"?e.get(t)||null:e.artifacts&&typeof e.artifacts=="object"&&e.artifacts[t]||null:null}function Ee(e,t,n){if(e){if(typeof e.set=="function"){e.set(t,n);return}if(typeof e.put=="function"){e.put(t,n);return}e.artifacts&&typeof e.artifacts=="object"&&(e.artifacts[t]=n)}}async function Ae({data:e,store:t,refresh:n,render:a=null,edit:r,message:o=null,chartsBase:i,guest:s=!1,wallet:d,now:m=Date.now()}={}){let l=se(e);if(!l)return null;let p=Se(t,l.id);if(!p||p.kind!=="chart")return null;if(String(p.interval)===l.interval)return{ok:!0,edited:!1,unchanged:!0,interval:l.interval,artifact:p};if(typeof n!="function")return{ok:!1,edited:!1,reason:"refresh unavailable",interval:l.interval};let c;try{c=await n({artifact:p,interval:l.interval})}catch(v){return{ok:!1,edited:!1,reason:`refresh failed: ${String(v?.message||v).slice(0,120)}`,interval:l.interval}}if(!c||c.kind!=="chart")return{ok:!1,edited:!1,reason:"refresh returned no chart",interval:l.interval};let u={...c,id:l.id,interval:l.interval};Ee(t,l.id,u);let h=oe({artifact:u,chartsBase:i,guest:s,wallet:d,now:m}),f=null;if(typeof a=="function")try{f=await a(h.pngRequest)}catch{f=null}return typeof r!="function"?{ok:!1,edited:!1,reason:"edit unavailable",interval:l.interval,artifact:u,caption:h.caption,replyMarkup:h.replyMarkup,png:f}:(await r({message:o,id:l.id,interval:l.interval,caption:h.caption,replyMarkup:h.replyMarkup,png:f}),{ok:!0,edited:!0,interval:l.interval,artifact:u,caption:h.caption,replyMarkup:h.replyMarkup,png:f})}function _e(e,t){let n=String(e||"").trim();if(!n)return null;if(/^\d+$/.test(n)){let r=Number(n);return Number.isSafeInteger(r)&&r>0?{id:r,name:null}:null}if(typeof t=="function"){let r=t(n);if(Number.isInteger(r)&&r>0)return{id:r,name:null}}let a=n.toLowerCase();for(let[r,o]of Object.entries(Y))if(r===a||String(o.name||"").toLowerCase()===a)return{id:o.chainId,name:o.name};return null}function Re(e,{resolveChain:t=null,defaultInterval:n="1h"}={}){let a=String(e||"").trim().match(ve);if(!a)return null;let r=(a[1]||"").trim().split(/\s+/).filter(Boolean),o="Usage: /chart <chain> <token|pair> [1h|4h|1d] \u2014 e.g. /chart base 0x\u2026 4h";if(r.length<2||r.length>3)return{cmd:"chart",error:o};let i=_e(r[0],t);if(!i)return{cmd:"chart",error:`Unknown chain "${r[0].slice(0,24)}". ${o}`};let s=r[1],d,m=A(s);if(m)d={token:m};else{if(/^0x/i.test(s))return{cmd:"chart",error:`Bad token or pair "${s.slice(0,24)}". ${o}`};if(te.test(s))d={pair:s.toUpperCase()};else if(Ce.test(s))d={symbol:s.toUpperCase()};else return{cmd:"chart",error:`Bad token or pair "${s.slice(0,24)}". ${o}`}}let l=String(n||"1h").toLowerCase();if(r.length===3){let p=r[2].toLowerCase();if(!P.has(p))return{cmd:"chart",error:`Interval must be one of ${U.join(", ")}. ${o}`};l=p}return{cmd:"chart",chainId:i.id,chainName:i.name,subject:d,interval:l}}var He={CHART_INTERVALS:U,CHART_CALLBACK_PREFIX:Z,MAX_CAPTION:J,chartSubject:N,chartOpenUrl:re,overlaySummary:ne,chartCaption:ae,chartPngRequest:ie,chartCard:oe,parseChartCallback:se,handleChartCallback:Ae,parseChartCommand:Re};export{Z as CHART_CALLBACK_PREFIX,U as CHART_INTERVALS,J as MAX_CAPTION,b as UNKNOWN,ae as chartCaption,oe as chartCard,re as chartOpenUrl,ie as chartPngRequest,N as chartSubject,He as default,Ae as handleChartCallback,ne as overlaySummary,se as parseChartCallback,Re as parseChartCommand};
@@ -1,2 +1,2 @@
1
- import{AsyncLocalStorage as E}from"node:async_hooks";var U=new E;var W=Object.getOwnPropertyDescriptor(AbortSignal.prototype,"aborted")?.get,K=Object.getOwnPropertyDescriptor(AbortSignal.prototype,"reason")?.get,G=AbortSignal.prototype.throwIfAborted,Q=EventTarget.prototype.addEventListener,Y=EventTarget.prototype.removeEventListener,X=typeof AbortSignal.any=="function"?AbortSignal.any.bind(AbortSignal):null;var J=64*1024,Z=Object.freeze({depth:32,nodes:1e4,fields:1e4,arrayLength:1e4,bytes:1024*1024});var h={robinhood:{chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC"],evm:!0},ethereum:{chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],evm:!0},polygon:{chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],evm:!0},arbitrum:{chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],evm:!0},base:{chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],evm:!0},hyperevm:{chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],evm:!0},bsc:{chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],evm:!0},avalanche:{chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],evm:!0},optimism:{chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],evm:!0},abstract:{chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],evm:!0},stable:{chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],evm:!0}};var ne=new Map(Object.values(h).map(e=>[e.chainId,e]));import{Interface as A,getAddress as de}from"ethers";var pe=new A(["function allowance(address owner,address spender) view returns (uint256)","function balanceOf(address account) view returns (uint256)"]);var ye=Object.freeze({1:"ethereum",10:"optimism",56:"bsc",137:"polygon",8453:"base",42161:"arbitrum",43114:"avalanche",999:"hyperevm",4663:"robinhood"});var ge=Object.freeze(["blockNumber","nativeBalance","tokenBalance","resolveToken","resolvePools","scanBlocks","scoreRisk","quote","sellSimulation","prepareUnsignedTx"]),m=Object.freeze({LIVE:"LIVE",CACHED:"CACHED",STALE:"STALE",UNKNOWN:"UNKNOWN",UNAVAILABLE:"UNAVAILABLE"}),b=Object.freeze({PASS:"PASS",CAUTION:"CAUTION",FAIL:"FAIL",UNKNOWN:"UNKNOWN"});var u=Object.freeze([{key:"ethereum",chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://etherscan.io",dexscreenerSlug:"ethereum",venueKind:"uniswap-v3",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",stableQuoteAssets:["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.71 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}}]},{key:"optimism",chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://optimistic.etherscan.io",dexscreenerSlug:"optimism",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1905.23 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}}]},{key:"bsc",chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],nativeCurrency:{symbol:"BNB",decimals:18},explorer:"https://bscscan.com",dexscreenerSlug:"bsc",venueKind:"uniswap-v3",wrappedNative:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",stableQuoteAssets:["0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d","0x55d398326f99059fF775485246999027B3197955"],venues:[{kind:"quoter",address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WBNB->USDC fee 500 quoted 413.86 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}},{kind:"router",address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}}]},{key:"polygon",chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],nativeCurrency:{symbol:"POL",decimals:18},explorer:"https://polygonscan.com",dexscreenerSlug:"polygon",venueKind:"uniswap-v3",wrappedNative:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",stableQuoteAssets:["0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WMATIC->USDC fee 500 quoted 0.0720 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}}]},{key:"stable",chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],nativeCurrency:{symbol:"USDT0",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x5d442b349590a6048Eb2dC0eC346cAA5F47A9ab5",venues:[{kind:"quoter",address:"0xb070179E7032CdA868b53e6C1742F80c9e940d1A",label:"Uniswap V3 QuoterV2 (canonical)",verified:{method:"Stable is on the OFFICIAL Uniswap v3 Deployments List (governance-recognised 2026-05-12, UAC process completed 2026-04, deployed by Protofire), so this is a canonical deployment rather than a fork. eth_getCode returned 8273 bytes, the same size as the canonical quoter on the seven already-verified chains. Functional probe on a live pool (TOAST -> USDT0, fee 10000): 100 in -> 0.000003, 1000 -> 0.000031, 10000 -> 0.000319 USDT0. Output scales monotonically with input, which is a working quoter answering, not a revert. Two of three sampled pools carry non-zero liquidity. NOTE: the pools discovered so far are thin, so real routing size is limited -- the venue is proved, deep liquidity is not.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:988}},{kind:"router",address:"0x32eaf9B5d5F2CD7361c5012890C943D7de84C22a",label:"Uniswap SwapRouter02 (canonical)",verified:{method:"eth_getCode returned 24497 bytes. Cross-checked on-chain rather than trusted from docs: router.factory() returns 0x88f0a512ef09175d456bc9547f914f48c013e4aa, the same v3 core factory that created the pools quoted above, and router.WETH9() returns the wrappedNative recorded on this chain entry. Address published in the Stable docs DEX reference and the Uniswap deployments list.",source:"docs.stable.xyz/en/reference/dexes + on-chain factory()/WETH9() round-trip",date:"2026-08-05",chainId:988}}]},{key:"hyperevm",chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],nativeCurrency:{symbol:"HYPE",decimals:18},dexscreenerSlug:"hyperevm",venueKind:"uniswap-v3",wrappedNative:"0x5555555555555555555555555555555555555555",venues:[{kind:"quoter",address:"0x03A918028f22D9E1473B7959C927AD7425A45C7C",label:"HyperSwap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle(1 WHYPE -> USDT0) returned live output on all four fee tiers (100: 57.3385, 500: 57.4187, 3000: 57.3237, 10000: 56.1963 USDT0). Decimals read on-chain: WHYPE 18, USDT0 6. Best tier checked against an INDEPENDENT control the same minute -- Hyperliquid allMids put HYPE at 57.3205, so the pool is 0.171% from the perp mid, which is the right shape for fee plus impact rather than a wrong contract or a decimals bug.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}},{kind:"router",address:"0x4E2960a8cd19B467b82d26D83fAcb0fAE26b094D",label:"HyperSwap V3 SwapRouter",verified:{method:"eth_getCode returned 12070 bytes, and it is the router paired with the quoter proved above -- the same pair already shipped in UNI_V3_VENUES[999].hyperswap, which is the map the quote/prepare path actually routes through.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}}]},{key:"abstract",chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x3439153EB7AF838Ad19d56E1571FBD09333C2809",venues:[{kind:"quoter",address:"0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693",label:"Uniswap V3 QuoterV2 (Abstract deployment)",verified:{method:"Abstract is a ZK-stack chain, so CREATE2 addresses differ and the canonical Uniswap addresses are NOT valid here -- probing them returns codesize 0, which is what previously made this chain look like it had no V3 at all. Found the real deployment from live traffic instead: scanned recent Swap(...) logs, took the busiest pool, read pool.factory() = 0xa1160e73b63f322ae88cc2d8e700833e71d0b2a1, then enumerated that factory's deployer (0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e) and probed each of its 56 contracts with a real quoteExactInputSingle call. Exactly one answered: 1 WETH -> 1846.475731 USDC.e at fee 500. Independent sanity check: the pool's own slot0() spot price is 1873.11 USDC.e per WETH, so the quoter sits ~1.4% below spot, the right shape for fee plus price impact on this size.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:2741}},{kind:"router",address:"0x7712FA47387542819d4E35A23f8116C90C18767C",label:"Uniswap SwapRouter02 (Abstract deployment)",verified:{method:"eth_getCode returned 167392 bytes and the runtime contains the exactInputSingle selector. router.factory() matches the factory proved above and router.WETH9() matches the wrappedNative on this entry. Chosen over its byte-identical twin (0xfD6257F4...) because this is the address real users actually route through: it appeared as tx.to on live swaps against the WETH/USDC.e pool.",source:"on-chain factory()/WETH9() round-trip + live swap tx.to sampling",date:"2026-08-05",chainId:2741}}]},{key:"robinhood",chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC","ROBINHOOD_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},dexscreenerSlug:"robinhood",venueKind:"uniswap-v3",wrappedNative:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",stableQuoteAssets:["0x5fc5360d0400a0fd4f2af552add042d716f1d168"],venues:[{kind:"quoter",address:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDG fee 100 quoted 1866.58 USDG, and USDG->CASHCAT fee 10000 quoted a live amount). A contract that correctly prices known pairs IS a working V3 quoter",source:"live eth_call against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"router",address:"0xcaf681a66d020601342297493863e78c959e5cb2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode (24497 bytes) on this chain and the paired quoter at the same deployment passed a live functional quote",source:"live eth_getCode against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"factory",address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",label:"Uniswap V3 Factory",verified:{method:"eth_getCode returned real bytecode (24535 bytes) and a PoolCreated log scan over this factory returned 76 pools in ~9000 recent blocks",source:"live eth_getLogs against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}}]},{key:"base",chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://basescan.org",dexscreenerSlug:"base",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],venues:[{kind:"quoter",address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",label:"Uniswap V3 QuoterV2 (Base)",verified:{method:"functional probe: quoteExactInputSingle returned WETH->USDC at fee 500 = 1908.44 USDC, a live sane price. The canonical mainnet quoter address also has bytecode on Base but does NOT price this pair, which is exactly the false positive a codesize-only check accepts",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router",address:"0x2626664c2603336E57B271c5C0b26F421741e481",label:"Uniswap V3 SwapRouter02 (Base)",verified:{method:"eth_getCode returned real bytecode and the paired Base quoter passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router-v2",address:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",label:"Uniswap V2 Router02 (Base)",verified:{method:"eth_getCode returned 17891 bytes; live getAmountsOut on WETH->USDC round-tripped to 98.75% (2x0.30% fee + impact)",source:"https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments",date:"2026-07-30",chainId:8453}}]},{key:"arbitrum",chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://arbiscan.io",dexscreenerSlug:"arbitrum",venueKind:"uniswap-v3",wrappedNative:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",stableQuoteAssets:["0xaf88d065e77c8cC2239327C5EDb3A432268e5831","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.72 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}}]},{key:"avalanche",chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],nativeCurrency:{symbol:"AVAX",decimals:18},explorer:"https://snowtrace.io",dexscreenerSlug:"avalanche",venueKind:"uniswap-v3",wrappedNative:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",stableQuoteAssets:["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],venues:[{kind:"quoter",address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WAVAX->USDC fee 500 quoted 6.48 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}},{kind:"router",address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}}]}]);var C=Object.freeze(["whales","top","token","bag","recent"]),s="unknown",g=3500;function T(e){let t=String(e||"").trim().match(/^\/(whales|top|token|bag|recent)(?:@[\w]+)?(?:\s+(.*))?$/i);if(!t)return{cmd:null,args:[]};let o=(t[2]||"").trim().split(/\s+/).filter(Boolean);return{cmd:t[1].toLowerCase(),args:o}}function I(){return u.map(e=>Number(e.chainId)).filter(e=>Number.isInteger(e)&&e>0).sort((e,t)=>e-t)}function v(e){let t=String(e||"").trim();if(!t)return null;if(/^\d+$/.test(t)){let r=Number(t);return Number.isSafeInteger(r)&&r>0?r:null}let o=t.toLowerCase(),n=u.find(r=>String(r.key||"").toLowerCase()===o||String(r.name||"").toLowerCase()===o);return n?Number(n.chainId):null}function N(e=[]){for(let t of e){let o=v(t);if(o!=null)return{chainId:o,arg:t}}return null}function O(e="whales"){let t=u.map(o=>`${o.key} ${o.chainId}`).join(", ");return`Say which chain: /${e} 8453 or /${e} base. Supported: ${t}.`}function a(e){let t=String(e||"");return/^0x[0-9a-f]{40}$/i.test(t)?`${t.slice(0,6)}\u2026${t.slice(-4)}`:t||s}function c(e,t=!1){if(e===s||e==null||!Number.isFinite(Number(e)))return s;let o=Number(e),n=Math.abs(o),r=n>=1?n.toLocaleString("en-US",{maximumFractionDigits:0}):n===0?"0":n.toPrecision(3).replace(/\.?0+$/,"");return`${o<0?"-":""}${t?"~":""}$${r}`}function d(e){if(e===s||e==null||!Number.isFinite(Number(e)))return s;let t=Number(e);return t>=1e9?`${(t/1e9).toFixed(2)}B`:t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t>=1?t.toFixed(2).replace(/\.?0+$/,""):t.toPrecision(3).replace(/\.?0+$/,"")}function p(e,t=Date.now()){let o=Number(e);if(!Number.isFinite(o))return s;let n=Math.max(0,Math.round((t-o)/1e3));if(n<60)return`${n}s ago`;let r=Math.round(n/60);return r<60?`${r}m ago`:`${Math.round(r/60)}h ago`}function y(e,t){let o=[`src: ${e.source||s}`,p(e.observedAt,t)];return e.truncated&&o.push("partial read"),o.join(" \xB7 ")}function l(e){let t=e.join(`
1
+ import{AsyncLocalStorage as E}from"node:async_hooks";var U=new E;var W=Object.getOwnPropertyDescriptor(AbortSignal.prototype,"aborted")?.get,K=Object.getOwnPropertyDescriptor(AbortSignal.prototype,"reason")?.get,G=AbortSignal.prototype.throwIfAborted,Q=EventTarget.prototype.addEventListener,Y=EventTarget.prototype.removeEventListener,X=typeof AbortSignal.any=="function"?AbortSignal.any.bind(AbortSignal):null;var J=64*1024,Z=Object.freeze({depth:32,nodes:1e4,fields:1e4,arrayLength:1e4,bytes:1024*1024});var h={robinhood:{chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC"],evm:!0},ethereum:{chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],evm:!0},polygon:{chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],evm:!0},arbitrum:{chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],evm:!0},base:{chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],evm:!0},hyperevm:{chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],evm:!0},bsc:{chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],evm:!0},avalanche:{chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],evm:!0},optimism:{chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],evm:!0},abstract:{chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],evm:!0},stable:{chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],evm:!0},elysium:{chainId:1339,name:"Elysium",rpcEnv:["ELYSIUM_RPC_URL"],evm:!0,readOnly:!0}};var ne=new Map(Object.values(h).map(e=>[e.chainId,e]));import{Interface as x,getAddress as de}from"ethers";var pe=new x(["function allowance(address owner,address spender) view returns (uint256)","function balanceOf(address account) view returns (uint256)"]);var ye=Object.freeze({1:"ethereum",10:"optimism",56:"bsc",137:"polygon",8453:"base",42161:"arbitrum",43114:"avalanche",999:"hyperevm",4663:"robinhood"});var ge=Object.freeze(["blockNumber","nativeBalance","tokenBalance","resolveToken","resolvePools","scanBlocks","scoreRisk","quote","sellSimulation","prepareUnsignedTx"]),m=Object.freeze({LIVE:"LIVE",CACHED:"CACHED",STALE:"STALE",UNKNOWN:"UNKNOWN",UNAVAILABLE:"UNAVAILABLE"}),b=Object.freeze({PASS:"PASS",CAUTION:"CAUTION",FAIL:"FAIL",UNKNOWN:"UNKNOWN"});var u=Object.freeze([{key:"ethereum",chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://etherscan.io",dexscreenerSlug:"ethereum",venueKind:"uniswap-v3",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",stableQuoteAssets:["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.71 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}}]},{key:"optimism",chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://optimistic.etherscan.io",dexscreenerSlug:"optimism",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1905.23 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}}]},{key:"bsc",chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],nativeCurrency:{symbol:"BNB",decimals:18},explorer:"https://bscscan.com",dexscreenerSlug:"bsc",venueKind:"uniswap-v3",wrappedNative:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",stableQuoteAssets:["0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d","0x55d398326f99059fF775485246999027B3197955"],venues:[{kind:"quoter",address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WBNB->USDC fee 500 quoted 413.86 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}},{kind:"router",address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}}]},{key:"polygon",chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],nativeCurrency:{symbol:"POL",decimals:18},explorer:"https://polygonscan.com",dexscreenerSlug:"polygon",venueKind:"uniswap-v3",wrappedNative:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",stableQuoteAssets:["0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WMATIC->USDC fee 500 quoted 0.0720 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}}]},{key:"stable",chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],nativeCurrency:{symbol:"USDT0",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x5d442b349590a6048Eb2dC0eC346cAA5F47A9ab5",venues:[{kind:"quoter",address:"0xb070179E7032CdA868b53e6C1742F80c9e940d1A",label:"Uniswap V3 QuoterV2 (canonical)",verified:{method:"Stable is on the OFFICIAL Uniswap v3 Deployments List (governance-recognised 2026-05-12, UAC process completed 2026-04, deployed by Protofire), so this is a canonical deployment rather than a fork. eth_getCode returned 8273 bytes, the same size as the canonical quoter on the seven already-verified chains. Functional probe on a live pool (TOAST -> USDT0, fee 10000): 100 in -> 0.000003, 1000 -> 0.000031, 10000 -> 0.000319 USDT0. Output scales monotonically with input, which is a working quoter answering, not a revert. Two of three sampled pools carry non-zero liquidity. NOTE: the pools discovered so far are thin, so real routing size is limited -- the venue is proved, deep liquidity is not.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:988}},{kind:"router",address:"0x32eaf9B5d5F2CD7361c5012890C943D7de84C22a",label:"Uniswap SwapRouter02 (canonical)",verified:{method:"eth_getCode returned 24497 bytes. Cross-checked on-chain rather than trusted from docs: router.factory() returns 0x88f0a512ef09175d456bc9547f914f48c013e4aa, the same v3 core factory that created the pools quoted above, and router.WETH9() returns the wrappedNative recorded on this chain entry. Address published in the Stable docs DEX reference and the Uniswap deployments list.",source:"docs.stable.xyz/en/reference/dexes + on-chain factory()/WETH9() round-trip",date:"2026-08-05",chainId:988}}]},{key:"hyperevm",chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],nativeCurrency:{symbol:"HYPE",decimals:18},dexscreenerSlug:"hyperevm",venueKind:"uniswap-v3",wrappedNative:"0x5555555555555555555555555555555555555555",venues:[{kind:"quoter",address:"0x03A918028f22D9E1473B7959C927AD7425A45C7C",label:"HyperSwap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle(1 WHYPE -> USDT0) returned live output on all four fee tiers (100: 57.3385, 500: 57.4187, 3000: 57.3237, 10000: 56.1963 USDT0). Decimals read on-chain: WHYPE 18, USDT0 6. Best tier checked against an INDEPENDENT control the same minute -- Hyperliquid allMids put HYPE at 57.3205, so the pool is 0.171% from the perp mid, which is the right shape for fee plus impact rather than a wrong contract or a decimals bug.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}},{kind:"router",address:"0x4E2960a8cd19B467b82d26D83fAcb0fAE26b094D",label:"HyperSwap V3 SwapRouter",verified:{method:"eth_getCode returned 12070 bytes, and it is the router paired with the quoter proved above -- the same pair already shipped in UNI_V3_VENUES[999].hyperswap, which is the map the quote/prepare path actually routes through.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}}]},{key:"abstract",chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x3439153EB7AF838Ad19d56E1571FBD09333C2809",venues:[{kind:"quoter",address:"0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693",label:"Uniswap V3 QuoterV2 (Abstract deployment)",verified:{method:"Abstract is a ZK-stack chain, so CREATE2 addresses differ and the canonical Uniswap addresses are NOT valid here -- probing them returns codesize 0, which is what previously made this chain look like it had no V3 at all. Found the real deployment from live traffic instead: scanned recent Swap(...) logs, took the busiest pool, read pool.factory() = 0xa1160e73b63f322ae88cc2d8e700833e71d0b2a1, then enumerated that factory's deployer (0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e) and probed each of its 56 contracts with a real quoteExactInputSingle call. Exactly one answered: 1 WETH -> 1846.475731 USDC.e at fee 500. Independent sanity check: the pool's own slot0() spot price is 1873.11 USDC.e per WETH, so the quoter sits ~1.4% below spot, the right shape for fee plus price impact on this size.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:2741}},{kind:"router",address:"0x7712FA47387542819d4E35A23f8116C90C18767C",label:"Uniswap SwapRouter02 (Abstract deployment)",verified:{method:"eth_getCode returned 167392 bytes and the runtime contains the exactInputSingle selector. router.factory() matches the factory proved above and router.WETH9() matches the wrappedNative on this entry. Chosen over its byte-identical twin (0xfD6257F4...) because this is the address real users actually route through: it appeared as tx.to on live swaps against the WETH/USDC.e pool.",source:"on-chain factory()/WETH9() round-trip + live swap tx.to sampling",date:"2026-08-05",chainId:2741}}]},{key:"robinhood",chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC","ROBINHOOD_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},dexscreenerSlug:"robinhood",venueKind:"uniswap-v3",wrappedNative:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",stableQuoteAssets:["0x5fc5360d0400a0fd4f2af552add042d716f1d168"],venues:[{kind:"quoter",address:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDG fee 100 quoted 1866.58 USDG, and USDG->CASHCAT fee 10000 quoted a live amount). A contract that correctly prices known pairs IS a working V3 quoter",source:"live eth_call against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"router",address:"0xcaf681a66d020601342297493863e78c959e5cb2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode (24497 bytes) on this chain and the paired quoter at the same deployment passed a live functional quote",source:"live eth_getCode against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"factory",address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",label:"Uniswap V3 Factory",verified:{method:"eth_getCode returned real bytecode (24535 bytes) and a PoolCreated log scan over this factory returned 76 pools in ~9000 recent blocks",source:"live eth_getLogs against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}}]},{key:"base",chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://basescan.org",dexscreenerSlug:"base",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],venues:[{kind:"quoter",address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",label:"Uniswap V3 QuoterV2 (Base)",verified:{method:"functional probe: quoteExactInputSingle returned WETH->USDC at fee 500 = 1908.44 USDC, a live sane price. The canonical mainnet quoter address also has bytecode on Base but does NOT price this pair, which is exactly the false positive a codesize-only check accepts",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router",address:"0x2626664c2603336E57B271c5C0b26F421741e481",label:"Uniswap V3 SwapRouter02 (Base)",verified:{method:"eth_getCode returned real bytecode and the paired Base quoter passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router-v2",address:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",label:"Uniswap V2 Router02 (Base)",verified:{method:"eth_getCode returned 17891 bytes; live getAmountsOut on WETH->USDC round-tripped to 98.75% (2x0.30% fee + impact)",source:"https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments",date:"2026-07-30",chainId:8453}}]},{key:"arbitrum",chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://arbiscan.io",dexscreenerSlug:"arbitrum",venueKind:"uniswap-v3",wrappedNative:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",stableQuoteAssets:["0xaf88d065e77c8cC2239327C5EDb3A432268e5831","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.72 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}}]},{key:"avalanche",chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],nativeCurrency:{symbol:"AVAX",decimals:18},explorer:"https://snowtrace.io",dexscreenerSlug:"avalanche",venueKind:"uniswap-v3",wrappedNative:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",stableQuoteAssets:["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],venues:[{kind:"quoter",address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WAVAX->USDC fee 500 quoted 6.48 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}},{kind:"router",address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}}]}]);var C=Object.freeze(["whales","top","token","bag","recent"]),s="unknown",g=3500;function T(e){let t=String(e||"").trim().match(/^\/(whales|top|token|bag|recent)(?:@[\w]+)?(?:\s+(.*))?$/i);if(!t)return{cmd:null,args:[]};let o=(t[2]||"").trim().split(/\s+/).filter(Boolean);return{cmd:t[1].toLowerCase(),args:o}}function I(){return u.map(e=>Number(e.chainId)).filter(e=>Number.isInteger(e)&&e>0).sort((e,t)=>e-t)}function v(e){let t=String(e||"").trim();if(!t)return null;if(/^\d+$/.test(t)){let r=Number(t);return Number.isSafeInteger(r)&&r>0?r:null}let o=t.toLowerCase(),n=u.find(r=>String(r.key||"").toLowerCase()===o||String(r.name||"").toLowerCase()===o);return n?Number(n.chainId):null}function N(e=[]){for(let t of e){let o=v(t);if(o!=null)return{chainId:o,arg:t}}return null}function O(e="whales"){let t=u.map(o=>`${o.key} ${o.chainId}`).join(", ");return`Say which chain: /${e} 8453 or /${e} base. Supported: ${t}.`}function a(e){let t=String(e||"");return/^0x[0-9a-f]{40}$/i.test(t)?`${t.slice(0,6)}\u2026${t.slice(-4)}`:t||s}function c(e,t=!1){if(e===s||e==null||!Number.isFinite(Number(e)))return s;let o=Number(e),n=Math.abs(o),r=n>=1?n.toLocaleString("en-US",{maximumFractionDigits:0}):n===0?"0":n.toPrecision(3).replace(/\.?0+$/,"");return`${o<0?"-":""}${t?"~":""}$${r}`}function d(e){if(e===s||e==null||!Number.isFinite(Number(e)))return s;let t=Number(e);return t>=1e9?`${(t/1e9).toFixed(2)}B`:t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t>=1?t.toFixed(2).replace(/\.?0+$/,""):t.toPrecision(3).replace(/\.?0+$/,"")}function p(e,t=Date.now()){let o=Number(e);if(!Number.isFinite(o))return s;let n=Math.max(0,Math.round((t-o)/1e3));if(n<60)return`${n}s ago`;let r=Math.round(n/60);return r<60?`${r}m ago`:`${Math.round(r/60)}h ago`}function y(e,t){let o=[`src: ${e.source||s}`,p(e.observedAt,t)];return e.truncated&&o.push("partial read"),o.join(" \xB7 ")}function l(e){let t=e.join(`
2
2
  `);return t.length<=g?t:`${t.slice(0,g-1)}\u2026`}function k(e,{now:t=Date.now(),windowMin:o=60}={}){let n=[`Biggest buys \xB7 last ${o}m \xB7 chain ${e.chainId??s}`];return e.rows?.length||n.push("none priced in window"),e.rows?.forEach((r,i)=>{n.push(`${i+1}. ${c(r.usd,r.estimated)} ${r.tokenSymbol||a(r.token)} \xB7 ${a(r.trader)} \xB7 ${d(r.tokenAmount)} for ${d(r.quoteAmount)} ${r.quoteSymbol}`)}),e.unpriced>0&&n.push(`+${e.unpriced} buys without a USD leg (unpriced, not shown)`),n.push(y(e,t)),l(n)}function P(e,{now:t=Date.now(),windowMin:o=60}={}){let n=[`Busiest tokens \xB7 last ${o}m \xB7 chain ${e.chainId??s}`];return e.rows?.length||n.push("no swaps in window"),e.rows?.forEach((r,i)=>{let f=r.unpriced>0&&r.buyUsd===0&&r.sellUsd===0?s:c(r.netUsd);n.push(`${i+1}. ${r.symbol||a(r.token)} \xB7 ${r.swaps} swaps (${r.buys}b/${r.sells}s) \xB7 ${r.traders} wallets \xB7 net ${f}${r.unpriced?` \xB7 ${r.unpriced} unpriced`:""}`)}),n.push(y(e,t)),l(n)}function $(e,{now:t=Date.now(),windowMin:o=60}={}){let n=[`${e.symbol||a(e.token)} \xB7 ${a(e.token)} \xB7 chain ${e.chainId??s}`];return n.push(`last ${o}m: ${e.swaps} swaps \xB7 in ${c(e.buyUsd)} \xB7 out ${c(e.sellUsd)}${e.unpriced?` \xB7 ${e.unpriced} unpriced`:""}`),n.push(`last price: ${e.lastPriceQuote===s?s:`${d(e.lastPriceQuote)} ${e.lastQuoteSymbol}`}`),n.push("in:"),e.ins?.length||n.push(" none"),e.ins?.forEach(r=>n.push(` ${a(r.trader)} +${c(r.netUsd)} (${r.buys}b/${r.sells}s)`)),n.push("out:"),e.outs?.length||n.push(" none"),e.outs?.forEach(r=>n.push(` ${a(r.trader)} ${c(r.netUsd)} (${r.buys}b/${r.sells}s)`)),n.push(y(e,t)),l(n)}function R(e,{now:t=Date.now()}={}){let o=[`Bag \xB7 ${a(e.address)} \xB7 chain ${e.chainId??s}`];return e.tokens===s?o.push(`holdings: unknown${e.reason?` (${e.reason})`:""}${e.error?` (${e.error})`:""}`):(o.push(`${e.tokens} token${e.tokens===1?"":"s"} \xB7 ${c(e.knownUsd)}${e.unknownCount>0?` + ${e.unknownCount} unpriced`:""}`),(e.rows||[]).slice(0,15).forEach(n=>o.push(` ${n.symbol}${n.suspicious?" (unverified ticker)":""} \xB7 ${d(n.amount)} \xB7 ${n.usd==null?s:c(n.usd)}`)),(e.rows||[]).length>15&&o.push(` +${e.rows.length-15} more`)),o.push(`src: ${e.source||"blockscout"} \xB7 ${p(e.observedAt??t,t)}`),l(o)}function L(e,{now:t=Date.now(),source:o=s,observedAt:n}={}){let r=["Recent trades from followed wallets"];return e?.length||r.push("none yet"),e?.slice(0,20).forEach(i=>{let f=i.side==="sell"?"SELL":"BUY";r.push(`${f} ${c(i.usd,i.estimated||i.origin==="curve")} ${i.tokenSymbol||a(i.token)} \xB7 ${i.walletLabel||a(i.wallet)} \xB7 ${p(i.observedAt,t)}`)}),r.push(`src: ${o} \xB7 ${p(n??t,t)}`),l(r)}var Xe={MARKET_COMMANDS:C,parseMarketCommand:T,resolveChainArg:v,findChainArg:N,supportedChainIds:I,chainPrompt:O,renderWhales:k,renderTop:P,renderToken:$,renderBag:R,renderRecent:L};export{C as MARKET_COMMANDS,O as chainPrompt,Xe as default,N as findChainArg,T as parseMarketCommand,R as renderBag,L as renderRecent,$ as renderToken,P as renderTop,k as renderWhales,v as resolveChainArg,I as supportedChainIds};