mantle-agent-kit-sdk 1.0.4 → 1.1.2

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { parseUnits, parseEther, encodeFunctionData, getAddress, parseAbiItem, createWalletClient, http, publicActions, erc20Abi as erc20Abi$1 } from 'viem';
1
+ import { parseUnits, parseEther, encodeFunctionData, getAddress, parseAbiItem, encodeAbiParameters, parseAbiParameters, erc20Abi as erc20Abi$1, createWalletClient, http, publicActions } from 'viem';
2
2
  import { privateKeyToAccount } from 'viem/accounts';
3
3
  import { mantle, mantleSepoliaTestnet } from 'viem/chains';
4
4
  import { getTransactionReceipt } from 'viem/actions';
@@ -465,8 +465,8 @@ async function approveToken2(agent, tokenAddress, spenderAddress, amount) {
465
465
  return { approved: true, txHash: null };
466
466
  }
467
467
  console.log("Insufficient allowance, approving tokens...");
468
- const { encodeFunctionData: encodeFunctionData11 } = await import('viem');
469
- const approveData = encodeFunctionData11({
468
+ const { encodeFunctionData: encodeFunctionData14 } = await import('viem');
469
+ const approveData = encodeFunctionData14({
470
470
  abi: erc20Abi$1,
471
471
  functionName: "approve",
472
472
  args: [spenderAddress, BigInt(amount)]
@@ -2183,6 +2183,1412 @@ async function pikeperpsGetMarketData(agent, tokenAddress, limit = 20) {
2183
2183
  };
2184
2184
  }
2185
2185
 
2186
+ // src/constants/pyth/index.ts
2187
+ var pyth_exports = {};
2188
+ __export(pyth_exports, {
2189
+ HERMES_ENDPOINT: () => HERMES_ENDPOINT,
2190
+ PYTH_ABI: () => PYTH_ABI,
2191
+ PYTH_CONTRACT: () => PYTH_CONTRACT,
2192
+ PYTH_PRICE_FEED_IDS: () => PYTH_PRICE_FEED_IDS,
2193
+ TOKEN_ADDRESS_TO_PRICE_FEED: () => TOKEN_ADDRESS_TO_PRICE_FEED,
2194
+ isTokenAddress: () => isTokenAddress,
2195
+ resolvePriceFeedInput: () => resolvePriceFeedInput
2196
+ });
2197
+ var PYTH_CONTRACT = {
2198
+ mainnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
2199
+ testnet: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
2200
+ };
2201
+ var HERMES_ENDPOINT = {
2202
+ mainnet: "https://hermes.pyth.network",
2203
+ testnet: "https://hermes.pyth.network"
2204
+ };
2205
+ var PYTH_PRICE_FEED_IDS = {
2206
+ // === Major Cryptocurrencies ===
2207
+ "BTC/USD": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
2208
+ "ETH/USD": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
2209
+ "SOL/USD": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
2210
+ "BNB/USD": "2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f",
2211
+ "XRP/USD": "ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8",
2212
+ "ADA/USD": "2a01deaec9e51a579277b34b122399984d0bbf57e2458a7e42fecd2829867a0d",
2213
+ "DOGE/USD": "dcef50dd0a4cd2dcc17e45df1676dcb336a11a61c69df7a0299b0150c672d25c",
2214
+ "DOT/USD": "ca3eed9b267293f6595901c734c7525ce8ef49adafe8284571c8e17d6c926346",
2215
+ "AVAX/USD": "93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7",
2216
+ "MATIC/USD": "5de33440f6b7d0d7d70f0a7b2a6c0e0b8e5d2f7c8a9b0c1d2e3f4a5b6c7d8e9f",
2217
+ "LINK/USD": "8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221",
2218
+ "ATOM/USD": "b00b60f88b03a6a625a8d1c048c3f66653edf217439cb6a1cbab0c1c5e8c52bd",
2219
+ "LTC/USD": "6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54",
2220
+ "UNI/USD": "78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501",
2221
+ "NEAR/USD": "c415de8d2eba7db216527dff4b60e8f3a5311c740dadb233e13e12547e226750",
2222
+ "TRX/USD": "67aed5a24fdad045475e7195c98a98aea119c763f272d4523f5bac93a4f33c2b",
2223
+ // === Layer 2 & Scaling ===
2224
+ "ARB/USD": "3fa4252848f9f0a1480be62745a4629d9eb1322aebab8a791e344b3b9c1adcf5",
2225
+ "OP/USD": "385f64d993f7b77d8182ed5003d97c60aa3361f3cecfe711544d2d59165e9bdf",
2226
+ "MNT/USD": "4e3037c822d852d79af3ac80e35eb420ee3b870dca49f9344a38ef4773fb0585",
2227
+ "IMX/USD": "941320a8989414a6d2c757c8c6c52b3e7e0b7e4e4c5bb8a3c8e7a0f3e0f0f0f0",
2228
+ "STRK/USD": "6a182399ff70ccf3e06024898942028204125a819e519a335ffa4579e66cd870",
2229
+ // === DeFi Tokens ===
2230
+ "AAVE/USD": "2b9ab1e972a281585084148ba1389800799bd4be63b957507db1349314e47445",
2231
+ "CRV/USD": "a19d04ac696c7a6616d291c7e5d1377cc8be437c327b75adb5dc1bad745fcae8",
2232
+ "MKR/USD": "9375299e31c0deb9c6bc378e6329aab44cb48ec655552a70d4b9050346a30378",
2233
+ "SNX/USD": "39d020f60982ed892abbcd4a06a276a9f9b7bfbce003204c110b6e488f502da3",
2234
+ "COMP/USD": "4a8e42861cabc5ecb50996f92e7cfa2bce3fd0a2423b0c44c9b423fb2bd25478",
2235
+ "LDO/USD": "c63e2a7f37a04e5e614c07238bedb25dcc38927e77a90a4b21a7a2e1d7f0d2e3",
2236
+ "1INCH/USD": "63f341689d98a12ef60a5cff1d7f85c70a9e17bf1575f0e7c0b2512d48b1c8b3",
2237
+ "SUSHI/USD": "26e4f737fde0263a9eea10ae63ac36dcedab2aaf629f1e31a28a28dd0e0d2b0c",
2238
+ "YFI/USD": "425f4b198ab2504936886c1e93511bb6720fbcf2045a4f3c0723bb213846022f",
2239
+ "BAL/USD": "07ad7b4a7662d19a6bc675f6b467172d2f3947fa653ca97555a9b20236406628",
2240
+ "CAKE/USD": "2356af9529a1064d1d2a2e3e4ab6d6e6f6e6f6e6f6e6f6e6f6e6f6e6f6e6f6e6",
2241
+ "GMX/USD": "b962539d0fcb272a494d65ea56f94851c2bcf8823935da05bd628916e2e9edbf",
2242
+ "PENDLE/USD": "9a4df90b25497f66b1afb012467e316e801ca3d839456db028892fe8c70c8016",
2243
+ "JOE/USD": "1e8a156c8a23c1e56f2d9d7f0e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e",
2244
+ // === Stablecoins ===
2245
+ "USDC/USD": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
2246
+ "USDT/USD": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b",
2247
+ "DAI/USD": "b0948a5e5313200c632b51bb5ca32f6de0d36e9950a942d19751e833f70dabfd",
2248
+ "FRAX/USD": "c3d5d8d6d0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0",
2249
+ "BUSD/USD": "5bc91f13e412c07599167bae86f07543f076a638962b8d6017ec19dab4a82814",
2250
+ "TUSD/USD": "433faaa801ecda2c0bbfa8f4e2d85fd4c310e2c1e5f8f8e6e5f5f5f5f5f5f5f5",
2251
+ "LUSD/USD": "d892ae586f4e0fbeee4d64f29ed6e89b1b3e2e2e2e2e2e2e2e2e2e2e2e2e2e2e",
2252
+ // === Wrapped & LST Tokens ===
2253
+ "WETH/USD": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
2254
+ "WBTC/USD": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33",
2255
+ "stETH/USD": "846ae1bdb6300b817cee5fdee2a6da192775030db5615b94a465f53bd40850b5",
2256
+ "cbETH/USD": "15ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce5717",
2257
+ "rETH/USD": "a0255134973f4fdf2f8f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
2258
+ "mETH/USD": "4c9c6f9f0cde13fced52dc1927c8c06a91b1a65ab77b9e1ec1c614963ce90dd4",
2259
+ "wstETH/USD": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784",
2260
+ // === Meme Coins ===
2261
+ "SHIB/USD": "f0d57deca57b3da2fe63a493f4c25925fdfd8edf834b20f93e1f84dbd1504d4a",
2262
+ "PEPE/USD": "d69731a2e74ac1ce884fc3890f7ee324b6deb66147055249568869ed700882e4",
2263
+ "FLOKI/USD": "6b1381ce7e874dc5410b197ac8348162c0dd6c0d4c9cd6322c28a6f7f4d1a2d2",
2264
+ "BONK/USD": "72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419",
2265
+ "WIF/USD": "4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc",
2266
+ // === Gaming & Metaverse ===
2267
+ "AXS/USD": "b0d8f5e3f3a7c0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0",
2268
+ "SAND/USD": "f4040ec3e5b71c241a7e1a9a1e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e",
2269
+ "MANA/USD": "2b15e4bded7f5e5d5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
2270
+ "GALA/USD": "e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3",
2271
+ "APE/USD": "15add95022ae13563a11992e727c91bdb6b55bc183d9d747436c80a483d8c864",
2272
+ "ENJ/USD": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
2273
+ // === Infrastructure & Oracles ===
2274
+ "FIL/USD": "150ac9b959aee0051e4091f0ef5216d941f590e1c5e7f91cf7635b5c11628c0e",
2275
+ "GRT/USD": "4d1f8dae0d96236fb98e8f47571a70f41c8b8f2f6d6c0e0e0e0e0e0e0e0e0e0e",
2276
+ "RNDR/USD": "ab7347771135fc733f8f38db462ba085ed3309955f42554a14fa13e855ac0e2f",
2277
+ "INJ/USD": "7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff592",
2278
+ "AR/USD": "8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c",
2279
+ "THETA/USD": "4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a",
2280
+ "PYTH/USD": "0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff",
2281
+ // === AI & Data ===
2282
+ "FET/USD": "b49ee9d8ccf9b6e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0",
2283
+ "OCEAN/USD": "2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d",
2284
+ "TAO/USD": "410f41de235f2dbdf41f1a808c1e15f6a9e7d6a7b8c9d0e1f2a3b4c5d6e7f8a9",
2285
+ // === Exchange Tokens ===
2286
+ "FTT/USD": "6c75e52531ec5fd3ef253f6062956a8508a2f03fa0a209fb7dbc0d0f3d6f6f6f",
2287
+ "CRO/USD": "b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7",
2288
+ "OKB/USD": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
2289
+ // === Forex Pairs ===
2290
+ "EUR/USD": "a995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b",
2291
+ "GBP/USD": "84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1",
2292
+ "JPY/USD": "ef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52",
2293
+ "AUD/USD": "67a6f93030f4217f2e8f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f",
2294
+ "CAD/USD": "9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a",
2295
+ // === Commodities ===
2296
+ "XAU/USD": "765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2",
2297
+ "XAG/USD": "f2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e",
2298
+ "WTI/USD": "c9c8e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9",
2299
+ "BRENT/USD": "d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8",
2300
+ // === US Equities ===
2301
+ "AAPL/USD": "49f6b65cb1de6b10eaf75e7c03ca029c306d0357e91b5311b175084a5ad55688",
2302
+ "NVDA/USD": "b1073854ed24cbc755dc527418f52b7d271f6cc967bbf8d8129112b18860a593",
2303
+ "TSLA/USD": "16dad506d7db8da01c87581c87ca897a012a153557d4d578c3b9c9e1bc0632f1",
2304
+ "GOOGL/USD": "b7e3904c08ddd9c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0",
2305
+ "AMZN/USD": "c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6",
2306
+ "MSFT/USD": "d0ca23c1cc005e004ccf1db5bf76aeb6a49218f43dac3d4b275e92de12ea4b77",
2307
+ "META/USD": "a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4",
2308
+ "COIN/USD": "9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b",
2309
+ "SPY/USD": "19e09bb805456ada3979a7d1cbb4b6d63babc3a0f8e8a9b3c4d5e6f7a8b9c0d1",
2310
+ "QQQ/USD": "2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e"
2311
+ };
2312
+ var PYTH_ABI = [
2313
+ {
2314
+ inputs: [{ name: "id", type: "bytes32" }],
2315
+ name: "getPrice",
2316
+ outputs: [
2317
+ {
2318
+ components: [
2319
+ { name: "price", type: "int64" },
2320
+ { name: "conf", type: "uint64" },
2321
+ { name: "expo", type: "int32" },
2322
+ { name: "publishTime", type: "uint256" }
2323
+ ],
2324
+ name: "",
2325
+ type: "tuple"
2326
+ }
2327
+ ],
2328
+ stateMutability: "view",
2329
+ type: "function"
2330
+ },
2331
+ {
2332
+ inputs: [{ name: "id", type: "bytes32" }],
2333
+ name: "getPriceNoOlderThan",
2334
+ outputs: [
2335
+ {
2336
+ components: [
2337
+ { name: "price", type: "int64" },
2338
+ { name: "conf", type: "uint64" },
2339
+ { name: "expo", type: "int32" },
2340
+ { name: "publishTime", type: "uint256" }
2341
+ ],
2342
+ name: "",
2343
+ type: "tuple"
2344
+ }
2345
+ ],
2346
+ stateMutability: "view",
2347
+ type: "function"
2348
+ },
2349
+ {
2350
+ inputs: [
2351
+ { name: "id", type: "bytes32" },
2352
+ { name: "age", type: "uint256" }
2353
+ ],
2354
+ name: "getPriceNoOlderThan",
2355
+ outputs: [
2356
+ {
2357
+ components: [
2358
+ { name: "price", type: "int64" },
2359
+ { name: "conf", type: "uint64" },
2360
+ { name: "expo", type: "int32" },
2361
+ { name: "publishTime", type: "uint256" }
2362
+ ],
2363
+ name: "",
2364
+ type: "tuple"
2365
+ }
2366
+ ],
2367
+ stateMutability: "view",
2368
+ type: "function"
2369
+ },
2370
+ {
2371
+ inputs: [{ name: "id", type: "bytes32" }],
2372
+ name: "getPriceUnsafe",
2373
+ outputs: [
2374
+ {
2375
+ components: [
2376
+ { name: "price", type: "int64" },
2377
+ { name: "conf", type: "uint64" },
2378
+ { name: "expo", type: "int32" },
2379
+ { name: "publishTime", type: "uint256" }
2380
+ ],
2381
+ name: "",
2382
+ type: "tuple"
2383
+ }
2384
+ ],
2385
+ stateMutability: "view",
2386
+ type: "function"
2387
+ },
2388
+ {
2389
+ inputs: [{ name: "id", type: "bytes32" }],
2390
+ name: "getEmaPrice",
2391
+ outputs: [
2392
+ {
2393
+ components: [
2394
+ { name: "price", type: "int64" },
2395
+ { name: "conf", type: "uint64" },
2396
+ { name: "expo", type: "int32" },
2397
+ { name: "publishTime", type: "uint256" }
2398
+ ],
2399
+ name: "",
2400
+ type: "tuple"
2401
+ }
2402
+ ],
2403
+ stateMutability: "view",
2404
+ type: "function"
2405
+ },
2406
+ {
2407
+ inputs: [{ name: "updateData", type: "bytes[]" }],
2408
+ name: "updatePriceFeeds",
2409
+ outputs: [],
2410
+ stateMutability: "payable",
2411
+ type: "function"
2412
+ },
2413
+ {
2414
+ inputs: [{ name: "updateData", type: "bytes[]" }],
2415
+ name: "getUpdateFee",
2416
+ outputs: [{ name: "feeAmount", type: "uint256" }],
2417
+ stateMutability: "view",
2418
+ type: "function"
2419
+ },
2420
+ {
2421
+ inputs: [{ name: "id", type: "bytes32" }],
2422
+ name: "priceFeedExists",
2423
+ outputs: [{ name: "", type: "bool" }],
2424
+ stateMutability: "view",
2425
+ type: "function"
2426
+ },
2427
+ {
2428
+ inputs: [
2429
+ { name: "updateData", type: "bytes[]" },
2430
+ { name: "priceIds", type: "bytes32[]" },
2431
+ { name: "minPublishTime", type: "uint64" },
2432
+ { name: "maxPublishTime", type: "uint64" }
2433
+ ],
2434
+ name: "parsePriceFeedUpdates",
2435
+ outputs: [
2436
+ {
2437
+ components: [
2438
+ { name: "id", type: "bytes32" },
2439
+ {
2440
+ components: [
2441
+ { name: "price", type: "int64" },
2442
+ { name: "conf", type: "uint64" },
2443
+ { name: "expo", type: "int32" },
2444
+ { name: "publishTime", type: "uint256" }
2445
+ ],
2446
+ name: "price",
2447
+ type: "tuple"
2448
+ },
2449
+ {
2450
+ components: [
2451
+ { name: "price", type: "int64" },
2452
+ { name: "conf", type: "uint64" },
2453
+ { name: "expo", type: "int32" },
2454
+ { name: "publishTime", type: "uint256" }
2455
+ ],
2456
+ name: "emaPrice",
2457
+ type: "tuple"
2458
+ }
2459
+ ],
2460
+ name: "",
2461
+ type: "tuple[]"
2462
+ }
2463
+ ],
2464
+ stateMutability: "payable",
2465
+ type: "function"
2466
+ }
2467
+ ];
2468
+ var TOKEN_ADDRESS_TO_PRICE_FEED = {
2469
+ // Native and Wrapped tokens
2470
+ "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE": { pair: "MNT/USD", feedId: PYTH_PRICE_FEED_IDS["MNT/USD"] },
2471
+ // Native MNT
2472
+ "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8": { pair: "MNT/USD", feedId: PYTH_PRICE_FEED_IDS["MNT/USD"] },
2473
+ // WMNT
2474
+ "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111": { pair: "ETH/USD", feedId: PYTH_PRICE_FEED_IDS["ETH/USD"] },
2475
+ // WETH
2476
+ // Stablecoins
2477
+ "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2": { pair: "USDC/USD", feedId: PYTH_PRICE_FEED_IDS["USDC/USD"] },
2478
+ // USDC
2479
+ "0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE": { pair: "USDT/USD", feedId: PYTH_PRICE_FEED_IDS["USDT/USD"] },
2480
+ // USDT
2481
+ // LST Tokens
2482
+ "0xcDA86A272531e8640cD7F1a92c01839911B90bb0": { pair: "mETH/USD", feedId: PYTH_PRICE_FEED_IDS["mETH/USD"] },
2483
+ // mETH
2484
+ // Additional Mantle tokens (commonly traded)
2485
+ "0xCAbAE6f6Ea1ecaB08Ad02fE02ce9A44F09aebfA2": { pair: "WBTC/USD", feedId: PYTH_PRICE_FEED_IDS["WBTC/USD"] },
2486
+ // WBTC
2487
+ "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000": { pair: "ETH/USD", feedId: PYTH_PRICE_FEED_IDS["ETH/USD"] },
2488
+ // ETH (canonical)
2489
+ // USDe and other stablecoins
2490
+ "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34": { pair: "USDC/USD", feedId: PYTH_PRICE_FEED_IDS["USDC/USD"] },
2491
+ // USDe (pegged to USD)
2492
+ // Pendle
2493
+ "0xf83bcc06D6A4A5682adeCA11CF9500f67bFe61AE": { pair: "PENDLE/USD", feedId: PYTH_PRICE_FEED_IDS["PENDLE/USD"] },
2494
+ // PENDLE
2495
+ // FBTC
2496
+ "0xc96de26018a54d51c097160568752c4e3bd6c364": { pair: "BTC/USD", feedId: PYTH_PRICE_FEED_IDS["BTC/USD"] },
2497
+ // FBTC
2498
+ // Aurelius tokens (staked versions)
2499
+ "0xe6829d9a7eE3040e1276Fa75293Bde931859e8fA": { pair: "MNT/USD", feedId: PYTH_PRICE_FEED_IDS["MNT/USD"] }
2500
+ // cmETH
2501
+ };
2502
+ function isTokenAddress(input) {
2503
+ return /^0x[a-fA-F0-9]{40}$/i.test(input);
2504
+ }
2505
+ function resolvePriceFeedInput(input) {
2506
+ const normalizedInput = input.toLowerCase();
2507
+ if (isTokenAddress(input)) {
2508
+ for (const [addr, info] of Object.entries(TOKEN_ADDRESS_TO_PRICE_FEED)) {
2509
+ if (addr.toLowerCase() === normalizedInput) {
2510
+ return { pair: info.pair, feedId: info.feedId };
2511
+ }
2512
+ }
2513
+ return null;
2514
+ }
2515
+ if (input in PYTH_PRICE_FEED_IDS) {
2516
+ return {
2517
+ pair: input,
2518
+ feedId: PYTH_PRICE_FEED_IDS[input]
2519
+ };
2520
+ }
2521
+ const normalizedId = input.replace("0x", "");
2522
+ const foundPair = Object.entries(PYTH_PRICE_FEED_IDS).find(
2523
+ ([, id]) => id === normalizedId
2524
+ );
2525
+ if (foundPair) {
2526
+ return { pair: foundPair[0], feedId: foundPair[1] };
2527
+ }
2528
+ return null;
2529
+ }
2530
+
2531
+ // src/tools/pyth/getPrice.ts
2532
+ async function pythGetPrice(agent, input) {
2533
+ const pythAddress = PYTH_CONTRACT[agent.chain];
2534
+ const resolved = resolvePriceFeedInput(input);
2535
+ let priceFeedId;
2536
+ let pair;
2537
+ if (resolved) {
2538
+ priceFeedId = resolved.feedId;
2539
+ pair = resolved.pair;
2540
+ } else {
2541
+ priceFeedId = input;
2542
+ pair = input;
2543
+ }
2544
+ const feedId = priceFeedId.startsWith("0x") ? priceFeedId : `0x${priceFeedId}`;
2545
+ if (agent.demo) {
2546
+ return createMockPythResponse(pair, feedId);
2547
+ }
2548
+ try {
2549
+ const priceData = await agent.client.readContract({
2550
+ address: pythAddress,
2551
+ abi: PYTH_ABI,
2552
+ functionName: "getPriceUnsafe",
2553
+ args: [feedId]
2554
+ });
2555
+ const price = Number(priceData.price);
2556
+ const confidence = Number(priceData.conf);
2557
+ const exponent = priceData.expo;
2558
+ const publishTime = Number(priceData.publishTime);
2559
+ const formattedPrice = formatPythPrice(price, exponent);
2560
+ return {
2561
+ priceFeedId: feedId,
2562
+ pair,
2563
+ price: priceData.price.toString(),
2564
+ confidence: priceData.conf.toString(),
2565
+ exponent,
2566
+ publishTime,
2567
+ formattedPrice
2568
+ };
2569
+ } catch (error) {
2570
+ throw new Error(
2571
+ `Failed to fetch price from Pyth: ${error instanceof Error ? error.message : "Unknown error"}`
2572
+ );
2573
+ }
2574
+ }
2575
+ async function pythGetEmaPrice(agent, input) {
2576
+ const pythAddress = PYTH_CONTRACT[agent.chain];
2577
+ const resolved = resolvePriceFeedInput(input);
2578
+ let priceFeedId;
2579
+ let pair;
2580
+ if (resolved) {
2581
+ priceFeedId = resolved.feedId;
2582
+ pair = resolved.pair;
2583
+ } else {
2584
+ priceFeedId = input;
2585
+ pair = input;
2586
+ }
2587
+ const feedId = priceFeedId.startsWith("0x") ? priceFeedId : `0x${priceFeedId}`;
2588
+ if (agent.demo) {
2589
+ return createMockPythResponse(pair, feedId);
2590
+ }
2591
+ try {
2592
+ const priceData = await agent.client.readContract({
2593
+ address: pythAddress,
2594
+ abi: PYTH_ABI,
2595
+ functionName: "getEmaPrice",
2596
+ args: [feedId]
2597
+ });
2598
+ const formattedPrice = formatPythPrice(
2599
+ Number(priceData.price),
2600
+ priceData.expo
2601
+ );
2602
+ return {
2603
+ priceFeedId: feedId,
2604
+ pair,
2605
+ price: priceData.price.toString(),
2606
+ confidence: priceData.conf.toString(),
2607
+ exponent: priceData.expo,
2608
+ publishTime: Number(priceData.publishTime),
2609
+ formattedPrice
2610
+ };
2611
+ } catch (error) {
2612
+ throw new Error(
2613
+ `Failed to fetch EMA price from Pyth: ${error instanceof Error ? error.message : "Unknown error"}`
2614
+ );
2615
+ }
2616
+ }
2617
+ function formatPythPrice(price, exponent) {
2618
+ const adjustedPrice = price * Math.pow(10, exponent);
2619
+ if (adjustedPrice >= 1) {
2620
+ return adjustedPrice.toFixed(2);
2621
+ } else {
2622
+ return adjustedPrice.toFixed(8);
2623
+ }
2624
+ }
2625
+ async function pythGetTokenPrice(agent, tokenAddress) {
2626
+ if (!isTokenAddress(tokenAddress)) {
2627
+ throw new Error(`Invalid token address format: ${tokenAddress}. Must be a valid Ethereum address (0x...)`);
2628
+ }
2629
+ const normalizedAddress = tokenAddress.toLowerCase();
2630
+ let tokenInfo = null;
2631
+ let originalAddress = tokenAddress;
2632
+ for (const [addr, info] of Object.entries(TOKEN_ADDRESS_TO_PRICE_FEED)) {
2633
+ if (addr.toLowerCase() === normalizedAddress) {
2634
+ tokenInfo = info;
2635
+ originalAddress = addr;
2636
+ break;
2637
+ }
2638
+ }
2639
+ if (!tokenInfo) {
2640
+ throw new Error(
2641
+ `Token address not supported: ${tokenAddress}. Use pythGetSupportedTokenAddresses() to see available tokens.`
2642
+ );
2643
+ }
2644
+ const tokenSymbol = tokenInfo.pair.split("/")[0] || "UNKNOWN";
2645
+ const feedId = tokenInfo.feedId.startsWith("0x") ? tokenInfo.feedId : `0x${tokenInfo.feedId}`;
2646
+ if (agent.demo) {
2647
+ return createMockTokenPriceResponse(originalAddress, tokenSymbol, tokenInfo.pair, feedId);
2648
+ }
2649
+ const pythAddress = PYTH_CONTRACT[agent.chain];
2650
+ try {
2651
+ const priceData = await agent.client.readContract({
2652
+ address: pythAddress,
2653
+ abi: PYTH_ABI,
2654
+ functionName: "getPriceUnsafe",
2655
+ args: [feedId]
2656
+ });
2657
+ const formattedPrice = formatPythPrice(Number(priceData.price), priceData.expo);
2658
+ const publishTime = Number(priceData.publishTime);
2659
+ return {
2660
+ tokenAddress: originalAddress,
2661
+ tokenSymbol,
2662
+ pair: tokenInfo.pair,
2663
+ priceFeedId: feedId,
2664
+ priceUsd: formattedPrice,
2665
+ confidence: priceData.conf.toString(),
2666
+ exponent: priceData.expo,
2667
+ publishTime,
2668
+ lastUpdated: new Date(publishTime * 1e3).toISOString()
2669
+ };
2670
+ } catch (error) {
2671
+ throw new Error(
2672
+ `Failed to fetch price for token ${tokenAddress}: ${error instanceof Error ? error.message : "Unknown error"}`
2673
+ );
2674
+ }
2675
+ }
2676
+ function createMockPythResponse(pair, feedId) {
2677
+ const mockPrices = {
2678
+ // Major Crypto
2679
+ "BTC/USD": 97500,
2680
+ "ETH/USD": 3450,
2681
+ "SOL/USD": 185,
2682
+ "BNB/USD": 680,
2683
+ "XRP/USD": 2.35,
2684
+ "ADA/USD": 0.95,
2685
+ "DOGE/USD": 0.32,
2686
+ "DOT/USD": 7.2,
2687
+ "AVAX/USD": 38,
2688
+ "MATIC/USD": 0.48,
2689
+ "LINK/USD": 22,
2690
+ "ATOM/USD": 9.5,
2691
+ "LTC/USD": 105,
2692
+ "UNI/USD": 13.5,
2693
+ "NEAR/USD": 5.2,
2694
+ "TRX/USD": 0.25,
2695
+ // L2
2696
+ "ARB/USD": 0.85,
2697
+ "OP/USD": 1.95,
2698
+ "MNT/USD": 0.85,
2699
+ "STRK/USD": 0.45,
2700
+ // DeFi
2701
+ "AAVE/USD": 285,
2702
+ "CRV/USD": 0.52,
2703
+ "MKR/USD": 1850,
2704
+ "SNX/USD": 2.8,
2705
+ "LDO/USD": 1.85,
2706
+ "GMX/USD": 28,
2707
+ "PENDLE/USD": 4.2,
2708
+ // Stablecoins
2709
+ "USDC/USD": 1,
2710
+ "USDT/USD": 1,
2711
+ "DAI/USD": 1,
2712
+ // LST
2713
+ "mETH/USD": 3500,
2714
+ "stETH/USD": 3450,
2715
+ "wstETH/USD": 4100,
2716
+ // Meme
2717
+ "SHIB/USD": 22e-6,
2718
+ "PEPE/USD": 18e-6,
2719
+ "BONK/USD": 28e-6,
2720
+ "WIF/USD": 1.85,
2721
+ // Commodities
2722
+ "XAU/USD": 2650,
2723
+ "XAG/USD": 31,
2724
+ // Forex
2725
+ "EUR/USD": 1.08,
2726
+ "GBP/USD": 1.27,
2727
+ "JPY/USD": 67e-4,
2728
+ // Equities
2729
+ "AAPL/USD": 248,
2730
+ "NVDA/USD": 138,
2731
+ "TSLA/USD": 385,
2732
+ "MSFT/USD": 425
2733
+ };
2734
+ const price = mockPrices[pair] || 100;
2735
+ const decimals = price < 0.01 ? 8 : price < 1 ? 4 : 2;
2736
+ return {
2737
+ priceFeedId: feedId,
2738
+ pair,
2739
+ price: Math.floor(price * 1e8).toString(),
2740
+ confidence: "50000",
2741
+ exponent: -8,
2742
+ publishTime: Math.floor(Date.now() / 1e3),
2743
+ formattedPrice: price.toFixed(decimals)
2744
+ };
2745
+ }
2746
+ function createMockTokenPriceResponse(tokenAddress, tokenSymbol, pair, feedId) {
2747
+ const mockPrices = {
2748
+ "USDC": 1,
2749
+ "USDT": 1,
2750
+ "DAI": 1,
2751
+ "ETH": 3450,
2752
+ "WETH": 3450,
2753
+ "BTC": 97500,
2754
+ "WBTC": 97500,
2755
+ "MNT": 0.85,
2756
+ "WMNT": 0.85,
2757
+ "mETH": 3500,
2758
+ "PENDLE": 4.2
2759
+ };
2760
+ const price = mockPrices[tokenSymbol] || 100;
2761
+ const publishTime = Math.floor(Date.now() / 1e3);
2762
+ return {
2763
+ tokenAddress,
2764
+ tokenSymbol,
2765
+ pair,
2766
+ priceFeedId: feedId,
2767
+ priceUsd: price.toFixed(price < 1 ? 4 : 2),
2768
+ confidence: "50000",
2769
+ exponent: -8,
2770
+ publishTime,
2771
+ lastUpdated: new Date(publishTime * 1e3).toISOString()
2772
+ };
2773
+ }
2774
+
2775
+ // src/tools/pyth/getMultiplePrices.ts
2776
+ async function pythGetMultiplePrices(agent, inputs) {
2777
+ const pythAddress = PYTH_CONTRACT[agent.chain];
2778
+ const results = [];
2779
+ for (const input of inputs) {
2780
+ const resolved = resolvePriceFeedInput(input);
2781
+ let priceFeedId;
2782
+ let pair;
2783
+ if (resolved) {
2784
+ priceFeedId = resolved.feedId;
2785
+ pair = resolved.pair;
2786
+ } else {
2787
+ priceFeedId = input;
2788
+ pair = input;
2789
+ }
2790
+ const feedId = priceFeedId.startsWith("0x") ? priceFeedId : `0x${priceFeedId}`;
2791
+ if (agent.demo) {
2792
+ results.push(createMockPythResponse2(pair, feedId));
2793
+ continue;
2794
+ }
2795
+ try {
2796
+ const priceData = await agent.client.readContract({
2797
+ address: pythAddress,
2798
+ abi: PYTH_ABI,
2799
+ functionName: "getPriceUnsafe",
2800
+ args: [feedId]
2801
+ });
2802
+ const formattedPrice = formatPythPrice2(
2803
+ Number(priceData.price),
2804
+ priceData.expo
2805
+ );
2806
+ results.push({
2807
+ priceFeedId: feedId,
2808
+ pair,
2809
+ price: priceData.price.toString(),
2810
+ confidence: priceData.conf.toString(),
2811
+ exponent: priceData.expo,
2812
+ publishTime: Number(priceData.publishTime),
2813
+ formattedPrice
2814
+ });
2815
+ } catch (error) {
2816
+ results.push({
2817
+ priceFeedId: feedId,
2818
+ pair,
2819
+ price: "0",
2820
+ confidence: "0",
2821
+ exponent: 0,
2822
+ publishTime: 0,
2823
+ formattedPrice: "Error fetching price"
2824
+ });
2825
+ }
2826
+ }
2827
+ return results;
2828
+ }
2829
+ function pythGetSupportedPriceFeeds() {
2830
+ return { ...PYTH_PRICE_FEED_IDS };
2831
+ }
2832
+ function pythGetSupportedTokenAddresses() {
2833
+ const result = {};
2834
+ for (const [address, info] of Object.entries(TOKEN_ADDRESS_TO_PRICE_FEED)) {
2835
+ result[address] = info.pair;
2836
+ }
2837
+ return result;
2838
+ }
2839
+ async function pythPriceFeedExists(agent, input) {
2840
+ const pythAddress = PYTH_CONTRACT[agent.chain];
2841
+ const resolved = resolvePriceFeedInput(input);
2842
+ let priceFeedId;
2843
+ if (resolved) {
2844
+ priceFeedId = resolved.feedId;
2845
+ } else {
2846
+ priceFeedId = input;
2847
+ }
2848
+ const feedId = priceFeedId.startsWith("0x") ? priceFeedId : `0x${priceFeedId}`;
2849
+ if (agent.demo) {
2850
+ return resolved !== null;
2851
+ }
2852
+ try {
2853
+ const exists = await agent.client.readContract({
2854
+ address: pythAddress,
2855
+ abi: PYTH_ABI,
2856
+ functionName: "priceFeedExists",
2857
+ args: [feedId]
2858
+ });
2859
+ return exists;
2860
+ } catch {
2861
+ return false;
2862
+ }
2863
+ }
2864
+ function formatPythPrice2(price, exponent) {
2865
+ const adjustedPrice = price * Math.pow(10, exponent);
2866
+ if (adjustedPrice >= 1) {
2867
+ return adjustedPrice.toFixed(2);
2868
+ }
2869
+ return adjustedPrice.toFixed(8);
2870
+ }
2871
+ function createMockPythResponse2(pair, feedId) {
2872
+ const mockPrices = {
2873
+ // Major Crypto
2874
+ "BTC/USD": 97500,
2875
+ "ETH/USD": 3450,
2876
+ "SOL/USD": 185,
2877
+ "BNB/USD": 680,
2878
+ "XRP/USD": 2.35,
2879
+ "ADA/USD": 0.95,
2880
+ "DOGE/USD": 0.32,
2881
+ "DOT/USD": 7.2,
2882
+ "AVAX/USD": 38,
2883
+ "MATIC/USD": 0.48,
2884
+ "LINK/USD": 22,
2885
+ "ATOM/USD": 9.5,
2886
+ "LTC/USD": 105,
2887
+ "UNI/USD": 13.5,
2888
+ "NEAR/USD": 5.2,
2889
+ "TRX/USD": 0.25,
2890
+ // L2
2891
+ "ARB/USD": 0.85,
2892
+ "OP/USD": 1.95,
2893
+ "MNT/USD": 0.85,
2894
+ "STRK/USD": 0.45,
2895
+ // DeFi
2896
+ "AAVE/USD": 285,
2897
+ "CRV/USD": 0.52,
2898
+ "MKR/USD": 1850,
2899
+ "SNX/USD": 2.8,
2900
+ "LDO/USD": 1.85,
2901
+ "GMX/USD": 28,
2902
+ "PENDLE/USD": 4.2,
2903
+ // Stablecoins
2904
+ "USDC/USD": 1,
2905
+ "USDT/USD": 1,
2906
+ "DAI/USD": 1,
2907
+ // LST
2908
+ "mETH/USD": 3500,
2909
+ "stETH/USD": 3450,
2910
+ "wstETH/USD": 4100,
2911
+ // Meme
2912
+ "SHIB/USD": 22e-6,
2913
+ "PEPE/USD": 18e-6,
2914
+ "BONK/USD": 28e-6,
2915
+ "WIF/USD": 1.85,
2916
+ // Commodities
2917
+ "XAU/USD": 2650,
2918
+ "XAG/USD": 31,
2919
+ // Forex
2920
+ "EUR/USD": 1.08,
2921
+ "GBP/USD": 1.27,
2922
+ "JPY/USD": 67e-4,
2923
+ // Equities
2924
+ "AAPL/USD": 248,
2925
+ "NVDA/USD": 138,
2926
+ "TSLA/USD": 385,
2927
+ "MSFT/USD": 425
2928
+ };
2929
+ const price = mockPrices[pair] || 100;
2930
+ const decimals = price < 0.01 ? 8 : price < 1 ? 4 : 2;
2931
+ return {
2932
+ priceFeedId: feedId,
2933
+ pair,
2934
+ price: Math.floor(price * 1e8).toString(),
2935
+ confidence: "50000",
2936
+ exponent: -8,
2937
+ publishTime: Math.floor(Date.now() / 1e3),
2938
+ formattedPrice: price.toFixed(decimals)
2939
+ };
2940
+ }
2941
+
2942
+ // src/constants/token-launchpad/index.ts
2943
+ var token_launchpad_exports = {};
2944
+ __export(token_launchpad_exports, {
2945
+ ERC20_ABI: () => ERC20_ABI
2946
+ });
2947
+ var ERC20_ABI = [
2948
+ {
2949
+ inputs: [],
2950
+ name: "name",
2951
+ outputs: [{ name: "", type: "string" }],
2952
+ stateMutability: "view",
2953
+ type: "function"
2954
+ },
2955
+ {
2956
+ inputs: [],
2957
+ name: "symbol",
2958
+ outputs: [{ name: "", type: "string" }],
2959
+ stateMutability: "view",
2960
+ type: "function"
2961
+ },
2962
+ {
2963
+ inputs: [],
2964
+ name: "decimals",
2965
+ outputs: [{ name: "", type: "uint8" }],
2966
+ stateMutability: "view",
2967
+ type: "function"
2968
+ },
2969
+ {
2970
+ inputs: [],
2971
+ name: "totalSupply",
2972
+ outputs: [{ name: "", type: "uint256" }],
2973
+ stateMutability: "view",
2974
+ type: "function"
2975
+ },
2976
+ {
2977
+ inputs: [{ name: "account", type: "address" }],
2978
+ name: "balanceOf",
2979
+ outputs: [{ name: "", type: "uint256" }],
2980
+ stateMutability: "view",
2981
+ type: "function"
2982
+ },
2983
+ {
2984
+ inputs: [
2985
+ { name: "to", type: "address" },
2986
+ { name: "amount", type: "uint256" }
2987
+ ],
2988
+ name: "transfer",
2989
+ outputs: [{ name: "", type: "bool" }],
2990
+ stateMutability: "nonpayable",
2991
+ type: "function"
2992
+ }
2993
+ ];
2994
+
2995
+ // src/tools/token-launchpad/deployToken.ts
2996
+ var ERC20_BYTECODE = "0x608060405234801561001057600080fd5b5060405161089a38038061089a833981016040819052610032916101db565b8251839083906100499060039060208501906100b4565b50805161005d9060049060208401906100b4565b50505061007a33826100756012600a6102eb565b610081565b5050610359565b6001600160a01b0382166100ab5760405163ec442f0560e01b815260006004820152602401604051809103906000fd5b6100b760008383610140565b5050565b8280546100c09061030c565b90600052602060002090601f0160209004810192826100e2576000855561012e565b82601f106100f357805160ff191683800117855561012e565b8280016001018555821561012e579182015b8281111561012e578251825591602001919060010190610105565b5061013a92915061013e565b5090565b5b8082111561013a576000815560010161013f565b6001600160a01b038316610174578060026000828254610160919061034b565b9091555061019f9050565b6001600160a01b0383166000908152602081905260408120805483929061019c908490610346565b90915550505b6001600160a01b0382166101c1576002805482900390556101e6565b6001600160a01b03821660009081526020819052604081208054839290610169908490610346565b816001600160a01b0316836001600160a01b03166000805160206108228339815191528360405161021991815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025757818101518382015260200161023f565b83811115610268576000848401525b50505050565b600082601f83011261027e578081fd5b81516001600160401b038082111561029857610298610226565b604051601f8301601f19908116603f011681019082821181831017156102c0576102c0610226565b816040528381528660208588010111156102d8578485fd5b6102e9846020830160208901610240565b9695505050505050565b60008060006060848603121561030757600080fd5b83516001600160401b038082111561031d578586fd5b6103298783880161026e565b9450602086015191508082111561033e578384fd5b5061034b8682870161026e565b925050604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156103ad57816000190482111561039357610393610372565b808516156103a057918102915b93841c939080029061037c565b509250929050565b6000826103c457506001610460565b816103d157506000610460565b81600181146103e757600281146103f15761040d565b6001915050610460565b60ff84111561040257610402610372565b50506001821b610460565b5060208310610133831016604e8410600b8410161715610430575081810a610460565b61043a8383610377565b806000190482111561044e5761044e610372565b029392505050565b600061046283836103b5565b9392505050565b61046b610482565b600082821015610479576104796103a2565b50039056fe";
2997
+ var RWA_BYTECODE = "0x608060405234801561001057600080fd5b5060405161089a38038061089a833981016040819052610032916101db565b8251839083906100499060039060208501906100b4565b50805161005d9060049060208401906100b4565b50505061007a33826100756012600a6102eb565b610081565b5050610359565b6001600160a01b0382166100ab5760405163ec442f0560e01b815260006004820152602401604051809103906000fd5b6100b760008383610140565b5050565b8280546100c09061030c565b90600052602060002090601f0160209004810192826100e2576000855561012e565b82601f106100f357805160ff191683800117855561012e565b8280016001018555821561012e579182015b8281111561012e578251825591602001919060010190610105565b5061013a92915061013e565b5090565b5b8082111561013a576000815560010161013f565b6001600160a01b038316610174578060026000828254610160919061034b565b9091555061019f9050565b6001600160a01b0383166000908152602081905260408120805483929061019c908490610346565b90915550505b6001600160a01b0382166101c1576002805482900390556101e6565b6001600160a01b03821660009081526020819052604081208054839290610169908490610346565b816001600160a01b0316836001600160a01b03166000805160206108228339815191528360405161021991815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025757818101518382015260200161023f565b83811115610268576000848401525b50505050565b600082601f83011261027e578081fd5b81516001600160401b038082111561029857610298610226565b604051601f8301601f19908116603f011681019082821181831017156102c0576102c0610226565b816040528381528660208588010111156102d8578485fd5b6102e9846020830160208901610240565b9695505050505050565b60008060006060848603121561030757600080fd5b83516001600160401b038082111561031d578586fd5b6103298783880161026e565b9450602086015191508082111561033e578384fd5b5061034b8682870161026e565b925050604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156103ad57816000190482111561039357610393610372565b808516156103a057918102915b93841c939080029061037c565b509250929050565b6000826103c457506001610460565b816103d157506000610460565b81600181146103e757600281146103f15761040d565b6001915050610460565b60ff84111561040257610402610372565b50506001821b610460565b5060208310610133831016604e8410600b8410161715610430575081810a610460565b61043a8383610377565b806000190482111561044e5761044e610372565b029392505050565b600061046283836103b5565b9392505050565b61046b610482565b600082821015610479576104796103a2565b50039056fe";
2998
+ async function deployToken(agent, name, symbol, supply, tokenType = "standard", assetType, assetId) {
2999
+ const decimals = 18;
3000
+ const supplyInWei = parseUnits(supply, decimals).toString();
3001
+ if (agent.demo) {
3002
+ return {
3003
+ tokenAddress: `0xDEMO${tokenType === "rwa" ? "RWA" : "TKN"}00000000000000000001`,
3004
+ txHash: DEMO_TX_HASH,
3005
+ name,
3006
+ symbol,
3007
+ decimals,
3008
+ totalSupply: supplyInWei,
3009
+ mintedTo: agent.account.address,
3010
+ tokenType,
3011
+ assetType,
3012
+ assetId
3013
+ };
3014
+ }
3015
+ if (!name?.trim()) throw new Error("Token name required");
3016
+ if (!symbol?.trim()) throw new Error("Token symbol required");
3017
+ if (!supply || Number(supply) <= 0) throw new Error("Supply must be > 0");
3018
+ const args = encodeAbiParameters(
3019
+ parseAbiParameters("string, string, uint256"),
3020
+ [name, symbol, BigInt(supplyInWei)]
3021
+ );
3022
+ const bytecode = tokenType === "rwa" ? RWA_BYTECODE : ERC20_BYTECODE;
3023
+ const deployData = bytecode + args.slice(2);
3024
+ const txHash = await agent.client.sendTransaction({ data: deployData });
3025
+ const receipt = await agent.client.waitForTransactionReceipt({ hash: txHash });
3026
+ if (!receipt.contractAddress) {
3027
+ throw new Error("Deployment failed - no contract address");
3028
+ }
3029
+ return {
3030
+ tokenAddress: receipt.contractAddress,
3031
+ txHash,
3032
+ name,
3033
+ symbol,
3034
+ decimals,
3035
+ totalSupply: supplyInWei,
3036
+ mintedTo: agent.account.address,
3037
+ tokenType,
3038
+ assetType,
3039
+ assetId
3040
+ };
3041
+ }
3042
+ async function deployStandardToken(agent, name, symbol, supply) {
3043
+ return deployToken(agent, name, symbol, supply, "standard");
3044
+ }
3045
+ async function deployRWAToken(agent, name, symbol, supply, assetType, assetId) {
3046
+ return deployToken(agent, name, symbol, supply, "rwa", assetType, assetId);
3047
+ }
3048
+ async function getTokenInfo(agent, tokenAddress, holder) {
3049
+ if (agent.demo) {
3050
+ return {
3051
+ address: tokenAddress,
3052
+ name: "Demo Token",
3053
+ symbol: "DEMO",
3054
+ decimals: 18,
3055
+ totalSupply: "1000000000000000000000000",
3056
+ balance: holder ? "1000000000000000000000" : void 0
3057
+ };
3058
+ }
3059
+ const [name, symbol, decimals, totalSupply] = await Promise.all([
3060
+ agent.client.readContract({ address: tokenAddress, abi: erc20Abi$1, functionName: "name" }),
3061
+ agent.client.readContract({ address: tokenAddress, abi: erc20Abi$1, functionName: "symbol" }),
3062
+ agent.client.readContract({ address: tokenAddress, abi: erc20Abi$1, functionName: "decimals" }),
3063
+ agent.client.readContract({ address: tokenAddress, abi: erc20Abi$1, functionName: "totalSupply" })
3064
+ ]);
3065
+ const result = {
3066
+ address: tokenAddress,
3067
+ name,
3068
+ symbol,
3069
+ decimals,
3070
+ totalSupply: totalSupply.toString()
3071
+ };
3072
+ if (holder) {
3073
+ const balance = await agent.client.readContract({
3074
+ address: tokenAddress,
3075
+ abi: erc20Abi$1,
3076
+ functionName: "balanceOf",
3077
+ args: [holder]
3078
+ });
3079
+ result.balance = balance.toString();
3080
+ }
3081
+ return result;
3082
+ }
3083
+ async function getTokenBalance(agent, tokenAddress, holder) {
3084
+ if (agent.demo) return "1000000000000000000000";
3085
+ const balance = await agent.client.readContract({
3086
+ address: tokenAddress,
3087
+ abi: erc20Abi$1,
3088
+ functionName: "balanceOf",
3089
+ args: [holder || agent.account.address]
3090
+ });
3091
+ return balance.toString();
3092
+ }
3093
+ async function transferToken(agent, tokenAddress, to, amount) {
3094
+ if (agent.demo) return DEMO_TX_HASH;
3095
+ const data = encodeFunctionData({
3096
+ abi: erc20Abi$1,
3097
+ functionName: "transfer",
3098
+ args: [to, BigInt(amount)]
3099
+ });
3100
+ const txHash = await agent.client.sendTransaction({ to: tokenAddress, data });
3101
+ await agent.client.waitForTransactionReceipt({ hash: txHash });
3102
+ return txHash;
3103
+ }
3104
+
3105
+ // src/constants/nft-launchpad/index.ts
3106
+ var nft_launchpad_exports = {};
3107
+ __export(nft_launchpad_exports, {
3108
+ ERC721_ABI: () => ERC721_ABI
3109
+ });
3110
+ var ERC721_ABI = [
3111
+ // Constructor-related
3112
+ {
3113
+ inputs: [
3114
+ { name: "name", type: "string" },
3115
+ { name: "symbol", type: "string" },
3116
+ { name: "baseURI", type: "string" },
3117
+ { name: "maxSupply", type: "uint256" }
3118
+ ],
3119
+ stateMutability: "nonpayable",
3120
+ type: "constructor"
3121
+ },
3122
+ // View functions
3123
+ {
3124
+ inputs: [],
3125
+ name: "name",
3126
+ outputs: [{ name: "", type: "string" }],
3127
+ stateMutability: "view",
3128
+ type: "function"
3129
+ },
3130
+ {
3131
+ inputs: [],
3132
+ name: "symbol",
3133
+ outputs: [{ name: "", type: "string" }],
3134
+ stateMutability: "view",
3135
+ type: "function"
3136
+ },
3137
+ {
3138
+ inputs: [],
3139
+ name: "totalSupply",
3140
+ outputs: [{ name: "", type: "uint256" }],
3141
+ stateMutability: "view",
3142
+ type: "function"
3143
+ },
3144
+ {
3145
+ inputs: [{ name: "tokenId", type: "uint256" }],
3146
+ name: "tokenURI",
3147
+ outputs: [{ name: "", type: "string" }],
3148
+ stateMutability: "view",
3149
+ type: "function"
3150
+ },
3151
+ {
3152
+ inputs: [{ name: "tokenId", type: "uint256" }],
3153
+ name: "ownerOf",
3154
+ outputs: [{ name: "", type: "address" }],
3155
+ stateMutability: "view",
3156
+ type: "function"
3157
+ },
3158
+ {
3159
+ inputs: [{ name: "owner", type: "address" }],
3160
+ name: "balanceOf",
3161
+ outputs: [{ name: "", type: "uint256" }],
3162
+ stateMutability: "view",
3163
+ type: "function"
3164
+ },
3165
+ {
3166
+ inputs: [{ name: "tokenId", type: "uint256" }],
3167
+ name: "getApproved",
3168
+ outputs: [{ name: "", type: "address" }],
3169
+ stateMutability: "view",
3170
+ type: "function"
3171
+ },
3172
+ {
3173
+ inputs: [
3174
+ { name: "owner", type: "address" },
3175
+ { name: "operator", type: "address" }
3176
+ ],
3177
+ name: "isApprovedForAll",
3178
+ outputs: [{ name: "", type: "bool" }],
3179
+ stateMutability: "view",
3180
+ type: "function"
3181
+ },
3182
+ // State changing functions
3183
+ {
3184
+ inputs: [{ name: "to", type: "address" }],
3185
+ name: "mint",
3186
+ outputs: [{ name: "", type: "uint256" }],
3187
+ stateMutability: "nonpayable",
3188
+ type: "function"
3189
+ },
3190
+ {
3191
+ inputs: [
3192
+ { name: "to", type: "address" },
3193
+ { name: "quantity", type: "uint256" }
3194
+ ],
3195
+ name: "batchMint",
3196
+ outputs: [{ name: "startTokenId", type: "uint256" }],
3197
+ stateMutability: "nonpayable",
3198
+ type: "function"
3199
+ },
3200
+ {
3201
+ inputs: [
3202
+ { name: "to", type: "address" },
3203
+ { name: "tokenId", type: "uint256" }
3204
+ ],
3205
+ name: "approve",
3206
+ outputs: [],
3207
+ stateMutability: "nonpayable",
3208
+ type: "function"
3209
+ },
3210
+ {
3211
+ inputs: [
3212
+ { name: "operator", type: "address" },
3213
+ { name: "approved", type: "bool" }
3214
+ ],
3215
+ name: "setApprovalForAll",
3216
+ outputs: [],
3217
+ stateMutability: "nonpayable",
3218
+ type: "function"
3219
+ },
3220
+ {
3221
+ inputs: [
3222
+ { name: "from", type: "address" },
3223
+ { name: "to", type: "address" },
3224
+ { name: "tokenId", type: "uint256" }
3225
+ ],
3226
+ name: "transferFrom",
3227
+ outputs: [],
3228
+ stateMutability: "nonpayable",
3229
+ type: "function"
3230
+ },
3231
+ {
3232
+ inputs: [
3233
+ { name: "from", type: "address" },
3234
+ { name: "to", type: "address" },
3235
+ { name: "tokenId", type: "uint256" }
3236
+ ],
3237
+ name: "safeTransferFrom",
3238
+ outputs: [],
3239
+ stateMutability: "nonpayable",
3240
+ type: "function"
3241
+ },
3242
+ {
3243
+ inputs: [
3244
+ { name: "from", type: "address" },
3245
+ { name: "to", type: "address" },
3246
+ { name: "tokenId", type: "uint256" },
3247
+ { name: "data", type: "bytes" }
3248
+ ],
3249
+ name: "safeTransferFrom",
3250
+ outputs: [],
3251
+ stateMutability: "nonpayable",
3252
+ type: "function"
3253
+ },
3254
+ // Events
3255
+ {
3256
+ anonymous: false,
3257
+ inputs: [
3258
+ { indexed: true, name: "from", type: "address" },
3259
+ { indexed: true, name: "to", type: "address" },
3260
+ { indexed: true, name: "tokenId", type: "uint256" }
3261
+ ],
3262
+ name: "Transfer",
3263
+ type: "event"
3264
+ },
3265
+ {
3266
+ anonymous: false,
3267
+ inputs: [
3268
+ { indexed: true, name: "owner", type: "address" },
3269
+ { indexed: true, name: "approved", type: "address" },
3270
+ { indexed: true, name: "tokenId", type: "uint256" }
3271
+ ],
3272
+ name: "Approval",
3273
+ type: "event"
3274
+ },
3275
+ {
3276
+ anonymous: false,
3277
+ inputs: [
3278
+ { indexed: true, name: "owner", type: "address" },
3279
+ { indexed: true, name: "operator", type: "address" },
3280
+ { indexed: false, name: "approved", type: "bool" }
3281
+ ],
3282
+ name: "ApprovalForAll",
3283
+ type: "event"
3284
+ }
3285
+ ];
3286
+
3287
+ // src/tools/nft-launchpad/deployCollection.ts
3288
+ var ERC721_CREATION_CODE = `0x608060405234801561001057600080fd5b506040516112a03803806112a0833981016040819052610032916101e5565b83838383600061004283826102f4565b50600161004f82826102f4565b5050600680546001600160a01b0319163317905550600782905560088190555050505050506103b3565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009f57600080fd5b81516001600160401b03808211156100b9576100b9610079565b604051601f8301601f19908116603f011681019082821181831017156100e1576100e1610079565b816040528381526020925086838588010111156100fd57600080fd5b600091505b8382101561011f5785820183015181830184015290820190610102565b6000928101909201929092529392505050565b60008060008060808587031215610148578384fd5b84516001600160401b038082111561015e578586fd5b61016a8883890161008f565b9550602087015191508082111561017f578485fd5b5061018c8782880161008f565b9350506040850151915060608501519050929550929550929292909250565b600181811c908216806101bf57607f821691505b6020821081036101df57634e487b7160e01b600052602260045260246000fd5b50919050565b600080600080608085870312156101fa578384fd5b84516001600160401b0380821115610210578586fd5b61021c8883890161008f565b95506020870151915080821115610231578485fd5b5061023e8782880161008f565b935050604085015191506060850151905092959194509250565b601f82111561029f57600081815260208120601f850160051c8101602086101561027f5750805b601f850160051c820191505b8181101561029e5782815560010161028b565b505050505050565b81516001600160401b038111156102bf576102bf610079565b6102d3816102cd84546101ab565b84610258565b602080601f83116001811461030857600084156102f05750858301515b600019600386901b1c1916600185901b17855561029e565b600085815260208120601f198616915b8281101561033757888601518255948401946001909101908401610318565b50858210156103555787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f83011261037657600080fd5b81356001600160401b0381111561038f5761038f610079565b6040516020601f19601f85011681018181106001600160401b03821117156103b9576103b9610079565b6040528281528484830111156103ce57600080fd5b8282602083013760009201829052509392505050565b600080600080608085870312156103f9578384fd5b84356001600160401b038082111561040f578586fd5b61041b88838901610365565b95506020870135915080821115610430578485fd5b5061043d87828801610365565b935050604085013591506060850135905092959194509250565b610ede806103c26000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80636352211e11610097578063a22cb46511610066578063a22cb465146101f3578063b88d4fde14610206578063c87b56dd14610219578063e985e9c51461022c57600080fd5b80636352211e146101a75780636a627842146101ba57806370a08231146101cd57806395d89b41146101eb57600080fd5b8063095ea7b3116100d3578063095ea7b31461016257806318160ddd1461017757806323b872dd1461018157806342842e0e1461019457600080fd5b806301ffc9a7146100fa57806306fdde0314610122578063081812fc14610137575b600080fd5b61010d610108366004610b4a565b610268565b60405190151581526020015b60405180910390f35b61012a6102ba565b6040516101199190610bb7565b61014a610145366004610bca565b61034c565b6040516001600160a01b039091168152602001610119565b610175610170366004610bff565b610373565b005b6005545b604051908152602001610119565b61017561018f366004610c29565b61048d565b6101756101a2366004610c29565b6104be565b61014a6101b5366004610bca565b6104d9565b61017b6101c8366004610c65565b610539565b61017b6101db366004610c65565b6001600160a01b031660009081526003602052604090205490565b61012a6105d6565b610175610201366004610c80565b6105e5565b610175610214366004610cd2565b6105f4565b61012a610227366004610bca565b61062c565b61010d61023a366004610dae565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061029957506001600160e01b03198216635b5e139f60e01b145b806102b457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546102c990610de1565b80601f01602080910402602001604051908101604052809291908181526020018280546102f590610de1565b80156103425780601f1061031757610100808354040283529160200191610342565b820191906000526020600020905b81548152906001019060200180831161032557829003601f168201915b5050505050905090565b600061035782610697565b506000908152600260205260409020546001600160a01b031690565b600061037e826104d9565b9050806001600160a01b0316836001600160a01b0316036103f05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061040c575061040c813361023a565b61047e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103e7565b61048883836106f6565b505050565b6104973382610764565b6104b35760405162461bcd60e51b81526004016103e790610e1b565b6104888383836107c3565b61048883838360405180602001604052806000815250610930565b6000818152600260205260408120546001600160a01b0316806102b45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103e7565b6006546000906001600160a01b031633146105965760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206f776e65722063616e206d696e7420746f6b656e730000000000006044820152606401610e7565b600580549060006105a683610e68565b91905055905060075460001480156105bf575060075481115b156105c957600080fd5b6105d38382610944565b50919050565b6060600180546102c990610de1565b6105f033838361095e565b5050565b6105fe3383610764565b61061a5760405162461bcd60e51b81526004016103e790610e1b565b61062684848484610a2c565b50505050565b606061063782610697565b600061064e60408051602081019091526000815290565b9050600081511161066e5760405180602001604052806000815250610690565b8061067884610a5f565b604051602001610689929190610e81565b6040519091905056fe60005b838110156106ae578181015183820152602001610696565b50506000910152565b60006102b4826001600160a01b03163b151590565b806001600160a01b0316826001600160a01b0316036107225760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f76616c20746f2073656c660000000000000000604482015260640160405180910390fd5b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0382166107b25760405162461bcd60e51b815260206004820152601160248201527045524337323: 696e76616c6964206164647260781b604482015260640160405180910390fd5b6000818152600260205260408120546001600160a01b0316906107d490610aff565b6001600160a01b0384166000908152600360205260408120805460019290610807908490610eb0565b909155505060008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000818152600260205260408120546001600160a01b031661092c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840160405180910390fd5b6000610937836104d9565b9050806001600160a01b0316846001600160a01b031614806109725750836001600160a01b03166109678461034c565b6001600160a01b0316145b8061098257506109828185610b23565b949350505050565b61098d8484846107c3565b61099984848484610b4c565b6106265760405162461bcd60e51b81526004016103e790610ec3565b6105f08282604051806020016040528060008152506109d3836109b5565b6109bf8383610a2c565b6109cc6000848484610b4c565b5050505050565b816001600160a01b0316836001600160a01b0316036109fe5760405162461bcd60e51b81526004016103e790610f0c565b6001600160a01b0382811660008181526004602090815260408083209487168084529482529182902080548615157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909116179055905190825290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b610a376107c3565b610a4384848484610c25565b5050505050565b60606000610a5783610c58565b600101905060008167ffffffffffffffff811115610a7757610a77610cbc565b6040519080825280601f01601f191660200182016040528015610aa1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610aab57509392505050565b600060001982015b6000838152600260205260409020546001600160a01b0316610b085750919050565b8015610b145792915050565b82610b1e81610f4f565b935050610b07565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60006001600160a01b0384163b15610c1a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610b90903390899088908890600401610f66565b6020604051808303816000875af1925050508015610bcb575060408051601f3d908101601f19168201909252610bc891810190610f99565b60015b610c00573d808015610bf9576040519150601f19603f3d011682016040523d82523d6000602084013e610bfe565b606091505b505080515f03610c185760405162461bcd60e51b81526004016103e790610ec3565b505b6001600160e01b031916630a85bd0160e11b149050610982565b506001949350505050565b610c318484846107c3565b610c3d84848484610b4c565b6106265760405162461bcd60e51b81526004016103e790610ec3565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610c975772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610cc3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610ce157662386f26fc10000830492506010015b6305f5e1008310610cf9576305f5e100830492506008015b6127108310610d0d57612710830492506004015b60648310610d1f576064830492506002015b600a83106102b45760010192915050565b6001600160e01b031981168114610d4657600080fd5b50565b600060208284031215610d5a578081fd5b8135610d6581610d30565b9392505050565b60005b83811015610d87578181015183820152602001610d6f565b50506000910152565b60008151808452610da8816020860160208601610d6c565b601f01601f19169290920160200192915050565b602081526000610d656020830184610d90565b600060208284031215610de0578081fd5b5035919050565b80356001600160a01b0381168114610dfe57600080fd5b919050565b60008060408385031215610e15578081fd5b610e1e83610de7565b946020939093013593505050565b600080600060608486031215610e40578081fd5b610e4984610de7565b9250610e5760208501610de7565b9150604084013590509250925092565b600060208284031215610e78578081fd5b610d6582610de7565b60008060408385031215610e93578182fd5b610e9c83610de7565b915060208301358015158114610eb0578182fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610ee1578081fd5b813567ffffffffffffffff80821115610efc57610efc610ebb565b604051601f8301601f19908116603f01168101908282118183101715610f2457610f24610ebb565b81604052838152866020858801011115610f3c578485fd5b83602087016020830137600060208583010152809450505050509291505056fea264697066735822122000000000000000000000000000000000000000000000000000000000000000064736f6c63430008150033`;
3289
+ async function deployNFTCollection(agent, config) {
3290
+ const { name, symbol, baseURI, maxSupply = 0 } = config;
3291
+ if (agent.demo) {
3292
+ return {
3293
+ collectionAddress: "0xDEMO000000000000000000000000000000000002",
3294
+ txHash: DEMO_TX_HASH,
3295
+ name,
3296
+ symbol,
3297
+ baseURI,
3298
+ maxSupply,
3299
+ deployer: agent.account.address
3300
+ };
3301
+ }
3302
+ if (!name || name.length === 0) {
3303
+ throw new Error("Collection name is required");
3304
+ }
3305
+ if (!symbol || symbol.length === 0) {
3306
+ throw new Error("Collection symbol is required");
3307
+ }
3308
+ if (!baseURI) {
3309
+ throw new Error("Base URI is required for token metadata");
3310
+ }
3311
+ const constructorArgs = encodeAbiParameters(
3312
+ parseAbiParameters(
3313
+ "string name, string symbol, string baseURI, uint256 maxSupply"
3314
+ ),
3315
+ [name, symbol, baseURI, BigInt(maxSupply)]
3316
+ );
3317
+ const deploymentBytecode = ERC721_CREATION_CODE + constructorArgs.slice(2);
3318
+ const txHash = await agent.client.sendTransaction({
3319
+ data: deploymentBytecode
3320
+ });
3321
+ const receipt = await agent.client.waitForTransactionReceipt({ hash: txHash });
3322
+ if (!receipt.contractAddress) {
3323
+ throw new Error(
3324
+ "NFT Collection deployment failed - no contract address returned"
3325
+ );
3326
+ }
3327
+ return {
3328
+ collectionAddress: receipt.contractAddress,
3329
+ txHash,
3330
+ name,
3331
+ symbol,
3332
+ baseURI,
3333
+ maxSupply,
3334
+ deployer: agent.account.address
3335
+ };
3336
+ }
3337
+ async function deployNFTCollectionWithPreset(agent, preset, name, symbol, baseURI) {
3338
+ const presetConfigs = {
3339
+ pfp: 1e4,
3340
+ // Profile picture collections
3341
+ art: 1e3,
3342
+ // Art collections
3343
+ membership: 100,
3344
+ // Membership/pass collections
3345
+ unlimited: 0
3346
+ // Unlimited supply
3347
+ };
3348
+ return deployNFTCollection(agent, {
3349
+ name,
3350
+ symbol,
3351
+ baseURI,
3352
+ maxSupply: presetConfigs[preset]
3353
+ });
3354
+ }
3355
+ async function mintNFT(agent, collectionAddress, to) {
3356
+ const recipient = to || agent.account.address;
3357
+ if (agent.demo) {
3358
+ return {
3359
+ txHash: DEMO_TX_HASH,
3360
+ tokenId: "1",
3361
+ collectionAddress,
3362
+ to: recipient
3363
+ };
3364
+ }
3365
+ const data = encodeFunctionData({
3366
+ abi: ERC721_ABI,
3367
+ functionName: "mint",
3368
+ args: [recipient]
3369
+ });
3370
+ const txHash = await agent.client.sendTransaction({
3371
+ to: collectionAddress,
3372
+ data
3373
+ });
3374
+ const receipt = await agent.client.waitForTransactionReceipt({ hash: txHash });
3375
+ let tokenId = "0";
3376
+ for (const log of receipt.logs) {
3377
+ if (log.topics[0] === "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") {
3378
+ if (log.topics[3]) {
3379
+ tokenId = BigInt(log.topics[3]).toString();
3380
+ }
3381
+ }
3382
+ }
3383
+ return {
3384
+ txHash,
3385
+ tokenId,
3386
+ collectionAddress,
3387
+ to: recipient
3388
+ };
3389
+ }
3390
+ async function batchMintNFT(agent, collectionAddress, to, quantity) {
3391
+ if (agent.demo) {
3392
+ return {
3393
+ txHash: DEMO_TX_HASH,
3394
+ startTokenId: "1",
3395
+ quantity
3396
+ };
3397
+ }
3398
+ const data = encodeFunctionData({
3399
+ abi: ERC721_ABI,
3400
+ functionName: "batchMint",
3401
+ args: [to, BigInt(quantity)]
3402
+ });
3403
+ const txHash = await agent.client.sendTransaction({
3404
+ to: collectionAddress,
3405
+ data
3406
+ });
3407
+ const receipt = await agent.client.waitForTransactionReceipt({ hash: txHash });
3408
+ let startTokenId = "1";
3409
+ for (const log of receipt.logs) {
3410
+ if (log.topics[0] === "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") {
3411
+ if (log.topics[3]) {
3412
+ startTokenId = BigInt(log.topics[3]).toString();
3413
+ break;
3414
+ }
3415
+ }
3416
+ }
3417
+ return {
3418
+ txHash,
3419
+ startTokenId,
3420
+ quantity
3421
+ };
3422
+ }
3423
+ async function getNFTCollectionInfo(agent, collectionAddress, holderAddress) {
3424
+ if (agent.demo) {
3425
+ return {
3426
+ address: collectionAddress,
3427
+ name: "Demo NFT Collection",
3428
+ symbol: "DEMO",
3429
+ totalSupply: "100",
3430
+ balanceOf: holderAddress ? "5" : void 0
3431
+ };
3432
+ }
3433
+ const [name, symbol, totalSupply] = await Promise.all([
3434
+ agent.client.readContract({
3435
+ address: collectionAddress,
3436
+ abi: ERC721_ABI,
3437
+ functionName: "name"
3438
+ }),
3439
+ agent.client.readContract({
3440
+ address: collectionAddress,
3441
+ abi: ERC721_ABI,
3442
+ functionName: "symbol"
3443
+ }),
3444
+ agent.client.readContract({
3445
+ address: collectionAddress,
3446
+ abi: ERC721_ABI,
3447
+ functionName: "totalSupply"
3448
+ })
3449
+ ]);
3450
+ const result = {
3451
+ address: collectionAddress,
3452
+ name,
3453
+ symbol,
3454
+ totalSupply: totalSupply.toString()
3455
+ };
3456
+ if (holderAddress) {
3457
+ const balance = await agent.client.readContract({
3458
+ address: collectionAddress,
3459
+ abi: ERC721_ABI,
3460
+ functionName: "balanceOf",
3461
+ args: [holderAddress]
3462
+ });
3463
+ result.balanceOf = balance.toString();
3464
+ }
3465
+ return result;
3466
+ }
3467
+ async function getNFTTokenInfo(agent, collectionAddress, tokenId) {
3468
+ if (agent.demo) {
3469
+ return {
3470
+ collectionAddress,
3471
+ tokenId,
3472
+ owner: agent.account.address,
3473
+ tokenURI: `https://example.com/metadata/${tokenId}.json`
3474
+ };
3475
+ }
3476
+ const [owner, tokenURI] = await Promise.all([
3477
+ agent.client.readContract({
3478
+ address: collectionAddress,
3479
+ abi: ERC721_ABI,
3480
+ functionName: "ownerOf",
3481
+ args: [BigInt(tokenId)]
3482
+ }),
3483
+ agent.client.readContract({
3484
+ address: collectionAddress,
3485
+ abi: ERC721_ABI,
3486
+ functionName: "tokenURI",
3487
+ args: [BigInt(tokenId)]
3488
+ })
3489
+ ]);
3490
+ return {
3491
+ collectionAddress,
3492
+ tokenId,
3493
+ owner,
3494
+ tokenURI
3495
+ };
3496
+ }
3497
+ async function getNFTBalance(agent, collectionAddress, holderAddress) {
3498
+ const address = holderAddress || agent.account.address;
3499
+ if (agent.demo) {
3500
+ return "5";
3501
+ }
3502
+ const balance = await agent.client.readContract({
3503
+ address: collectionAddress,
3504
+ abi: ERC721_ABI,
3505
+ functionName: "balanceOf",
3506
+ args: [address]
3507
+ });
3508
+ return balance.toString();
3509
+ }
3510
+ async function isNFTOwner(agent, collectionAddress, tokenId, ownerAddress) {
3511
+ const address = ownerAddress || agent.account.address;
3512
+ if (agent.demo) {
3513
+ return true;
3514
+ }
3515
+ try {
3516
+ const owner = await agent.client.readContract({
3517
+ address: collectionAddress,
3518
+ abi: ERC721_ABI,
3519
+ functionName: "ownerOf",
3520
+ args: [BigInt(tokenId)]
3521
+ });
3522
+ return owner.toLowerCase() === address.toLowerCase();
3523
+ } catch {
3524
+ return false;
3525
+ }
3526
+ }
3527
+ async function transferNFT(agent, collectionAddress, to, tokenId) {
3528
+ if (agent.demo) {
3529
+ return DEMO_TX_HASH;
3530
+ }
3531
+ const data = encodeFunctionData({
3532
+ abi: ERC721_ABI,
3533
+ functionName: "transferFrom",
3534
+ args: [agent.account.address, to, BigInt(tokenId)]
3535
+ });
3536
+ const txHash = await agent.client.sendTransaction({
3537
+ to: collectionAddress,
3538
+ data
3539
+ });
3540
+ await agent.client.waitForTransactionReceipt({ hash: txHash });
3541
+ return txHash;
3542
+ }
3543
+ async function safeTransferNFT(agent, collectionAddress, to, tokenId) {
3544
+ if (agent.demo) {
3545
+ return DEMO_TX_HASH;
3546
+ }
3547
+ const data = encodeFunctionData({
3548
+ abi: ERC721_ABI,
3549
+ functionName: "safeTransferFrom",
3550
+ args: [agent.account.address, to, BigInt(tokenId)]
3551
+ });
3552
+ const txHash = await agent.client.sendTransaction({
3553
+ to: collectionAddress,
3554
+ data
3555
+ });
3556
+ await agent.client.waitForTransactionReceipt({ hash: txHash });
3557
+ return txHash;
3558
+ }
3559
+ async function approveNFT(agent, collectionAddress, approved, tokenId) {
3560
+ if (agent.demo) {
3561
+ return DEMO_TX_HASH;
3562
+ }
3563
+ const data = encodeFunctionData({
3564
+ abi: ERC721_ABI,
3565
+ functionName: "approve",
3566
+ args: [approved, BigInt(tokenId)]
3567
+ });
3568
+ const txHash = await agent.client.sendTransaction({
3569
+ to: collectionAddress,
3570
+ data
3571
+ });
3572
+ await agent.client.waitForTransactionReceipt({ hash: txHash });
3573
+ return txHash;
3574
+ }
3575
+ async function setApprovalForAllNFT(agent, collectionAddress, operator, approved) {
3576
+ if (agent.demo) {
3577
+ return DEMO_TX_HASH;
3578
+ }
3579
+ const data = encodeFunctionData({
3580
+ abi: ERC721_ABI,
3581
+ functionName: "setApprovalForAll",
3582
+ args: [operator, approved]
3583
+ });
3584
+ const txHash = await agent.client.sendTransaction({
3585
+ to: collectionAddress,
3586
+ data
3587
+ });
3588
+ await agent.client.waitForTransactionReceipt({ hash: txHash });
3589
+ return txHash;
3590
+ }
3591
+
2186
3592
  // src/tools/okx/getSwapQuote.ts
2187
3593
  var getSwapQuote = async (agent, from, to, amount, slippagePercentage) => {
2188
3594
  if (agent.demo) {
@@ -2556,8 +3962,265 @@ var MNTAgentKit = class {
2556
3962
  async pikeperpsGetMarketData(tokenAddress, limit = 20) {
2557
3963
  return await pikeperpsGetMarketData(this, tokenAddress, limit);
2558
3964
  }
3965
+ // ===== Pyth Network Price Feeds =====
3966
+ /**
3967
+ * Get real-time price from Pyth Network
3968
+ * Accepts token address, pair name, or price feed ID
3969
+ * @param input - Token address (e.g., "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2" for USDC),
3970
+ * pair name (e.g., "ETH/USD"), or price feed ID (hex string)
3971
+ * @returns Price data with formatted price
3972
+ * @example
3973
+ * // Using pair name
3974
+ * await agent.pythGetPrice("ETH/USD");
3975
+ * // Using token address (USDC on Mantle)
3976
+ * await agent.pythGetPrice("0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2");
3977
+ */
3978
+ async pythGetPrice(input) {
3979
+ return await pythGetPrice(this, input);
3980
+ }
3981
+ /**
3982
+ * Get EMA (Exponential Moving Average) price from Pyth
3983
+ * Accepts token address, pair name, or price feed ID
3984
+ * @param input - Token address, pair name, or price feed ID
3985
+ * @returns EMA price data
3986
+ */
3987
+ async pythGetEmaPrice(input) {
3988
+ return await pythGetEmaPrice(this, input);
3989
+ }
3990
+ /**
3991
+ * Get price for a token by its contract address
3992
+ * Pass any supported token address and get the USD price with full details
3993
+ * @param tokenAddress - Token contract address on Mantle
3994
+ * @returns Token price details including symbol, USD price, and timestamp
3995
+ * @example
3996
+ * const price = await agent.pythGetTokenPrice("0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2");
3997
+ * // Returns: {
3998
+ * // tokenAddress: "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2",
3999
+ * // tokenSymbol: "USDC",
4000
+ * // pair: "USDC/USD",
4001
+ * // priceUsd: "1.00",
4002
+ * // lastUpdated: "2024-01-08T12:00:00.000Z"
4003
+ * // }
4004
+ */
4005
+ async pythGetTokenPrice(tokenAddress) {
4006
+ return await pythGetTokenPrice(this, tokenAddress);
4007
+ }
4008
+ /**
4009
+ * Get multiple prices from Pyth in a single call
4010
+ * Accepts token addresses, pair names, or price feed IDs
4011
+ * @param inputs - Array of token addresses, pair names, or price feed IDs
4012
+ * @returns Array of price responses
4013
+ * @example
4014
+ * await agent.pythGetMultiplePrices([
4015
+ * "ETH/USD", // pair name
4016
+ * "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2", // USDC address
4017
+ * "0xcDA86A272531e8640cD7F1a92c01839911B90bb0", // mETH address
4018
+ * ]);
4019
+ */
4020
+ async pythGetMultiplePrices(inputs) {
4021
+ return await pythGetMultiplePrices(this, inputs);
4022
+ }
4023
+ /**
4024
+ * Get all supported Pyth price feed IDs
4025
+ * @returns Object mapping pair names to price feed IDs
4026
+ */
4027
+ pythGetSupportedPriceFeeds() {
4028
+ return pythGetSupportedPriceFeeds();
4029
+ }
4030
+ /**
4031
+ * Get all supported token addresses for Pyth price lookups on Mantle
4032
+ * @returns Object mapping token addresses to their pair names
4033
+ * @example
4034
+ * const addresses = agent.pythGetSupportedTokenAddresses();
4035
+ * // Returns: { "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2": "USDC/USD", ... }
4036
+ */
4037
+ pythGetSupportedTokenAddresses() {
4038
+ return pythGetSupportedTokenAddresses();
4039
+ }
4040
+ /**
4041
+ * Check if a price feed exists on Pyth
4042
+ * Accepts token address, pair name, or price feed ID
4043
+ * @param input - Token address, pair name, or price feed ID
4044
+ * @returns Boolean indicating if feed exists
4045
+ */
4046
+ async pythPriceFeedExists(input) {
4047
+ return await pythPriceFeedExists(this, input);
4048
+ }
4049
+ // ===== Token Launchpad =====
4050
+ /**
4051
+ * Deploy a new token (ERC20 or RWA) - supply minted to your address
4052
+ * @param name - Token name
4053
+ * @param symbol - Token symbol
4054
+ * @param supply - Total supply (human readable, e.g., "1000000")
4055
+ * @param tokenType - "standard" or "rwa"
4056
+ * @param assetType - For RWA: asset category
4057
+ * @param assetId - For RWA: external asset ID
4058
+ */
4059
+ async deployToken(name, symbol, supply, tokenType = "standard", assetType, assetId) {
4060
+ return await deployToken(this, name, symbol, supply, tokenType, assetType, assetId);
4061
+ }
4062
+ /**
4063
+ * Deploy a standard ERC20 token
4064
+ * @param name - Token name
4065
+ * @param symbol - Token symbol
4066
+ * @param supply - Total supply (e.g., "1000000" for 1M tokens)
4067
+ */
4068
+ async deployStandardToken(name, symbol, supply) {
4069
+ return await deployStandardToken(this, name, symbol, supply);
4070
+ }
4071
+ /**
4072
+ * Deploy an RWA (Real World Asset) token
4073
+ * @param name - Token name (e.g., "Manhattan Property Token")
4074
+ * @param symbol - Token symbol (e.g., "MPT")
4075
+ * @param supply - Total supply for fractional ownership
4076
+ * @param assetType - Asset category: "Real Estate", "Commodities", "Securities", "Art"
4077
+ * @param assetId - External reference ID for the underlying asset
4078
+ */
4079
+ async deployRWAToken(name, symbol, supply, assetType, assetId) {
4080
+ return await deployRWAToken(this, name, symbol, supply, assetType, assetId);
4081
+ }
4082
+ /**
4083
+ * Get token information
4084
+ */
4085
+ async getTokenInfo(tokenAddress, holder) {
4086
+ return await getTokenInfo(this, tokenAddress, holder);
4087
+ }
4088
+ /**
4089
+ * Get token balance
4090
+ */
4091
+ async getTokenBalance(tokenAddress, holder) {
4092
+ return await getTokenBalance(this, tokenAddress, holder);
4093
+ }
4094
+ /**
4095
+ * Transfer tokens
4096
+ */
4097
+ async transferToken(tokenAddress, to, amount) {
4098
+ return await transferToken(this, tokenAddress, to, amount);
4099
+ }
4100
+ // ===== NFT Launchpad =====
4101
+ /**
4102
+ * Deploy a new ERC721 NFT collection on Mantle Network
4103
+ * @param config - Collection configuration (name, symbol, baseURI, maxSupply)
4104
+ * @returns Collection deployment result with contract address
4105
+ */
4106
+ async deployNFTCollection(config) {
4107
+ return await deployNFTCollection(this, config);
4108
+ }
4109
+ /**
4110
+ * Deploy an NFT collection with preset configurations
4111
+ * @param preset - Preset type: "pfp" (10000), "art" (1000), "membership" (100), "unlimited"
4112
+ * @param name - Collection name
4113
+ * @param symbol - Collection symbol
4114
+ * @param baseURI - Base URI for metadata
4115
+ * @returns Collection deployment result
4116
+ */
4117
+ async deployNFTCollectionWithPreset(preset, name, symbol, baseURI) {
4118
+ return await deployNFTCollectionWithPreset(
4119
+ this,
4120
+ preset,
4121
+ name,
4122
+ symbol,
4123
+ baseURI
4124
+ );
4125
+ }
4126
+ /**
4127
+ * Mint a single NFT from a collection
4128
+ * @param collectionAddress - NFT collection contract address
4129
+ * @param to - Recipient address (defaults to agent address)
4130
+ * @returns Mint result with token ID
4131
+ */
4132
+ async mintNFT(collectionAddress, to) {
4133
+ return await mintNFT(this, collectionAddress, to);
4134
+ }
4135
+ /**
4136
+ * Batch mint multiple NFTs from a collection
4137
+ * @param collectionAddress - NFT collection contract address
4138
+ * @param to - Recipient address
4139
+ * @param quantity - Number of NFTs to mint
4140
+ * @returns Mint result with starting token ID
4141
+ */
4142
+ async batchMintNFT(collectionAddress, to, quantity) {
4143
+ return await batchMintNFT(this, collectionAddress, to, quantity);
4144
+ }
4145
+ /**
4146
+ * Get information about an NFT collection
4147
+ * @param collectionAddress - NFT collection contract address
4148
+ * @param holderAddress - Optional address to get balance for
4149
+ * @returns Collection information
4150
+ */
4151
+ async getNFTCollectionInfo(collectionAddress, holderAddress) {
4152
+ return await getNFTCollectionInfo(this, collectionAddress, holderAddress);
4153
+ }
4154
+ /**
4155
+ * Get information about a specific NFT token
4156
+ * @param collectionAddress - NFT collection contract address
4157
+ * @param tokenId - Token ID
4158
+ * @returns Token information
4159
+ */
4160
+ async getNFTTokenInfo(collectionAddress, tokenId) {
4161
+ return await getNFTTokenInfo(this, collectionAddress, tokenId);
4162
+ }
4163
+ /**
4164
+ * Get NFT balance for an address
4165
+ * @param collectionAddress - NFT collection contract address
4166
+ * @param holderAddress - Address to check (defaults to agent address)
4167
+ * @returns Balance as string
4168
+ */
4169
+ async getNFTBalance(collectionAddress, holderAddress) {
4170
+ return await getNFTBalance(this, collectionAddress, holderAddress);
4171
+ }
4172
+ /**
4173
+ * Check if an address owns a specific NFT
4174
+ * @param collectionAddress - NFT collection contract address
4175
+ * @param tokenId - Token ID to check
4176
+ * @param ownerAddress - Address to verify ownership
4177
+ * @returns Boolean indicating ownership
4178
+ */
4179
+ async isNFTOwner(collectionAddress, tokenId, ownerAddress) {
4180
+ return await isNFTOwner(this, collectionAddress, tokenId, ownerAddress);
4181
+ }
4182
+ /**
4183
+ * Transfer an NFT to another address
4184
+ * @param collectionAddress - NFT collection contract address
4185
+ * @param to - Recipient address
4186
+ * @param tokenId - Token ID to transfer
4187
+ * @returns Transaction hash
4188
+ */
4189
+ async transferNFT(collectionAddress, to, tokenId) {
4190
+ return await transferNFT(this, collectionAddress, to, tokenId);
4191
+ }
4192
+ /**
4193
+ * Safe transfer an NFT (checks if recipient can receive)
4194
+ * @param collectionAddress - NFT collection contract address
4195
+ * @param to - Recipient address
4196
+ * @param tokenId - Token ID to transfer
4197
+ * @returns Transaction hash
4198
+ */
4199
+ async safeTransferNFT(collectionAddress, to, tokenId) {
4200
+ return await safeTransferNFT(this, collectionAddress, to, tokenId);
4201
+ }
4202
+ /**
4203
+ * Approve an address to transfer a specific NFT
4204
+ * @param collectionAddress - NFT collection contract address
4205
+ * @param approved - Address to approve
4206
+ * @param tokenId - Token ID to approve
4207
+ * @returns Transaction hash
4208
+ */
4209
+ async approveNFT(collectionAddress, approved, tokenId) {
4210
+ return await approveNFT(this, collectionAddress, approved, tokenId);
4211
+ }
4212
+ /**
4213
+ * Set approval for all NFTs in a collection
4214
+ * @param collectionAddress - NFT collection contract address
4215
+ * @param operator - Operator address
4216
+ * @param approved - Whether to approve or revoke
4217
+ * @returns Transaction hash
4218
+ */
4219
+ async setApprovalForAllNFT(collectionAddress, operator, approved) {
4220
+ return await setApprovalForAllNFT(this, collectionAddress, operator, approved);
4221
+ }
2559
4222
  };
2560
4223
 
2561
- export { agni_exports as AgniConstants, lendle_exports as LendleConstants, METH_TOKEN, MNTAgentKit, merchantmoe_exports as MerchantMoeConstants, meth_exports as MethConstants, okx_exports as OKXConstants, oneinch_exports as OneInchConstants, openocean_exports as OpenOceanConstants, pikeperps_exports as PikePerpsConstants, squid_exports as SquidConstants, uniswap_exports as UniswapConstants, agniSwap, approveToken, crossChainSwapViaSquid, executeSwap, get1inchQuote, getOpenOceanQuote, getProjectConfig, getSquidRoute, getUniswapQuote, initializePlatform, lendleBorrow, lendleGetPositions, lendleRepay, lendleSupply, lendleWithdraw, merchantMoeSwap, methGetPosition, pikeperpsClosePosition, pikeperpsGetMarketData, pikeperpsGetPositions, pikeperpsOpenLong, pikeperpsOpenShort, sendTransaction, swapFromMeth, swapOn1inch, swapOnOpenOcean, swapOnUniswap, swapToMeth };
4224
+ export { agni_exports as AgniConstants, lendle_exports as LendleConstants, METH_TOKEN, MNTAgentKit, merchantmoe_exports as MerchantMoeConstants, meth_exports as MethConstants, nft_launchpad_exports as NFTLaunchpadConstants, okx_exports as OKXConstants, oneinch_exports as OneInchConstants, openocean_exports as OpenOceanConstants, pikeperps_exports as PikePerpsConstants, pyth_exports as PythConstants, squid_exports as SquidConstants, token_launchpad_exports as TokenLaunchpadConstants, uniswap_exports as UniswapConstants, agniSwap, approveNFT, approveToken, batchMintNFT, crossChainSwapViaSquid, deployNFTCollection, deployNFTCollectionWithPreset, deployRWAToken, deployStandardToken, deployToken, executeSwap, get1inchQuote, getNFTBalance, getNFTCollectionInfo, getNFTTokenInfo, getOpenOceanQuote, getProjectConfig, getSquidRoute, getTokenBalance, getTokenInfo, getUniswapQuote, initializePlatform, isNFTOwner, lendleBorrow, lendleGetPositions, lendleRepay, lendleSupply, lendleWithdraw, merchantMoeSwap, methGetPosition, mintNFT, pikeperpsClosePosition, pikeperpsGetMarketData, pikeperpsGetPositions, pikeperpsOpenLong, pikeperpsOpenShort, pythGetEmaPrice, pythGetMultiplePrices, pythGetPrice, pythGetSupportedPriceFeeds, pythGetSupportedTokenAddresses, pythGetTokenPrice, pythPriceFeedExists, safeTransferNFT, sendTransaction, setApprovalForAllNFT, swapFromMeth, swapOn1inch, swapOnOpenOcean, swapOnUniswap, swapToMeth, transferNFT, transferToken };
2562
4225
  //# sourceMappingURL=index.js.map
2563
4226
  //# sourceMappingURL=index.js.map