@rhinestone/shared-configs 1.9.0 → 1.10.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.
@@ -34,6 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.classifyChainNetworks = classifyChainNetworks;
37
+ exports.classifyChainCaip2 = classifyChainCaip2;
38
+ exports.classifyChainExplorers = classifyChainExplorers;
37
39
  exports.classifyChainStacks = classifyChainStacks;
38
40
  exports.validateChainConfig = validateChainConfig;
39
41
  exports.formatValidationIssues = formatValidationIssues;
@@ -72,6 +74,18 @@ const STACKS = new Set(['op-stack', 'zksync', 'celo', 'vanilla']);
72
74
  // canonical positive integers — no leading zeros, which would let "01" and "1"
73
75
  // both address chain 1.
74
76
  const CHAIN_ID_KEY = /^[1-9][0-9]*$/;
77
+ // CAIP-2 (https://chainagnostic.org/CAIPs/caip-2): `<namespace>:<reference>`.
78
+ //
79
+ // Deliberately shape-only — the namespace set is not ours to close, and a chain
80
+ // arriving under a namespace this build has never heard of is a new chain, not
81
+ // a malformed one.
82
+ //
83
+ // Deliberately looser than the spec on namespace length too. CAIP-2 caps it at
84
+ // 8 characters; `hypercore` is 9, and that spelling is canonical for us across
85
+ // the orchestrator, the SDK and deposit-service. Tightening this to the spec
86
+ // would fail the build on our own established id, so the bound is the org's,
87
+ // not the spec's.
88
+ const CAIP2 = /^[-a-z0-9]{3,16}:[-_a-zA-Z0-9]{1,32}$/;
75
89
  const isObject = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
76
90
  const isNonEmptyString = (v) => typeof v === 'string' && v.length > 0;
77
91
  const isNonNegativeInt = (v) => typeof v === 'number' && Number.isInteger(v) && v >= 0;
@@ -107,8 +121,26 @@ function structuralProblems(chain) {
107
121
  if (!STACKS.has(chain.stack)) {
108
122
  problems.push(`stack ${JSON.stringify(chain.stack)} is not one of ${[...STACKS].join(', ')}`);
109
123
  }
110
- if (!isAbsentOr(chain.caip2, isNonEmptyString))
111
- problems.push('caip2 is not a string');
124
+ // Same deal as `network` and `stack` for EVM chains, where it is derived
125
+ // rather than authored — but unlike those two it is authored in the jsonnet
126
+ // for every chain whose id is not an EIP-155 one. Required either way: it is
127
+ // the id consumers key a chain by on the wire, and until it was always
128
+ // present each of them re-derived `eip155:<id>` for itself.
129
+ if (!CAIP2.test(chain.caip2)) {
130
+ problems.push(`caip2 ${JSON.stringify(chain.caip2)} is not a "<namespace>:<reference>" identifier`);
131
+ }
132
+ // Nullable, but the key has to be present: `null` is the answer for a chain
133
+ // with no explorer, and absent is not an answer at all. Stamped by
134
+ // classifyChainExplorers rather than authored for most chains, and checked
135
+ // here for the same reason as `network` and `stack` — this is the gate the
136
+ // published artifact passes through, and `ChainEntry` types consumers as
137
+ // though the key is always there.
138
+ if (!('explorer' in chain)) {
139
+ problems.push('explorer is missing (use null for a chain with no explorer)');
140
+ }
141
+ else if (chain.explorer !== null && !isChainExplorer(chain.explorer)) {
142
+ problems.push(`explorer ${JSON.stringify(chain.explorer)} is not null or { url (no trailing slash), addressPath, txPath (both slash-wrapped) }`);
143
+ }
112
144
  if (!isAbsentOr(chain.virtual, (v) => typeof v === 'boolean')) {
113
145
  problems.push('virtual is not a boolean');
114
146
  }
@@ -288,6 +320,185 @@ function classifyChainNetworks(chains, mainnets, testnets) {
288
320
  }
289
321
  return { chains: classified, issues };
290
322
  }
