@parabolicfamily/mcp 0.1.8 → 0.2.1

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 (70) hide show
  1. package/README.md +72 -14
  2. package/abi/ParabolicAggregatorRouter.json +2259 -0
  3. package/abi/ParabolicLaunchFactoryV2.json +2542 -0
  4. package/abi/ParabolicPairProbe.json +429 -0
  5. package/abi/ParabolicRouterV2.json +1171 -0
  6. package/abi/ParabolicSessionModule.json +2317 -0
  7. package/abi/deployments.json +258 -0
  8. package/dist/abi.d.ts +3 -3
  9. package/dist/abi.js +3 -3
  10. package/dist/abi.js.map +1 -1
  11. package/dist/chain.d.ts +12 -1
  12. package/dist/chain.js +13 -4
  13. package/dist/chain.js.map +1 -1
  14. package/dist/chains.d.ts +17 -10
  15. package/dist/chains.js +21 -16
  16. package/dist/chains.js.map +1 -1
  17. package/dist/coins.js +2 -1
  18. package/dist/coins.js.map +1 -1
  19. package/dist/config.d.ts +36 -11
  20. package/dist/config.js +98 -20
  21. package/dist/config.js.map +1 -1
  22. package/dist/deployed.d.ts +80 -0
  23. package/dist/deployed.js +95 -0
  24. package/dist/deployed.js.map +1 -0
  25. package/dist/docs.d.ts +13 -0
  26. package/dist/docs.js +68 -12
  27. package/dist/docs.js.map +1 -1
  28. package/dist/format.d.ts +2 -1
  29. package/dist/format.js +3 -2
  30. package/dist/format.js.map +1 -1
  31. package/dist/parabolic.d.ts +18 -0
  32. package/dist/parabolic.js +65 -13
  33. package/dist/parabolic.js.map +1 -1
  34. package/dist/quote-unit.js +49 -28
  35. package/dist/quote-unit.js.map +1 -1
  36. package/dist/referrals.d.ts +77 -0
  37. package/dist/referrals.js +55 -0
  38. package/dist/referrals.js.map +1 -0
  39. package/dist/restapi.d.ts +4 -3
  40. package/dist/restapi.js +19 -4
  41. package/dist/restapi.js.map +1 -1
  42. package/dist/routed.d.ts +389 -0
  43. package/dist/routed.js +413 -0
  44. package/dist/routed.js.map +1 -0
  45. package/dist/server.d.ts +1 -1
  46. package/dist/server.js +91 -7
  47. package/dist/server.js.map +1 -1
  48. package/dist/tx.d.ts +6 -0
  49. package/dist/tx.js +12 -2
  50. package/dist/tx.js.map +1 -1
  51. package/dist/venues.d.ts +49 -0
  52. package/dist/venues.js +44 -0
  53. package/dist/venues.js.map +1 -0
  54. package/package.json +2 -2
  55. package/src/abi.ts +3 -4
  56. package/src/chain.ts +19 -4
  57. package/src/chains.ts +33 -20
  58. package/src/coins.ts +2 -1
  59. package/src/config.ts +112 -22
  60. package/src/deployed.ts +128 -0
  61. package/src/docs.ts +70 -12
  62. package/src/format.ts +3 -2
  63. package/src/parabolic.ts +69 -13
  64. package/src/quote-unit.ts +47 -6
  65. package/src/referrals.ts +61 -0
  66. package/src/restapi.ts +18 -4
  67. package/src/routed.ts +499 -0
  68. package/src/server.ts +123 -7
  69. package/src/tx.ts +13 -2
  70. package/src/venues.ts +93 -0
package/dist/config.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { type Address } from "viem";
2
+ import { type VenueKey } from "./venues.js";
2
3
  /** Arc's system `Memo` contract (CREATE2, zero salt), verified on Arc Testnet; expected to match on mainnet. */
3
4
  export declare const ARC_MEMO_DEFAULT: Address;
4
5
  /** ERC-20 view of native USDC on Arc (6 decimals, same balance as the 18-decimal native asset). */
@@ -9,10 +10,17 @@ export declare const DEFAULT_API_URL = "https://www.parabolic.family/api/v1";
9
10
  /**
10
11
  * Deployed Parabolic addresses per chain, so the server is useful with no configuration at all.
11
12
  * The source repository is private; these are the same addresses the site publishes at
12
- * https://www.parabolic.family/docs#contracts and that are verified on Arcscan.
13
+ * https://www.parabolic.family/docs#contracts and that are verified on Sourcify.
13
14
  *
14
- * Arc mainnet (5042) opened on 16 September 2026; Parabolic deployed at block 21,105,294 and these are
15
- * the live addresses (contracts/deployments/5042.json). With them in place the default chain is Arc.
15
+ * **No address is written here** (23 Sep 2026, finding F50). Every one is read out of the deployment
16
+ * record the deploy itself produced, through `abi/deployments.json` (src/deployed.ts). This table was
17
+ * three chains typed by hand and chain two was never typed, so the package shipped for four days telling
18
+ * every agent Parabolic was not deployed on Robinhood Chain; syncing a record is now the whole of adding
19
+ * a chain, and `CHAINS[id].live` follows the same file.
20
+ *
21
+ * What stays written here is what no deploy can answer: the **public** JSON-RPC endpoint an unconfigured
22
+ * agent may call (a record holds the deploy machine's endpoint, which on Arc is a keyed provider's), the
23
+ * site that serves the chain, and Arc's ERC-8004 registry, which is Arc's contract and not one of ours.
16
24
  */
