@panoptic-eng/sdk 1.0.4 → 1.0.6
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/LICENSE +21 -0
- package/README.md +75 -20
- package/dist/cow/index.d.ts +5 -0
- package/dist/cow/index.js +5 -0
- package/dist/cow/types.d.ts +4 -0
- package/dist/cow/types.js +0 -0
- package/dist/cow-Dy-Cd09v.js +1405 -0
- package/dist/cow-Dy-Cd09v.js.map +1 -0
- package/dist/index-BuJcj5aO.d.ts +275 -0
- package/dist/index-BuJcj5aO.d.ts.map +1 -0
- package/dist/index-DVMjZi1E.d.ts +1801 -0
- package/dist/index-DVMjZi1E.d.ts.map +1 -0
- package/dist/index.d.ts +6192 -2513
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3242 -5537
- package/dist/index.js.map +1 -1
- package/dist/irm-CBrX8bjH.js +2375 -0
- package/dist/irm-CBrX8bjH.js.map +1 -0
- package/dist/irm-CGykVo3q.d.ts +32 -0
- package/dist/irm-CGykVo3q.d.ts.map +1 -0
- package/dist/irm-zWjtffWA.d.ts +85 -0
- package/dist/irm-zWjtffWA.d.ts.map +1 -0
- package/dist/panoptic/v2/index.d.ts +9370 -0
- package/dist/panoptic/v2/index.d.ts.map +1 -0
- package/dist/panoptic/v2/index.js +10765 -0
- package/dist/panoptic/v2/index.js.map +1 -0
- package/dist/panoptic/v2/types/index.d.ts +3 -0
- package/dist/panoptic/v2/types/index.js +0 -0
- package/dist/position-FxaZi608.js +10530 -0
- package/dist/position-FxaZi608.js.map +1 -0
- package/dist/router-gzYGM1OO.js +1012 -0
- package/dist/router-gzYGM1OO.js.map +1 -0
- package/dist/types-BQejAFnu.d.ts +245 -0
- package/dist/types-BQejAFnu.d.ts.map +1 -0
- package/dist/types-CRvvn2ce.d.ts +128 -0
- package/dist/types-CRvvn2ce.d.ts.map +1 -0
- package/dist/uniswap/index.d.ts +291 -0
- package/dist/uniswap/index.d.ts.map +1 -0
- package/dist/uniswap/index.js +5 -0
- package/dist/writes-CVCD6Ers.js +4302 -0
- package/dist/writes-CVCD6Ers.js.map +1 -0
- package/package.json +24 -7
|
@@ -0,0 +1,1405 @@
|
|
|
1
|
+
import { PanopticError$1 as PanopticError, submitWrite } from "./position-FxaZi608.js";
|
|
2
|
+
import { erc20Abi, getAddress, keccak256, maxUint256, stringToHex, zeroAddress } from "viem";
|
|
3
|
+
|
|
4
|
+
//#region src/cow/addresses.ts
|
|
5
|
+
/** GPv2Settlement — EIP-712 verifying contract for signed orders. */
|
|
6
|
+
const COW_SETTLEMENT = "0x9008D19f58AAbD9eD0D60971565AA8510560ab41";
|
|
7
|
+
/** GPv2VaultRelayer — the ERC20 approval target (NOT the settlement contract). */
|
|
8
|
+
const COW_VAULT_RELAYER = "0xC92E8bdf79f0507f65a392b0ab4667716BFE0110";
|
|
9
|
+
/**
|
|
10
|
+
* Buy-token marker for native ETH. Orders buying this sentinel settle in
|
|
11
|
+
* native ETH (the settlement contract unwraps WETH). Only valid on the buy
|
|
12
|
+
* side — selling native ETH requires the eth-flow contract (unsupported here).
|
|
13
|
+
*/
|
|
14
|
+
const COW_NATIVE_ETH = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
15
|
+
/** Order-book API base URL per chain. */
|
|
16
|
+
const COW_API_URLS = {
|
|
17
|
+
1: "https://api.cow.fi/mainnet",
|
|
18
|
+
11155111: "https://api.cow.fi/sepolia"
|
|
19
|
+
};
|
|
20
|
+
/** Whether CoW Protocol has an order book for the chain. */
|
|
21
|
+
function isCowSupportedChain(chainId) {
|
|
22
|
+
return COW_API_URLS[Number(chainId)] !== void 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/cow/approval.ts
|
|
27
|
+
/** Check whether the vault relayer can pull `amount` of the sell token. */
|
|
28
|
+
async function checkCowApproval(params) {
|
|
29
|
+
const { client, sellToken, owner, amount } = params;
|
|
30
|
+
const allowance = await client.readContract({
|
|
31
|
+
address: sellToken,
|
|
32
|
+
abi: erc20Abi,
|
|
33
|
+
functionName: "allowance",
|
|
34
|
+
args: [owner, COW_VAULT_RELAYER]
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
needsApproval: allowance < amount,
|
|
38
|
+
allowance
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Approve the sell token to the vault relayer (defaults to unlimited). */
|
|
42
|
+
async function approveErc20ForCow(params) {
|
|
43
|
+
const { client, walletClient, account, sellToken, amount = maxUint256, txOverrides } = params;
|
|
44
|
+
return submitWrite({
|
|
45
|
+
client,
|
|
46
|
+
walletClient,
|
|
47
|
+
account,
|
|
48
|
+
address: sellToken,
|
|
49
|
+
abi: erc20Abi,
|
|
50
|
+
functionName: "approve",
|
|
51
|
+
args: [COW_VAULT_RELAYER, amount],
|
|
52
|
+
txOverrides
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/cow/compare.ts
|
|
58
|
+
const BPS_DENOMINATOR$1 = 10000n;
|
|
59
|
+
/**
|
|
60
|
+
* Pick the venue with the better effective price. Exact-in compares net
|
|
61
|
+
* output (higher wins); exact-out compares gross input (lower wins). With a
|
|
62
|
+
* single usable quote that venue wins; ties go to Uniswap (instant
|
|
63
|
+
* settlement); with no usable quotes Uniswap wins by default.
|
|
64
|
+
*/
|
|
65
|
+
function pickBestVenue(params) {
|
|
66
|
+
const { kind, uniswap, cow } = params;
|
|
67
|
+
const uniAmount = kind === "sell" ? uniswap?.amountOut : uniswap?.amountIn;
|
|
68
|
+
const cowAmount = kind === "sell" ? cow?.buyAmount : cow?.sellAmountTotal;
|
|
69
|
+
if (cowAmount === void 0 || cowAmount <= 0n) return { winner: "uniswap" };
|
|
70
|
+
if (uniAmount === void 0 || uniAmount <= 0n) return { winner: "cow" };
|
|
71
|
+
const cowWins = kind === "sell" ? cowAmount > uniAmount : cowAmount < uniAmount;
|
|
72
|
+
const [better, worse] = cowWins ? [cowAmount, uniAmount] : [uniAmount, cowAmount];
|
|
73
|
+
const advantageBps = kind === "sell" ? (better - worse) * BPS_DENOMINATOR$1 / worse : (worse - better) * BPS_DENOMINATOR$1 / better;
|
|
74
|
+
return {
|
|
75
|
+
winner: cowWins ? "cow" : "uniswap",
|
|
76
|
+
advantageBps
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/cow/eip712.ts
|
|
82
|
+
/** GPv2 `Order` struct, in EIP-712 typed-data form. */
|
|
83
|
+
const COW_ORDER_TYPES = { Order: [
|
|
84
|
+
{
|
|
85
|
+
name: "sellToken",
|
|
86
|
+
type: "address"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "buyToken",
|
|
90
|
+
type: "address"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "receiver",
|
|
94
|
+
type: "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "sellAmount",
|
|
98
|
+
type: "uint256"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "buyAmount",
|
|
102
|
+
type: "uint256"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "validTo",
|
|
106
|
+
type: "uint32"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "appData",
|
|
110
|
+
type: "bytes32"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "feeAmount",
|
|
114
|
+
type: "uint256"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "kind",
|
|
118
|
+
type: "string"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "partiallyFillable",
|
|
122
|
+
type: "bool"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "sellTokenBalance",
|
|
126
|
+
type: "string"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "buyTokenBalance",
|
|
130
|
+
type: "string"
|
|
131
|
+
}
|
|
132
|
+
] };
|
|
133
|
+
/** GPv2 order-cancellation struct (batch of order UIDs). */
|
|
134
|
+
const COW_CANCELLATION_TYPES = { OrderCancellations: [{
|
|
135
|
+
name: "orderUids",
|
|
136
|
+
type: "bytes[]"
|
|
137
|
+
}] };
|
|
138
|
+
/** EIP-712 domain for GPv2Settlement on the given chain. */
|
|
139
|
+
function cowDomain(chainId) {
|
|
140
|
+
return {
|
|
141
|
+
name: "Gnosis Protocol",
|
|
142
|
+
version: "v2",
|
|
143
|
+
chainId: Number(chainId),
|
|
144
|
+
verifyingContract: COW_SETTLEMENT
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Full appData JSON document attached to orders. The order itself carries only
|
|
149
|
+
* its keccak256 hash; the API stores the document when it accompanies the
|
|
150
|
+
* order POST. Must stay byte-identical to {@link APP_DATA_HASH}.
|
|
151
|
+
*/
|
|
152
|
+
const APP_DATA_DOC = "{\"appCode\":\"panoptic\",\"metadata\":{},\"version\":\"1.3.0\"}";
|
|
153
|
+
/** keccak256 of {@link APP_DATA_DOC} — the `appData` field signed in the order. */
|
|
154
|
+
const APP_DATA_HASH = keccak256(stringToHex(APP_DATA_DOC));
|
|
155
|
+
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/cow/errors.ts
|
|
158
|
+
/** The chain has no CoW order book. */
|
|
159
|
+
var CowUnsupportedChainError = class extends PanopticError {
|
|
160
|
+
name = "CowUnsupportedChainError";
|
|
161
|
+
constructor(chainId, cause) {
|
|
162
|
+
super(`CoW Protocol not available on chain ${chainId}`, cause);
|
|
163
|
+
this.chainId = chainId;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
/** The order-book API rejected a request (non-2xx response). */
|
|
167
|
+
var CowApiError = class extends PanopticError {
|
|
168
|
+
name = "CowApiError";
|
|
169
|
+
constructor(errorType, message, status, cause) {
|
|
170
|
+
super(message, cause);
|
|
171
|
+
this.errorType = errorType;
|
|
172
|
+
this.status = status;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
/** The sell amount is too small to cover the protocol fee (dust order). */
|
|
176
|
+
var CowOrderTooSmallError = class extends CowApiError {
|
|
177
|
+
name = "CowOrderTooSmallError";
|
|
178
|
+
constructor(message, status, cause) {
|
|
179
|
+
super("SellAmountDoesNotCoverFee", message, status, cause);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
/** Selling native ETH requires the eth-flow contract (unsupported here); buying it is fine. */
|
|
183
|
+
var CowNativeTokenError = class extends PanopticError {
|
|
184
|
+
name = "CowNativeTokenError";
|
|
185
|
+
constructor(cause) {
|
|
186
|
+
super("CoW orders cannot sell native ETH (eth-flow not supported)", cause);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/cow/api.ts
|
|
192
|
+
/** Resolve the order-book base URL for a chain (override wins). */
|
|
193
|
+
function resolveCowApiUrl(chainId, apiUrl) {
|
|
194
|
+
const url = apiUrl ?? COW_API_URLS[Number(chainId)];
|
|
195
|
+
if (!url) throw new CowUnsupportedChainError(chainId);
|
|
196
|
+
return url;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Call the order book and parse JSON, mapping non-2xx responses to
|
|
200
|
+
* {@link CowApiError} (dust orders to {@link CowOrderTooSmallError}).
|
|
201
|
+
*/
|
|
202
|
+
async function cowApiRequest(baseUrl, path, init) {
|
|
203
|
+
const headers = new Headers(init?.headers);
|
|
204
|
+
if (!headers.has("Content-Type")) headers.set("Content-Type", "application/json");
|
|
205
|
+
const response = await fetch(`${baseUrl}/api/v1${path}`, {
|
|
206
|
+
...init,
|
|
207
|
+
headers
|
|
208
|
+
});
|
|
209
|
+
if (!response.ok) {
|
|
210
|
+
let body = {};
|
|
211
|
+
try {
|
|
212
|
+
body = await response.json();
|
|
213
|
+
} catch {}
|
|
214
|
+
const errorType = body.errorType ?? "UnknownError";
|
|
215
|
+
const message = body.description ?? `CoW API request failed (${response.status})`;
|
|
216
|
+
if (errorType === "SellAmountDoesNotCoverFee") throw new CowOrderTooSmallError(message, response.status);
|
|
217
|
+
throw new CowApiError(errorType, message, response.status);
|
|
218
|
+
}
|
|
219
|
+
if (response.status === 204) return void 0;
|
|
220
|
+
const text = await response.text();
|
|
221
|
+
if (text === "") return void 0;
|
|
222
|
+
return JSON.parse(text);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/cow/order.ts
|
|
227
|
+
/**
|
|
228
|
+
* Build the final order from a quote, sign it (EIP-712) and POST it to the
|
|
229
|
+
* order book. The signed `feeAmount` is 0 — the fee is already folded into the
|
|
230
|
+
* quote's `orderSellAmount`.
|
|
231
|
+
*/
|
|
232
|
+
async function signAndSubmitCowOrder(params) {
|
|
233
|
+
const { walletClient, account, chainId, quote, receiver = account, apiUrl } = params;
|
|
234
|
+
const baseUrl = resolveCowApiUrl(chainId, apiUrl);
|
|
235
|
+
const order = {
|
|
236
|
+
sellToken: quote.sellToken,
|
|
237
|
+
buyToken: quote.buyToken,
|
|
238
|
+
receiver,
|
|
239
|
+
sellAmount: quote.orderSellAmount,
|
|
240
|
+
buyAmount: quote.orderBuyAmount,
|
|
241
|
+
validTo: Number(quote.validTo),
|
|
242
|
+
appData: APP_DATA_HASH,
|
|
243
|
+
feeAmount: 0n,
|
|
244
|
+
kind: quote.kind,
|
|
245
|
+
partiallyFillable: false,
|
|
246
|
+
sellTokenBalance: "erc20",
|
|
247
|
+
buyTokenBalance: "erc20"
|
|
248
|
+
};
|
|
249
|
+
const signature = await walletClient.signTypedData({
|
|
250
|
+
account,
|
|
251
|
+
domain: cowDomain(chainId),
|
|
252
|
+
types: COW_ORDER_TYPES,
|
|
253
|
+
primaryType: "Order",
|
|
254
|
+
message: order
|
|
255
|
+
});
|
|
256
|
+
const orderUid = await cowApiRequest(baseUrl, "/orders", {
|
|
257
|
+
method: "POST",
|
|
258
|
+
body: JSON.stringify({
|
|
259
|
+
...order,
|
|
260
|
+
sellAmount: order.sellAmount.toString(),
|
|
261
|
+
buyAmount: order.buyAmount.toString(),
|
|
262
|
+
feeAmount: "0",
|
|
263
|
+
appData: APP_DATA_DOC,
|
|
264
|
+
appDataHash: APP_DATA_HASH,
|
|
265
|
+
signingScheme: "eip712",
|
|
266
|
+
signature,
|
|
267
|
+
from: account,
|
|
268
|
+
quoteId: quote.quoteId ?? void 0
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
return { orderUid };
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Cancel an open order off-chain (free, signed cancellation). Cancellation is
|
|
275
|
+
* best-effort: an order already committed to a solver batch can still settle.
|
|
276
|
+
*/
|
|
277
|
+
async function cancelCowOrder(params) {
|
|
278
|
+
const { walletClient, account, chainId, orderUid, apiUrl } = params;
|
|
279
|
+
const baseUrl = resolveCowApiUrl(chainId, apiUrl);
|
|
280
|
+
const signature = await walletClient.signTypedData({
|
|
281
|
+
account,
|
|
282
|
+
domain: cowDomain(chainId),
|
|
283
|
+
types: COW_CANCELLATION_TYPES,
|
|
284
|
+
primaryType: "OrderCancellations",
|
|
285
|
+
message: { orderUids: [orderUid] }
|
|
286
|
+
});
|
|
287
|
+
await cowApiRequest(baseUrl, "/orders", {
|
|
288
|
+
method: "DELETE",
|
|
289
|
+
body: JSON.stringify({
|
|
290
|
+
orderUids: [orderUid],
|
|
291
|
+
signature,
|
|
292
|
+
signingScheme: "eip712"
|
|
293
|
+
})
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/cow/quote.ts
|
|
299
|
+
const BPS_DENOMINATOR = 10000n;
|
|
300
|
+
/** Default order validity window (30 minutes). */
|
|
301
|
+
const DEFAULT_VALID_FOR_SECONDS = 1800n;
|
|
302
|
+
/** No block context for off-chain quotes. */
|
|
303
|
+
const OFFCHAIN_META = {
|
|
304
|
+
blockNumber: 0n,
|
|
305
|
+
blockTimestamp: 0n,
|
|
306
|
+
blockHash: "0x0"
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Reject out-of-range slippage so the limit-amount math can't underflow/overflow.
|
|
310
|
+
* 100% (BPS_DENOMINATOR) is forbidden too: on the exact-in path it would reduce
|
|
311
|
+
* `orderBuyAmount` to 0, signing an order that accepts any fill.
|
|
312
|
+
*/
|
|
313
|
+
function assertSlippageBps(slippageBps) {
|
|
314
|
+
if (slippageBps < 0n || slippageBps >= BPS_DENOMINATOR) throw new PanopticError(`invalid slippageBps ${slippageBps}, must be 0..9999`);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Quote a swap via the CoW order book.
|
|
318
|
+
*
|
|
319
|
+
* For `kind: 'sell'` (exact-in) `amount` is the sell amount before fee; for
|
|
320
|
+
* `kind: 'buy'` (exact-out) it is the exact buy amount. The returned
|
|
321
|
+
* `orderSellAmount`/`orderBuyAmount` are ready to sign: the fee is folded into
|
|
322
|
+
* the sell side (orders are placed with `feeAmount: 0` under the current fee
|
|
323
|
+
* model) and `slippageBps` is applied to the non-exact side.
|
|
324
|
+
*/
|
|
325
|
+
async function quoteCowSwap(params) {
|
|
326
|
+
const { chainId, sellToken, buyToken, kind, amount, from, slippageBps, validForSeconds = DEFAULT_VALID_FOR_SECONDS, apiUrl } = params;
|
|
327
|
+
try {
|
|
328
|
+
assertSlippageBps(slippageBps);
|
|
329
|
+
if (sellToken === zeroAddress) throw new CowNativeTokenError();
|
|
330
|
+
const resolvedBuyToken = buyToken === zeroAddress ? COW_NATIVE_ETH : buyToken;
|
|
331
|
+
if (amount <= 0n) throw new PanopticError(`amount ${amount} must be positive`);
|
|
332
|
+
const baseUrl = resolveCowApiUrl(chainId, apiUrl);
|
|
333
|
+
const response = await cowApiRequest(baseUrl, "/quote", {
|
|
334
|
+
method: "POST",
|
|
335
|
+
body: JSON.stringify({
|
|
336
|
+
sellToken,
|
|
337
|
+
buyToken: resolvedBuyToken,
|
|
338
|
+
from,
|
|
339
|
+
receiver: from,
|
|
340
|
+
validFor: Number(validForSeconds),
|
|
341
|
+
appData: APP_DATA_DOC,
|
|
342
|
+
partiallyFillable: false,
|
|
343
|
+
sellTokenBalance: "erc20",
|
|
344
|
+
buyTokenBalance: "erc20",
|
|
345
|
+
signingScheme: "eip712",
|
|
346
|
+
...kind === "sell" ? {
|
|
347
|
+
kind: "sell",
|
|
348
|
+
sellAmountBeforeFee: amount.toString()
|
|
349
|
+
} : {
|
|
350
|
+
kind: "buy",
|
|
351
|
+
buyAmountAfterFee: amount.toString()
|
|
352
|
+
}
|
|
353
|
+
})
|
|
354
|
+
});
|
|
355
|
+
const sellAmount = BigInt(response.quote.sellAmount);
|
|
356
|
+
const buyAmount = BigInt(response.quote.buyAmount);
|
|
357
|
+
const feeAmount = BigInt(response.quote.feeAmount);
|
|
358
|
+
const sellAmountTotal = sellAmount + feeAmount;
|
|
359
|
+
const orderSellAmount = kind === "sell" ? sellAmountTotal : (sellAmountTotal * (BPS_DENOMINATOR + slippageBps) + BPS_DENOMINATOR - 1n) / BPS_DENOMINATOR;
|
|
360
|
+
const orderBuyAmount = kind === "sell" ? buyAmount * (BPS_DENOMINATOR - slippageBps) / BPS_DENOMINATOR : buyAmount;
|
|
361
|
+
return {
|
|
362
|
+
success: true,
|
|
363
|
+
data: {
|
|
364
|
+
kind,
|
|
365
|
+
sellToken,
|
|
366
|
+
buyToken: resolvedBuyToken,
|
|
367
|
+
sellAmount,
|
|
368
|
+
buyAmount,
|
|
369
|
+
feeAmount,
|
|
370
|
+
sellAmountTotal,
|
|
371
|
+
orderSellAmount,
|
|
372
|
+
orderBuyAmount,
|
|
373
|
+
validTo: BigInt(response.quote.validTo),
|
|
374
|
+
quoteId: response.id
|
|
375
|
+
},
|
|
376
|
+
gasEstimate: 0n,
|
|
377
|
+
_meta: OFFCHAIN_META
|
|
378
|
+
};
|
|
379
|
+
} catch (error) {
|
|
380
|
+
return {
|
|
381
|
+
success: false,
|
|
382
|
+
error: error instanceof PanopticError ? error : new PanopticError(error instanceof Error ? error.message : "CoW quote failed", error instanceof Error ? error : void 0),
|
|
383
|
+
_meta: OFFCHAIN_META
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/cow/status.ts
|
|
390
|
+
/**
|
|
391
|
+
* Fetch an order's lifecycle state. Once any trade has executed, the
|
|
392
|
+
* settlement tx hash is included (fetched from the trades endpoint).
|
|
393
|
+
*/
|
|
394
|
+
async function getCowOrderStatus(params) {
|
|
395
|
+
const { chainId, orderUid, apiUrl } = params;
|
|
396
|
+
const baseUrl = resolveCowApiUrl(chainId, apiUrl);
|
|
397
|
+
const order = await cowApiRequest(baseUrl, `/orders/${orderUid}`);
|
|
398
|
+
const executedSellAmount = BigInt(order.executedSellAmount ?? "0");
|
|
399
|
+
const executedBuyAmount = BigInt(order.executedBuyAmount ?? "0");
|
|
400
|
+
let settlementTxHash;
|
|
401
|
+
if (executedBuyAmount > 0n) {
|
|
402
|
+
const trades = await cowApiRequest(baseUrl, `/trades?orderUid=${orderUid}`);
|
|
403
|
+
settlementTxHash = trades.find((t) => t.txHash)?.txHash ?? void 0;
|
|
404
|
+
}
|
|
405
|
+
return {
|
|
406
|
+
status: order.status,
|
|
407
|
+
executedSellAmount,
|
|
408
|
+
executedBuyAmount,
|
|
409
|
+
settlementTxHash
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region src/cow/tokens.ts
|
|
415
|
+
/** CoinGecko per-chain list slugs for the chains CoW supports here. */
|
|
416
|
+
const COINGECKO_CHAIN_SLUGS = { 1: "ethereum" };
|
|
417
|
+
function tokenListUrls(chainId) {
|
|
418
|
+
const urls = ["https://files.cow.fi/tokens/CowSwap.json"];
|
|
419
|
+
const slug = COINGECKO_CHAIN_SLUGS[chainId];
|
|
420
|
+
if (slug) urls.push(`https://tokens.coingecko.com/${slug}/all.json`);
|
|
421
|
+
return urls;
|
|
422
|
+
}
|
|
423
|
+
const LIST_CACHE_TTL_MS = 36e5;
|
|
424
|
+
const listCache = new Map();
|
|
425
|
+
/** Fetch a token list with an in-module 1h cache; resolves null on any failure. */
|
|
426
|
+
function fetchTokenList(url) {
|
|
427
|
+
const cached = listCache.get(url);
|
|
428
|
+
if (cached && Date.now() - cached.fetchedAt < LIST_CACHE_TTL_MS) return cached.list;
|
|
429
|
+
const list = fetch(url).then((res) => res.ok ? res.json() : null).catch(() => null).then((parsed) => {
|
|
430
|
+
if (parsed === null || !Array.isArray(parsed.tokens)) {
|
|
431
|
+
listCache.delete(url);
|
|
432
|
+
return null;
|
|
433
|
+
}
|
|
434
|
+
return parsed;
|
|
435
|
+
});
|
|
436
|
+
listCache.set(url, {
|
|
437
|
+
fetchedAt: Date.now(),
|
|
438
|
+
list
|
|
439
|
+
});
|
|
440
|
+
return list;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Find a token by symbol on the given chain across CoW's token lists. The
|
|
444
|
+
* first list containing a (case-insensitive) symbol match wins; within a
|
|
445
|
+
* list the first match wins, which favors canonical entries on collisions.
|
|
446
|
+
* Returns null when no list resolves the symbol (or all fetches fail).
|
|
447
|
+
*
|
|
448
|
+
* Resolution only proves the token is listed — whether solvers can actually
|
|
449
|
+
* fill a given pair/size is answered by `quoteCowSwap`.
|
|
450
|
+
*/
|
|
451
|
+
async function findCowToken(params) {
|
|
452
|
+
const { chainId, symbol, listUrls } = params;
|
|
453
|
+
const chain = Number(chainId);
|
|
454
|
+
const wanted = symbol.toUpperCase();
|
|
455
|
+
for (const url of listUrls ?? tokenListUrls(chain)) {
|
|
456
|
+
const list = await fetchTokenList(url);
|
|
457
|
+
if (!list) continue;
|
|
458
|
+
const match = list.tokens.find(
|
|
459
|
+
// CoW's own list omits chainId on some entries (single-chain lists).
|
|
460
|
+
(t) => (t.chainId === void 0 || t.chainId === chain) && t.symbol.toUpperCase() === wanted
|
|
461
|
+
);
|
|
462
|
+
if (match) {
|
|
463
|
+
let address;
|
|
464
|
+
try {
|
|
465
|
+
address = getAddress(match.address);
|
|
466
|
+
} catch {
|
|
467
|
+
continue;
|
|
468
|
+
}
|
|
469
|
+
return {
|
|
470
|
+
chainId: chain,
|
|
471
|
+
address,
|
|
472
|
+
symbol: match.symbol,
|
|
473
|
+
name: match.name,
|
|
474
|
+
decimals: match.decimals,
|
|
475
|
+
logoURI: match.logoURI
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/cow/xstockWrappers.generated.ts
|
|
484
|
+
const XSTOCK_WRAPPERS = { 1: [
|
|
485
|
+
{
|
|
486
|
+
wrapper: "0x5AA7649fdbDa47De64A07aC81D64B682AF9C0724",
|
|
487
|
+
underlying: "0x9d275685dC284C8eB1C79f6ABA7a63Dc75ec890a",
|
|
488
|
+
symbol: "wAAPLx",
|
|
489
|
+
name: "Wrapped Apple xStock",
|
|
490
|
+
decimals: 18
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
wrapper: "0x5CC079963Fb70C0f987F65F539E3B61a6EBdf6Db",
|
|
494
|
+
underlying: "0xfBF2398dF672cEE4aFcC2A4A733222331c742a6A",
|
|
495
|
+
symbol: "wABBVx",
|
|
496
|
+
name: "Wrapped AbbVie xStock",
|
|
497
|
+
decimals: 18
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
wrapper: "0xD812B37181Ae89801e4BB3F49E4C1FAF11fC0b57",
|
|
501
|
+
underlying: "0x89233399708C18Ac6887F90A2B4Cd8Ba5fEdD06e",
|
|
502
|
+
symbol: "wABTx",
|
|
503
|
+
name: "Wrapped Abbott xStock",
|
|
504
|
+
decimals: 18
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
wrapper: "0xc262Bea18cb810Cc7715EE48fe3cbD3D79B4aFe1",
|
|
508
|
+
underlying: "0x03183Ce31b1656B72A55fa6056e287f50C35BbEB",
|
|
509
|
+
symbol: "wACNx",
|
|
510
|
+
name: "Wrapped Accenture xStock",
|
|
511
|
+
decimals: 18
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
wrapper: "0x444DE06b76C9a1417A21A877038F49A1f0D8A1cD",
|
|
515
|
+
underlying: "0x16E0B579be45bAaE54cEddd52e742B6457A7fE12",
|
|
516
|
+
symbol: "wADBEx",
|
|
517
|
+
name: "Wrapped Adobe xStock",
|
|
518
|
+
decimals: 18
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
wrapper: "0x36d2fe6e6e4136C6BF286588391FAD6d45422350",
|
|
522
|
+
underlying: "0x2f9a35aB5dDFBc49927BFdEab98A86c53DC6E763",
|
|
523
|
+
symbol: "wAMBRx",
|
|
524
|
+
name: "Wrapped Amber xStock",
|
|
525
|
+
decimals: 18
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
wrapper: "0x1eb8909B5C46A24F005A76C469912f5518F448eF",
|
|
529
|
+
underlying: "0x3522513E5F146a2006e2901b05f16B2821485E19",
|
|
530
|
+
symbol: "wAMDx",
|
|
531
|
+
name: "Wrapped AMD xStock",
|
|
532
|
+
decimals: 18
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
wrapper: "0xac85d37acbadCa37545E21ab0fB991bcE8c1187C",
|
|
536
|
+
underlying: "0x3557Ba345B01EFa20A1bdDC61F573BFD87195081",
|
|
537
|
+
symbol: "wAMZNx",
|
|
538
|
+
name: "Wrapped Amazon.com xStock",
|
|
539
|
+
decimals: 18
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
wrapper: "0xd17E483364D849e3B3A52464bb2CA56626EDfc31",
|
|
543
|
+
underlying: "0x50a1291F69D9d3853Def8209cFb1AF0b46927BE1",
|
|
544
|
+
symbol: "wAPPx",
|
|
545
|
+
name: "Wrapped AppLovin xStock",
|
|
546
|
+
decimals: 18
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
wrapper: "0xD0798d3c30F4408350C8448d75DA1c7721227dBa",
|
|
550
|
+
underlying: "0xC0B417e7F83db438631Eb5E096684dd742E5294F",
|
|
551
|
+
symbol: "wASMLx",
|
|
552
|
+
name: "Wrapped ASML xStock",
|
|
553
|
+
decimals: 18
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
wrapper: "0x720347faf9D745B841541De0d7B2abc8A4b87531",
|
|
557
|
+
underlying: "0x89b2607878ae19baB8020b8140eD550Ef3E953bb",
|
|
558
|
+
symbol: "wASTSx",
|
|
559
|
+
name: "Wrapped AST SpaceMobile xStock",
|
|
560
|
+
decimals: 18
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
wrapper: "0x8DEb752aAA807E0258afd5cCFFe2b5A804026f28",
|
|
564
|
+
underlying: "0x38BAC69cbBd28156796e4163B2B6dcb81E336565",
|
|
565
|
+
symbol: "wAVGOx",
|
|
566
|
+
name: "Wrapped Broadcom xStock",
|
|
567
|
+
decimals: 18
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
wrapper: "0x0b306951161b856Ad02c8566B4eF184c6BB08564",
|
|
571
|
+
underlying: "0xb23767492D0Ca6dC7221CBeA45689a0410f388c4",
|
|
572
|
+
symbol: "wAXPx",
|
|
573
|
+
name: "Wrapped American Express xStock",
|
|
574
|
+
decimals: 18
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
wrapper: "0xB908FEAeab7E671dB697d77c3acFD8859E92a4e2",
|
|
578
|
+
underlying: "0x5D642505FE1a28897eb3BaBA665F454755D8daA2",
|
|
579
|
+
symbol: "wAZNx",
|
|
580
|
+
name: "Wrapped AstraZeneca xStock",
|
|
581
|
+
decimals: 18
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
wrapper: "0xA2b1335256cd663Da89F650180508dd1f0DC3BAa",
|
|
585
|
+
underlying: "0x314938c596F5ce31C3f75307d2979338C346D7F2",
|
|
586
|
+
symbol: "wBACx",
|
|
587
|
+
name: "Wrapped Bank of America xStock",
|
|
588
|
+
decimals: 18
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
wrapper: "0xDEc933e2392AD908263e70A386fbF34e703Ffe8F",
|
|
592
|
+
underlying: "0xbbcb0356bB9e6B3Faa5CbF9E5F36185d53403Ac9",
|
|
593
|
+
symbol: "wbCOIN",
|
|
594
|
+
name: "Wrapped Backed Coinbase Global",
|
|
595
|
+
decimals: 18
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
wrapper: "0x277f724d12DD0249b48CBD7eB2623c5e5042b970",
|
|
599
|
+
underlying: "0xa8A25DB6Cf17Fa097f1DBbc9c841892456898fF3",
|
|
600
|
+
symbol: "wBKNGx",
|
|
601
|
+
name: "Wrapped Booking xStock",
|
|
602
|
+
decimals: 18
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
wrapper: "0xE5365A5A16A7D1DD37b33e6F8D78aeB89847398B",
|
|
606
|
+
underlying: "0x5A6a0742cA689E7E8a91A38F5255589CB2191646",
|
|
607
|
+
symbol: "wBLKx",
|
|
608
|
+
name: "Wrapped BlackRock xStock",
|
|
609
|
+
decimals: 18
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
wrapper: "0x7a1d054e09eAe0294D53959674EE9DE14a1f70B1",
|
|
613
|
+
underlying: "0x38DE7b9FC733DeF81525E65C1Bf99722026489e2",
|
|
614
|
+
symbol: "wBLSHx",
|
|
615
|
+
name: "Wrapped Bullish xStock",
|
|
616
|
+
decimals: 18
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
wrapper: "0xBFd29b7F395d30932033c2F45ab792024E71AA94",
|
|
620
|
+
underlying: "0xaeB681B69E5094E04d11BCeF51A71358A374C3ED",
|
|
621
|
+
symbol: "wBMNRx",
|
|
622
|
+
name: "Wrapped Bitmine xStock",
|
|
623
|
+
decimals: 18
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
wrapper: "0x1a4F71B0Ff3C22540887bcf83b50054a213c673d",
|
|
627
|
+
underlying: "0xaC28C9178ACc8BA4A11A29E013a3A2627086e422",
|
|
628
|
+
symbol: "wbMSTR",
|
|
629
|
+
name: "Wrapped Backed MicroStrategy Inc",
|
|
630
|
+
decimals: 18
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
wrapper: "0x7E8101A1C322D394b3961498c7D40d2DFA94C392",
|
|
634
|
+
underlying: "0xA34C5e0AbE843E10461E2C9586Ea03E55Dbcc495",
|
|
635
|
+
symbol: "wbNVDA",
|
|
636
|
+
name: "Wrapped Backed NVIDIA Corp",
|
|
637
|
+
decimals: 18
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
wrapper: "0xa150245f155778e749185C9446e9e59E406674eF",
|
|
641
|
+
underlying: "0x12992613fDd35aBe95DEc5a4964331b1ee23B50d",
|
|
642
|
+
symbol: "wBRK.Bx",
|
|
643
|
+
name: "Wrapped Berkshire Hathaway xStock",
|
|
644
|
+
decimals: 18
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
wrapper: "0x88E437dbebdDe3D75Ff7c0cb830F54dd834538f0",
|
|
648
|
+
underlying: "0x22E1991e5f82736A2a990322a46aac0e95826c5B",
|
|
649
|
+
symbol: "wBTBTx",
|
|
650
|
+
name: "Wrapped Bit Digital xStock",
|
|
651
|
+
decimals: 18
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
wrapper: "0x1f82284C1658Ad71C576f7230E6C2DEE7901c1FA",
|
|
655
|
+
underlying: "0x14A5f2872396802C3Cc8942A39Ab3E4118EE5038",
|
|
656
|
+
symbol: "wbTSLA",
|
|
657
|
+
name: "Wrapped Backed Tesla Inc",
|
|
658
|
+
decimals: 18
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
wrapper: "0xdCE0CA61bC9F95b771e0764dc4C553288b7F2f13",
|
|
662
|
+
underlying: "0xD0194F0f077968DA8ca59811e9407f54AE6c9432",
|
|
663
|
+
symbol: "wCLSKx",
|
|
664
|
+
name: "Wrapped CleanSpark xStock",
|
|
665
|
+
decimals: 18
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
wrapper: "0xd1A01e3F9c7565e88b1CF2413ba0a0E671e57b33",
|
|
669
|
+
underlying: "0xBC7170a1280Be28513B4e940C681537EB25e39f4",
|
|
670
|
+
symbol: "wCMCSAx",
|
|
671
|
+
name: "Wrapped Comcast xStock",
|
|
672
|
+
decimals: 18
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
wrapper: "0x3a98E79cDc7D8B2716A8696E25af028E429f11dA",
|
|
676
|
+
underlying: "0x364f210f430eC2448Fc68A49203040F6124096F0",
|
|
677
|
+
symbol: "wCOINx",
|
|
678
|
+
name: "Wrapped Coinbase xStock",
|
|
679
|
+
decimals: 18
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
wrapper: "0x89E2B6cA78DBee629544679780963b85Ba76fe2a",
|
|
683
|
+
underlying: "0x51eD5b74A05F256DbD9Ebb4e4f68Bb41ba10160b",
|
|
684
|
+
symbol: "wCORZx",
|
|
685
|
+
name: "Wrapped Core Scientific xStock",
|
|
686
|
+
decimals: 18
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
wrapper: "0xFa48FeE923600Fecaa7af0DfB4a66E3109Ad51bf",
|
|
690
|
+
underlying: "0x4720B5e6421e6879132aED52040d56Bb6e5CFeeF",
|
|
691
|
+
symbol: "wCOSTx",
|
|
692
|
+
name: "Wrapped Costco xStock",
|
|
693
|
+
decimals: 18
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
wrapper: "0xA90872ACa656eBE47bDEBF3B19Ec9Dd9C5ADC7f8",
|
|
697
|
+
underlying: "0xfEbDEd1B0986a8ee107f5AB1a1c5a813491DeCEB",
|
|
698
|
+
symbol: "wCRCLx",
|
|
699
|
+
name: "Wrapped Circle xStock",
|
|
700
|
+
decimals: 18
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
wrapper: "0xc6B6B8D50A6673C04C495e30B411da5A7adF39f5",
|
|
704
|
+
underlying: "0x4A4073f2EAF299A1be22254DCD2C41727F6F54a2",
|
|
705
|
+
symbol: "wCRMx",
|
|
706
|
+
name: "Wrapped Salesforce xStock",
|
|
707
|
+
decimals: 18
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
wrapper: "0xD71a6aDBc40c2674591CDB11B8C7ae03A880b06E",
|
|
711
|
+
underlying: "0x214151022C2a5E380aB80CdaC31f23Ae554a7345",
|
|
712
|
+
symbol: "wCRWDx",
|
|
713
|
+
name: "Wrapped CrowdStrike xStock",
|
|
714
|
+
decimals: 18
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
wrapper: "0xCFa485bc42c2492917351F89F5cf5c7b2C5a66aa",
|
|
718
|
+
underlying: "0x053C784cD87B74f42e0c089f98643E79c1A3ff16",
|
|
719
|
+
symbol: "wCSCOx",
|
|
720
|
+
name: "Wrapped Cisco xStock",
|
|
721
|
+
decimals: 18
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
wrapper: "0x7F88888b7A81546a036554Aa67a289Ea428b20d4",
|
|
725
|
+
underlying: "0xad5cdc3340904285B8159089974A99a1A09EB4C0",
|
|
726
|
+
symbol: "wCVXx",
|
|
727
|
+
name: "Wrapped Chevron xStock",
|
|
728
|
+
decimals: 18
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
wrapper: "0xce41bF7482E86fFF0Ab0A971dD425496BB58E4FD",
|
|
732
|
+
underlying: "0x521860bB5dF5468358875266B89BFE90d990C6e7",
|
|
733
|
+
symbol: "wDFDVx",
|
|
734
|
+
name: "Wrapped DFDV xStock",
|
|
735
|
+
decimals: 18
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
wrapper: "0x6c7AD1886a6Da37766fED060d5F08fF43285DcdD",
|
|
739
|
+
underlying: "0xdbA228936F4079DaF9Aa906fd48a87f2300405F4",
|
|
740
|
+
symbol: "wDHRx",
|
|
741
|
+
name: "Wrapped Danaher xStock",
|
|
742
|
+
decimals: 18
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
wrapper: "0x3E5ceeA6D6399Ac1a1FEE67C1644fc7F616aD9fD",
|
|
746
|
+
underlying: "0x03D44b9bB0398E2Be3C89417D51E615C3D461F5a",
|
|
747
|
+
symbol: "wDUOLx",
|
|
748
|
+
name: "Wrapped Duolingo xStock",
|
|
749
|
+
decimals: 18
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
wrapper: "0x0c4F0256FB31cC71666Fee3f0cE1De3B1abE347B",
|
|
753
|
+
underlying: "0x4c7610990cb63cdca174ce61822F7693B49FCe93",
|
|
754
|
+
symbol: "wEBAYx",
|
|
755
|
+
name: "Wrapped eBay xStock",
|
|
756
|
+
decimals: 18
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
wrapper: "0x5230C4b621bd2d1f22933903F9a4fA82a9F17fcf",
|
|
760
|
+
underlying: "0xd1be5bA0c293997C7F69da707D14EB4ABCB13ddD",
|
|
761
|
+
symbol: "wEXPEx",
|
|
762
|
+
name: "Wrapped Expedia xStock",
|
|
763
|
+
decimals: 18
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
wrapper: "0x91049e9586301c54B2eF410C2b7e9040Ffb02182",
|
|
767
|
+
underlying: "0x3C313D234D0C6C876F6c21ba2EC1F26823247Be2",
|
|
768
|
+
symbol: "wFIGx",
|
|
769
|
+
name: "Wrapped Figma xStock",
|
|
770
|
+
decimals: 18
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
wrapper: "0xdeAE051463CD8C457e7e9D97A398c575E8629c18",
|
|
774
|
+
underlying: "0x3AE27479E6e52f6ddB6EA8AA567e6Cc92C78d93a",
|
|
775
|
+
symbol: "wFUFUx",
|
|
776
|
+
name: "Wrapped BitFuFu xStock",
|
|
777
|
+
decimals: 18
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
wrapper: "0x61532Ce3f1DF7fBf5fFb7B891d184226e85B37c6",
|
|
781
|
+
underlying: "0x2380F2673C640fB67E2d6B55B44C62F0E0e69DA9",
|
|
782
|
+
symbol: "wGLDx",
|
|
783
|
+
name: "Wrapped Gold xStock",
|
|
784
|
+
decimals: 18
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
wrapper: "0x4c79D4A1a863830EF845431578FB40E31bD51f4A",
|
|
788
|
+
underlying: "0xf7F4fAC56f012dE7Dd6adFF54C761986B9E0655a",
|
|
789
|
+
symbol: "wGLXYx",
|
|
790
|
+
name: "Wrapped Galaxy Digital xStock",
|
|
791
|
+
decimals: 18
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
wrapper: "0xb2f6ED0ED3eEb22bEF7A648794FFC19b8aF3761C",
|
|
795
|
+
underlying: "0xE5f6d3b2405ABdfE6F660e63202B25D23763160d",
|
|
796
|
+
symbol: "wGMEx",
|
|
797
|
+
name: "Wrapped Gamestop xStock",
|
|
798
|
+
decimals: 18
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
wrapper: "0x1630F08370917E79df0B7572395a5e907508bBBc",
|
|
802
|
+
underlying: "0xe92f673Ca36C5E2Efd2DE7628f815f84807e803F",
|
|
803
|
+
symbol: "wGOOGLx",
|
|
804
|
+
name: "Wrapped Alphabet xStock",
|
|
805
|
+
decimals: 18
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
wrapper: "0x6eEd78e2780d82BE4E37d9937C27Bcf32C8DA072",
|
|
809
|
+
underlying: "0x3Ee7E9B3A992fD23CD1C363B0e296856B04ab149",
|
|
810
|
+
symbol: "wGSx",
|
|
811
|
+
name: "Wrapped Goldman Sachs xStock",
|
|
812
|
+
decimals: 18
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
wrapper: "0xC641E2eBF6E076e2AE53477C2E725b3c67C0fd94",
|
|
816
|
+
underlying: "0x766b0CD6ED6D90B5d49d2c36a3761E9728501BA9",
|
|
817
|
+
symbol: "wHDx",
|
|
818
|
+
name: "Wrapped Home Depot xStock",
|
|
819
|
+
decimals: 18
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
wrapper: "0xBd1B73b2E89967e83507B500D798998200A53380",
|
|
823
|
+
underlying: "0x62a48560861B0b451654bFffdb5be6E47aa8ff1B",
|
|
824
|
+
symbol: "wHONx",
|
|
825
|
+
name: "Wrapped Honeywell xStock",
|
|
826
|
+
decimals: 18
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
wrapper: "0x953707d7A1cB30cc5C636bDA8EaeBe410341eB14",
|
|
830
|
+
underlying: "0xE1385FDd5ffB10081Cd52C56584F25EFa9084015",
|
|
831
|
+
symbol: "wHOODx",
|
|
832
|
+
name: "Wrapped Robinhood xStock",
|
|
833
|
+
decimals: 18
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
wrapper: "0x6Ec2763859C5b04F5598017880744081aFeFa3Bb",
|
|
837
|
+
underlying: "0xd457b379801433EA5c3A8542b61902023AE39DcD",
|
|
838
|
+
symbol: "wHSDTx",
|
|
839
|
+
name: "Wrapped Helius Medical Technologies xStock",
|
|
840
|
+
decimals: 18
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
wrapper: "0x154f25Cfd146d2DF6420ec1f575C3c46D45f4Db7",
|
|
844
|
+
underlying: "0x560deb3D70Ac90064fF809349cDf9A771a06fd36",
|
|
845
|
+
symbol: "wHUTx",
|
|
846
|
+
name: "Wrapped Hut 8 xStock",
|
|
847
|
+
decimals: 18
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
wrapper: "0xa8F31436FFE4E71f51B2D65b7D5a5c457AE2000f",
|
|
851
|
+
underlying: "0xd9913208647671Fe0F48F7F260076B2C6F310Aac",
|
|
852
|
+
symbol: "wIBMx",
|
|
853
|
+
name: "Wrapped International Business Machines xStock",
|
|
854
|
+
decimals: 18
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
wrapper: "0x59361E881b186e48D71EC61E969dCF50a4dbC75b",
|
|
858
|
+
underlying: "0x6a668332825450ACD2e449372057d31b3de16a1E",
|
|
859
|
+
symbol: "wIEMGx",
|
|
860
|
+
name: "Wrapped Core MSCI Emerging Markets xStock",
|
|
861
|
+
decimals: 18
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
wrapper: "0x3ab20fd7c57146AF128E8565261CBdaDa0F015E6",
|
|
865
|
+
underlying: "0xAA28cB97D7f7E172f54deE950743886D2d65447d",
|
|
866
|
+
symbol: "wIJRx",
|
|
867
|
+
name: "Wrapped S&P Small Cap xStock",
|
|
868
|
+
decimals: 18
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
wrapper: "0x6A2a68Ca7FC793D8CEa36326a6Ec1eF7AC3D9742",
|
|
872
|
+
underlying: "0xf8A80D1cb9cFD70D03D655D9dF42339846F3B3C8",
|
|
873
|
+
symbol: "wINTCx",
|
|
874
|
+
name: "Wrapped Intel xStock",
|
|
875
|
+
decimals: 18
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
wrapper: "0x5A47DE111D731Fd2Df90E4A2d7a9b459b31Bd643",
|
|
879
|
+
underlying: "0xdadfb355c6110eda0908740d52c834d6C2BCDDc7",
|
|
880
|
+
symbol: "wIWMx",
|
|
881
|
+
name: "Wrapped Russell 2000 xStock",
|
|
882
|
+
decimals: 18
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
wrapper: "0xcdB53A7cBa9Ec6d55dfE8f58bd6772826722D7BD",
|
|
886
|
+
underlying: "0xdb0482cfaD4789798623E64b15eebA01b16e917C",
|
|
887
|
+
symbol: "wJNJx",
|
|
888
|
+
name: "Wrapped Johnson & Johnson xStock",
|
|
889
|
+
decimals: 18
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
wrapper: "0xaB635f839f81A12dC8Db8Ab31006af14E26292fE",
|
|
893
|
+
underlying: "0xD9FC3E075d45254a1D834fEa18AF8041207DeA0A",
|
|
894
|
+
symbol: "wJPMx",
|
|
895
|
+
name: "Wrapped JPMorgan Chase xStock",
|
|
896
|
+
decimals: 18
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
wrapper: "0x9a2486fbe7bC17C9100be65c31aBE7c9Bf84C23c",
|
|
900
|
+
underlying: "0xdCC1a2699441079dA889B1F49e12B69cC791129b",
|
|
901
|
+
symbol: "wKOx",
|
|
902
|
+
name: "Wrapped Coca-Cola xStock",
|
|
903
|
+
decimals: 18
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
wrapper: "0x316fFEa434348c2cB72024e62Ae845770315351E",
|
|
907
|
+
underlying: "0x15059c599C16Fd8f70B633Ade165502D6402CD49",
|
|
908
|
+
symbol: "wLINx",
|
|
909
|
+
name: "Wrapped Linde xStock",
|
|
910
|
+
decimals: 18
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
wrapper: "0x3644971A7E971f60e707F7E8716cCaC5a0461290",
|
|
914
|
+
underlying: "0x19c41EA77b34BbDEe61c3A87A75D1ABDA2ED0be4",
|
|
915
|
+
symbol: "wLLYx",
|
|
916
|
+
name: "Wrapped Eli Lilly xStock",
|
|
917
|
+
decimals: 18
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
wrapper: "0xD395C4dAd12eb071714d2b86cB5bC16acE9996B6",
|
|
921
|
+
underlying: "0x847dEB9c78fb00319bC7A006dFF729c11428E537",
|
|
922
|
+
symbol: "wLULUx",
|
|
923
|
+
name: "Wrapped lululemon xStock",
|
|
924
|
+
decimals: 18
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
wrapper: "0x34f5273693C880a9B2d9B6cfc8e13A2f3B8C0F06",
|
|
928
|
+
underlying: "0x9D692bffEf6f6BedF4274053ff9998EFE3B2539E",
|
|
929
|
+
symbol: "wMARAx",
|
|
930
|
+
name: "Wrapped MARA xStock",
|
|
931
|
+
decimals: 18
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
wrapper: "0x5b32624f352d2FC6cC70889967A143ba1814f82b",
|
|
935
|
+
underlying: "0xb365Cd2588065F522D379AD19e903304f6B622C6",
|
|
936
|
+
symbol: "wMAx",
|
|
937
|
+
name: "Wrapped Mastercard xStock",
|
|
938
|
+
decimals: 18
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
wrapper: "0x1717D8Be2Bcb27f4E8f36c817088Fa6a2c0b3B30",
|
|
942
|
+
underlying: "0x80A77a372c1e12AcCdA84299492f404902E2DA67",
|
|
943
|
+
symbol: "wMCDx",
|
|
944
|
+
name: "Wrapped McDonald's xStock",
|
|
945
|
+
decimals: 18
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
wrapper: "0x02C1b10e5329c4502469396B2ce9f200E60b4a77",
|
|
949
|
+
underlying: "0x0588e851ec0418d660BeE81230d6c678dAF21d46",
|
|
950
|
+
symbol: "wMDTx",
|
|
951
|
+
name: "Wrapped Medtronic xStock",
|
|
952
|
+
decimals: 18
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
wrapper: "0x4E41a262cAA93C6575d336E0a4eb79f3c67caa06",
|
|
956
|
+
underlying: "0x96702be57Cd9777f835117a809C7124fe4ec989A",
|
|
957
|
+
symbol: "wMETAx",
|
|
958
|
+
name: "Wrapped Meta xStock",
|
|
959
|
+
decimals: 18
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
wrapper: "0x61a6Cd11f658D1b418e1082b564678983b71Fb7F",
|
|
963
|
+
underlying: "0x8499b26BBfC8c3830a37b92E47DF2d7cBc0154e9",
|
|
964
|
+
symbol: "wMNSTx",
|
|
965
|
+
name: "Wrapped Monster xStock",
|
|
966
|
+
decimals: 18
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
wrapper: "0x4728E48c2C201E32fe210AaB68A71E419FEAc74a",
|
|
970
|
+
underlying: "0x17D8186Ed8F68059124190D147174D0f6697dc40",
|
|
971
|
+
symbol: "wMRKx",
|
|
972
|
+
name: "Wrapped Merck xStock",
|
|
973
|
+
decimals: 18
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
wrapper: "0x0d6fce45796D5c00689c0916b976645a0FF1F0cE",
|
|
977
|
+
underlying: "0xeAAd46F4146Ded5a47B55AA7F6c48c191dEAEC88",
|
|
978
|
+
symbol: "wMRVLx",
|
|
979
|
+
name: "Wrapped Marvell xStock",
|
|
980
|
+
decimals: 18
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
wrapper: "0x63Ad27614231767C8C489745B9145272De50D09b",
|
|
984
|
+
underlying: "0x5621737f42dAE558b81269FcB9E9E70c19Aa6b35",
|
|
985
|
+
symbol: "wMSFTx",
|
|
986
|
+
name: "Wrapped Microsoft xStock",
|
|
987
|
+
decimals: 18
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
wrapper: "0x266E5923F6118F8b340cA5a23AE7f71897361476",
|
|
991
|
+
underlying: "0xAE2f842EF90C0d5213259Ab82639D5BBF649b08E",
|
|
992
|
+
symbol: "wMSTRx",
|
|
993
|
+
name: "Wrapped MicroStrategy xStock",
|
|
994
|
+
decimals: 18
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
wrapper: "0x529E286229963bE57F0EC6F57d2D70A2F3E29935",
|
|
998
|
+
underlying: "0xf6a873BAe4Ba1B304e45dF52A4b7D176E1C6a8c4",
|
|
999
|
+
symbol: "wMUx",
|
|
1000
|
+
name: "Wrapped Micron Technology xStock",
|
|
1001
|
+
decimals: 18
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
wrapper: "0xfE0D2545f9E7f3678CB35Ed3CDf70488C5570D11",
|
|
1005
|
+
underlying: "0xA6a65AC27E76cD53cB790473E4345c46e5eBf961",
|
|
1006
|
+
symbol: "wNFLXx",
|
|
1007
|
+
name: "Wrapped Netflix xStock",
|
|
1008
|
+
decimals: 18
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
wrapper: "0x93E62845C1DD5822EbC807ab71A5Fb750DecD15A",
|
|
1012
|
+
underlying: "0xc845b2894dBddd03858fd2D643B4eF725fE0849d",
|
|
1013
|
+
symbol: "wNVDAx",
|
|
1014
|
+
name: "Wrapped NVIDIA xStock",
|
|
1015
|
+
decimals: 18
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
wrapper: "0x16E443AEbc83E2089AA90431A1C0d311854EEC69",
|
|
1019
|
+
underlying: "0xF9523E369c5f55ad72DbAA75B0a9b92B3D8b147e",
|
|
1020
|
+
symbol: "wNVOx",
|
|
1021
|
+
name: "Wrapped Novo Nordisk xStock",
|
|
1022
|
+
decimals: 18
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
wrapper: "0x9608a6eB064dd1C35eC9A4332bD9F8b05D1dE66C",
|
|
1026
|
+
underlying: "0x4b0eE7C047D43cA403239f28f42115bEdB7c0076",
|
|
1027
|
+
symbol: "wOKLOx",
|
|
1028
|
+
name: "Wrapped Oklo xStock",
|
|
1029
|
+
decimals: 18
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
wrapper: "0x9836479c80823f5f8B60FD0171F8D96301185714",
|
|
1033
|
+
underlying: "0xbEe6b69345F376598Fe16AbD5592c6F844825E66",
|
|
1034
|
+
symbol: "wOPENx",
|
|
1035
|
+
name: "Wrapped OPEN xStock",
|
|
1036
|
+
decimals: 18
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
wrapper: "0x54f34Ceb15313Caaee838F77c1c3C2Fe2E94526A",
|
|
1040
|
+
underlying: "0x548308E91ec9F285C7bFf05295baDBD56a6e4971",
|
|
1041
|
+
symbol: "wORCLx",
|
|
1042
|
+
name: "Wrapped Oracle xStock",
|
|
1043
|
+
decimals: 18
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
wrapper: "0x7FbE0E7ACB47DCb053BF6146cCA6Bfb81A5D1319",
|
|
1047
|
+
underlying: "0xe12BB32D77BE4DB10DDC82088b230D35d097E9C5",
|
|
1048
|
+
symbol: "wPANWx",
|
|
1049
|
+
name: "Wrapped Palo Alto Networks xStock",
|
|
1050
|
+
decimals: 18
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
wrapper: "0xA00A5538708b5aca7045F2ca15104707965bac94",
|
|
1054
|
+
underlying: "0x36c424a6EC0e264b1616102Ad63eD2aD7857413e",
|
|
1055
|
+
symbol: "wPEPx",
|
|
1056
|
+
name: "Wrapped PepsiCo xStock",
|
|
1057
|
+
decimals: 18
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
wrapper: "0x4E6894c3481B3A45393ce8ac9552945Ad50A3758",
|
|
1061
|
+
underlying: "0x1Ac765B5BEa23184802C7d2d497f7c33f1444A9e",
|
|
1062
|
+
symbol: "wPFEx",
|
|
1063
|
+
name: "Wrapped Pfizer xStock",
|
|
1064
|
+
decimals: 18
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
wrapper: "0x0afC19943fA98E9E9E90Fc4ab4d4D3c13E162232",
|
|
1068
|
+
underlying: "0xa90424D5D3E770e8644103AB503ed775dD1318FD",
|
|
1069
|
+
symbol: "wPGx",
|
|
1070
|
+
name: "Wrapped Procter & Gamble xStock",
|
|
1071
|
+
decimals: 18
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
wrapper: "0xa3B6Fe1a923585bb828fCFAa460B78EeFD5aE2EC",
|
|
1075
|
+
underlying: "0x6d482CeC5f9dd1f05CCee9Fd3ff79B246170F8e2",
|
|
1076
|
+
symbol: "wPLTRx",
|
|
1077
|
+
name: "Wrapped Palantir xStock",
|
|
1078
|
+
decimals: 18
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
wrapper: "0xF429759BBf687118efd6B3713303006C356b8765",
|
|
1082
|
+
underlying: "0x536825370F1159cBA953055f5c2F16DDc7B5a348",
|
|
1083
|
+
symbol: "wPLx",
|
|
1084
|
+
name: "Wrapped Planet Labs xStock",
|
|
1085
|
+
decimals: 18
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
wrapper: "0x7C2e00e6b0d519a8C492d20c2524342A4398FF34",
|
|
1089
|
+
underlying: "0x02a6c1789c3B4FDb1a7a3DfA39F90e5d3c94F4F9",
|
|
1090
|
+
symbol: "wPMx",
|
|
1091
|
+
name: "Wrapped Philip Morris xStock",
|
|
1092
|
+
decimals: 18
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
wrapper: "0xCf4953c617CD1306A1f9236084204fBc67FDA2Ac",
|
|
1096
|
+
underlying: "0xf706585e7e8900bE0267bEE3B9A2F70835EC6628",
|
|
1097
|
+
symbol: "wPYPLx",
|
|
1098
|
+
name: "Wrapped PayPal xStock",
|
|
1099
|
+
decimals: 18
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
wrapper: "0xdbD9232fee15351068Fe02F0683146e16D9f2cEa",
|
|
1103
|
+
underlying: "0xa753A7395cAe905Cd615Da0B82A53E0560f250af",
|
|
1104
|
+
symbol: "wQQQx",
|
|
1105
|
+
name: "Wrapped Nasdaq xStock",
|
|
1106
|
+
decimals: 18
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
wrapper: "0xc1de0BA489E6a5df9ebbA3911e382b455DeDF8c3",
|
|
1110
|
+
underlying: "0x5d8dA1417E3565eb02C9ca8cC588bE5D8F65b1c5",
|
|
1111
|
+
symbol: "wRBLXx",
|
|
1112
|
+
name: "Wrapped Roblox xStock",
|
|
1113
|
+
decimals: 18
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
wrapper: "0xE99c177Bcb254bE2A0333c3B7071c696400Df1cF",
|
|
1117
|
+
underlying: "0x6Ac47387f0a2798dF4C4eE5bb31ab9517ac97cb8",
|
|
1118
|
+
symbol: "wRIOTx",
|
|
1119
|
+
name: "Wrapped Riot Platforms xStock",
|
|
1120
|
+
decimals: 18
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
wrapper: "0xf3f249dBaA9E3e9C9B78b1784cECd954e829aC81",
|
|
1124
|
+
underlying: "0xE17ce7dD2afb6Da3488fD9ef2558523D569e17B4",
|
|
1125
|
+
symbol: "wRKLBx",
|
|
1126
|
+
name: "Wrapped Rocket Lab xStock",
|
|
1127
|
+
decimals: 18
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
wrapper: "0x4329d7C2Fa1De1c7218cd0c68587e2225C8C53fB",
|
|
1131
|
+
underlying: "0x7c7445A40926152B8d24aBDb9020e219d3D3380a",
|
|
1132
|
+
symbol: "wSATAx",
|
|
1133
|
+
name: "Wrapped Strive, Inc. Series A Preferred xStock",
|
|
1134
|
+
decimals: 18
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
wrapper: "0x9Fd163B1020535C24A3140DB9BB1153E6dEf8fCd",
|
|
1138
|
+
underlying: "0x338791c58fdED314b81EAb139A1A2Fb7967D90d6",
|
|
1139
|
+
symbol: "wSBETx",
|
|
1140
|
+
name: "Wrapped SharpLink Gaming xStock",
|
|
1141
|
+
decimals: 18
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
wrapper: "0xB9FCE7dcDfa1962EB53B3e2000554A77F0c10E8b",
|
|
1145
|
+
underlying: "0xF6D87E523512704C29E9b7cA3e9e6226bDCE3EA1",
|
|
1146
|
+
symbol: "wSCHFx",
|
|
1147
|
+
name: "Wrapped Schwab International Equity xStock",
|
|
1148
|
+
decimals: 18
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
wrapper: "0x93bd84EE978b60f37df0639f70EAC621e542AD4b",
|
|
1152
|
+
underlying: "0x4833e7f4f0460f4B72A3a5879A6C9841bCC5B58B",
|
|
1153
|
+
symbol: "wSLVx",
|
|
1154
|
+
name: "Wrapped iShares Silver Trust xStock",
|
|
1155
|
+
decimals: 18
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
wrapper: "0x382567e5D72eca3eD2Bb97a4e42918107E09fab0",
|
|
1159
|
+
underlying: "0x7F8ba411ECBC0A135d669d5EaE5D15b0Ca0b0ea1",
|
|
1160
|
+
symbol: "wSPCEx",
|
|
1161
|
+
name: "Wrapped Virgin Galactic xStock",
|
|
1162
|
+
decimals: 18
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
wrapper: "0x8e2eeD8b8B5E13Ea7BF38e50d7821d2C57309072",
|
|
1166
|
+
underlying: "0x68fa48B1C2FE52b3D776E1953e0E782b5044Ce28",
|
|
1167
|
+
symbol: "wSPCXx",
|
|
1168
|
+
name: "Wrapped SpaceX xStock",
|
|
1169
|
+
decimals: 18
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
wrapper: "0x2f5a59Dd87C57fBfA10a5Ab12fD902C8AFdA2dfD",
|
|
1173
|
+
underlying: "0xD3c5Af6B2F0F754b2141f368cFc5ea99C3594d3a",
|
|
1174
|
+
symbol: "wSPGIx",
|
|
1175
|
+
name: "Wrapped S&P Global xStock",
|
|
1176
|
+
decimals: 18
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
wrapper: "0xc88FcD8B874fDb3256E8B55b3decB8c24EAb4c02",
|
|
1180
|
+
underlying: "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48",
|
|
1181
|
+
symbol: "wSPYx",
|
|
1182
|
+
name: "Wrapped SP500 xStock",
|
|
1183
|
+
decimals: 18
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
wrapper: "0x0B2456017C5Df2dFc0289740C4b352049892780C",
|
|
1187
|
+
underlying: "0x1Aad217B8F78dbA5E6693460e8470F8b1A3977f3",
|
|
1188
|
+
symbol: "wSTRCx",
|
|
1189
|
+
name: "Wrapped Strategy PP Variable xStock",
|
|
1190
|
+
decimals: 18
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
wrapper: "0xB038B3b1f999897035AD4Ea65A9d6F59E2e86588",
|
|
1194
|
+
underlying: "0x38E0445308E7FcD5230F2DF6b52B36DD4FF313b6",
|
|
1195
|
+
symbol: "wSTRKx",
|
|
1196
|
+
name: "Wrapped Strategy PP Fixed xStock",
|
|
1197
|
+
decimals: 18
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
wrapper: "0xCd932bF1c895B7143ec34Df5Ae7889D3853904D8",
|
|
1201
|
+
underlying: "0x4cbf89ED7Bb30b8a860fa86d3c96E9c72931299b",
|
|
1202
|
+
symbol: "wTBLLx",
|
|
1203
|
+
name: "Wrapped TBLL xStock",
|
|
1204
|
+
decimals: 18
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
wrapper: "0xfa4fFDbf6D53E1539B03823D72886Ab9510250E7",
|
|
1208
|
+
underlying: "0x61AeE4f4e6B62806c26eafF921e7F41782cA2E03",
|
|
1209
|
+
symbol: "wTEMx",
|
|
1210
|
+
name: "Wrapped Tempus AI xStock",
|
|
1211
|
+
decimals: 18
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
wrapper: "0x0420112790C619Fbbd44106bC72ce217b515269A",
|
|
1215
|
+
underlying: "0xAB6a44AD34D083f463fa6F64d0619F11eB2cb48D",
|
|
1216
|
+
symbol: "wTGTx",
|
|
1217
|
+
name: "Wrapped Target xStock",
|
|
1218
|
+
decimals: 18
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
wrapper: "0x89EA0284308dEEF33a22abd7ea33888b4349108C",
|
|
1222
|
+
underlying: "0xAF072F109A2C173D822a4fe9af311A1B18F83d19",
|
|
1223
|
+
symbol: "wTMOx",
|
|
1224
|
+
name: "Wrapped Thermo Fisher xStock",
|
|
1225
|
+
decimals: 18
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
wrapper: "0xF940Fd9D8B80412C47691442075848cc05cD6732",
|
|
1229
|
+
underlying: "0x68F3DDEE8BAE33691E7CD0372984fD857E842760",
|
|
1230
|
+
symbol: "wTMUSx",
|
|
1231
|
+
name: "Wrapped T-Mobile xStock",
|
|
1232
|
+
decimals: 18
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
wrapper: "0x4b12EB39418e30fC0e86E36CDac0545c1d9edAc9",
|
|
1236
|
+
underlying: "0xe95ab205e333443D7970336D5fD827eF9eD97608",
|
|
1237
|
+
symbol: "wTONXx",
|
|
1238
|
+
name: "Wrapped TON xStock",
|
|
1239
|
+
decimals: 18
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
wrapper: "0x3D843414E617CBb9D2328c7eCF155d7C18139D6A",
|
|
1243
|
+
underlying: "0xfDDDb57878eF9D6f681Ec4381DCB626b9E69AC86",
|
|
1244
|
+
symbol: "wTQQQx",
|
|
1245
|
+
name: "Wrapped TQQQ xStock",
|
|
1246
|
+
decimals: 18
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
wrapper: "0x93730D679190e831caea5e4ce46a5701D555e0F2",
|
|
1250
|
+
underlying: "0xeCF59a3FD0224D33429920f8fa6dE493abc4EFC0",
|
|
1251
|
+
symbol: "wTRONx",
|
|
1252
|
+
name: "Wrapped Tron xStock",
|
|
1253
|
+
decimals: 18
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
wrapper: "0x43680aBF18cf54898Be84C6eF78237CFBD441883",
|
|
1257
|
+
underlying: "0x8aD3c73F833d3F9A523aB01476625F269aEB7Cf0",
|
|
1258
|
+
symbol: "wTSLAx",
|
|
1259
|
+
name: "Wrapped Tesla xStock",
|
|
1260
|
+
decimals: 18
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
wrapper: "0x083283FAfD9CEC6145ce6a4A50F020A01737De52",
|
|
1264
|
+
underlying: "0x9e3bf4Ecfc44EeDD624F26656B6736a3F093b073",
|
|
1265
|
+
symbol: "wTSMx",
|
|
1266
|
+
name: "Wrapped TSMC xStock",
|
|
1267
|
+
decimals: 18
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
wrapper: "0xb10F7AA3BC0ad9FcE5Fc99702C2022d47BA93827",
|
|
1271
|
+
underlying: "0x75639aE3A05079873D7189DcbDBc455898cAe904",
|
|
1272
|
+
symbol: "wTx",
|
|
1273
|
+
name: "Wrapped AT&T xStock",
|
|
1274
|
+
decimals: 18
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
wrapper: "0x4BEa51f138A30329b8855bf0DaE85EA5644Ada82",
|
|
1278
|
+
underlying: "0xdb9783Ca04bBD64fe2c6d7B9503A979b3DE30729",
|
|
1279
|
+
symbol: "wUBERx",
|
|
1280
|
+
name: "Wrapped Uber xStock",
|
|
1281
|
+
decimals: 18
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
wrapper: "0xA0412CE46fE877b7f174B82aCD95E70063BbaF2a",
|
|
1285
|
+
underlying: "0x167A6375DA1eFc4a5BE0f470E73eCEfd66245048",
|
|
1286
|
+
symbol: "wUNHx",
|
|
1287
|
+
name: "Wrapped UnitedHealth xStock",
|
|
1288
|
+
decimals: 18
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
wrapper: "0x92DB84B2358E97976DAD16f91E6aeb9B2A757e76",
|
|
1292
|
+
underlying: "0x7AB6C97f65e4227adc5090Bd31a376D1F36f39fa",
|
|
1293
|
+
symbol: "wVSTx",
|
|
1294
|
+
name: "Wrapped Vistra xStock",
|
|
1295
|
+
decimals: 18
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
wrapper: "0xE9161F111c55Bdd67525C1d4F9bbca07750aaAb7",
|
|
1299
|
+
underlying: "0xbD730E618bcD88C82dDeE52e10275CF2f88A4777",
|
|
1300
|
+
symbol: "wVTIx",
|
|
1301
|
+
name: "Wrapped Vanguard xStock",
|
|
1302
|
+
decimals: 18
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
wrapper: "0x48Da55D8FE70A4E3ec421736369BACB8D62Fa089",
|
|
1306
|
+
underlying: "0x6d5edEEbBc6A4099Eb8bb289EB3b80D799f7b28C",
|
|
1307
|
+
symbol: "wVTx",
|
|
1308
|
+
name: "Wrapped Vanguard Total World xStock",
|
|
1309
|
+
decimals: 18
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
wrapper: "0x3cf193acf378Ec224a0209Be888b4b0B963E1896",
|
|
1313
|
+
underlying: "0x2363FD1235C1B6d3A5088DdF8dF3A0b3A30C5293",
|
|
1314
|
+
symbol: "wVx",
|
|
1315
|
+
name: "Wrapped Visa xStock",
|
|
1316
|
+
decimals: 18
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
wrapper: "0x4cA269239B760787bB2A54C055c383FD2DADE779",
|
|
1320
|
+
underlying: "0xc435b3C41AE56d9Bc57b8525F4d522C978F168e8",
|
|
1321
|
+
symbol: "wWBDx",
|
|
1322
|
+
name: "Wrapped Warner Bros. Discovery xStock",
|
|
1323
|
+
decimals: 18
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
wrapper: "0x97C4C1704111B7c2304B177C37858B7169c667f9",
|
|
1327
|
+
underlying: "0xfEEE18422F8F1cD6193C12aAfad7123DbfF15517",
|
|
1328
|
+
symbol: "wWENx",
|
|
1329
|
+
name: "Wrapped Wendy's xStock",
|
|
1330
|
+
decimals: 18
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
wrapper: "0xa24D9c43D64c76aCD962003647FD43a85eb44Db8",
|
|
1334
|
+
underlying: "0x7AEfc9965699fBea943e03264d96e50CD4A97b21",
|
|
1335
|
+
symbol: "wWMTx",
|
|
1336
|
+
name: "Wrapped Walmart xStock",
|
|
1337
|
+
decimals: 18
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
wrapper: "0xf068165CFf011A56562F855b44CF690e371232C8",
|
|
1341
|
+
underlying: "0xC0c2150cf0870E2d7aBc7cDe17C20A542faFBB9B",
|
|
1342
|
+
symbol: "wWULFx",
|
|
1343
|
+
name: "Wrapped TeraWulf xStock",
|
|
1344
|
+
decimals: 18
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
wrapper: "0x448bC811F60eac772775dD53421380E8D4DC4338",
|
|
1348
|
+
underlying: "0xEEdb0273c5Af792745180e9fF568cD01550fFA13",
|
|
1349
|
+
symbol: "wXOMx",
|
|
1350
|
+
name: "Wrapped Exxon Mobil xStock",
|
|
1351
|
+
decimals: 18
|
|
1352
|
+
}
|
|
1353
|
+
] };
|
|
1354
|
+
|
|
1355
|
+
//#endregion
|
|
1356
|
+
//#region src/cow/xstockWrappers.ts
|
|
1357
|
+
/**
|
|
1358
|
+
* Per-chain lookup indices, built lazily from the static registry. Keys are
|
|
1359
|
+
* lowercased addresses for case-insensitive matching. Caching static config is
|
|
1360
|
+
* safe (it carries no dynamic on-chain data).
|
|
1361
|
+
*/
|
|
1362
|
+
const indexCache = new Map();
|
|
1363
|
+
function getIndex(chainId) {
|
|
1364
|
+
let idx = indexCache.get(chainId);
|
|
1365
|
+
if (!idx) {
|
|
1366
|
+
const byUnderlying = new Map();
|
|
1367
|
+
const byWrapper = new Map();
|
|
1368
|
+
for (const entry of XSTOCK_WRAPPERS[chainId] ?? []) {
|
|
1369
|
+
byUnderlying.set(entry.underlying.toLowerCase(), entry);
|
|
1370
|
+
byWrapper.set(entry.wrapper.toLowerCase(), entry);
|
|
1371
|
+
}
|
|
1372
|
+
idx = {
|
|
1373
|
+
byUnderlying,
|
|
1374
|
+
byWrapper
|
|
1375
|
+
};
|
|
1376
|
+
indexCache.set(chainId, idx);
|
|
1377
|
+
}
|
|
1378
|
+
return idx;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Resolve the wrapper for an unwrapped xStock. Returns `undefined` when the
|
|
1382
|
+
* address isn't a known xStock underlying on this chain.
|
|
1383
|
+
*/
|
|
1384
|
+
function getXstockWrapper(chainId, underlying) {
|
|
1385
|
+
return getIndex(chainId).byUnderlying.get(underlying.toLowerCase());
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Resolve the underlying xStock for a wrapper address. Returns `undefined` when
|
|
1389
|
+
* the address isn't a known xStock wrapper on this chain.
|
|
1390
|
+
*/
|
|
1391
|
+
function getXstockUnderlying(chainId, wrapper) {
|
|
1392
|
+
return getIndex(chainId).byWrapper.get(wrapper.toLowerCase());
|
|
1393
|
+
}
|
|
1394
|
+
/** True if `address` is a known unwrapped xStock on this chain. */
|
|
1395
|
+
function isXstockUnderlying(chainId, address) {
|
|
1396
|
+
return getXstockWrapper(chainId, address) !== void 0;
|
|
1397
|
+
}
|
|
1398
|
+
/** True if `address` is a known xStock wrapper on this chain. */
|
|
1399
|
+
function isXstockWrapper(chainId, address) {
|
|
1400
|
+
return getXstockUnderlying(chainId, address) !== void 0;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
//#endregion
|
|
1404
|
+
export { APP_DATA_DOC, APP_DATA_HASH, COW_API_URLS, COW_CANCELLATION_TYPES, COW_NATIVE_ETH, COW_ORDER_TYPES, COW_SETTLEMENT, COW_VAULT_RELAYER, CowApiError, CowNativeTokenError, CowOrderTooSmallError, CowUnsupportedChainError, DEFAULT_VALID_FOR_SECONDS, XSTOCK_WRAPPERS, approveErc20ForCow, cancelCowOrder, checkCowApproval, cowDomain, findCowToken, getCowOrderStatus, getXstockUnderlying, getXstockWrapper, isCowSupportedChain, isXstockUnderlying, isXstockWrapper, pickBestVenue, quoteCowSwap, signAndSubmitCowOrder };
|
|
1405
|
+
//# sourceMappingURL=cow-Dy-Cd09v.js.map
|