323
+ /**
324
+ * Stamps every chain with its canonical CAIP-2 id, deriving `eip155:<chainId>`
325
+ * for the chains that do not declare one.
326
+ *
327
+ * Why this exists: `caip2` was authored only for the chains whose id is not an
328
+ * EIP-155 one (Solana, Tron, HyperCore), so every consumer that wanted a CAIP-2
329
+ * id had to carry the same `entry.caip2 ?? \`eip155:${id}\`` fallback — the
330
+ * orchestrator, deposit-service, the SDK and the indexers each had their own.
331
+ * A fallback repeated in five places is a rule with five chances to drift, and
332
+ * the one place it is genuinely load-bearing (HyperCore, whose `eip155:1337`
333
+ * spelling is wrong) is exactly where getting it wrong is silent.
334
+ *
335
+ * Derived rather than authored per chain for the same reason `network` is: an
336
+ * EVM chain's CAIP-2 id is a restatement of its chain id, so authoring it would
337
+ * only create a second copy that could disagree with the first.
338
+ *
339
+ * Uniqueness is checked because `chainIdFromCaip2` is a reverse lookup over this
340
+ * field — two chains sharing an id makes that lookup silently return whichever
341
+ * came first.
342
+ */
343
+ function classifyChainCaip2(chains) {
344
+ const issues = [];
345
+ const classified = {};
346
+ const seen = new Map();
347
+ for (const [chainId, chain] of Object.entries(chains)) {
348
+ const chainName = isNonEmptyString(chain?.name)
349
+ ? chain.name
350
+ : '<unnamed>';
351
+ const declared = chain?.caip2;
352
+ // A malformed declaration is left exactly as authored rather than replaced
353
+ // with the derived form: quietly publishing `eip155:1337` for HyperCore is
354
+ // the precise mistake this field exists to prevent, so the structural check
355
+ // reports the real value instead.
356
+ if (declared !== undefined && !(typeof declared === 'string' && CAIP2.test(declared))) {
357
+ issues.push({
358
+ severity: 'error',
359
+ chainId,
360
+ chainName,
361
+ message: `declares a malformed caip2 ${JSON.stringify(declared)} — expected "<namespace>:<reference>"`,
362
+ });
363
+ classified[chainId] = withSortedKeys({ ...chain });
364
+ continue;
365
+ }
366
+ // A real EVM chain — and only a real EVM chain — has an id that is
367
+ // definitionally `eip155:<chainId>`. Everything else is addressed by an id
368
+ // the registry key cannot express, so its caip2 has to be authored.
369
+ const derivable = chain.vmType === 'evm' && chain.virtual !== true;
370
+ const derived = `eip155:${chainId}`;
371
+ // Deriving for a non-EVM or virtual entry would hand it an `eip155:` id that
372
+ // is confidently wrong — the same failure as HyperCore's `eip155:1337`,
373
+ // reintroduced by the very thing meant to prevent it. So the next svm/tvm or
374
+ // virtual chain added without an authored caip2 fails the build here rather
375
+ // than reaching the artifact under a wire id nothing uses.
376
+ if (declared === undefined && !derivable) {
377
+ issues.push({
378
+ severity: 'error',
379
+ chainId,
380
+ chainName,
381
+ message: `is ${chain.virtual === true ? 'a virtual chain' : `vmType ${JSON.stringify(chain.vmType)}`} and must author its caip2 — only a non-virtual EVM chain can derive ${JSON.stringify(derived)} from its registry key`,
382
+ });
383
+ classified[chainId] = withSortedKeys({ ...chain });
384
+ continue;
385
+ }
386
+ const caip2 = declared === undefined ? derived : declared;
387
+ // Conversely, a declaration that disagrees with the derivable form is a typo
388
+ // rather than an override.
389
+ if (declared !== undefined && derivable && declared !== derived) {
390
+ issues.push({
391
+ severity: 'error',
392
+ chainId,
393
+ chainName,
394
+ message: `declares caip2 ${JSON.stringify(declared)} but is a non-virtual EVM chain, whose canonical id is ${JSON.stringify(derived)}`,
395
+ });
396
+ }
397
+ const collision = seen.get(caip2);
398
+ if (collision !== undefined) {
399
+ issues.push({
400
+ severity: 'error',
401
+ chainId,
402
+ chainName,
403
+ message: `resolves to caip2 ${JSON.stringify(caip2)}, which chain ${collision} already uses — a reverse lookup cannot tell them apart`,
404
+ });
405
+ }
406
+ else {
407
+ seen.set(caip2, chainId);
408
+ }
409
+ classified[chainId] = withSortedKeys({ ...chain, caip2 });
410
+ }
411
+ return { chains: classified, issues };
412
+ }
413
+ // Near-universal across EVM explorers (Etherscan, Blockscout and the -scan
414
+ // forks all use these). Tronscan is the exception, and authors its own.
415
+ const DEFAULT_ADDRESS_PATH = '/address/';
416
+ const DEFAULT_TX_PATH = '/tx/';
417
+ // The slash convention is enforced, not assumed: a link is built by plain
418
+ // concatenation, so a path missing its leading slash or a url carrying a
419
+ // trailing one produces a subtly wrong URL rather than an obviously broken one.
420
+ function isChainExplorer(value) {
421
+ const hasSlashes = (v) => typeof v === 'string' && /^\/.*\/$/.test(v);
422
+ return (isObject(value) &&
423
+ typeof value.url === 'string' &&
424
+ value.url.length > 0 &&
425
+ !value.url.endsWith('/') &&
426
+ hasSlashes(value.addressPath) &&
427
+ hasSlashes(value.txPath));
428
+ }
429
+ /**
430
+ * Stamps every chain with its block explorer, derived from the chain's viem
431
+ * definition where it has one and authored in the jsonnet where it does not.
432
+ *
433
+ * Resolved by the entry's declared `viemChain` **name**, never by chain id. A
434
+ * lookup by id is actively wrong here: viem's chain 1337 is `localhost`, so
435
+ * HyperCore — whose registry key is 1337 — would silently inherit Localhost's
436
+ * metadata. That is the same mistake as addressing HyperCore by `eip155:1337`,
437
+ * arrived at from the other direction.
438
+ *
439
+ * A missing explorer is not an error. It resolves to `null`, which consumers
440
+ * render as plain text instead of a link; the cost of not knowing one is a
441
+ * missing hyperlink, not a wrong answer. It is still worth a warning, because
442
+ * the usual cause is a chain added without one rather than a chain that
443
+ * genuinely has none.
444
+ */
445
+ function classifyChainExplorers(chains, networks) {
446
+ const issues = [];
447
+ const stamped = {};
448
+ const entriesById = new Map();
449
+ for (const entry of [...networks.mainnets, ...networks.testnets]) {
450
+ entriesById.set(String(entry.id), entry);
451
+ }
452
+ for (const [chainId, chain] of Object.entries(chains)) {
453
+ const chainName = isNonEmptyString(chain?.name)
454
+ ? chain.name
455
+ : '<unnamed>';
456
+ const authored = chain?.explorer;
457
+ // Authoring wins outright, unlike `stack` where viem's definition is what
458
+ // the consumer actually uses. An explorer is presentation: the jsonnet is
459
+ // the only place a non-default path (Tronscan's `/#/address/`) or a
460
+ // preferred explorer among several can be expressed.
461
+ if (authored !== undefined) {
462
+ if (!isChainExplorer(authored)) {
463
+ issues.push({
464
+ severity: 'error',
465
+ chainId,
466
+ chainName,
467
+ message: `declares a malformed explorer ${JSON.stringify(authored)} — expected { url, addressPath, txPath }`,
468
+ });
469
+ stamped[chainId] = withSortedKeys({ ...chain });
470
+ continue;
471
+ }
472
+ stamped[chainId] = withSortedKeys({ ...chain, explorer: authored });
473
+ continue;
474
+ }
475
+ const viemChainName = entriesById.get(chainId)?.viemChain;
476
+ const url = viemChainName
477
+ ? viemChains[viemChainName]?.blockExplorers?.default?.url
478
+ : undefined;
479
+ if (typeof url !== 'string' || url.length === 0) {
480
+ issues.push({
481
+ severity: 'warning',
482
+ chainId,
483
+ chainName,
484
+ message: viemChainName
485
+ ? `viem chain "${viemChainName}" ships no block explorer — links will render as plain text until one is authored`
486
+ : 'has no viemChain to derive a block explorer from and authors none — links will render as plain text',
487
+ });
488
+ stamped[chainId] = withSortedKeys({ ...chain, explorer: null });
489
+ continue;
490
+ }
491
+ stamped[chainId] = withSortedKeys({
492
+ ...chain,
493
+ explorer: {
494
+ url: url.replace(/\/+$/, ''),
495
+ addressPath: DEFAULT_ADDRESS_PATH,
496
+ txPath: DEFAULT_TX_PATH,
497
+ },
498
+ });
499
+ }
500
+ return { chains: stamped, issues };
501
+ }
291
502
  const isChainStack = (v) => typeof v === 'string' && STACKS.has(v);
