@pushchain/core 6.0.27-alpha.1 → 6.0.27-alpha.3
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/AGW.md +114 -6
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/lib/agentic/contracts/prc20-metadata.d.ts +1 -1
- package/src/lib/agentic/contracts/prc20-metadata.js +11 -5
- package/src/lib/agentic/index.d.ts +1 -1
- package/src/lib/agentic/presets/aave-reserves.d.ts +4 -0
- package/src/lib/agentic/presets/aave-reserves.js +147 -0
- package/src/lib/agentic/presets/catalog.d.ts +25 -1
- package/src/lib/agentic/presets/catalog.js +70 -17
- package/src/lib/agentic/presets/default-policy.d.ts +9 -0
- package/src/lib/agentic/presets/default-policy.js +85 -0
- package/src/lib/agentic/presets/default-tokens.d.ts +4 -0
- package/src/lib/agentic/presets/default-tokens.js +39 -0
- package/src/lib/agentic/presets/index.js +130 -15
- package/src/lib/agentic/presets/operation-limits.d.ts +13 -0
- package/src/lib/agentic/presets/operation-limits.js +111 -0
- package/src/lib/agentic/presets/routes.d.ts +9 -0
- package/src/lib/agentic/presets/routes.js +51 -0
- package/src/lib/agentic/presets/types.d.ts +65 -13
- package/src/lib/index.d.ts +1 -1
- package/src/lib/universal/prc20-address.js +18 -4
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nativeAsset = exports.assetAddress = void 0;
|
|
4
|
+
exports.applyOperationLimits = applyOperationLimits;
|
|
5
|
+
const viem_1 = require("viem");
|
|
6
|
+
const assetAddress = (asset) => typeof asset.token === 'string' ? asset.token : asset.token.address;
|
|
7
|
+
exports.assetAddress = assetAddress;
|
|
8
|
+
const nativeAsset = (asset) => (0, exports.assetAddress)(asset) === viem_1.zeroAddress ||
|
|
9
|
+
(typeof asset.token !== 'string' && asset.token.mechanism === 'native');
|
|
10
|
+
exports.nativeAsset = nativeAsset;
|
|
11
|
+
/** Compile reviewed protocol argument positions. No exchange-rate or share guesses. */
|
|
12
|
+
function applyOperationLimits(definitions, assets) {
|
|
13
|
+
const matches = (definition) => {
|
|
14
|
+
const b = definition.budget;
|
|
15
|
+
if (!b)
|
|
16
|
+
return [];
|
|
17
|
+
if (b.kind === 'native-value')
|
|
18
|
+
return assets.filter(exports.nativeAsset);
|
|
19
|
+
if (b.kind === 'fixed-token')
|
|
20
|
+
return assets.filter((a) => !(0, exports.nativeAsset)(a) && (0, viem_1.getAddress)((0, exports.assetAddress)(a)) === (0, viem_1.getAddress)(b.token));
|
|
21
|
+
if (b.kind === 'token-argument')
|
|
22
|
+
return assets.filter((a) => !(0, exports.nativeAsset)(a) &&
|
|
23
|
+
(!b.tokens ||
|
|
24
|
+
b.tokens.some((t) => (0, viem_1.getAddress)(t) === (0, viem_1.getAddress)((0, exports.assetAddress)(a)))));
|
|
25
|
+
return [];
|
|
26
|
+
};
|
|
27
|
+
const previewAll = !definitions.some((d) => matches(d).length > 0);
|
|
28
|
+
const calls = [];
|
|
29
|
+
const disabledCalls = [], excludedCalls = [];
|
|
30
|
+
const knownTokens = new Set();
|
|
31
|
+
let enabled = false;
|
|
32
|
+
for (const definition of definitions) {
|
|
33
|
+
const { budget, ...call } = definition;
|
|
34
|
+
if (!budget || budget.kind === 'setup') {
|
|
35
|
+
calls.push(call);
|
|
36
|
+
if (!budget)
|
|
37
|
+
enabled = true; // Non-budgeted internal fixture entries only.
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const info = {
|
|
41
|
+
target: call.target,
|
|
42
|
+
selector: call.selector,
|
|
43
|
+
...(call.app ? { app: call.app } : {}),
|
|
44
|
+
};
|
|
45
|
+
if (budget.kind === 'unsupported') {
|
|
46
|
+
excludedCalls.push({
|
|
47
|
+
...info,
|
|
48
|
+
reason: budget.reason,
|
|
49
|
+
...(budget.alternative ? { alternative: budget.alternative } : {}),
|
|
50
|
+
});
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (budget.kind === 'fixed-token')
|
|
54
|
+
knownTokens.add((0, viem_1.getAddress)(budget.token));
|
|
55
|
+
if (budget.kind === 'native-value')
|
|
56
|
+
knownTokens.add(viem_1.zeroAddress);
|
|
57
|
+
if (budget.kind === 'token-argument')
|
|
58
|
+
budget.tokens?.forEach((t) => knownTokens.add((0, viem_1.getAddress)(t)));
|
|
59
|
+
const selected = matches(definition);
|
|
60
|
+
if (!selected.length && !previewAll) {
|
|
61
|
+
excludedCalls.push({
|
|
62
|
+
...info,
|
|
63
|
+
reason: 'UNSELECTED_TOKEN',
|
|
64
|
+
...(budget.kind === 'fixed-token'
|
|
65
|
+
? { token: (0, viem_1.getAddress)(budget.token) }
|
|
66
|
+
: {}),
|
|
67
|
+
});
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
for (const asset of selected.length ? selected : [undefined]) {
|
|
71
|
+
const maximum = asset?.maxPerCall ?? BigInt(0);
|
|
72
|
+
const pins = [...(call.pins ?? [])];
|
|
73
|
+
if (budget.kind === 'token-argument' && asset)
|
|
74
|
+
pins.push({
|
|
75
|
+
arg: budget.tokenArg,
|
|
76
|
+
expected: (0, viem_1.getAddress)((0, exports.assetAddress)(asset)),
|
|
77
|
+
});
|
|
78
|
+
if (budget.kind !== 'native-value')
|
|
79
|
+
pins.push({ arg: budget.amountArg, max: maximum });
|
|
80
|
+
calls.push({
|
|
81
|
+
...call,
|
|
82
|
+
...(pins.length ? { pins } : {}),
|
|
83
|
+
...(budget.kind === 'native-value' ? { maxValue: maximum } : {}),
|
|
84
|
+
});
|
|
85
|
+
if (maximum > BigInt(0))
|
|
86
|
+
enabled = true;
|
|
87
|
+
else
|
|
88
|
+
disabledCalls.push({
|
|
89
|
+
...info,
|
|
90
|
+
reason: asset
|
|
91
|
+
? 'ZERO_CAP'
|
|
92
|
+
: assets.length
|
|
93
|
+
? 'UNSELECTED_TOKEN'
|
|
94
|
+
: 'TOKEN_REQUIRED',
|
|
95
|
+
...(asset
|
|
96
|
+
? { token: (0, exports.assetAddress)(asset) }
|
|
97
|
+
: budget.kind === 'fixed-token'
|
|
98
|
+
? { token: (0, viem_1.getAddress)(budget.token) }
|
|
99
|
+
: {}),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
calls,
|
|
105
|
+
enabled,
|
|
106
|
+
disabledCalls,
|
|
107
|
+
excludedCalls,
|
|
108
|
+
knownTokens: [...knownTokens],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=operation-limits.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PUSH_NETWORK } from '../../constants/enums';
|
|
2
|
+
import type { RuleAsset } from '../agentic.types';
|
|
3
|
+
import type { PresetChainReadiness, PresetConfigurationIssue } from './types';
|
|
4
|
+
/** Offline registry checks only. Grant preparation still verifies source metadata
|
|
5
|
+
* and wiring against chain state before any signature or transaction. */
|
|
6
|
+
export declare function presetRoutes(chain: string, assets: RuleAsset[], network: PUSH_NETWORK, funding: 'push' | 'destination'): {
|
|
7
|
+
bridgeAssets: PresetChainReadiness['bridgeAssets'];
|
|
8
|
+
issues: PresetConfigurationIssue[];
|
|
9
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.presetRoutes = presetRoutes;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
const enums_1 = require("../../constants/enums");
|
|
6
|
+
const helpers_1 = require("../../orchestrator/internals/helpers");
|
|
7
|
+
const prc20_address_1 = require("../../universal/prc20-address");
|
|
8
|
+
const deployments_1 = require("../deployments");
|
|
9
|
+
const operation_limits_1 = require("./operation-limits");
|
|
10
|
+
/** Offline registry checks only. Grant preparation still verifies source metadata
|
|
11
|
+
* and wiring against chain state before any signature or transaction. */
|
|
12
|
+
function presetRoutes(chain, assets, network, funding) {
|
|
13
|
+
const issues = [];
|
|
14
|
+
network =
|
|
15
|
+
network === enums_1.PUSH_NETWORK.TESTNET ? enums_1.PUSH_NETWORK.TESTNET_DONUT : network;
|
|
16
|
+
if (!(0, deployments_1.generationsFor)(network).some((g) => g.advertised))
|
|
17
|
+
issues.push({
|
|
18
|
+
code: 'AGW_NETWORK_UNAVAILABLE',
|
|
19
|
+
message: `No verified AGW deployment is registered for ${network}.`,
|
|
20
|
+
});
|
|
21
|
+
const supported = helpers_1.SUPPORTED_GATEWAY_CHAINS.includes(chain);
|
|
22
|
+
if (!supported)
|
|
23
|
+
issues.push({
|
|
24
|
+
code: 'DESTINATION_UNAVAILABLE',
|
|
25
|
+
message: `The SDK has no supported gateway route to ${chain}; this is a catalog template.`,
|
|
26
|
+
});
|
|
27
|
+
const bridgeAssets = assets.map((asset) => {
|
|
28
|
+
const token = (0, operation_limits_1.assetAddress)(asset);
|
|
29
|
+
try {
|
|
30
|
+
if (!supported)
|
|
31
|
+
throw new Error(`No supported gateway route to ${chain}`);
|
|
32
|
+
const prc20 = (0, prc20_address_1.getPRC20Address)({ chain, address: token }, { network });
|
|
33
|
+
return {
|
|
34
|
+
token,
|
|
35
|
+
prc20: (0, viem_1.getAddress)(prc20.address),
|
|
36
|
+
status: 'registered',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
if (funding === 'push')
|
|
41
|
+
issues.push({
|
|
42
|
+
code: 'BRIDGE_ASSET_UNAVAILABLE',
|
|
43
|
+
token,
|
|
44
|
+
message: `No SDK PRC20 mapping for ${chain}:${token} on ${network}. Use a supported source asset or explicitly choose destination funding for assets already at the CEA.`,
|
|
45
|
+
});
|
|
46
|
+
return { token, status: 'unavailable' };
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return { bridgeAssets, issues };
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Address } from 'viem';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PUSH_NETWORK } from '../../constants/enums';
|
|
3
|
+
import type { Rule, RuleAsset, RuleCall, ForeignChainNamespace } from '../agentic.types';
|
|
3
4
|
export type PresetCategory = 'DEXES' | 'LENDING' | 'STAKING' | 'PREDICTION';
|
|
4
5
|
export interface Preset {
|
|
5
6
|
type: 'CATEGORY';
|
|
@@ -7,7 +8,7 @@ export interface Preset {
|
|
|
7
8
|
name: string;
|
|
8
9
|
chains: ForeignChainNamespace[];
|
|
9
10
|
}
|
|
10
|
-
/**
|
|
11
|
+
/** Presets generate expiry; optional fields retain editable-template compatibility. */
|
|
11
12
|
export type PresetRuleTemplate = Omit<Rule, 'agent' | 'validUntil'> & {
|
|
12
13
|
agent?: Address;
|
|
13
14
|
validUntil?: number;
|
|
@@ -15,23 +16,78 @@ export type PresetRuleTemplate = Omit<Rule, 'agent' | 'validUntil'> & {
|
|
|
15
16
|
export interface PresetAsset {
|
|
16
17
|
chainNamespace?: ForeignChainNamespace;
|
|
17
18
|
token: RuleAsset['token'];
|
|
18
|
-
/**
|
|
19
|
+
/** Per allowed operation and per Push outbound, in raw token units. Omitted = 0.
|
|
20
|
+
* Does not aggregate multiple destination calls in one transaction. */
|
|
19
21
|
maxPerCall?: bigint;
|
|
22
|
+
/** Cumulative Push-outbound amount only; not lifetime activity on destination-held assets. Omitted = 0. */
|
|
20
23
|
maxTotal?: bigint;
|
|
21
24
|
}
|
|
22
25
|
export interface PresetOptions {
|
|
23
|
-
/**
|
|
26
|
+
/** Offline route/deployment checks; defaults to TESTNET_DONUT. */
|
|
27
|
+
network?: PUSH_NETWORK;
|
|
28
|
+
/** Push funding requires PRC20 routes. Destination funding explicitly emits
|
|
29
|
+
* empty bridge assets while preserving selected token/call limits in metadata.
|
|
30
|
+
* The CEA must already hold the required destination assets. Default: push. */
|
|
31
|
+
funding?: 'push' | 'destination';
|
|
32
|
+
/** Push-PC budget ceiling per outbound; omitted uses the catalog policy (20 PC).
|
|
33
|
+
* Explicit zero is preserved. This is not the fee charged. */
|
|
24
34
|
maxGasPerCall?: bigint;
|
|
25
35
|
chainNamespace?: ForeignChainNamespace;
|
|
26
36
|
agent?: Address;
|
|
37
|
+
/** Omitted: seven days from generation time. Explicit expiry is preserved. */
|
|
27
38
|
validUntil?: number;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
39
|
+
/** Omitted: include the catalog's curated tokens and explicit spending policy.
|
|
40
|
+
* An explicit array replaces all defaults (including [] to select no tokens).
|
|
41
|
+
* Supplied assets retain zero for omitted caps; no policy is guessed for them.
|
|
42
|
+
* DEX swaps with fewer than two tokens remain zero-input-cap review templates. */
|
|
30
43
|
assets?: PresetAsset[];
|
|
31
44
|
}
|
|
32
45
|
export interface ReadyPresetOptions extends PresetOptions {
|
|
33
46
|
agent: Address;
|
|
34
|
-
|
|
47
|
+
}
|
|
48
|
+
/** Offline configuration/registry checks; chain state and balances are not checked. */
|
|
49
|
+
export interface PresetConfigurationIssue {
|
|
50
|
+
code: 'AGENT_REQUIRED' | 'EXPIRY_REQUIRED' | 'GAS_BUDGET_REQUIRED' | 'ASSETS_REQUIRED' | 'TOKEN_PAIR_REQUIRED' | 'NO_ENABLED_OPERATION' | 'AGW_NETWORK_UNAVAILABLE' | 'DESTINATION_UNAVAILABLE' | 'BRIDGE_ASSET_UNAVAILABLE';
|
|
51
|
+
message: string;
|
|
52
|
+
token?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface PresetCallIssue {
|
|
55
|
+
target: string;
|
|
56
|
+
selector: RuleCall['selector'];
|
|
57
|
+
app?: string;
|
|
58
|
+
reason: 'TOKEN_REQUIRED' | 'ZERO_CAP' | 'UNSELECTED_TOKEN' | 'SHARE_AMOUNT' | 'DYNAMIC_AMOUNT' | 'POSITION_AMOUNT';
|
|
59
|
+
token?: string;
|
|
60
|
+
alternative?: RuleCall['selector'];
|
|
61
|
+
}
|
|
62
|
+
export interface PresetChainReadiness {
|
|
63
|
+
chainNamespace: ForeignChainNamespace;
|
|
64
|
+
ready: boolean;
|
|
65
|
+
configurationReady: boolean;
|
|
66
|
+
funding: 'push' | 'destination';
|
|
67
|
+
/** Selected destination permissions, retained even when bridge assets is empty. */
|
|
68
|
+
selectedAssets: RuleAsset[];
|
|
69
|
+
/** Registry presence only; grant preparation verifies exact on-chain identity. */
|
|
70
|
+
bridgeAssets: {
|
|
71
|
+
token: string;
|
|
72
|
+
status: 'registered' | 'unavailable';
|
|
73
|
+
prc20?: Address;
|
|
74
|
+
}[];
|
|
75
|
+
issues: PresetConfigurationIssue[];
|
|
76
|
+
/** Calls present in the rule but disabled by a zero amount/value maximum. */
|
|
77
|
+
disabledCalls: PresetCallIssue[];
|
|
78
|
+
/** Calls deliberately omitted, including operations with incompatible amount units. */
|
|
79
|
+
excludedCalls: PresetCallIssue[];
|
|
80
|
+
/** Known catalog token addresses, including the curated default subset. */
|
|
81
|
+
knownTokens: string[];
|
|
82
|
+
/** Selected tokens with a zero Push-outbound budget; destination-held assets are separate. */
|
|
83
|
+
zeroBridgeLimits: string[];
|
|
84
|
+
}
|
|
85
|
+
export interface PresetResult<T extends PresetRuleTemplate = PresetRuleTemplate> {
|
|
86
|
+
rules: T[];
|
|
87
|
+
readiness: {
|
|
88
|
+
ready: boolean;
|
|
89
|
+
chains: PresetChainReadiness[];
|
|
90
|
+
};
|
|
35
91
|
}
|
|
36
92
|
export interface AgenticPresets {
|
|
37
93
|
list(options?: {
|
|
@@ -39,10 +95,6 @@ export interface AgenticPresets {
|
|
|
39
95
|
}): {
|
|
40
96
|
presets: Preset[];
|
|
41
97
|
};
|
|
42
|
-
get(preset: PresetCategory, options: ReadyPresetOptions):
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
get(preset: PresetCategory, options?: PresetOptions): {
|
|
46
|
-
rules: PresetRuleTemplate[];
|
|
47
|
-
};
|
|
98
|
+
get(preset: PresetCategory, options: ReadyPresetOptions): PresetResult<Rule>;
|
|
99
|
+
get(preset: PresetCategory, options?: PresetOptions): PresetResult;
|
|
48
100
|
}
|
package/src/lib/index.d.ts
CHANGED
|
@@ -26,4 +26,4 @@ export type { PushChainInitializeOptions } from './push-chain/push-chain';
|
|
|
26
26
|
export { AGENTIC_ERROR_CODE, AgenticError, AgenticRevertError, } from './agentic';
|
|
27
27
|
export type { AgenticAddress, AgenticDoor, AgenticErrorCode, AgenticHex, AgenticNamespace, AgenticProgressHook, AgenticTxMetadata, AgenticWallet, AllowedCall, AssetCap, Checkpoint, CheckpointKind, CreateOptions, CreateResult, ForeignChainNamespace, DecodedSolanaRule, Rule, RuleInput, Pin, Spent, WalletMarker, ArgumentPath, RulesRecord, Selector, WalletInfo, WalletSummary, } from './agentic';
|
|
28
28
|
export { PushChain };
|
|
29
|
-
export type { Preset, PresetCategory, PresetAsset, PresetOptions, ReadyPresetOptions, PresetRuleTemplate, AgenticPresets, } from './agentic';
|
|
29
|
+
export type { Preset, PresetCategory, PresetAsset, PresetOptions, ReadyPresetOptions, PresetRuleTemplate, PresetResult, PresetChainReadiness, PresetConfigurationIssue, PresetCallIssue, AgenticPresets, } from './agentic';
|
|
@@ -4,6 +4,10 @@ exports.getPRC20Address = getPRC20Address;
|
|
|
4
4
|
const enums_1 = require("../constants/enums");
|
|
5
5
|
const tokens_1 = require("../constants/tokens");
|
|
6
6
|
const chain_1 = require("../constants/chain");
|
|
7
|
+
const viem_1 = require("viem");
|
|
8
|
+
const sameTokenAddress = (a, b) => (0, viem_1.isAddress)(a, { strict: false }) && (0, viem_1.isAddress)(b, { strict: false })
|
|
9
|
+
? a.toLowerCase() === b.toLowerCase()
|
|
10
|
+
: a === b;
|
|
7
11
|
/** Shared pure origin-to-PRC20 mapping; no signer or network reads. */
|
|
8
12
|
function getPRC20Address(token, options) {
|
|
9
13
|
const network = options?.network ?? enums_1.PUSH_NETWORK.TESTNET_DONUT;
|
|
@@ -33,7 +37,8 @@ function getPRC20Address(token, options) {
|
|
|
33
37
|
// MoveableToken path: infer chain by symbol + address
|
|
34
38
|
for (const [key, list] of Object.entries(tokens_1.MOVEABLE_TOKENS)) {
|
|
35
39
|
const k = key;
|
|
36
|
-
const match = (list ?? []).find((t) => t.symbol === token.symbol &&
|
|
40
|
+
const match = (list ?? []).find((t) => t.symbol === token.symbol &&
|
|
41
|
+
sameTokenAddress(t.address, token.address));
|
|
37
42
|
if (match) {
|
|
38
43
|
originChain = k;
|
|
39
44
|
tokenSymbol = match.symbol;
|
|
@@ -46,7 +51,7 @@ function getPRC20Address(token, options) {
|
|
|
46
51
|
// { chain, address } path: trust the provided chain and resolve symbol via registry
|
|
47
52
|
originChain = token.chain;
|
|
48
53
|
const list = tokens_1.MOVEABLE_TOKENS[originChain] ?? [];
|
|
49
|
-
const match = list.find((t) => t.address
|
|
54
|
+
const match = list.find((t) => sameTokenAddress(t.address, token.address));
|
|
50
55
|
if (match) {
|
|
51
56
|
tokenSymbol = match.symbol;
|
|
52
57
|
tokenDecimals = match.decimals;
|
|
@@ -60,14 +65,23 @@ function getPRC20Address(token, options) {
|
|
|
60
65
|
throw new Error(`No PRC20 address map configured for network: ${network}`);
|
|
61
66
|
}
|
|
62
67
|
// Map token → synthetic key by origin chain family
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
// Current synthetic keys represent testnet sources. Mainnet assets must never
|
|
69
|
+
// resolve to a same-symbol Sepolia token on Donut.
|
|
70
|
+
const isEthFamily = originChain === enums_1.CHAIN.ETHEREUM_SEPOLIA;
|
|
65
71
|
const isArbFamily = originChain === enums_1.CHAIN.ARBITRUM_SEPOLIA;
|
|
66
72
|
const isBaseFamily = originChain === enums_1.CHAIN.BASE_SEPOLIA;
|
|
67
73
|
const isBnbFamily = originChain === enums_1.CHAIN.BNB_TESTNET;
|
|
68
74
|
const isSolFamily = originChain === enums_1.CHAIN.SOLANA_DEVNET;
|
|
69
75
|
let key;
|
|
70
76
|
switch (tokenSymbol) {
|
|
77
|
+
case 'WETH':
|
|
78
|
+
case 'stETH': {
|
|
79
|
+
// These deployments represent Sepolia tokens, not other chains' assets.
|
|
80
|
+
if (originChain !== enums_1.CHAIN.ETHEREUM_SEPOLIA)
|
|
81
|
+
throw new Error(`Unsupported ${tokenSymbol} origin chain for synthetic mapping`);
|
|
82
|
+
key = tokenSymbol === 'WETH' ? 'WETH_ETH' : 'stETH_ETH';
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
71
85
|
case 'ETH': {
|
|
72
86
|
if (isEthFamily)
|
|
73
87
|
key = 'pETH';
|