@parabolicfamily/mcp 0.1.6 → 0.1.8
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.
- package/README.md +58 -2
- package/dist/chains.d.ts +79 -0
- package/dist/chains.js +75 -0
- package/dist/chains.js.map +1 -0
- package/dist/coins.d.ts +38 -3
- package/dist/coins.js +54 -4
- package/dist/coins.js.map +1 -1
- package/dist/config.d.ts +5 -1
- package/dist/config.js +7 -5
- package/dist/config.js.map +1 -1
- package/dist/curve.d.ts +2 -1
- package/dist/curve.js +2 -1
- package/dist/curve.js.map +1 -1
- package/dist/docs.d.ts +11 -1
- package/dist/docs.js +57 -21
- package/dist/docs.js.map +1 -1
- package/dist/parabolic.d.ts +198 -5
- package/dist/parabolic.js +330 -38
- package/dist/parabolic.js.map +1 -1
- package/dist/quote-unit.d.ts +77 -0
- package/dist/quote-unit.js +122 -0
- package/dist/quote-unit.js.map +1 -0
- package/dist/restapi.d.ts +51 -2
- package/dist/restapi.js +98 -11
- package/dist/restapi.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +67 -20
- package/dist/server.js.map +1 -1
- package/dist/subgraph.d.ts +18 -6
- package/dist/subgraph.js +13 -1
- package/dist/subgraph.js.map +1 -1
- package/dist/ticker.d.ts +97 -0
- package/dist/ticker.js +109 -0
- package/dist/ticker.js.map +1 -0
- package/package.json +2 -2
- package/src/chains.ts +121 -0
- package/src/coins.ts +67 -5
- package/src/config.ts +7 -5
- package/src/curve.ts +2 -1
- package/src/docs.ts +59 -21
- package/src/parabolic.ts +344 -40
- package/src/quote-unit.ts +153 -0
- package/src/restapi.ts +110 -12
- package/src/server.ts +72 -20
- package/src/subgraph.ts +22 -4
- package/src/ticker.ts +148 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Parabolic MCP server
|
|
2
2
|
|
|
3
|
-
A small [Model Context Protocol](https://modelcontextprotocol.io) server for **Parabolic**,
|
|
3
|
+
A small [Model Context Protocol](https://modelcontextprotocol.io) server for **Parabolic**, a bonding-curve token launchpad on Arc and Robinhood Chain. It lets AI agents (Claude Code, Cursor, custom ERC-8004 agents) discover coins, quote curve trades with the contract's exact math, and build **unsigned** transactions, without a browser.
|
|
4
4
|
|
|
5
5
|
**What it never does:** hold keys, sign, send or broadcast transactions, custody funds, or accept private keys, seed phrases or session tokens as input. Every `build_*` tool returns `{ to, data, value, chainId }` for the caller's own wallet to sign. Quotes are read from chain at call time and can move before a transaction lands.
|
|
6
6
|
|
|
@@ -14,6 +14,31 @@ npx -y @parabolicfamily/mcp # starts the server on stdio
|
|
|
14
14
|
|
|
15
15
|
The ABIs ship with the package, so it works offline against any Arc RPC you point it at.
|
|
16
16
|
|
|
17
|
+
## What changed in 0.1.8
|
|
18
|
+
|
|
19
|
+
One tool, `parabolic.check_ticker`, and nothing else moved: every call that worked in 0.1.7 works unchanged.
|
|
20
|
+
Given a ticker it asks the Parabolic site whether a coin already carries it on **any** chain the site serves
|
|
21
|
+
and whether `<ticker>.parabolic.family` is free. It is advice and not a gate — nothing on chain enforces a
|
|
22
|
+
unique symbol — and the hostname is the one exclusive thing, held by the oldest coin with that ticker. The
|
|
23
|
+
ticker is normalised the way the site normalises it, so an impossible one is refused before a request is spent.
|
|
24
|
+
|
|
25
|
+
## What changed in 0.1.7 (for an existing consumer: nothing has to)
|
|
26
|
+
|
|
27
|
+
0.1.7 makes the server chain-aware. **Every call that worked in 0.1.6 works unchanged and means the same
|
|
28
|
+
chain it meant**, because an unqualified identifier means Arc, permanently (`docs/20-multichain.md` §3).
|
|
29
|
+
|
|
30
|
+
- **Added, optional, on every tool: `chain`.** A chain key (`"arc"`) or an id (`5042`). Left out, it is the
|
|
31
|
+
chain the server is configured for — Arc with no configuration at all. Arguments are strict, so this had
|
|
32
|
+
to be declared rather than tolerated; passing nothing is what every existing caller does.
|
|
33
|
+
- **Added: `address` accepts a reference.** `0x…` is still a coin on this server's chain. `rhc:0x…` names a
|
|
34
|
+
coin on another one and is **refused by name** ("…is on Robinhood Chain (chain 4663); this server is
|
|
35
|
+
configured for Arc"), never looked up here: the same address is a different token on every chain.
|
|
36
|
+
- **Added to answers: `chain: { id, key, name }`** on `get_coin`, `list_coins`, both quotes, all three
|
|
37
|
+
builders and `protocol_stats`, plus `ref` on `get_coin` and on each listed coin. Nothing was renamed,
|
|
38
|
+
nothing changed type: `address` is the address, `tx.chainId` is the same scalar a wallet reads.
|
|
39
|
+
- One server still serves one chain. A second chain is a second server with its own `PARABOLIC_CHAIN_ID`,
|
|
40
|
+
RPC and factory.
|
|
41
|
+
|
|
17
42
|
## Configure
|
|
18
43
|
|
|
19
44
|
Nothing is required. Out of the box the server talks to the newest Arc chain it has addresses for,
|
|
@@ -133,9 +158,16 @@ Arguments are strict: a key a tool does not know fails with `Unrecognized key` i
|
|
|
133
158
|
| `parabolic.agent_status` | `{ address }`. Whether the wallet holds an ERC-8004 agent identity on Arc's `IdentityRegistry` (`balanceOf`), how many it holds, and the registry address and chain. On a chain where Arc has published no registry the answer is that fact, with `registered` and `identities` null. |
|
|
134
159
|
| `parabolic.build_register_agent_tx` | `{ from, metadataURI? }` → unsigned `IdentityRegistry.register(metadataURI)` (no value). The registry mints the ERC-721 identity to the signer, so `from` is the wallet that sends it, and returns the agent id; read it from the `Transfer` log in the receipt. `metadataURI` is a pointer to the agent's metadata stored as `tokenURI` and may be empty. Warns when the wallet already holds an identity. |
|
|
135
160
|
| `parabolic.protocol_stats` | Subgraph totals (launches, graduations, trades, volume, fees, daily series) plus the factory's live launch fee, curve preset, snipe-tax terms and contract addresses. |
|
|
161
|
+
| `parabolic.check_ticker` | `{ ticker }`. Whether a Parabolic coin already carries the ticker on **any** chain the site serves, and whether `<ticker>.parabolic.family` is free, read from the site's own route (`/api/v1/studio/ticker` on `PARABOLIC_API_URL`'s site). **Advice, not a gate**: nothing on chain enforces a unique symbol, so `free: false` lists what exists (`taken[]`, each with a `ref` for `get_coin`) and does not stop a launch. The hostname is the one exclusive thing and belongs to the oldest coin carrying the ticker (`hostFree`). A name on the site's reserved list comes back as `reserved` and is not a coin. The ticker is normalised the way the site does it (A-Z and 0-9, case and punctuation ignored, 2 to 10 characters); one outside that is refused before the site is asked. Call it before `build_launch_tx`. |
|
|
136
162
|
| `parabolic.docs` | The adopted parameters, curve mechanics, verified Arc facts and this server's configuration, as text. |
|
|
137
163
|
|
|
138
|
-
|
|
164
|
+
Every tool above also takes an optional `chain` (see "What changed in 0.1.7"), and every coin argument
|
|
165
|
+
takes a reference: `0x…` for a coin on this server's chain, `rhc:0x…` for one elsewhere. A wallet argument
|
|
166
|
+
(`recipient`, `buyer`, `creator`, `from`, `agent_status`'s `address`) stays a plain address — a wallet is
|
|
167
|
+
the same person on every EVM chain. `check_ticker` accepts `chain` like the others and its verdict still
|
|
168
|
+
covers every chain the site serves, because a ticker taken elsewhere is a collision the moment a link is shared.
|
|
169
|
+
|
|
170
|
+
Resources: `parabolic://docs/parameters` (same text as `parabolic.docs`) and `parabolic://coins/{address}` (same JSON as `parabolic.get_coin`; the address may be a reference).
|
|
139
171
|
|
|
140
172
|
### Examples
|
|
141
173
|
|
|
@@ -199,6 +231,29 @@ The result is `kind: "register_agent"`: one unsigned `tx` to the registry carryi
|
|
|
199
231
|
registry mints to `msg.sender`. Once it lands, `parabolic.list_coins` with `pair: "Agents"` keeps the
|
|
200
232
|
coins launched from that wallet, and the site tags them `[ Agent ]`.
|
|
201
233
|
|
|
234
|
+
Check a ticker before launching under it:
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
{ "name": "parabolic.check_ticker", "arguments": { "ticker": "$para" } }
|
|
238
|
+
```
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"ticker": "PARA", "asked": "$para",
|
|
242
|
+
"chain": { "id": 5042, "key": "arc", "name": "Arc" },
|
|
243
|
+
"scope": "every chain the Parabolic site serves, not only this server's chain",
|
|
244
|
+
"free": false,
|
|
245
|
+
"taken": [{ "chain": { "id": 5042, "key": "arc", "name": "Arc" }, "name": "Parabolic", "address": "0x552F…4073", "ref": "0x552F…4073", "page": "https://www.parabolic.family/coin/0x552F…4073" }],
|
|
246
|
+
"reserved": null,
|
|
247
|
+
"host": "para.parabolic.family", "hostFree": false,
|
|
248
|
+
"message": "$PARA already trades on Arc as \"Parabolic\". Nothing on chain stops a second coin using it; para.parabolic.family belongs to the oldest coin carrying the ticker.",
|
|
249
|
+
"notes": ["Advice, not a gate: …", "…"]
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
`free: true` comes back with `taken: []` and `hostFree: true`, and a name on the site's reserved list as
|
|
254
|
+
`reserved: { name }`. Nothing here is a lock: the verdict is what the site's board holds at the moment of
|
|
255
|
+
asking, and it lags the site's indexer by however far that is behind.
|
|
256
|
+
|
|
202
257
|
## Notes on the mechanics
|
|
203
258
|
|
|
204
259
|
- Curve math is a port of `ParabolicBondingCurve` / `ParabolicBondingCurveMath` (and of `web/lib/curve.ts`): fee legs are taken off the buy input separately, the constant product is priced on `getReserves()`, and a buy that would take more than `sellableTokens()` is clamped to the last sellable tokens, charged the grossed-up price and refunded the rest; that buy graduates the coin, so give it extra gas. Sells take the fee off the gross quote output and close once the curve is ready to graduate.
|
|
@@ -224,6 +279,7 @@ src/
|
|
|
224
279
|
chain.ts viem RPC wrapper (batched HTTP) behind a small Rpc interface
|
|
225
280
|
subgraph.ts GraphQL client and Coin/Protocol shapes
|
|
226
281
|
coins.ts coin summaries, sorting
|
|
282
|
+
ticker.ts check_ticker's rule: the site's normalisation, its verdict shape, the sentence
|
|
227
283
|
config.ts PARABOLIC_* environment
|
|
228
284
|
abi.ts loads abi/*.json
|
|
229
285
|
docs.ts parameters + Arc facts text
|
package/dist/chains.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* The chain registry and the chain-qualified reference.
|
|
4
|
+
*
|
|
5
|
+
* One rule, from docs/20-multichain.md §3: **`arc` is the empty prefix. An unqualified identifier means
|
|
6
|
+
* Arc, permanently.** `parabolic.get_coin({ address: "0x552F…4073" })` is the Arc coin it has always been,
|
|
7
|
+
* for every consumer of `@parabolicfamily/mcp` already installed; a coin on another chain is named
|
|
8
|
+
* `rhc:0x552F…4073`. Nothing an agent already sends changes meaning, which is the only way to widen a
|
|
9
|
+
* published tool's input without a version break.
|
|
10
|
+
*
|
|
11
|
+
* The registry is small on purpose. It carries what a *reference* needs — an id, a prefix, a name, an
|
|
12
|
+
* explorer — while the deployed addresses stay in `DEPLOYMENTS` (src/config.ts), keyed by the same chain
|
|
13
|
+
* id and written from `contracts/deployments/<chainId>.json`. A chain can be nameable here long before
|
|
14
|
+
* anything of ours is deployed on it, which is exactly the state Robinhood Chain is in.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* A chain's stable name in configuration, logs and the `chain` field of an answer. The same set
|
|
18
|
+
* web/lib/chains.ts uses, with Arc Testnet spelled `arc-testnet` here and `arct` there; `chainByName`
|
|
19
|
+
* reads both. Solana is absent on purpose (see the note above `KEY_ALIASES`).
|
|
20
|
+
*/
|
|
21
|
+
export type ChainKey = "arc" | "arc-testnet" | "rhc" | "base" | "eth" | "bnb" | "anvil";
|
|
22
|
+
export type ChainInfo = {
|
|
23
|
+
id: number;
|
|
24
|
+
key: ChainKey;
|
|
25
|
+
/** What precedes the colon in a reference. Empty for Arc, which is what makes a bare address mean Arc. */
|
|
26
|
+
prefix: string;
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* The gas token, where it has been read from the chain. Undefined otherwise: a symbol and a decimal
|
|
30
|
+
* count are measurements, and this server quotes money to agents that act on it.
|
|
31
|
+
*/
|
|
32
|
+
native?: {
|
|
33
|
+
name: string;
|
|
34
|
+
symbol: string;
|
|
35
|
+
decimals: number;
|
|
36
|
+
dollar: boolean;
|
|
37
|
+
};
|
|
38
|
+
explorer?: string;
|
|
39
|
+
testnet: boolean;
|
|
40
|
+
/** Whether Parabolic is deployed and served there today. */
|
|
41
|
+
live: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Arc mainnet and Arc Testnet, with the explorer hosts this package has always used (Arc mainnet's is
|
|
45
|
+
* Circle's `explorer.arc.io`, published 16 Sep 2026, behind a login at launch; `PARABOLIC_EXPLORER_URL`
|
|
46
|
+
* still overrides both).
|
|
47
|
+
*
|
|
48
|
+
* Robinhood Chain (4663, from docs/20-multichain.md §1, verified 18 Sep 2026 against chain docs) is here
|
|
49
|
+
* so a reference and an error message can name it. It has no gas token and no explorer written down,
|
|
50
|
+
* because neither has been read in this repo, and nothing here invents either.
|
|
51
|
+
*/
|
|
52
|
+
export declare const CHAINS: Record<number, ChainInfo>;
|
|
53
|
+
/** Arc mainnet: the chain an unqualified identifier means. */
|
|
54
|
+
export declare const ARC = 5042;
|
|
55
|
+
export declare const chainFor: (chainId: number) => ChainInfo | undefined;
|
|
56
|
+
/** "Arc", "Arc Testnet", "Robinhood Chain", else `chain 8453`. */
|
|
57
|
+
export declare const chainName: (chainId: number) => string;
|
|
58
|
+
/** A chain by key ("arc"), by prefix ("rhc") or by id ("5042" / 5042); undefined for anything else. */
|
|
59
|
+
export declare function chainByName(value: string | number): ChainInfo | undefined;
|
|
60
|
+
/** A coin: the chain it is on and its address there. `chainId` stays a scalar, as every payload's does. */
|
|
61
|
+
export type Ref = {
|
|
62
|
+
chainId: number;
|
|
63
|
+
address: Address;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Parses a coin reference. `0x…` is the coin on `home`; `rhc:0x…` is the coin on the chain that prefix
|
|
67
|
+
* names. Null for anything else, including a prefix no chain claims — an agent handed `rhc:0x…` by the
|
|
68
|
+
* site must be told which chain that is, not answered from Arc, because the same address is a different
|
|
69
|
+
* token on every chain (docs/20-multichain.md §2).
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseRef(input: string, home: number): Ref | null;
|
|
72
|
+
/** A reference as it is written: the bare address on Arc, `rhc:0x…` anywhere else. */
|
|
73
|
+
export declare function formatRef(ref: Ref): string;
|
|
74
|
+
/** The chain block every payload carries, so an answer always says which chain it is about. */
|
|
75
|
+
export declare const chainBlock: (chainId: number) => {
|
|
76
|
+
id: number;
|
|
77
|
+
key: string;
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
package/dist/chains.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { getAddress, isAddress } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Arc mainnet and Arc Testnet, with the explorer hosts this package has always used (Arc mainnet's is
|
|
4
|
+
* Circle's `explorer.arc.io`, published 16 Sep 2026, behind a login at launch; `PARABOLIC_EXPLORER_URL`
|
|
5
|
+
* still overrides both).
|
|
6
|
+
*
|
|
7
|
+
* Robinhood Chain (4663, from docs/20-multichain.md §1, verified 18 Sep 2026 against chain docs) is here
|
|
8
|
+
* so a reference and an error message can name it. It has no gas token and no explorer written down,
|
|
9
|
+
* because neither has been read in this repo, and nothing here invents either.
|
|
10
|
+
*/
|
|
11
|
+
export const CHAINS = {
|
|
12
|
+
5042: { id: 5042, key: "arc", prefix: "", name: "Arc", native: { name: "USDC", symbol: "USDC", decimals: 18, dollar: true }, explorer: "https://explorer.arc.io", testnet: false, live: true },
|
|
13
|
+
5042002: { id: 5042002, key: "arc-testnet", prefix: "", name: "Arc Testnet", native: { name: "USDC", symbol: "USDC", decimals: 18, dollar: true }, explorer: "https://testnet.arcscan.app", testnet: true, live: true },
|
|
14
|
+
// Deployed 19 Sep 2026 (contracts/deployments/4663.json), and its gas asset filled in here on 20 Sep. ETH
|
|
15
|
+
// at 18 decimals is the scale the deploy MEASURED against the WETH9 that chain's own PositionManager names
|
|
16
|
+
// and wrote into `config.nativeDecimals`, not a figure taken from a doc; `dollar: false` is why no balance
|
|
17
|
+
// or launch fee on this chain may be reported as money in dollars. The Blockscout instance is the one the
|
|
18
|
+
// chain lists and the one contracts/scripts/verify-arcscan.sh has on record. `live` stays false here because
|
|
19
|
+
// this package has no `DEPLOYMENTS` entry for the chain: it is a chain a reference can name, not one an
|
|
20
|
+
// unconfigured server can read.
|
|
21
|
+
4663: { id: 4663, key: "rhc", prefix: "rhc", name: "Robinhood Chain", native: { name: "Ether", symbol: "ETH", decimals: 18, dollar: false }, explorer: "https://robinhoodchain.blockscout.com", testnet: false, live: false },
|
|
22
|
+
8453: { id: 8453, key: "base", prefix: "base", name: "Base", testnet: false, live: false },
|
|
23
|
+
1: { id: 1, key: "eth", prefix: "eth", name: "Ethereum", testnet: false, live: false },
|
|
24
|
+
56: { id: 56, key: "bnb", prefix: "bnb", name: "BNB Chain", testnet: false, live: false },
|
|
25
|
+
31337: { id: 31337, key: "anvil", prefix: "anvil", name: "Anvil", testnet: true, live: false },
|
|
26
|
+
};
|
|
27
|
+
/** Arc mainnet: the chain an unqualified identifier means. */
|
|
28
|
+
export const ARC = 5042;
|
|
29
|
+
export const chainFor = (chainId) => CHAINS[chainId];
|
|
30
|
+
/** "Arc", "Arc Testnet", "Robinhood Chain", else `chain 8453`. */
|
|
31
|
+
export const chainName = (chainId) => CHAINS[chainId]?.name ?? `chain ${chainId}`;
|
|
32
|
+
/**
|
|
33
|
+
* `arct` is what web/lib/chains.ts calls Arc Testnet, and this calls it `arc-testnet`. Both are read
|
|
34
|
+
* wherever a chain is named by key, so neither surface has to remember which spelling the other chose.
|
|
35
|
+
* Solana has no entry at all: its addresses are base58 and it has no EVM chain id, so a `sol:` reference
|
|
36
|
+
* cannot be parsed into the `{ chainId, address }` this file is built on, and answering "not a coin" is
|
|
37
|
+
* more honest than half-parsing it.
|
|
38
|
+
*/
|
|
39
|
+
const KEY_ALIASES = { arct: 5042002, "arc-testnet": 5042002 };
|
|
40
|
+
/** A chain by key ("arc"), by prefix ("rhc") or by id ("5042" / 5042); undefined for anything else. */
|
|
41
|
+
export function chainByName(value) {
|
|
42
|
+
const s = String(value).trim().toLowerCase();
|
|
43
|
+
if (/^\d+$/.test(s))
|
|
44
|
+
return CHAINS[Number(s)];
|
|
45
|
+
const alias = KEY_ALIASES[s];
|
|
46
|
+
if (alias !== undefined)
|
|
47
|
+
return CHAINS[alias];
|
|
48
|
+
return Object.values(CHAINS).find((c) => c.key === s || (c.prefix !== "" && c.prefix === s));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Parses a coin reference. `0x…` is the coin on `home`; `rhc:0x…` is the coin on the chain that prefix
|
|
52
|
+
* names. Null for anything else, including a prefix no chain claims — an agent handed `rhc:0x…` by the
|
|
53
|
+
* site must be told which chain that is, not answered from Arc, because the same address is a different
|
|
54
|
+
* token on every chain (docs/20-multichain.md §2).
|
|
55
|
+
*/
|
|
56
|
+
export function parseRef(input, home) {
|
|
57
|
+
const s = input.trim();
|
|
58
|
+
const at = s.indexOf(":");
|
|
59
|
+
if (at === -1)
|
|
60
|
+
return isAddress(s, { strict: false }) ? { chainId: home, address: getAddress(s) } : null;
|
|
61
|
+
const prefix = s.slice(0, at).toLowerCase();
|
|
62
|
+
const rest = s.slice(at + 1);
|
|
63
|
+
if (prefix === "" || !isAddress(rest, { strict: false }))
|
|
64
|
+
return null;
|
|
65
|
+
const chain = Object.values(CHAINS).find((c) => c.prefix === prefix);
|
|
66
|
+
return chain ? { chainId: chain.id, address: getAddress(rest) } : null;
|
|
67
|
+
}
|
|
68
|
+
/** A reference as it is written: the bare address on Arc, `rhc:0x…` anywhere else. */
|
|
69
|
+
export function formatRef(ref) {
|
|
70
|
+
const prefix = CHAINS[ref.chainId]?.prefix ?? "";
|
|
71
|
+
return prefix ? `${prefix}:${ref.address}` : ref.address;
|
|
72
|
+
}
|
|
73
|
+
/** The chain block every payload carries, so an answer always says which chain it is about. */
|
|
74
|
+
export const chainBlock = (chainId) => ({ id: chainId, key: CHAINS[chainId]?.key ?? String(chainId), name: chainName(chainId) });
|
|
75
|
+
//# sourceMappingURL=chains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chains.js","sourceRoot":"","sources":["../src/chains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,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;IACrE,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzE,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,SAAS,CAAC,GAAQ;IAChC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IACjD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;AAC3D,CAAC;AAED,+FAA+F;AAC/F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAe,EAA6C,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/coins.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
+
import { type QuoteBlock } from "./quote-unit.js";
|
|
2
3
|
import type { GqlCoin } from "./subgraph.js";
|
|
3
4
|
export type StatusKey = "climbing" | "graduated";
|
|
4
5
|
export declare const SORT_KEYS: readonly ["trending", "new", "near_graduation", "market_cap"];
|
|
@@ -9,9 +10,19 @@ export type CoinSummary = {
|
|
|
9
10
|
name: string;
|
|
10
11
|
ticker: string;
|
|
11
12
|
creator: Address;
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* What the coin's money is called — the asset's own symbol, whatever it is.
|
|
15
|
+
*
|
|
16
|
+
* It was the literal union `"USDC" | "EURC"` until 20 September 2026, which is Arc's two answers written
|
|
17
|
+
* into a type: every coin on any other chain was reported to an agent as an EURC while every figure beside
|
|
18
|
+
* it was right, and src/restapi.ts had to cast a real symbol back through it to compile.
|
|
19
|
+
*/
|
|
20
|
+
pair: string;
|
|
13
21
|
pairToken: Address;
|
|
22
|
+
/** Read from the asset's own `decimals()`, or from the chain's gas asset. Never derived from `pairToken`. */
|
|
14
23
|
quoteDecimals: number;
|
|
24
|
+
/** What the money IS: whether it is a dollar, what kind of asset it is, who issues it. See src/quote-unit.ts. */
|
|
25
|
+
quote: QuoteBlock;
|
|
15
26
|
status: StatusKey;
|
|
16
27
|
/** Quote raised on the curve (net of fees), whole units; for a graduated coin the threshold it crossed. */
|
|
17
28
|
raised: string;
|
|
@@ -36,7 +47,22 @@ export type CoinSummary = {
|
|
|
36
47
|
source: "subgraph" | "api" | "chain";
|
|
37
48
|
};
|
|
38
49
|
export declare const isNative: (pairToken: string) => boolean;
|
|
39
|
-
|
|
50
|
+
/**
|
|
51
|
+
* The scale a coin's quote amounts are written at, from the only two sources that have ever read it.
|
|
52
|
+
*
|
|
53
|
+
* This was `isNative(pairToken) ? 18 : 6` — Arc's own two answers, typed out, and the same pair of literals
|
|
54
|
+
* web/lib/data.ts and bot/src/chain.ts carried until 18 September 2026. The 18 is right only where the gas
|
|
55
|
+
* token is an 18-decimal dollar, and the 6 is right only for EURC on Arc: USDC is a **6-decimal ERC-20** on
|
|
56
|
+
* Base, Ethereum and BNB, all three of them chains on the plan, so every `raisedRaw` and `thresholdRaw` this
|
|
57
|
+
* produced there was out by a factor of a trillion — inside calldata an agent signs, with nothing to say so.
|
|
58
|
+
*
|
|
59
|
+
* `indexed` is the coin's own `Coin.quoteDecimals`, which the indexer writes at launch from the factory's
|
|
60
|
+
* re-read of the asset's `decimals()` — the chain's answer for *that launch*. Without it, a gas-asset quote
|
|
61
|
+
* falls back to the chain registry, whose figures were read off the chain when the chain was added. Neither
|
|
62
|
+
* available means **nothing is returned**: a caller must refuse a figure it cannot scale rather than pick a
|
|
63
|
+
* number (docs/20-multichain.md §3).
|
|
64
|
+
*/
|
|
65
|
+
export declare function quoteDecimalsOf(pairToken: string, indexed: number | null | undefined, chainId: number): number | undefined;
|
|
40
66
|
/** Curve progress in percent with three decimals, capped at 100. */
|
|
41
67
|
export declare const progressPct: (raised: bigint, threshold: bigint) => number;
|
|
42
68
|
/**
|
|
@@ -47,6 +73,15 @@ export declare function dayStats(g: GqlCoin, now: number, quoteDecimals: number)
|
|
|
47
73
|
volume24h: number;
|
|
48
74
|
change24h: number;
|
|
49
75
|
};
|
|
50
|
-
|
|
76
|
+
/**
|
|
77
|
+
* A subgraph row as a coin summary.
|
|
78
|
+
*
|
|
79
|
+
* `chainId` is the chain the subgraph is indexing, and it is required because the scale of the row's amounts
|
|
80
|
+
* is not inferable from the row: `Coin.quoteDecimals` when the endpoint carries it (subgraph 0.3.0 and later),
|
|
81
|
+
* and otherwise that chain's gas asset for a native-quoted coin. A row nothing can scale **throws**, because
|
|
82
|
+
* every figure below it — raised, threshold, price, volume — would be wrong by orders of magnitude and would
|
|
83
|
+
* look entirely ordinary.
|
|
84
|
+
*/
|
|
85
|
+
export declare function summaryFromGql(g: GqlCoin, now?: number, chainId?: number, knownDecimals?: number): CoinSummary;
|
|
51
86
|
/** Pure sort used by list_coins; `near_graduation` ranks climbing coins by progress and puts graduated ones last. */
|
|
52
87
|
export declare function sortCoins(list: CoinSummary[], sort: SortKey): CoinSummary[];
|
package/dist/coins.js
CHANGED
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
import { formatUnits, getAddress } from "viem";
|
|
2
|
+
import { chainFor } from "./chains.js";
|
|
2
3
|
import { NATIVE_QUOTE } from "./config.js";
|
|
3
4
|
import { toNumber } from "./curve.js";
|
|
5
|
+
import { quoteBlock, quoteUnitByAddress, quoteUnitOf } from "./quote-unit.js";
|
|
4
6
|
export const SORT_KEYS = ["trending", "new", "near_graduation", "market_cap"];
|
|
5
7
|
export const isNative = (pairToken) => pairToken.toLowerCase() === NATIVE_QUOTE;
|
|
6
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The scale a coin's quote amounts are written at, from the only two sources that have ever read it.
|
|
10
|
+
*
|
|
11
|
+
* This was `isNative(pairToken) ? 18 : 6` — Arc's own two answers, typed out, and the same pair of literals
|
|
12
|
+
* web/lib/data.ts and bot/src/chain.ts carried until 18 September 2026. The 18 is right only where the gas
|
|
13
|
+
* token is an 18-decimal dollar, and the 6 is right only for EURC on Arc: USDC is a **6-decimal ERC-20** on
|
|
14
|
+
* Base, Ethereum and BNB, all three of them chains on the plan, so every `raisedRaw` and `thresholdRaw` this
|
|
15
|
+
* produced there was out by a factor of a trillion — inside calldata an agent signs, with nothing to say so.
|
|
16
|
+
*
|
|
17
|
+
* `indexed` is the coin's own `Coin.quoteDecimals`, which the indexer writes at launch from the factory's
|
|
18
|
+
* re-read of the asset's `decimals()` — the chain's answer for *that launch*. Without it, a gas-asset quote
|
|
19
|
+
* falls back to the chain registry, whose figures were read off the chain when the chain was added. Neither
|
|
20
|
+
* available means **nothing is returned**: a caller must refuse a figure it cannot scale rather than pick a
|
|
21
|
+
* number (docs/20-multichain.md §3).
|
|
22
|
+
*/
|
|
23
|
+
export function quoteDecimalsOf(pairToken, indexed, chainId) {
|
|
24
|
+
if (typeof indexed === "number" && Number.isInteger(indexed) && indexed > 0 && indexed <= 36)
|
|
25
|
+
return indexed;
|
|
26
|
+
return isNative(pairToken) ? chainFor(chainId)?.native?.decimals : undefined;
|
|
27
|
+
}
|
|
7
28
|
/** Curve progress in percent with three decimals, capped at 100. */
|
|
8
29
|
export const progressPct = (raised, threshold) => (threshold <= 0n ? 0 : Math.min(100, Number((raised * 100000n) / threshold) / 1000));
|
|
9
30
|
const dayOf = (sec) => Math.floor(sec / 86_400);
|
|
@@ -22,22 +43,51 @@ export function dayStats(g, now, quoteDecimals) {
|
|
|
22
43
|
const change24h = ref > 0 && current > 0 ? ((current - ref) / ref) * 100 : 0;
|
|
23
44
|
return { volume24h, change24h };
|
|
24
45
|
}
|
|
25
|
-
|
|
46
|
+
/**
|
|
47
|
+
* A subgraph row as a coin summary.
|
|
48
|
+
*
|
|
49
|
+
* `chainId` is the chain the subgraph is indexing, and it is required because the scale of the row's amounts
|
|
50
|
+
* is not inferable from the row: `Coin.quoteDecimals` when the endpoint carries it (subgraph 0.3.0 and later),
|
|
51
|
+
* and otherwise that chain's gas asset for a native-quoted coin. A row nothing can scale **throws**, because
|
|
52
|
+
* every figure below it — raised, threshold, price, volume — would be wrong by orders of magnitude and would
|
|
53
|
+
* look entirely ordinary.
|
|
54
|
+
*/
|
|
55
|
+
export function summaryFromGql(g, now = Math.floor(Date.now() / 1000), chainId = 5042, knownDecimals) {
|
|
26
56
|
const native = isNative(g.pairToken);
|
|
27
|
-
|
|
57
|
+
/* `knownDecimals` is the scale a caller has ALREADY read off the chain, and it is the authoritative one.
|
|
58
|
+
`get_coin` reads the curve and the subgraph in one `Promise.all`, so when the indexed row carries no scale
|
|
59
|
+
and this package's registry cannot name the asset, the answer is nonetheless sitting in the caller's hand
|
|
60
|
+
— it scales `volumeQuote` with it on the next line. Without this parameter that row was thrown away and
|
|
61
|
+
the tool reported it as unscalable, which treated the symptom of a scale it did not need to look for. */
|
|
62
|
+
const quoteDecimals = knownDecimals ?? quoteDecimalsOf(g.pairToken, g.quoteDecimals, chainId);
|
|
63
|
+
if (quoteDecimals === undefined) {
|
|
64
|
+
throw new Error(native
|
|
65
|
+
? `Coin ${g.id} is quoted in the gas token of chain ${chainId} and neither the indexer nor this package's chain registry says how many decimals it has, so its figures cannot be scaled`
|
|
66
|
+
: `Coin ${g.id} is quoted in ${g.pairToken} and the indexer does not carry its quoteDecimals (subgraph 0.3.0 or later), so its figures cannot be scaled`);
|
|
67
|
+
}
|
|
28
68
|
const graduated = g.status !== "CLIMBING";
|
|
29
69
|
const raisedRaw = BigInt(g.raised);
|
|
30
70
|
const thresholdRaw = BigInt(g.graduationThreshold);
|
|
31
71
|
const { volume24h, change24h } = dayStats(g, now, quoteDecimals);
|
|
72
|
+
const gas = chainFor(chainId)?.native;
|
|
73
|
+
/* The asset by its ADDRESS first, because that is what the subgraph carries and what a deploy approves. The
|
|
74
|
+
shortened-address string below is a display fallback for an asset this package has not been told about —
|
|
75
|
+
and until 20 September 2026 it was fed into `quoteUnitOf`, a SYMBOL lookup, which no shortened address can
|
|
76
|
+
ever match: USDG, a dollar, was published to every model as `dollar: false`. */
|
|
77
|
+
const byAddress = native ? undefined : quoteUnitByAddress(g.pairToken, chainId);
|
|
78
|
+
const quoteSymbol = native ? gas?.symbol ?? "" : byAddress?.symbol ?? `${g.pairToken.slice(0, 6)}\u2026${g.pairToken.slice(-4)}`;
|
|
32
79
|
return {
|
|
33
80
|
address: getAddress(g.id),
|
|
34
81
|
curve: getAddress(g.curve),
|
|
35
82
|
name: g.name,
|
|
36
83
|
ticker: g.symbol,
|
|
37
84
|
creator: getAddress(g.deployer),
|
|
38
|
-
|
|
85
|
+
// The chain's own asset, not Arc's two. `symbol` is on the subgraph's Coin only for the coin itself, so an
|
|
86
|
+
// ERC-20 quote falls back to its address until the caller resolves it on chain (src/parabolic.ts).
|
|
87
|
+
pair: quoteSymbol,
|
|
39
88
|
pairToken: getAddress(g.pairToken),
|
|
40
89
|
quoteDecimals,
|
|
90
|
+
quote: quoteBlock(byAddress ?? quoteUnitOf(quoteSymbol, chainId), getAddress(g.pairToken), quoteDecimals, native),
|
|
41
91
|
status: graduated ? "graduated" : "climbing",
|
|
42
92
|
raised: formatUnits(graduated ? thresholdRaw : raisedRaw, quoteDecimals),
|
|
43
93
|
raisedRaw: graduated ? thresholdRaw : raisedRaw,
|
package/dist/coins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coins.js","sourceRoot":"","sources":["../src/coins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAgB,MAAM,MAAM,CAAC;AAC7D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IAAa;IAC1D,MAAM,EAAE,GAAgE;QACtE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;QAC9I,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC;QACtD,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;QAC7H,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS;KAChD,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -75,7 +75,11 @@ export type Config = {
|
|
|
75
75
|
/** Environment variables the server reads, with their meaning (also rendered by `parabolic.docs`). */
|
|
76
76
|
export declare const ENV_VARS: Array<[name: string, meaning: string]>;
|
|
77
77
|
export declare function configFromEnv(env?: Record<string, string | undefined>): Config;
|
|
78
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Re-exported rather than defined here since 18 Sep 2026: the same two strings for the same two chains,
|
|
80
|
+
* from the registry that now also knows how a coin on a third one is named (src/chains.ts).
|
|
81
|
+
*/
|
|
82
|
+
export { chainName } from "./chains.js";
|
|
79
83
|
/**
|
|
80
84
|
* The Parabolic site that serves this chain's deployment, with no trailing slash.
|
|
81
85
|
*
|
package/dist/config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getAddress, isAddress } from "viem";
|
|
2
|
+
import { CHAINS, chainName } from "./chains.js";
|
|
2
3
|
/** Arc's system `Memo` contract (CREATE2, zero salt), verified on Arc Testnet; expected to match on mainnet. */
|
|
3
4
|
export const ARC_MEMO_DEFAULT = "0x5294E9927c3306DcBaDb03fe70b92e01cCede505";
|
|
4
5
|
/** ERC-20 view of native USDC on Arc (6 decimals, same balance as the 18-decimal native asset). */
|
|
@@ -99,10 +100,11 @@ export function configFromEnv(env = process.env) {
|
|
|
99
100
|
factoryStartBlock: BigInt(int("PARABOLIC_FACTORY_START_BLOCK", env.PARABOLIC_FACTORY_START_BLOCK, known?.startBlock ?? 0)),
|
|
100
101
|
};
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Re-exported rather than defined here since 18 Sep 2026: the same two strings for the same two chains,
|
|
105
|
+
* from the registry that now also knows how a coin on a third one is named (src/chains.ts).
|
|
106
|
+
*/
|
|
107
|
+
export { chainName } from "./chains.js";
|
|
106
108
|
/**
|
|
107
109
|
* The Parabolic site that serves this chain's deployment, with no trailing slash.
|
|
108
110
|
*
|
|
@@ -130,7 +132,7 @@ export function explorerBase(chainId) {
|
|
|
130
132
|
const override = process.env.PARABOLIC_EXPLORER_URL?.trim();
|
|
131
133
|
if (override && /^https?:\/\//i.test(override))
|
|
132
134
|
return override.replace(/\/+$/, "");
|
|
133
|
-
return chainId
|
|
135
|
+
return CHAINS[chainId]?.explorer;
|
|
134
136
|
}
|
|
135
137
|
export const explorerUrl = (chainId, kind, value) => {
|
|
136
138
|
const base = explorerBase(chainId);
|
package/dist/config.js.map
CHANGED
|
@@ -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;
|
|
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,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEhD,gHAAgH;AAChH,MAAM,CAAC,MAAM,gBAAgB,GAAY,4CAA4C,CAAC;AACtF,mGAAmG;AACnG,MAAM,CAAC,MAAM,SAAS,GAAY,4CAA4C,CAAC;AAC/E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,YAAY,GAAY,4CAA4C,CAAC;AAElF,MAAM,CAAC,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAenB;IACH,OAAO,EAAE;QACP,MAAM,EAAE,4BAA4B;QACpC,OAAO,EAAE,4CAA4C;QACrD,UAAU,EAAE,4CAA4C;QACxD,IAAI,EAAE,4CAA4C;QAClD,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,6CAA6C;QACrD,aAAa,EAAE,4CAA4C;KAC5D;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,4BAA4B;QACpC,OAAO,EAAE,4CAA4C;QACrD,UAAU,EAAE,4CAA4C;QACxD,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,eAAe;QACvB,6FAA6F;KAC9F;CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;AAC3E,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AAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,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"}
|
package/dist/curve.d.ts
CHANGED
|
@@ -80,7 +80,8 @@ export declare const graduationSplit: (reservedTokens: bigint, phantomQuote: big
|
|
|
80
80
|
*/
|
|
81
81
|
export declare function snipeTaxBpsAt(elapsedSeconds: bigint, windowSeconds: bigint, startBps: bigint, feeBps: bigint, creatorTaxBps: bigint): bigint;
|
|
82
82
|
export declare const toNumber: (v: bigint, decimals?: number) => number;
|
|
83
|
-
/** Spot market cap in whole quote units for `supply` at the current curve price
|
|
83
|
+
/** Spot market cap in whole quote units for `supply` at the current curve price. `quoteDecimals` is the quote
|
|
84
|
+
* asset's own, read off it by the caller (src/parabolic.ts `readQuoteAsset`) and never derived from a flag. */
|
|
84
85
|
export declare const marketCap: (quoteReserve: bigint, tokenReserve: bigint, supply: bigint, quoteDecimals?: number) => number;
|
|
85
86
|
/** Market cap at the price the v4 pool is seeded with: (phantomQuote + graduationThreshold) / reservedTokens. */
|
|
86
87
|
export declare const graduationMarketCap: (phantomQuote: bigint, graduationThreshold: bigint, reservedTokens: bigint, supply: bigint, quoteDecimals?: number) => number;
|
package/dist/curve.js
CHANGED
|
@@ -104,7 +104,8 @@ export function snipeTaxBpsAt(elapsedSeconds, windowSeconds, startBps, feeBps, c
|
|
|
104
104
|
return bps > ceiling ? ceiling : bps;
|
|
105
105
|
}
|
|
106
106
|
export const toNumber = (v, decimals = TOKEN_DECIMALS) => Number(formatUnits(v, decimals));
|
|
107
|
-
/** Spot market cap in whole quote units for `supply` at the current curve price
|
|
107
|
+
/** Spot market cap in whole quote units for `supply` at the current curve price. `quoteDecimals` is the quote
|
|
108
|
+
* asset's own, read off it by the caller (src/parabolic.ts `readQuoteAsset`) and never derived from a flag. */
|
|
108
109
|
export const marketCap = (quoteReserve, tokenReserve, supply, quoteDecimals = TOKEN_DECIMALS) => tokenReserve === 0n ? 0 : toNumber((quoteReserve * supply) / tokenReserve, quoteDecimals);
|
|
109
110
|
/** Market cap at the price the v4 pool is seeded with: (phantomQuote + graduationThreshold) / reservedTokens. */
|
|
110
111
|
export const graduationMarketCap = (phantomQuote, graduationThreshold, reservedTokens, supply, quoteDecimals = TOKEN_DECIMALS) => reservedTokens === 0n ? 0 : toNumber(((phantomQuote + graduationThreshold) * supply) / reservedTokens, quoteDecimals);
|
package/dist/curve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curve.js","sourceRoot":"","sources":["../src/curve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,EAA0B,MAAM,MAAM,CAAC;AAE3F;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,GAAG,GAAG,MAAO,CAAC;AAC3B,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,gFAAgF;AAChF,MAAM,CAAC,M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AAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,oIAAoI;AACpI,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAE,SAAkB,EAAE,GAAW,EAAE,WAAmB,EAAE,KAAc,EAAO,EAAE;IACpH,MAAM,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC3D,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5E,OAAO,SAAS,CAAC,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACnL,CAAC,CAAC"}
|
package/dist/docs.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { type Config } from "./config.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Adopted product parameters (adopted 2026-09-06, graduation threshold revised to $8,000 on 2026-09-16; published
|
|
4
|
+
* at https://www.parabolic.family/docs#parameters) and the chain's own facts, as text.
|
|
5
|
+
*
|
|
6
|
+
* Two things stopped being written here on 18 Sep 2026 (docs/20-multichain.md §4). **"Dollar-native"** meant one
|
|
7
|
+
* asset is both the money and the gas, which is Arc's property and nobody else's; what travels is that the curve
|
|
8
|
+
* is priced in a dollar asset rather than in the gas token, which is what every incumbent elsewhere does. And the
|
|
9
|
+
* **launch fee** is `msg.value` on the factory, so a written "$1.00 USDC" is a dollar on Arc and one ETH on an ETH
|
|
10
|
+
* chain; an agent that reads this document acts on it, so it now says where to read the figure instead of being
|
|
11
|
+
* the figure. The Arc network block is printed only on an Arc chain, for the same reason.
|
|
12
|
+
*/
|
|
3
13
|
export declare function docsText(config: Config): string;
|