292
503
  const STACK_FORMATTERS = [
293
504
  ['op-stack', op_stack_1.chainConfig.formatters],
@@ -49,9 +49,19 @@ function bumpedVersion() {
49
49
  const [major, minor, patch] = packageVersion_1.PACKAGE_VERSION.split("-")[0].split(".");
50
50
  return `${major}.${minor}.${Number(patch) + 1}`;
51
51
  }
52
+ // Must produce a genuinely older version for every PACKAGE_VERSION, including
53
+ // the `x.y.0` releases where decrementing the patch has nowhere to go — clamping
54
+ // to 0 there returned PACKAGE_VERSION itself, which the client accepts as the
55
+ // steady state, so the staleness tests asserted the opposite of what they read.
52
56
  function olderVersion() {
53
- const [major, minor, patch] = packageVersion_1.PACKAGE_VERSION.split("-")[0].split(".");
54
- return `${major}.${minor}.${Math.max(0, Number(patch) - 1)}`;
57
+ const [major, minor, patch] = packageVersion_1.PACKAGE_VERSION.split("-")[0]
58
+ .split(".")
59
+ .map(Number);
60
+ if (patch > 0)
61
+ return `${major}.${minor}.${patch - 1}`;
62
+ if (minor > 0)
63
+ return `${major}.${minor - 1}.0`;
64
+ return `${major - 1}.0.0`;
55
65
  }
56
66
  function withEthereum(overrides) {
57
67
  return {
@@ -30,10 +30,16 @@ const TRON_CAIP2 = "tron:mainnet";
30
30
  (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)(SOLANA_CAIP2)).toBe(index_1.MainnetNetwork.SOLANA);
31
31
  (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)(TRON_CAIP2)).toBe(index_1.MainnetNetwork.TRON);
32
32
  });