17
25
  export declare const DEPLOYMENTS: Record<number, {
18
26
  rpcUrl: string;
@@ -42,11 +50,11 @@ export declare const DEPLOYMENTS: Record<number, {
42
50
  export declare const DEFAULT_CHAIN_ID: number;
43
51
  export declare const DEFAULT_RPC_URL: string;
44
52
  export type Config = {
45
- /** JSON-RPC endpoint for Arc. */
53
+ /** JSON-RPC endpoint for the chain this server serves, which is not always Arc (23 Sep 2026). */
46
54
  rpcUrl: string;
47
55
  /** PARABOLIC_RPC_URL was set to something other than the deployment's own endpoint (a fork, a private node). */
48
56
  rpcOverridden?: boolean;
49
- /** 5042002 = Arc Testnet, 5042 = Arc mainnet (id unofficial until Circle publishes it). */
57
+ /** The chain this server serves: 5042 Arc, 5042002 Arc Testnet, 4663 Robinhood Chain. */
50
58
  chainId: number;
51
59
  /** ParabolicLaunchFactory. Required for on-chain coin lookups and for building launch transactions. */
52
60
  factory?: Address;
@@ -71,10 +79,27 @@ export type Config = {
71
79
  launchConfigId: bigint;
72
80
  /** First block to scan for `TokenLaunched` logs when listing without a subgraph. */
73
81
  factoryStartBlock: bigint;
82
+ /**
83
+ * ParabolicAggregatorRouter, for routed trades on another launchpad's coin (src/routed.ts). From the chain's
84
+ * deployment record (`aggregator`), or from PARABOLIC_AGGREGATOR_ROUTER only where the record names none AND the
85
+ * chain is Anvil or a testnet (`aggregatorEnvHonoured`), never on 5042 or 4663; never both, so an environment variable can never stand in for a deployed router.
86
+ */
87
+ aggregatorRouter?: Address;
88
+ /** Where `aggregatorRouter` came from: the deployment record, or the variable (a rehearsal, said so in every answer). */
89
+ aggregatorSource?: "record" | "env";
90
+ /** Venue subgraph endpoints for this chain, keyed by venue (PARABOLIC_SUBGRAPH_URL_<VENUE>_<CHAIN>). */
91
+ venueSubgraphs?: Partial<Record<VenueKey, string>>;
74
92
  };
75
93
  /** Environment variables the server reads, with their meaning (also rendered by `parabolic.docs`). */
76
94
  export declare const ENV_VARS: Array<[name: string, meaning: string]>;
77
95
  export declare function configFromEnv(env?: Record<string, string | undefined>): Config;
96
+ /**
97
+ * Whether PARABOLIC_AGGREGATOR_ROUTER may stand in for a router on this chain: Anvil and the testnets only (RE-30B-4).
98
+ * On a live chain (Arc 5042, Robinhood Chain 4663, any id this registry does not call a testnet) the deployment record
99
+ * is the only source, so an install snippet carrying the variable can never aim a trade at an address the record does
100
+ * not carry. A fork proof on a live chain's id sets the router on its own config, in the test, not through this.
101
+ */
102
+ export declare const aggregatorEnvHonoured: (chainId: number) => boolean;
78
103
  /**
79
104
  * Re-exported rather than defined here since 18 Sep 2026: the same two strings for the same two chains,
80
105
  * from the registry that now also knows how a coin on a third one is named (src/chains.ts).
@@ -89,13 +114,13 @@ export { chainName } from "./chains.js";
89
114
  */
90
115
  export declare function siteBase(chainId: number): string | undefined;
91
116
  /**
92
- * Arcscan base URL for the chain, undefined where there is no explorer (Anvil).
117
+ * The explorer base URL for the chain, undefined where there is no explorer (Anvil).
93
118
  *
94
- * Arc mainnet's host is a guess: Circle has published an explorer for Arc Testnet only, and
95
- * `https://explorer.arc.io` is Circle's published explorer (16 Sep 2026), behind a login at launch. `PARABOLIC_EXPLORER_URL` overrides it so a wrong guess
96
- * costs an environment variable rather than a republish of this package. Read from `process.env`
97
- * directly, unlike every other setting here, because this is called from `arcChain()` which builds a
98
- * viem chain from a chain id alone and never sees a Config.
119
+ * Arc mainnet's is Circle's `explorer.arc.io`, published 16 Sep 2026 and behind a login on the day;
120
+ * Robinhood Chain's is the Blockscout instance that chain lists. `PARABOLIC_EXPLORER_URL` overrides both,
121
+ * so a host that moves costs an environment variable rather than a republish of this package. Read from
122
+ * `process.env` directly, unlike every other setting here, because this is called from `arcChain()` which
123
+ * builds a viem chain from a chain id alone and never sees a Config.
99
124
  */
100
125
  export declare function explorerBase(chainId: number): string | undefined;
101
126
  export declare const explorerUrl: (chainId: number, kind: "address" | "tx", value: string) => string | undefined;
package/dist/config.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { getAddress, isAddress } from "viem";
2
2
  import { CHAINS, chainName } from "./chains.js";
3
+ import { deployedAt, factoryBlock, recordedAggregator, recordedEurc } from "./deployed.js";
4
+ import { VENUE_ENV_VARS, venueSubgraphsFrom } from "./venues.js";
3
5
  /** Arc's system `Memo` contract (CREATE2, zero salt), verified on Arc Testnet; expected to match on mainnet. */
4
6
  export const ARC_MEMO_DEFAULT = "0x5294E9927c3306DcBaDb03fe70b92e01cCede505";
5
7
  /** ERC-20 view of native USDC on Arc (6 decimals, same balance as the 18-decimal native asset). */
@@ -10,29 +12,65 @@ export const DEFAULT_API_URL = "https://www.parabolic.family/api/v1";
10
12
  /**
11
13
  * Deployed Parabolic addresses per chain, so the server is useful with no configuration at all.
12
14
  * The source repository is private; these are the same addresses the site publishes at
13
- * https://www.parabolic.family/docs#contracts and that are verified on Arcscan.
15
+ * https://www.parabolic.family/docs#contracts and that are verified on Sourcify.
14
16
  *
15
- * Arc mainnet (5042) opened on 16 September 2026; Parabolic deployed at block 21,105,294 and these are
16
- * the live addresses (contracts/deployments/5042.json). With them in place the default chain is Arc.
17
+ * **No address is written here** (23 Sep 2026, finding F50). Every one is read out of the deployment
18
+ * record the deploy itself produced, through `abi/deployments.json` (src/deployed.ts). This table was
19
+ * three chains typed by hand and chain two was never typed, so the package shipped for four days telling
20
+ * every agent Parabolic was not deployed on Robinhood Chain; syncing a record is now the whole of adding
21
+ * a chain, and `CHAINS[id].live` follows the same file.
22
+ *
23
+ * What stays written here is what no deploy can answer: the **public** JSON-RPC endpoint an unconfigured
24
+ * agent may call (a record holds the deploy machine's endpoint, which on Arc is a keyed provider's), the
25
+ * site that serves the chain, and Arc's ERC-8004 registry, which is Arc's contract and not one of ours.
17
26
  */
18
27
  export const DEPLOYMENTS = {
19
28
  5042002: {
20
29
  rpcUrl: "https://rpc.testnet.arc.io",
21
- factory: "0x2E06eD99bD7D164458847D186B282B23700b2C63",
22
- memoRouter: "0x1381567ea31a094e64f6B39Bd880d0b59c48e08F",
23
- eurc: "0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a",
24
- startBlock: 61736670,
30
+ factory: deployedAt(5042002, "ParabolicLaunchFactory"),
31
+ memoRouter: deployedAt(5042002, "ParabolicMemoRouter"),
32
+ eurc: recordedEurc(5042002),
33
+ startBlock: factoryBlock(5042002),
25
34
  apiUrl: "https://parabolic-testnet.vercel.app/api/v1",
26
35
  agentRegistry: "0x8004A818BFB912233c491871b3d84c89A494BD9e",
27
36
  },
28
37
  5042: {
29
38
  rpcUrl: "https://rpc.mainnet.arc.io",
30
- factory: "0x27EAeC564fd049E6920C73323ffA7eb6a32A4B1e",
31
- memoRouter: "0x7d642150A222D0F6c98e2fC6bBe86E8Bb6DC90d0",
32
- startBlock: 21105294,
39
+ factory: deployedAt(5042, "ParabolicLaunchFactory"),
40
+ memoRouter: deployedAt(5042, "ParabolicMemoRouter"),
41
+ eurc: recordedEurc(5042),
42
+ startBlock: factoryBlock(5042),
33
43
  apiUrl: DEFAULT_API_URL,
34
44
  // No EURC pair is approved at launch and Arc has published no ERC-8004 registry for mainnet.
35
45
  },
46
+ /*
47
+ * Robinhood Chain, deployed 19 September 2026 and served here since the 23rd.
48
+ *
49
+ * `rpcUrl` is the chain's own public host (CLAUDE.md §4): keyless, and what the indexer, the keeper and
50
+ * the site all read. It prunes state at ten to thirteen minutes of chain time, which is a real limit on a
51
+ * historical read and none at all on the head reads these tools make.
52
+ *
53
+ * `apiUrl` is production, the same host Arc's entry names, because one site serves both boards — which is
54
+ * why `RestApi` sends `chain=rhc` (src/restapi.ts). Without that parameter the host answers for Arc, the
55
+ * `meta.chainId` check refuses it, and a listing on this chain came back empty however many coins existed.
56
+ *
57
+ * **`memoRouter` is deliberately absent, and it must stay absent.** This chain deploys `ParabolicRouter`,
58
+ * not `ParabolicMemoRouter`: the two share no function selector (`buy` is memo 0x3f60b633 against router
59
+ * 0xe6eef0e5) and this package carries only the memo router's ABI, so filling this field with the router's
60
+ * address would encode calldata for functions that address does not have and every routed build would
61
+ * revert. Without it `build_buy_tx` goes straight to the curve and `build_launch_tx` to the factory, both
62
+ * of which are the same on every chain. A `ParabolicRouter` encoder is what this field is waiting on.
63
+ *
64
+ * No `agentRegistry`: Arc publishes one for Arc Testnet and nobody publishes one here, so `agent_status`
65
+ * says there is no registry rather than reading an address that is not a registry.
66
+ */
67
+ 4663: {
68
+ rpcUrl: "https://rpc.mainnet.chain.robinhood.com",
69
+ factory: deployedAt(4663, "ParabolicLaunchFactory"),
70
+ eurc: recordedEurc(4663),
71
+ startBlock: factoryBlock(4663),
72
+ apiUrl: DEFAULT_API_URL,
73
+ },
36
74
  };
37
75
  /**
38
76
  * The chain an agent gets with no configuration at all: Arc mainnet once its addresses are in
@@ -47,8 +85,13 @@ export const DEFAULT_CHAIN_ID = DEPLOYMENTS[5042].factory ? 5042 : 5042002;
47
85
  export const DEFAULT_RPC_URL = DEPLOYMENTS[DEFAULT_CHAIN_ID].rpcUrl;
48
86
  /** Environment variables the server reads, with their meaning (also rendered by `parabolic.docs`). */
49
87
  export const ENV_VARS = [
50
- ["PARABOLIC_RPC_URL", `Arc JSON-RPC endpoint (default ${DEFAULT_RPC_URL})`],
51
- ["PARABOLIC_CHAIN_ID", `chain id: 5042002 for Arc Testnet, 5042 for Arc (default ${DEFAULT_CHAIN_ID}, ${chainName(DEFAULT_CHAIN_ID)})`],
88
+ // Not "Arc JSON-RPC endpoint": `configFromEnv` defaults this to the CONFIGURED chain's own public host
89
+ // (`known.rpcUrl`), so on a 4663 server the old line named Arc twice over — the wrong chain and a default
90
+ // that is not the one taken (second review of 23 September 2026). The default is stated for the chain the
91
+ // line can name at module load, which is the unconfigured one.
92
+ ["PARABOLIC_RPC_URL", `JSON-RPC endpoint for the configured chain (default: that chain's public endpoint, ${DEFAULT_RPC_URL} on ${chainName(DEFAULT_CHAIN_ID)})`],
93
+ // Named from the registry rather than typed, so a chain whose record ships is a chain this line offers.
94
+ ["PARABOLIC_CHAIN_ID", `chain id: ${Object.values(CHAINS).filter((c) => c.live).map((c) => `${c.id} for ${c.name}`).join(", ")} (default ${DEFAULT_CHAIN_ID}, ${chainName(DEFAULT_CHAIN_ID)})`],
52
95
  ["PARABOLIC_FACTORY", "ParabolicLaunchFactory address (on-chain lookups, launch transactions, log-scan listing)"],
53
96
  ["PARABOLIC_MEMO_ROUTER", "ParabolicMemoRouter address (memo-routed buys carrying a referral code; EOA-only)"],
54
97
  ["PARABOLIC_SUBGRAPH_URL", "Parabolic subgraph endpoint (listing, holders, volume, protocol stats)"],
@@ -59,7 +102,9 @@ export const ENV_VARS = [
59
102
  ["PARABOLIC_AGENT_REGISTRY", `Arc's ERC-8004 IdentityRegistry (agent_status, build_register_agent_tx and the list_coins pair "Agents" filter). Arc's, not ours, and Arc has published one for Arc Testnet only, so on ${chainName(DEFAULT_CHAIN_ID)} the default is ${DEPLOYMENTS[DEFAULT_CHAIN_ID].agentRegistry ?? "none and those tools say so instead of answering"}`],
60
103
  ["PARABOLIC_LAUNCH_CONFIG_ID", "factory launch config index (default 0)"],
61
104
  ["PARABOLIC_FACTORY_START_BLOCK", "first block for the TokenLaunched log scan (default: the factory's deployment block for this chain)"],
62
- ["PARABOLIC_EXPLORER_URL", `block explorer base URL for building address and transaction links (default ${explorerBase(DEFAULT_CHAIN_ID) ?? "none for this chain"}; Arc mainnet's host is unconfirmed)`],
105
+ ["PARABOLIC_AGGREGATOR_ROUTER", "ParabolicAggregatorRouter address, read ONLY on Anvil (31337) and the testnets, and only where the chain's deployment record names no router; ignored on Arc (5042) and Robinhood Chain (4663), where the record's router is the only one. Routed trades on another launchpad's coin refuse without one"],
106
+ ...VENUE_ENV_VARS.map((name) => [name, `subgraph endpoint for that launchpad's coins on that chain (parabolic.list_venue_coins); unset lists none`]),
107
+ ["PARABOLIC_EXPLORER_URL", `block explorer base URL for building address and transaction links (default ${explorerBase(DEFAULT_CHAIN_ID) ?? "none for this chain"})`],
63
108
  ];
64
109
  function addr(name, v) {
65
110
  if (v === undefined || v.trim() === "")
@@ -69,6 +114,23 @@ function addr(name, v) {
69
114
  throw new Error(`${name} is not an address: ${s}`);
70
115
  return getAddress(s);
71
116
  }
117
+ /**
118
+ * `PARABOLIC_MEMO_ROUTER`, refused on a chain whose own record says it routes through `ParabolicRouter`.
119
+ *
120
+ * Second review of 23 September 2026. `build_buy_tx` used to throw "Memo-routed buys need
121
+ * PARABOLIC_MEMO_ROUTER" on every chain, which reads as an instruction; an operator on Robinhood Chain who
122
+ * followed it would set this to that chain's `ParabolicRouter` and every routed build would encode calldata
123
+ * for functions that address does not have (`buy` is memo 0x3f60b633 against router 0xe6eef0e5), reverting
124
+ * after the caller had already approved the quote asset. Refusing at start-up is the only place that costs
125
+ * nobody a transaction. A chain with no record of either contract is left alone: a private deployment of the
126
+ * memo router is a real case, and this is not the place to judge it.
127
+ */
128
+ function memoRouterFrom(chainId, given) {
129
+ if (given !== undefined && deployedAt(chainId, "ParabolicMemoRouter") === undefined && deployedAt(chainId, "ParabolicRouter") !== undefined) {
130
+ throw new Error(`PARABOLIC_MEMO_ROUTER is set on ${chainName(chainId)}, which deploys ParabolicRouter and no ParabolicMemoRouter. The two share no function selector, so a routed build against that address would encode calldata it does not have and revert. Unset it: buys here go straight to the curve.`);
131
+ }
132
+ return given;
133
+ }
72
134
  function int(name, v, fallback) {
73
135
  if (v === undefined || v.trim() === "")
74
136
  return fallback;
@@ -89,7 +151,7 @@ export function configFromEnv(env = process.env) {
89
151
  rpcOverridden: Boolean(env.PARABOLIC_RPC_URL?.trim()) && env.PARABOLIC_RPC_URL.trim() !== known?.rpcUrl,
90
152
  chainId,
91
153
  factory: addr("PARABOLIC_FACTORY", env.PARABOLIC_FACTORY) ?? known?.factory,
92
- memoRouter: addr("PARABOLIC_MEMO_ROUTER", env.PARABOLIC_MEMO_ROUTER) ?? known?.memoRouter,
154
+ memoRouter: memoRouterFrom(chainId, addr("PARABOLIC_MEMO_ROUTER", env.PARABOLIC_MEMO_ROUTER)) ?? known?.memoRouter,
93
155
  apiUrl: env.PARABOLIC_API_URL === undefined ? known?.apiUrl ?? DEFAULT_API_URL : env.PARABOLIC_API_URL.trim() || undefined,
94
156
  subgraphUrl: env.PARABOLIC_SUBGRAPH_URL?.trim() || undefined,
95
157
  eurc: addr("PARABOLIC_EURC", env.PARABOLIC_EURC) ?? known?.eurc,
@@ -98,8 +160,24 @@ export function configFromEnv(env = process.env) {
98
160
  agentRegistry: addr("PARABOLIC_AGENT_REGISTRY", env.PARABOLIC_AGENT_REGISTRY) ?? known?.agentRegistry,
99
161
  launchConfigId: BigInt(int("PARABOLIC_LAUNCH_CONFIG_ID", env.PARABOLIC_LAUNCH_CONFIG_ID, 0)),
100
162
  factoryStartBlock: BigInt(int("PARABOLIC_FACTORY_START_BLOCK", env.PARABOLIC_FACTORY_START_BLOCK, known?.startBlock ?? 0)),
163
+ ...aggregatorFrom(chainId, addr("PARABOLIC_AGGREGATOR_ROUTER", env.PARABOLIC_AGGREGATOR_ROUTER)),
164
+ venueSubgraphs: venueSubgraphsFrom(env, chainId),
101
165
  };
102
166
  }
167
+ /**
168
+ * Whether PARABOLIC_AGGREGATOR_ROUTER may stand in for a router on this chain: Anvil and the testnets only (RE-30B-4).
169
+ * On a live chain (Arc 5042, Robinhood Chain 4663, any id this registry does not call a testnet) the deployment record
170
+ * is the only source, so an install snippet carrying the variable can never aim a trade at an address the record does
171
+ * not carry. A fork proof on a live chain's id sets the router on its own config, in the test, not through this.
172
+ */
173
+ export const aggregatorEnvHonoured = (chainId) => chainId === 31337 || CHAINS[chainId]?.testnet === true;
174
+ /** The record's router, or the variable's where the record names none on a rehearsal chain. See `Config.aggregatorRouter`. */
175
+ function aggregatorFrom(chainId, given) {
176
+ const recorded = recordedAggregator(chainId)?.address;
177
+ if (recorded)
178
+ return { aggregatorRouter: recorded, aggregatorSource: "record" };
179
+ return given && aggregatorEnvHonoured(chainId) ? { aggregatorRouter: given, aggregatorSource: "env" } : {};
180
+ }
103
181
  /**
104
182
  * Re-exported rather than defined here since 18 Sep 2026: the same two strings for the same two chains,
105
183
  * from the registry that now also knows how a coin on a third one is named (src/chains.ts).
@@ -120,13 +198,13 @@ export function siteBase(chainId) {
120
198
  return at === -1 ? api.replace(/\/+$/, "") : api.slice(0, at);
121
199
  }
122
200
  /**
123
- * Arcscan base URL for the chain, undefined where there is no explorer (Anvil).
201
+ * The explorer base URL for the chain, undefined where there is no explorer (Anvil).
124
202
  *
125
- * Arc mainnet's host is a guess: Circle has published an explorer for Arc Testnet only, and
126
- * `https://explorer.arc.io` is Circle's published explorer (16 Sep 2026), behind a login at launch. `PARABOLIC_EXPLORER_URL` overrides it so a wrong guess
127
- * costs an environment variable rather than a republish of this package. Read from `process.env`
128
- * directly, unlike every other setting here, because this is called from `arcChain()` which builds a
129
- * viem chain from a chain id alone and never sees a Config.
203
+ * Arc mainnet's is Circle's `explorer.arc.io`, published 16 Sep 2026 and behind a login on the day;
204
+ * Robinhood Chain's is the Blockscout instance that chain lists. `PARABOLIC_EXPLORER_URL` overrides both,
205
+ * so a host that moves costs an environment variable rather than a republish of this package. Read from
206
+ * `process.env` directly, unlike every other setting here, because this is called from `arcChain()` which
207
+ * builds a viem chain from a chain id alone and never sees a Config.
130
208
  */
131
209
  export function explorerBase(chainId) {
132
210
  const override = process.env.PARABOLIC_EXPLORER_URL?.trim();
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAgB,MAAM,MAAM,CAAC;AAC3D,OAAO,EA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C,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC;IAC5D,IAAI,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpF,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,IAAsB,EAAE,KAAa,EAAsB,EAAE;IACxG,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { type Address } from "viem";
2
+ type Deployed = {
3
+ address: string;
4
+ block: number | null;
5
+ };
6
+ type Record_ = {
7
+ chainId: number;
8
+ network: string;
9
+ timestamp?: string;
10
+ commit?: string;
11
+ contracts: Record<string, Deployed>;
12
+ config: {
13
+ launchConfigId?: number | null;
14
+ launchForwarder?: string | null;
15
+ quoteToken?: string | null;
16
+ quoteEconomics?: {
17
+ decimals?: number | null;
18
+ } | null;
19
+ eurc?: string | null;
20
+ arcMemo?: string | null;
21
+ nativeDecimals?: number | null;
22
+ quoteAssets?: {
23
+ address?: string | null;
24
+ symbol?: string | null;
25
+ }[] | null;
26
+ } | null;
27
+ /** The chain's Uniswap v4 periphery as the deploy recorded it; null on a record that names none. */
28
+ v4?: Record<string, {
29
+ address?: string | null;
30
+ } | undefined> | null;
31
+ /** The aggregator router (docs/33 §A11). Absent means no router on that chain, never "unknown". */
32
+ aggregator?: {
33
+ address?: string | null;
34
+ block?: number | null;
35
+ } | null;
36
+ };
37
+ /** The record for a chain, or undefined where this package ships none. */
38
+ export declare const recordFor: (chainId: number) => Record_ | undefined;
39
+ /** A deployed contract's address by its Solidity name, or undefined where that chain's record has none. */
40
+ export declare const deployedAt: (chainId: number, name: string) => Address | undefined;
41
+ /**
42
+ * The block the factory itself was deployed at, which is where a `TokenLaunched` scan starts.
43
+ *
44
+ * The factory's own block rather than the record's `startBlock`: the record's is the first transaction of
45
+ * the whole deploy, and no coin can exist before the contract that launches them does.
46
+ */
47
+ export declare const factoryBlock: (chainId: number) => number | undefined;
48
+ /** EURC where a chain's deploy recorded one, undefined otherwise. Arc mainnet's record names none. */
49
+ export declare const recordedEurc: (chainId: number) => Address | undefined;
50
+ /** Chain ids this package ships addresses for, ascending. */
51
+ export type RecordedQuoteAsset = {
52
+ address: Address;
53
+ symbol: string;
54
+ };
55
+ /**
56
+ * Every quote asset a chain's deployment record names, checksummed. `config.quoteAssets` since the 4663 record
57
+ * (USDG and the three shares approved on 21 Sep 2026); Arc's record predates the field and names its ERC-20
58
+ * quote in `config.eurc` alone, null on mainnet, which is what "EURC pairs off at launch" looks like in a record.
59
+ * Read, never typed: a share named by hand here is the copy that goes stale (23 Sep 2026, the bot had exactly
60
+ * that gap and this package had it too, answering a 4663 share by its address alone).
61
+ */
62
+ export declare function recordedQuoteAssets(chainId: number): RecordedQuoteAsset[];
63
+ export declare const deployedChainIds: () => number[];
64
+ /**
65
+ * Whether Parabolic is deployed on this chain, which is what `live` means in src/chains.ts: a factory
66
+ * this package can read with no configuration at all, not merely a chain a reference can name.
67
+ */
68
+ export declare const isDeployedOn: (chainId: number) => boolean;
69
+ /**
70
+ * The ParabolicAggregatorRouter a chain's deployment record names under `aggregator`, or undefined. Undefined is the
71
+ * ordinary state until the founder deploys it (docs/33 §A11), and every routed tool then refuses by name: nothing in
72
+ * this package builds a routed trade against an address the record does not carry (src/routed.ts).
73
+ */
74
+ export declare const recordedAggregator: (chainId: number) => {
75
+ address: Address;
76
+ block: number | null;
77
+ } | undefined;
78
+ /** One v4 periphery contract by the record's own key (`v4Quoter`, `stateView`, `permit2`, `universalRouter`). */
79
+ export declare const recordedV4: (chainId: number, name: string) => Address | undefined;
80
+ export {};
@@ -0,0 +1,95 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, join, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { getAddress, isAddress } from "viem";
5
+ /**
6
+ * What this package ships addresses for, read from the deployment records rather than typed out.
7
+ *
8
+ * `scripts/sync-abis.mjs` reduces `contracts/deployments/<chainId>.json` into `abi/deployments.json`;
9
+ * this module reads it at import time, the way src/abi.ts reads the ABIs, and it is the only place in
10
+ * the package a deployed address comes from.
11
+ *
12
+ * ## Why it exists (23 September 2026, finding F50)
13
+ *
14
+ * `DEPLOYMENTS` in src/config.ts was three chains written by hand and chain two was never written. So
15
+ * the published 0.1.8 told every model "Parabolic is not deployed on Robinhood Chain yet" — four days
16
+ * after nine contracts were deployed there and twenty-three coins launched — and an operator who did
17
+ * what that message says (`PARABOLIC_CHAIN_ID=4663`) got Arc's RPC, no factory and an empty list. A
18
+ * table somebody has to remember to update is a table that goes stale silently, and this one went stale
19
+ * on the surface whose whole job is to be a model's system prompt.
20
+ *
21
+ * So a chain is served here **because its record says so**: `live` in src/chains.ts and the entry in
22
+ * `DEPLOYMENTS` are both derived from this file, and syncing a new chain's record is the whole of
23
+ * turning it on. The same rule web/lib/chains.ts follows through web/abi/deployments.json.
24
+ */
25
+ /** One level above src/ (tests) and dist/ (build), as src/abi.ts resolves it, and the same override. */
26
+ const DIR = process.env.PARABOLIC_ABI_DIR ?? resolve(dirname(fileURLToPath(import.meta.url)), "..", "abi");
27
+ const file = join(DIR, "deployments.json");
28
+ let records;
29
+ try {
30
+ records = JSON.parse(readFileSync(file, "utf8"));
31
+ }
32
+ catch (e) {
33
+ // Loud rather than silent, and for the same reason src/abi.ts is: a missing record would take every
34
+ // chain's addresses with it and the server would come up looking configured and reading nothing.
35
+ throw new Error(`Cannot read the bundled deployment records ${file}. The package ships abi/deployments.json; a missing file means a damaged install, so reinstall @parabolicfamily/mcp (${e.message})`);
36
+ }
37
+ const addr = (v) => (typeof v === "string" && isAddress(v, { strict: false }) ? getAddress(v) : undefined);
38
+ /** The record for a chain, or undefined where this package ships none. */
39
+ export const recordFor = (chainId) => records[String(chainId)];
40
+ /** A deployed contract's address by its Solidity name, or undefined where that chain's record has none. */
41
+ export const deployedAt = (chainId, name) => addr(recordFor(chainId)?.contracts?.[name]?.address);
42
+ /**
43
+ * The block the factory itself was deployed at, which is where a `TokenLaunched` scan starts.
44
+ *
45
+ * The factory's own block rather than the record's `startBlock`: the record's is the first transaction of
46
+ * the whole deploy, and no coin can exist before the contract that launches them does.
47
+ */
48
+ export const factoryBlock = (chainId) => {
49
+ const b = recordFor(chainId)?.contracts?.ParabolicLaunchFactory?.block;
50
+ return typeof b === "number" && b >= 0 ? b : undefined;
51
+ };
52
+ /** EURC where a chain's deploy recorded one, undefined otherwise. Arc mainnet's record names none. */
53
+ export const recordedEurc = (chainId) => addr(recordFor(chainId)?.config?.eurc);
54
+ /**
55
+ * Every quote asset a chain's deployment record names, checksummed. `config.quoteAssets` since the 4663 record
56
+ * (USDG and the three shares approved on 21 Sep 2026); Arc's record predates the field and names its ERC-20
57
+ * quote in `config.eurc` alone, null on mainnet, which is what "EURC pairs off at launch" looks like in a record.
58
+ * Read, never typed: a share named by hand here is the copy that goes stale (23 Sep 2026, the bot had exactly
59
+ * that gap and this package had it too, answering a 4663 share by its address alone).
60
+ */
61
+ export function recordedQuoteAssets(chainId) {
62
+ const config = recordFor(chainId)?.config;
63
+ if (!config)
64
+ return [];
65
+ const listed = Array.isArray(config.quoteAssets) ? config.quoteAssets : [];
66
+ const out = [];
67
+ for (const a of listed) {
68
+ const address = addr(a?.address);
69
+ if (address !== undefined && typeof a?.symbol === "string" && a.symbol.trim() !== "")
70
+ out.push({ address, symbol: a.symbol.trim() });
71
+ }
72
+ if (out.length > 0)
73
+ return out;
74
+ const eurc = addr(config.eurc);
75
+ return eurc === undefined ? [] : [{ address: eurc, symbol: "EURC" }];
76
+ }
77
+ export const deployedChainIds = () => Object.keys(records).map(Number).filter(Number.isFinite).sort((a, b) => a - b);
78
+ /**
79
+ * Whether Parabolic is deployed on this chain, which is what `live` means in src/chains.ts: a factory
80
+ * this package can read with no configuration at all, not merely a chain a reference can name.
81
+ */
82
+ export const isDeployedOn = (chainId) => deployedAt(chainId, "ParabolicLaunchFactory") !== undefined;
83
+ /**
84
+ * The ParabolicAggregatorRouter a chain's deployment record names under `aggregator`, or undefined. Undefined is the
85
+ * ordinary state until the founder deploys it (docs/33 §A11), and every routed tool then refuses by name: nothing in
86
+ * this package builds a routed trade against an address the record does not carry (src/routed.ts).
87
+ */
88
+ export const recordedAggregator = (chainId) => {
89
+ const a = recordFor(chainId)?.aggregator;
90
+ const address = addr(a?.address ?? undefined);
91
+ return address === undefined || /^0x0{40}$/i.test(address) ? undefined : { address, block: typeof a?.block === "number" ? a.block : null };
92
+ };
93
+ /** One v4 periphery contract by the record's own key (`v4Quoter`, `stateView`, `permit2`, `universalRouter`). */
94
+ export const recordedV4 = (chainId, name) => addr(recordFor(chainId)?.v4?.[name]?.address ?? undefined);
95
+ //# sourceMappingURL=deployed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployed.js","sourceRoot":"","sources":["../src/deployed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAgB,MAAM,MAAM,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,wGAAwG;AACxG,MA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1,17 @@
1
1
  import { type Config } from "./config.js";
2
+ /**
3
+ * The referral's share of a trade fee, in basis points of the whole fee, which is the unit the ledger that
4
+ * actually credits it is folded in (`REFERRAL_OF_FEE_BPS` in indexer/src/memo-payload.ts; decided 12 Sep 2026,
5
+ * curve buys only, paid out of Parabolic's own half of the fee).
6
+ *
7
+ * The line below wrote the percentage as a figure until 23 Sep 2026 (F60). Three packages state this rate and
8
+ * only the site's copy was pinned to a constant, so moving the indexer's would have left this file quoting a
9
+ * share nobody is paid at, on the one surface that is a model's system prompt rather than a page somebody
10
+ * skims. web/test/review-web-api-contract.test.ts reads the percentage out of THIS file and fails when it
11
+ * stops agreeing with web/lib/data.ts and the indexer, which holds the figures in this comment to those two
12
+ * as well: 1,000 bps is 10% of the fee, which is 0.10% of a referred buy.
13
+ */
14
+ export declare const REFERRAL_OF_FEE_BPS = 1000;
2
15
  /**
3
16
  * Adopted product parameters (adopted 2026-09-06, graduation threshold revised to $8,000 on 2026-09-16; published
4
17
  * at https://www.parabolic.family/docs#parameters) and the chain's own facts, as text.