33
- (0, bun_test_1.it)("returns undefined for unknown / eip155 caip2 strings", () => {
34
- // eip155 references are not registry-backed; callers parse them numerically.
35
- (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("eip155:1")).toBeUndefined();
33
+ (0, bun_test_1.it)("resolves eip155 caip2 strings, now that every entry carries one", () => {
34
+ (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("eip155:1")).toBe(index_1.MainnetNetwork.ETHEREUM);
35
+ (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("eip155:999")).toBe(index_1.MainnetNetwork.HYPEREVM);
36
+ });
37
+ (0, bun_test_1.it)("returns undefined for ids no chain uses", () => {
38
+ // 1337 is HyperCore's *registry key*, but its caip2 is `hypercore:mainnet`
39
+ // — so the eip155 spelling resolves to nothing, which is the point of
40
+ // reading the field instead of deriving it.
36
41
  (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("eip155:1337")).toBeUndefined();
42
+ (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("eip155:999999999")).toBeUndefined();
37
43
  (0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("hypercore:testnet")).toBeUndefined();
38
44
  });
39
45
  });
@@ -9,17 +9,19 @@ export declare function isNonEvmChainId(chainId: number): boolean;
9
9
  */
10
10
  export declare function getNonEvmChainIds(): number[];
11
11
  /**
12
- * Canonical CAIP-2 string for a chain id. Returns the registry-declared
13
- * `caip2` when present (non-EVM entries today), otherwise falls back to the
14
- * `eip155:<chainId>` form. Throws nothing returns the fallback for any
15
- * unknown id so callers don't need to special-case absent entries.
12
+ * Canonical CAIP-2 string for a chain id, read straight off the registry
13
+ * every entry carries one (see `classifyChainCaip2`). Falls back to the
14
+ * `eip155:<chainId>` form for an id the registry does not know, so callers
15
+ * don't need to special-case an absent entry.
16
16
  */
17
17
  export declare function getCaip2(chainId: number): string;
18
18
  /**
19
- * Reverse lookup — find the numeric chain id whose registry-declared
20
- * `caip2` matches the input, or `undefined` if no entry has it. EVM chains
21
- * (which omit `caip2` in the registry) are NOT covered by this lookup;
22
- * callers parse `eip155:N` references on their own.
19
+ * Reverse lookup — the numeric chain id addressed by a CAIP-2 string, or
20
+ * `undefined` if no registry entry uses it.
21
+ *
22
+ * Covers every chain, EVM included: `caip2` is present on all entries, and the
23
+ * generator rejects two chains resolving to the same one, so this is
24
+ * unambiguous.
23
25
  */
24
26
  export declare function chainIdFromCaip2(caip2: string): number | undefined;
25
27
  //# sourceMappingURL=chainVirtualization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chainVirtualization.d.ts","sourceRoot":"","sources":["../../src/chainVirtualization.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,SAAS,CAAC;AAIrD,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAI5C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKlE"}
1
+ {"version":3,"file":"chainVirtualization.d.ts","sourceRoot":"","sources":["../../src/chainVirtualization.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,SAAS,CAAC;AAIrD,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAI5C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKlE"}
@@ -44,22 +44,21 @@ function getNonEvmChainIds() {
44
44
  .map(([id]) => Number(id));
45
45
  }
46
46
  /**
47
- * Canonical CAIP-2 string for a chain id. Returns the registry-declared
48
- * `caip2` when present (non-EVM entries today), otherwise falls back to the
49
- * `eip155:<chainId>` form. Throws nothing returns the fallback for any
50
- * unknown id so callers don't need to special-case absent entries.
47
+ * Canonical CAIP-2 string for a chain id, read straight off the registry
48
+ * every entry carries one (see `classifyChainCaip2`). Falls back to the
49
+ * `eip155:<chainId>` form for an id the registry does not know, so callers
50
+ * don't need to special-case an absent entry.
51
51
  */
52
52
  function getCaip2(chainId) {
53
- const entry = chainRegistry[String(chainId)];
54
- if (entry?.caip2)
55
- return entry.caip2;
56
- return `eip155:${chainId}`;
53
+ return chainRegistry[String(chainId)]?.caip2 ?? `eip155:${chainId}`;
57
54
  }
58
55
  /**
59
- * Reverse lookup — find the numeric chain id whose registry-declared
60
- * `caip2` matches the input, or `undefined` if no entry has it. EVM chains
61
- * (which omit `caip2` in the registry) are NOT covered by this lookup;
62
- * callers parse `eip155:N` references on their own.
56
+ * Reverse lookup — the numeric chain id addressed by a CAIP-2 string, or
57
+ * `undefined` if no registry entry uses it.
58
+ *
59
+ * Covers every chain, EVM included: `caip2` is present on all entries, and the
60
+ * generator rejects two chains resolving to the same one, so this is
61
+ * unambiguous.
63
62
  */
64
63
  function chainIdFromCaip2(caip2) {
65
64
  for (const [id, entry] of Object.entries(chainRegistry)) {
@@ -18,6 +18,14 @@ interface NativeToken {
18
18
  symbol: string;
19
19
  decimals: number;
20
20
  }
21
+ interface Explorer {
22
+ /** Origin, no trailing slash. */
23
+ url: string;
24
+ /** Path to an address page, with both slashes (`/address/`). */
25
+ addressPath: string;
26
+ /** Path to a transaction page, with both slashes (`/tx/`). */
27
+ txPath: string;
28
+ }
21
29
  interface Chain {
22
30
  name: string;
23
31
  vmType: VmType;
@@ -25,8 +33,11 @@ interface Chain {
25
33
  network: ChainNetwork;
26
34
  /** Execution stack, for consumers that must synthesise a viem `Chain`. */
27
35
  stack: ChainStack;
28
- /** CAIP-2 chain identifier; populated for non-eip155 chains only. */
29
- caip2?: string;
36
+ /** CAIP-2 chain identifier. Present on every chain: authored for the
37
+ * non-eip155 ones, derived as `eip155:<chainId>` for the rest. */
38
+ caip2: string;
39
+ /** Block explorer, or null for a chain that has none (render plain text). */
40
+ explorer: Explorer | null;
30
41
  /** True for virtual chains (e.g. HyperCore) that settle on another chain. */
31
42
  virtual?: boolean;
32
43
  nativeToken: NativeToken;
@@ -39,5 +50,5 @@ interface Chain {
39
50
  }
40
51
  declare const chains: Record<SupportedChain, Chain>;
41
52
  export { chains };
42
- export type { Chain, Token, NativeToken };
53
+ export type { Chain, Token, NativeToken, Explorer };
43
54
  //# sourceMappingURL=chains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../src/chains.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEvJ,UAAU,KAAK;IACb,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,yEAAy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