@yodlpay/tokenlists 0.4.7 → 0.5.0

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.
@@ -2211,6 +2211,7 @@ var chains = [
2211
2211
  ],
2212
2212
  wrappedNativeToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
2213
2213
  explorerUrl: "https://etherscan.io",
2214
+ nativeTokenName: "ETH",
2214
2215
  timestamp: "2024-06-20T08:16:18.193Z",
2215
2216
  feeTreasury: "0x9C48d180e4eEE0dA2A899EE1E4c533cA5e92db77",
2216
2217
  curveRouterAddress: "0x99a58482BD75cbab83b27EC03CA68fF489b5788f"
@@ -2226,6 +2227,7 @@ var chains = [
2226
2227
  ],
2227
2228
  wrappedNativeToken: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
2228
2229
  explorerUrl: "https://goerli.etherscan.io",
2230
+ nativeTokenName: "ETH",
2229
2231
  timestamp: "2022-12-28T14:10:09+00:00",
2230
2232
  feeTreasury: "0x3E8A61F0532BA2b58660606d61110cC9E90c4D29"
2231
2233
  },
@@ -2240,6 +2242,7 @@ var chains = [
2240
2242
  ],
2241
2243
  wrappedNativeToken: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
2242
2244
  explorerUrl: "https://arbiscan.io",
2245
+ nativeTokenName: "ETH",
2243
2246
  timestamp: "2024-06-20T08:16:18.932Z",
2244
2247
  feeTreasury: "0x5f0947253a8218894af13438ac2e2e0ced30d234",
2245
2248
  curveRouterAddress: "0x4c2af2df2a7e567b5155879720619ea06c5bb15d"
@@ -2255,6 +2258,7 @@ var chains = [
2255
2258
  ],
2256
2259
  wrappedNativeToken: "0x4200000000000000000000000000000000000006",
2257
2260
  explorerUrl: "https://optimistic.etherscan.io",
2261
+ nativeTokenName: "ETH",
2258
2262
  timestamp: "2024-06-20T08:16:19.165Z",
2259
2263
  feeTreasury: "0x5f0947253a8218894af13438ac2e2e0ced30d234",
2260
2264
  curveRouterAddress: "0x89287c32c2cac1c76227f6d300b2dbbab6b75c08"
@@ -2270,6 +2274,7 @@ var chains = [
2270
2274
  ],
2271
2275
  wrappedNativeToken: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",
2272
2276
  explorerUrl: "https://snowtrace.io",
2277
+ nativeTokenName: "AVAX",
2273
2278
  timestamp: "2023-01-13T14:52:05+00:00",
2274
2279
  feeTreasury: "0x25e22F3ceE59F34622f7DC9a2078B85f17BfBe95"
2275
2280
  },
@@ -2284,6 +2289,7 @@ var chains = [
2284
2289
  ],
2285
2290
  wrappedNativeToken: "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
2286
2291
  explorerUrl: "https://gnosisscan.io",
2292
+ nativeTokenName: "xDAI",
2287
2293
  timestamp: "2024-06-20T08:16:18.872Z",
2288
2294
  feeTreasury: "0x775aaf73a50C25eEBd308BBb9C34C73D081B423b",
2289
2295
  curveRouterAddress: "0xe6358f6a45b502477e83cc1cda759f540e4459ee"
@@ -2299,6 +2305,7 @@ var chains = [
2299
2305
  ],
2300
2306
  wrappedNativeToken: "0x4200000000000000000000000000000000000006",
2301
2307
  explorerUrl: "https://basescan.org",
2308
+ nativeTokenName: "ETH",
2302
2309
  timestamp: "2024-06-20T08:16:19.051Z",
2303
2310
  feeTreasury: "0x46959a8a332eca1a05Bd4F18115b8F2E1C2F2f05",
2304
2311
  curveRouterAddress: "0x0000000000000000000000000000000000000000"
@@ -2314,6 +2321,7 @@ var chains = [
2314
2321
  ],
2315
2322
  wrappedNativeToken: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
2316
2323
  explorerUrl: "https://polygonscan.com",
2324
+ nativeTokenName: "MATIC",
2317
2325
  timestamp: "2024-06-20T08:16:18.717Z",
2318
2326
  feeTreasury: "0x5f0947253a8218894af13438ac2e2E0CeD30d234",
2319
2327
  curveRouterAddress: "0x2a426b3Bb4fa87488387545f15D01d81352732F9"
@@ -2365,6 +2373,13 @@ var routers = [
2365
2373
  version: "0.4",
2366
2374
  fee: "0.002"
2367
2375
  },
2376
+ {
2377
+ chainId: 1,
2378
+ address: "0x42ecf39814824a684529d57e1635d30a90fb9c33",
2379
+ timestamp: "2024-07-17T00:00:00+00:00",
2380
+ version: "0.5",
2381
+ fee: "0.002"
2382
+ },
2368
2383
  {
2369
2384
  chainId: 5,
2370
2385
  address: "0x8412D3c11aa605EbaF14D0b6BC7705ab45143Ee8",
@@ -2400,6 +2415,13 @@ var routers = [
2400
2415
  version: "0.4",
2401
2416
  fee: "0.002"
2402
2417
  },
2418
+ {
2419
+ chainId: 10,
2420
+ address: "0x589fce694575064b5637310804587338037d1de9",
2421
+ timestamp: "2024-07-17T00:00:00+00:00",
2422
+ version: "0.5",
2423
+ fee: "0.002"
2424
+ },
2403
2425
  {
2404
2426
  chainId: 42161,
2405
2427
  address: "0x334264f4fbb56a84f80df722ba765d210f0cf555",
@@ -2428,6 +2450,13 @@ var routers = [
2428
2450
  version: "0.4",
2429
2451
  fee: "0.002"
2430
2452
  },
2453
+ {
2454
+ chainId: 42161,
2455
+ address: "0x627a23113d5d4b2731002d71a6330802374d71d9",
2456
+ timestamp: "2024-07-17T00:00:00+00:00",
2457
+ version: "0.5",
2458
+ fee: "0.002"
2459
+ },
2431
2460
  {
2432
2461
  chainId: 100,
2433
2462
  address: "0x448fabd2d16bc48ecdbe68890414de7a1b6348fd",
@@ -2456,6 +2485,13 @@ var routers = [
2456
2485
  version: "0.4",
2457
2486
  fee: "0.002"
2458
2487
  },
2488
+ {
2489
+ chainId: 100,
2490
+ address: "0xbb8f4e641bbef2fb3e4d73ddf902bee92cee8889",
2491
+ timestamp: "2024-07-17T00:00:00+00:00",
2492
+ version: "0.5",
2493
+ fee: "0.002"
2494
+ },
2459
2495
  {
2460
2496
  chainId: 137,
2461
2497
  address: "0x8866DAFa2762346c85098C5b2201fA7CB2dA6100",
@@ -2477,6 +2513,13 @@ var routers = [
2477
2513
  version: "0.4",
2478
2514
  fee: "0.002"
2479
2515
  },
2516
+ {
2517
+ chainId: 137,
2518
+ address: "0x24794f216fd5a90927c47b8799fd73c9a8d083a1",
2519
+ timestamp: "2024-07-17T00:00:00+00:00",
2520
+ version: "0.5",
2521
+ fee: "0.002"
2522
+ },
2480
2523
  {
2481
2524
  chainId: 8453,
2482
2525
  address: "0x2BaE9Bb53BCe89c760dBfA55D854D43ab96EE19f",
@@ -2504,6 +2547,13 @@ var routers = [
2504
2547
  timestamp: "2024-06-28T10:50:00+00:00",
2505
2548
  version: "0.4",
2506
2549
  fee: "0.002"
2550
+ },
2551
+ {
2552
+ chainId: 8453,
2553
+ address: "0x556280bb6f34b4387662e59de18028052cd4d466",
2554
+ timestamp: "2024-07-17T00:00:00+00:00",
2555
+ version: "0.5",
2556
+ fee: "0.002"
2507
2557
  }
2508
2558
  ];
2509
2559
  var routerlist = {
@@ -13289,238 +13339,844 @@ var YodlRouterV04 = [
13289
13339
  }
13290
13340
  ];
13291
13341
 
13292
- var YODL_ROUTER_ABIS = {
13293
- "0.1": YodlRouterV01,
13294
- "0.2": YodlRouterV02,
13295
- "0.3": YodlRouterV03,
13296
- "0.4": YodlRouterV04,
13297
- "test": YodlRouterV03
13298
- };
13299
- var CURVE_ROUTER_ABI = CurveRouterV13Abi;
13300
-
13301
- (function (TokenListTagNames) {
13302
- // Networks
13303
- TokenListTagNames["MAINNET"] = "Mainnet";
13304
- TokenListTagNames["OPTIMISM"] = "Optimism";
13305
- TokenListTagNames["ARBITRUM"] = "Arbitrum";
13306
- TokenListTagNames["AVALANCHE"] = "Avalanche";
13307
- TokenListTagNames["BASE"] = "Base";
13308
- TokenListTagNames["TESTNET"] = "TESTNET"; // Coin/currency
13309
-
13310
- TokenListTagNames["STABLECOIN"] = "Stablecoin";
13311
- TokenListTagNames["USD"] = "USD";
13312
- TokenListTagNames["EUR"] = "EUR"; // Misc
13313
-
13314
- TokenListTagNames["TOP_10"] = "Top10";
13315
- TokenListTagNames["NATIVE_TOKEN"] = "Native Token";
13316
- })(exports.TokenListTagNames || (exports.TokenListTagNames = {}));
13317
-
13318
- /**
13319
- * Comparator function that allows sorting version from lowest to highest
13320
- * @param versionA version A to compare
13321
- * @param versionB version B to compare
13322
- * @returns -1 if versionA comes before versionB, 0 if versionA is equal to version B, and 1 if version A comes after version B
13323
- */
13324
- function versionComparator(versionA, versionB) {
13325
- if (versionA.major < versionB.major) {
13326
- return -1;
13327
- } else if (versionA.major > versionB.major) {
13328
- return 1;
13329
- } else if (versionA.minor < versionB.minor) {
13330
- return -1;
13331
- } else if (versionA.minor > versionB.minor) {
13332
- return 1;
13333
- } else if (versionA.patch < versionB.patch) {
13334
- return -1;
13335
- } else if (versionA.patch > versionB.patch) {
13336
- return 1;
13337
- } else {
13338
- return 0;
13339
- }
13340
- }
13341
-
13342
- /**
13343
- * Returns true if versionB is an update over versionA
13344
- */
13345
-
13346
- function isVersionUpdate(base, update) {
13347
- return versionComparator(base, update) < 0;
13348
- }
13349
-
13350
- /**
13351
- * Enum describing types of version differences
13352
- */
13353
-
13354
- (function (VersionUpgrade) {
13355
- VersionUpgrade[VersionUpgrade["NONE"] = 0] = "NONE";
13356
- VersionUpgrade[VersionUpgrade["PATCH"] = 1] = "PATCH";
13357
- VersionUpgrade[VersionUpgrade["MINOR"] = 2] = "MINOR";
13358
- VersionUpgrade[VersionUpgrade["MAJOR"] = 3] = "MAJOR";
13359
- })(exports.VersionUpgrade || (exports.VersionUpgrade = {}));
13360
- /**
13361
- * Return the upgrade type from the base version to the update version.
13362
- * Note that downgrades and equivalent versions are both treated as `NONE`.
13363
- * @param base base list
13364
- * @param update update to the list
13365
- */
13366
-
13367
-
13368
- function getVersionUpgrade(base, update) {
13369
- if (update.major > base.major) {
13370
- return exports.VersionUpgrade.MAJOR;
13371
- }
13372
-
13373
- if (update.major < base.major) {
13374
- return exports.VersionUpgrade.NONE;
13375
- }
13376
-
13377
- if (update.minor > base.minor) {
13378
- return exports.VersionUpgrade.MINOR;
13379
- }
13380
-
13381
- if (update.minor < base.minor) {
13382
- return exports.VersionUpgrade.NONE;
13383
- }
13384
-
13385
- return update.patch > base.patch ? exports.VersionUpgrade.PATCH : exports.VersionUpgrade.NONE;
13386
- }
13387
-
13388
- /**
13389
- * compares two token info key values
13390
- * this subset of full deep equal functionality does not work on objects or object arrays
13391
- * @param a comparison item a
13392
- * @param b comparison item b
13393
- */
13394
- function compareTokenInfoProperty(a, b) {
13395
- if (a === b) return true;
13396
- if (typeof a !== typeof b) return false;
13397
-
13398
- if (Array.isArray(a) && Array.isArray(b)) {
13399
- return a.every(function (el, i) {
13400
- return b[i] === el;
13401
- });
13402
- }
13403
-
13404
- return false;
13405
- }
13406
- /**
13407
- * Computes the diff of a token list where the first argument is the base and the second argument is the updated list.
13408
- * @param base base list
13409
- * @param update updated list
13410
- */
13411
-
13412
-
13413
- function diffTokenLists(base, update) {
13414
- var indexedBase = base.reduce(function (memo, tokenInfo) {
13415
- if (!memo[tokenInfo.chainId]) memo[tokenInfo.chainId] = {};
13416
- memo[tokenInfo.chainId][tokenInfo.address] = tokenInfo;
13417
- return memo;
13418
- }, {});
13419
- var newListUpdates = update.reduce(function (memo, tokenInfo) {
13420
- var _indexedBase$tokenInf;
13421
-
13422
- var baseToken = (_indexedBase$tokenInf = indexedBase[tokenInfo.chainId]) == null ? void 0 : _indexedBase$tokenInf[tokenInfo.address];
13423
-
13424
- if (!baseToken) {
13425
- memo.added.push(tokenInfo);
13426
- } else {
13427
- var changes = Object.keys(tokenInfo).filter(function (s) {
13428
- return s !== "address" && s !== "chainId";
13429
- }).filter(function (s) {
13430
- return !compareTokenInfoProperty(tokenInfo[s], baseToken[s]);
13431
- });
13432
-
13433
- if (changes.length > 0) {
13434
- if (!memo.changed[tokenInfo.chainId]) {
13435
- memo.changed[tokenInfo.chainId] = {};
13436
- }
13437
-
13438
- memo.changed[tokenInfo.chainId][tokenInfo.address] = changes;
13439
- }
13440
- }
13441
-
13442
- if (!memo.index[tokenInfo.chainId]) {
13443
- var _memo$index$tokenInfo;
13444
-
13445
- memo.index[tokenInfo.chainId] = (_memo$index$tokenInfo = {}, _memo$index$tokenInfo[tokenInfo.address] = true, _memo$index$tokenInfo);
13446
- } else {
13447
- memo.index[tokenInfo.chainId][tokenInfo.address] = true;
13448
- }
13449
-
13450
- return memo;
13451
- }, {
13452
- added: [],
13453
- changed: {},
13454
- index: {}
13455
- });
13456
- var removed = base.reduce(function (list, curr) {
13457
- if (!newListUpdates.index[curr.chainId] || !newListUpdates.index[curr.chainId][curr.address]) {
13458
- list.push(curr);
13459
- }
13460
-
13461
- return list;
13462
- }, []);
13463
- return {
13464
- added: newListUpdates.added,
13465
- changed: newListUpdates.changed,
13466
- removed: removed
13467
- };
13468
- }
13469
-
13470
- /**
13471
- * Returns the minimum version bump for the given list
13472
- * @param baseList the base list of tokens
13473
- * @param updatedList the updated list of tokens
13474
- */
13475
-
13476
- function minVersionBump(baseList, updatedList) {
13477
- var diff = diffTokenLists(baseList, updatedList);
13478
- if (diff.removed.length > 0) return exports.VersionUpgrade.MAJOR;
13479
- if (diff.added.length > 0) return exports.VersionUpgrade.MINOR;
13480
- if (Object.keys(diff.changed).length > 0) return exports.VersionUpgrade.PATCH;
13481
- return exports.VersionUpgrade.NONE;
13482
- }
13483
-
13484
- /**
13485
- * Returns the next version of the list given a base version and the upgrade type
13486
- * @param base current version
13487
- * @param bump the upgrade type
13488
- */
13489
-
13490
- function nextVersion(base, bump) {
13491
- switch (bump) {
13492
- case exports.VersionUpgrade.NONE:
13493
- return base;
13494
-
13495
- case exports.VersionUpgrade.MAJOR:
13496
- return {
13497
- major: base.major + 1,
13498
- minor: 0,
13499
- patch: 0
13500
- };
13501
-
13502
- case exports.VersionUpgrade.MINOR:
13503
- return {
13504
- major: base.major,
13505
- minor: base.minor + 1,
13506
- patch: 0
13507
- };
13508
-
13509
- case exports.VersionUpgrade.PATCH:
13510
- return {
13511
- major: base.major,
13512
- minor: base.minor,
13513
- patch: base.patch + 1
13514
- };
13515
- }
13516
- }
13517
-
13518
- var tokenlist = /*#__PURE__*/featuredTokenlist.tokens.concat( //@ts-ignore
13519
- generatedTokenlist.tokens);
13520
- function getChains() {
13521
- return chainlist.chains;
13522
- }
13523
- function getChain(chainId) {
13342
+ var YodlRouterV05 = [
13343
+ {
13344
+ inputs: [
13345
+ ],
13346
+ stateMutability: "nonpayable",
13347
+ type: "constructor"
13348
+ },
13349
+ {
13350
+ anonymous: false,
13351
+ inputs: [
13352
+ {
13353
+ indexed: true,
13354
+ internalType: "address",
13355
+ name: "priceFeed0",
13356
+ type: "address"
13357
+ },
13358
+ {
13359
+ indexed: true,
13360
+ internalType: "address",
13361
+ name: "priceFeed1",
13362
+ type: "address"
13363
+ },
13364
+ {
13365
+ indexed: false,
13366
+ internalType: "int256",
13367
+ name: "exchangeRate0",
13368
+ type: "int256"
13369
+ },
13370
+ {
13371
+ indexed: false,
13372
+ internalType: "int256",
13373
+ name: "exchangeRate1",
13374
+ type: "int256"
13375
+ }
13376
+ ],
13377
+ name: "Convert",
13378
+ type: "event"
13379
+ },
13380
+ {
13381
+ anonymous: false,
13382
+ inputs: [
13383
+ {
13384
+ indexed: true,
13385
+ internalType: "address",
13386
+ name: "sender",
13387
+ type: "address"
13388
+ },
13389
+ {
13390
+ indexed: true,
13391
+ internalType: "address",
13392
+ name: "receiver",
13393
+ type: "address"
13394
+ },
13395
+ {
13396
+ indexed: false,
13397
+ internalType: "address",
13398
+ name: "token",
13399
+ type: "address"
13400
+ },
13401
+ {
13402
+ indexed: false,
13403
+ internalType: "uint256",
13404
+ name: "amount",
13405
+ type: "uint256"
13406
+ },
13407
+ {
13408
+ indexed: false,
13409
+ internalType: "uint256",
13410
+ name: "fees",
13411
+ type: "uint256"
13412
+ },
13413
+ {
13414
+ indexed: false,
13415
+ internalType: "bytes32",
13416
+ name: "memo",
13417
+ type: "bytes32"
13418
+ }
13419
+ ],
13420
+ name: "Yodl",
13421
+ type: "event"
13422
+ },
13423
+ {
13424
+ anonymous: false,
13425
+ inputs: [
13426
+ {
13427
+ indexed: true,
13428
+ internalType: "address",
13429
+ name: "sender",
13430
+ type: "address"
13431
+ },
13432
+ {
13433
+ indexed: true,
13434
+ internalType: "address",
13435
+ name: "receiver",
13436
+ type: "address"
13437
+ },
13438
+ {
13439
+ indexed: true,
13440
+ internalType: "uint256",
13441
+ name: "amount",
13442
+ type: "uint256"
13443
+ }
13444
+ ],
13445
+ name: "YodlNativeTokenTransfer",
13446
+ type: "event"
13447
+ },
13448
+ {
13449
+ inputs: [
13450
+ ],
13451
+ name: "MAX_EXTRA_FEE_BPS",
13452
+ outputs: [
13453
+ {
13454
+ internalType: "uint256",
13455
+ name: "",
13456
+ type: "uint256"
13457
+ }
13458
+ ],
13459
+ stateMutability: "view",
13460
+ type: "function"
13461
+ },
13462
+ {
13463
+ inputs: [
13464
+ ],
13465
+ name: "NATIVE_TOKEN",
13466
+ outputs: [
13467
+ {
13468
+ internalType: "address",
13469
+ name: "",
13470
+ type: "address"
13471
+ }
13472
+ ],
13473
+ stateMutability: "view",
13474
+ type: "function"
13475
+ },
13476
+ {
13477
+ inputs: [
13478
+ {
13479
+ internalType: "uint256",
13480
+ name: "amount",
13481
+ type: "uint256"
13482
+ },
13483
+ {
13484
+ internalType: "uint256",
13485
+ name: "feeBps",
13486
+ type: "uint256"
13487
+ }
13488
+ ],
13489
+ name: "calculateFee",
13490
+ outputs: [
13491
+ {
13492
+ internalType: "uint256",
13493
+ name: "",
13494
+ type: "uint256"
13495
+ }
13496
+ ],
13497
+ stateMutability: "pure",
13498
+ type: "function"
13499
+ },
13500
+ {
13501
+ inputs: [
13502
+ {
13503
+ internalType: "address[2]",
13504
+ name: "priceFeeds",
13505
+ type: "address[2]"
13506
+ },
13507
+ {
13508
+ internalType: "uint256",
13509
+ name: "amount",
13510
+ type: "uint256"
13511
+ }
13512
+ ],
13513
+ name: "exchangeRate",
13514
+ outputs: [
13515
+ {
13516
+ internalType: "uint256",
13517
+ name: "converted",
13518
+ type: "uint256"
13519
+ },
13520
+ {
13521
+ internalType: "address[2]",
13522
+ name: "priceFeedsUsed",
13523
+ type: "address[2]"
13524
+ },
13525
+ {
13526
+ internalType: "int256[2]",
13527
+ name: "prices",
13528
+ type: "int256[2]"
13529
+ }
13530
+ ],
13531
+ stateMutability: "view",
13532
+ type: "function"
13533
+ },
13534
+ {
13535
+ inputs: [
13536
+ {
13537
+ internalType: "address",
13538
+ name: "token",
13539
+ type: "address"
13540
+ }
13541
+ ],
13542
+ name: "sweep",
13543
+ outputs: [
13544
+ ],
13545
+ stateMutability: "nonpayable",
13546
+ type: "function"
13547
+ },
13548
+ {
13549
+ inputs: [
13550
+ {
13551
+ internalType: "uint256",
13552
+ name: "amount",
13553
+ type: "uint256"
13554
+ },
13555
+ {
13556
+ internalType: "uint256",
13557
+ name: "feeBps",
13558
+ type: "uint256"
13559
+ },
13560
+ {
13561
+ internalType: "address",
13562
+ name: "token",
13563
+ type: "address"
13564
+ },
13565
+ {
13566
+ internalType: "address",
13567
+ name: "from",
13568
+ type: "address"
13569
+ },
13570
+ {
13571
+ internalType: "address",
13572
+ name: "to",
13573
+ type: "address"
13574
+ }
13575
+ ],
13576
+ name: "transferFee",
13577
+ outputs: [
13578
+ {
13579
+ internalType: "uint256",
13580
+ name: "",
13581
+ type: "uint256"
13582
+ }
13583
+ ],
13584
+ stateMutability: "nonpayable",
13585
+ type: "function"
13586
+ },
13587
+ {
13588
+ inputs: [
13589
+ ],
13590
+ name: "uniswapRouter",
13591
+ outputs: [
13592
+ {
13593
+ internalType: "contract ISwapRouter02",
13594
+ name: "",
13595
+ type: "address"
13596
+ }
13597
+ ],
13598
+ stateMutability: "view",
13599
+ type: "function"
13600
+ },
13601
+ {
13602
+ inputs: [
13603
+ ],
13604
+ name: "version",
13605
+ outputs: [
13606
+ {
13607
+ internalType: "string",
13608
+ name: "",
13609
+ type: "string"
13610
+ }
13611
+ ],
13612
+ stateMutability: "view",
13613
+ type: "function"
13614
+ },
13615
+ {
13616
+ inputs: [
13617
+ ],
13618
+ name: "wrappedNativeToken",
13619
+ outputs: [
13620
+ {
13621
+ internalType: "contract IWETH9",
13622
+ name: "",
13623
+ type: "address"
13624
+ }
13625
+ ],
13626
+ stateMutability: "view",
13627
+ type: "function"
13628
+ },
13629
+ {
13630
+ inputs: [
13631
+ ],
13632
+ name: "yodlFeeBps",
13633
+ outputs: [
13634
+ {
13635
+ internalType: "uint256",
13636
+ name: "",
13637
+ type: "uint256"
13638
+ }
13639
+ ],
13640
+ stateMutability: "view",
13641
+ type: "function"
13642
+ },
13643
+ {
13644
+ inputs: [
13645
+ ],
13646
+ name: "yodlFeeTreasury",
13647
+ outputs: [
13648
+ {
13649
+ internalType: "address",
13650
+ name: "",
13651
+ type: "address"
13652
+ }
13653
+ ],
13654
+ stateMutability: "view",
13655
+ type: "function"
13656
+ },
13657
+ {
13658
+ inputs: [
13659
+ {
13660
+ components: [
13661
+ {
13662
+ internalType: "address",
13663
+ name: "sender",
13664
+ type: "address"
13665
+ },
13666
+ {
13667
+ internalType: "address",
13668
+ name: "receiver",
13669
+ type: "address"
13670
+ },
13671
+ {
13672
+ internalType: "uint256",
13673
+ name: "amountIn",
13674
+ type: "uint256"
13675
+ },
13676
+ {
13677
+ internalType: "uint256",
13678
+ name: "amountOut",
13679
+ type: "uint256"
13680
+ },
13681
+ {
13682
+ internalType: "bytes32",
13683
+ name: "memo",
13684
+ type: "bytes32"
13685
+ },
13686
+ {
13687
+ internalType: "address[9]",
13688
+ name: "route",
13689
+ type: "address[9]"
13690
+ },
13691
+ {
13692
+ internalType: "uint256[3][4]",
13693
+ name: "swapParams",
13694
+ type: "uint256[3][4]"
13695
+ },
13696
+ {
13697
+ internalType: "address[4]",
13698
+ name: "factoryAddresses",
13699
+ type: "address[4]"
13700
+ },
13701
+ {
13702
+ internalType: "address[2]",
13703
+ name: "priceFeeds",
13704
+ type: "address[2]"
13705
+ },
13706
+ {
13707
+ internalType: "address",
13708
+ name: "extraFeeReceiver",
13709
+ type: "address"
13710
+ },
13711
+ {
13712
+ internalType: "uint256",
13713
+ name: "extraFeeBps",
13714
+ type: "uint256"
13715
+ },
13716
+ {
13717
+ internalType: "uint256",
13718
+ name: "yd",
13719
+ type: "uint256"
13720
+ },
13721
+ {
13722
+ components: [
13723
+ {
13724
+ internalType: "address",
13725
+ name: "yApp",
13726
+ type: "address"
13727
+ },
13728
+ {
13729
+ internalType: "uint256",
13730
+ name: "sessionId",
13731
+ type: "uint256"
13732
+ },
13733
+ {
13734
+ internalType: "bytes[]",
13735
+ name: "payload",
13736
+ type: "bytes[]"
13737
+ }
13738
+ ],
13739
+ internalType: "struct AbstractYodlRouter.YApp[]",
13740
+ name: "yAppList",
13741
+ type: "tuple[]"
13742
+ }
13743
+ ],
13744
+ internalType: "struct YodlCurveRouter.YodlCurveParams",
13745
+ name: "params",
13746
+ type: "tuple"
13747
+ }
13748
+ ],
13749
+ name: "yodlWithCurve",
13750
+ outputs: [
13751
+ {
13752
+ internalType: "uint256",
13753
+ name: "",
13754
+ type: "uint256"
13755
+ }
13756
+ ],
13757
+ stateMutability: "payable",
13758
+ type: "function"
13759
+ },
13760
+ {
13761
+ inputs: [
13762
+ {
13763
+ components: [
13764
+ {
13765
+ internalType: "bytes32",
13766
+ name: "memo",
13767
+ type: "bytes32"
13768
+ },
13769
+ {
13770
+ internalType: "uint256",
13771
+ name: "amount",
13772
+ type: "uint256"
13773
+ },
13774
+ {
13775
+ internalType: "address[2]",
13776
+ name: "priceFeeds",
13777
+ type: "address[2]"
13778
+ },
13779
+ {
13780
+ internalType: "address",
13781
+ name: "token",
13782
+ type: "address"
13783
+ },
13784
+ {
13785
+ internalType: "address",
13786
+ name: "receiver",
13787
+ type: "address"
13788
+ },
13789
+ {
13790
+ internalType: "address",
13791
+ name: "extraFeeReceiver",
13792
+ type: "address"
13793
+ },
13794
+ {
13795
+ internalType: "uint256",
13796
+ name: "extraFeeBps",
13797
+ type: "uint256"
13798
+ },
13799
+ {
13800
+ internalType: "uint256",
13801
+ name: "yd",
13802
+ type: "uint256"
13803
+ },
13804
+ {
13805
+ components: [
13806
+ {
13807
+ internalType: "address",
13808
+ name: "yApp",
13809
+ type: "address"
13810
+ },
13811
+ {
13812
+ internalType: "uint256",
13813
+ name: "sessionId",
13814
+ type: "uint256"
13815
+ },
13816
+ {
13817
+ internalType: "bytes[]",
13818
+ name: "payload",
13819
+ type: "bytes[]"
13820
+ }
13821
+ ],
13822
+ internalType: "struct AbstractYodlRouter.YApp[]",
13823
+ name: "yAppList",
13824
+ type: "tuple[]"
13825
+ }
13826
+ ],
13827
+ internalType: "struct YodlTransferRouter.YodlTransferParams",
13828
+ name: "params",
13829
+ type: "tuple"
13830
+ }
13831
+ ],
13832
+ name: "yodlWithToken",
13833
+ outputs: [
13834
+ {
13835
+ internalType: "uint256",
13836
+ name: "",
13837
+ type: "uint256"
13838
+ }
13839
+ ],
13840
+ stateMutability: "payable",
13841
+ type: "function"
13842
+ },
13843
+ {
13844
+ inputs: [
13845
+ {
13846
+ components: [
13847
+ {
13848
+ internalType: "address",
13849
+ name: "sender",
13850
+ type: "address"
13851
+ },
13852
+ {
13853
+ internalType: "address",
13854
+ name: "receiver",
13855
+ type: "address"
13856
+ },
13857
+ {
13858
+ internalType: "uint256",
13859
+ name: "amountIn",
13860
+ type: "uint256"
13861
+ },
13862
+ {
13863
+ internalType: "uint256",
13864
+ name: "amountOut",
13865
+ type: "uint256"
13866
+ },
13867
+ {
13868
+ internalType: "bytes32",
13869
+ name: "memo",
13870
+ type: "bytes32"
13871
+ },
13872
+ {
13873
+ internalType: "bytes",
13874
+ name: "path",
13875
+ type: "bytes"
13876
+ },
13877
+ {
13878
+ internalType: "address[2]",
13879
+ name: "priceFeeds",
13880
+ type: "address[2]"
13881
+ },
13882
+ {
13883
+ internalType: "address",
13884
+ name: "extraFeeReceiver",
13885
+ type: "address"
13886
+ },
13887
+ {
13888
+ internalType: "uint256",
13889
+ name: "extraFeeBps",
13890
+ type: "uint256"
13891
+ },
13892
+ {
13893
+ internalType: "enum YodlUniswapRouter.SwapType",
13894
+ name: "swapType",
13895
+ type: "uint8"
13896
+ },
13897
+ {
13898
+ internalType: "uint256",
13899
+ name: "yd",
13900
+ type: "uint256"
13901
+ },
13902
+ {
13903
+ components: [
13904
+ {
13905
+ internalType: "address",
13906
+ name: "yApp",
13907
+ type: "address"
13908
+ },
13909
+ {
13910
+ internalType: "uint256",
13911
+ name: "sessionId",
13912
+ type: "uint256"
13913
+ },
13914
+ {
13915
+ internalType: "bytes[]",
13916
+ name: "payload",
13917
+ type: "bytes[]"
13918
+ }
13919
+ ],
13920
+ internalType: "struct AbstractYodlRouter.YApp[]",
13921
+ name: "yAppList",
13922
+ type: "tuple[]"
13923
+ }
13924
+ ],
13925
+ internalType: "struct YodlUniswapRouter.YodlUniswapParams",
13926
+ name: "params",
13927
+ type: "tuple"
13928
+ }
13929
+ ],
13930
+ name: "yodlWithUniswap",
13931
+ outputs: [
13932
+ {
13933
+ internalType: "uint256",
13934
+ name: "",
13935
+ type: "uint256"
13936
+ }
13937
+ ],
13938
+ stateMutability: "payable",
13939
+ type: "function"
13940
+ },
13941
+ {
13942
+ stateMutability: "payable",
13943
+ type: "receive"
13944
+ }
13945
+ ];
13946
+
13947
+ var YODL_ROUTER_ABIS = {
13948
+ "0.1": YodlRouterV01,
13949
+ "0.2": YodlRouterV02,
13950
+ "0.3": YodlRouterV03,
13951
+ "0.4": YodlRouterV04,
13952
+ "0.5": YodlRouterV05,
13953
+ "test": YodlRouterV03
13954
+ };
13955
+ var CURVE_ROUTER_ABI = CurveRouterV13Abi;
13956
+
13957
+ (function (TokenListTagNames) {
13958
+ // Networks
13959
+ TokenListTagNames["MAINNET"] = "Mainnet";
13960
+ TokenListTagNames["OPTIMISM"] = "Optimism";
13961
+ TokenListTagNames["ARBITRUM"] = "Arbitrum";
13962
+ TokenListTagNames["AVALANCHE"] = "Avalanche";
13963
+ TokenListTagNames["BASE"] = "Base";
13964
+ TokenListTagNames["TESTNET"] = "TESTNET"; // Coin/currency
13965
+
13966
+ TokenListTagNames["STABLECOIN"] = "Stablecoin";
13967
+ TokenListTagNames["USD"] = "USD";
13968
+ TokenListTagNames["EUR"] = "EUR"; // Misc
13969
+
13970
+ TokenListTagNames["TOP_10"] = "Top10";
13971
+ TokenListTagNames["NATIVE_TOKEN"] = "Native Token";
13972
+ })(exports.TokenListTagNames || (exports.TokenListTagNames = {}));
13973
+
13974
+ /**
13975
+ * Comparator function that allows sorting version from lowest to highest
13976
+ * @param versionA version A to compare
13977
+ * @param versionB version B to compare
13978
+ * @returns -1 if versionA comes before versionB, 0 if versionA is equal to version B, and 1 if version A comes after version B
13979
+ */
13980
+ function versionComparator(versionA, versionB) {
13981
+ if (versionA.major < versionB.major) {
13982
+ return -1;
13983
+ } else if (versionA.major > versionB.major) {
13984
+ return 1;
13985
+ } else if (versionA.minor < versionB.minor) {
13986
+ return -1;
13987
+ } else if (versionA.minor > versionB.minor) {
13988
+ return 1;
13989
+ } else if (versionA.patch < versionB.patch) {
13990
+ return -1;
13991
+ } else if (versionA.patch > versionB.patch) {
13992
+ return 1;
13993
+ } else {
13994
+ return 0;
13995
+ }
13996
+ }
13997
+
13998
+ /**
13999
+ * Returns true if versionB is an update over versionA
14000
+ */
14001
+
14002
+ function isVersionUpdate(base, update) {
14003
+ return versionComparator(base, update) < 0;
14004
+ }
14005
+
14006
+ /**
14007
+ * Enum describing types of version differences
14008
+ */
14009
+
14010
+ (function (VersionUpgrade) {
14011
+ VersionUpgrade[VersionUpgrade["NONE"] = 0] = "NONE";
14012
+ VersionUpgrade[VersionUpgrade["PATCH"] = 1] = "PATCH";
14013
+ VersionUpgrade[VersionUpgrade["MINOR"] = 2] = "MINOR";
14014
+ VersionUpgrade[VersionUpgrade["MAJOR"] = 3] = "MAJOR";
14015
+ })(exports.VersionUpgrade || (exports.VersionUpgrade = {}));
14016
+ /**
14017
+ * Return the upgrade type from the base version to the update version.
14018
+ * Note that downgrades and equivalent versions are both treated as `NONE`.
14019
+ * @param base base list
14020
+ * @param update update to the list
14021
+ */
14022
+
14023
+
14024
+ function getVersionUpgrade(base, update) {
14025
+ if (update.major > base.major) {
14026
+ return exports.VersionUpgrade.MAJOR;
14027
+ }
14028
+
14029
+ if (update.major < base.major) {
14030
+ return exports.VersionUpgrade.NONE;
14031
+ }
14032
+
14033
+ if (update.minor > base.minor) {
14034
+ return exports.VersionUpgrade.MINOR;
14035
+ }
14036
+
14037
+ if (update.minor < base.minor) {
14038
+ return exports.VersionUpgrade.NONE;
14039
+ }
14040
+
14041
+ return update.patch > base.patch ? exports.VersionUpgrade.PATCH : exports.VersionUpgrade.NONE;
14042
+ }
14043
+
14044
+ /**
14045
+ * compares two token info key values
14046
+ * this subset of full deep equal functionality does not work on objects or object arrays
14047
+ * @param a comparison item a
14048
+ * @param b comparison item b
14049
+ */
14050
+ function compareTokenInfoProperty(a, b) {
14051
+ if (a === b) return true;
14052
+ if (typeof a !== typeof b) return false;
14053
+
14054
+ if (Array.isArray(a) && Array.isArray(b)) {
14055
+ return a.every(function (el, i) {
14056
+ return b[i] === el;
14057
+ });
14058
+ }
14059
+
14060
+ return false;
14061
+ }
14062
+ /**
14063
+ * Computes the diff of a token list where the first argument is the base and the second argument is the updated list.
14064
+ * @param base base list
14065
+ * @param update updated list
14066
+ */
14067
+
14068
+
14069
+ function diffTokenLists(base, update) {
14070
+ var indexedBase = base.reduce(function (memo, tokenInfo) {
14071
+ if (!memo[tokenInfo.chainId]) memo[tokenInfo.chainId] = {};
14072
+ memo[tokenInfo.chainId][tokenInfo.address] = tokenInfo;
14073
+ return memo;
14074
+ }, {});
14075
+ var newListUpdates = update.reduce(function (memo, tokenInfo) {
14076
+ var _indexedBase$tokenInf;
14077
+
14078
+ var baseToken = (_indexedBase$tokenInf = indexedBase[tokenInfo.chainId]) == null ? void 0 : _indexedBase$tokenInf[tokenInfo.address];
14079
+
14080
+ if (!baseToken) {
14081
+ memo.added.push(tokenInfo);
14082
+ } else {
14083
+ var changes = Object.keys(tokenInfo).filter(function (s) {
14084
+ return s !== "address" && s !== "chainId";
14085
+ }).filter(function (s) {
14086
+ return !compareTokenInfoProperty(tokenInfo[s], baseToken[s]);
14087
+ });
14088
+
14089
+ if (changes.length > 0) {
14090
+ if (!memo.changed[tokenInfo.chainId]) {
14091
+ memo.changed[tokenInfo.chainId] = {};
14092
+ }
14093
+
14094
+ memo.changed[tokenInfo.chainId][tokenInfo.address] = changes;
14095
+ }
14096
+ }
14097
+
14098
+ if (!memo.index[tokenInfo.chainId]) {
14099
+ var _memo$index$tokenInfo;
14100
+
14101
+ memo.index[tokenInfo.chainId] = (_memo$index$tokenInfo = {}, _memo$index$tokenInfo[tokenInfo.address] = true, _memo$index$tokenInfo);
14102
+ } else {
14103
+ memo.index[tokenInfo.chainId][tokenInfo.address] = true;
14104
+ }
14105
+
14106
+ return memo;
14107
+ }, {
14108
+ added: [],
14109
+ changed: {},
14110
+ index: {}
14111
+ });
14112
+ var removed = base.reduce(function (list, curr) {
14113
+ if (!newListUpdates.index[curr.chainId] || !newListUpdates.index[curr.chainId][curr.address]) {
14114
+ list.push(curr);
14115
+ }
14116
+
14117
+ return list;
14118
+ }, []);
14119
+ return {
14120
+ added: newListUpdates.added,
14121
+ changed: newListUpdates.changed,
14122
+ removed: removed
14123
+ };
14124
+ }
14125
+
14126
+ /**
14127
+ * Returns the minimum version bump for the given list
14128
+ * @param baseList the base list of tokens
14129
+ * @param updatedList the updated list of tokens
14130
+ */
14131
+
14132
+ function minVersionBump(baseList, updatedList) {
14133
+ var diff = diffTokenLists(baseList, updatedList);
14134
+ if (diff.removed.length > 0) return exports.VersionUpgrade.MAJOR;
14135
+ if (diff.added.length > 0) return exports.VersionUpgrade.MINOR;
14136
+ if (Object.keys(diff.changed).length > 0) return exports.VersionUpgrade.PATCH;
14137
+ return exports.VersionUpgrade.NONE;
14138
+ }
14139
+
14140
+ /**
14141
+ * Returns the next version of the list given a base version and the upgrade type
14142
+ * @param base current version
14143
+ * @param bump the upgrade type
14144
+ */
14145
+
14146
+ function nextVersion(base, bump) {
14147
+ switch (bump) {
14148
+ case exports.VersionUpgrade.NONE:
14149
+ return base;
14150
+
14151
+ case exports.VersionUpgrade.MAJOR:
14152
+ return {
14153
+ major: base.major + 1,
14154
+ minor: 0,
14155
+ patch: 0
14156
+ };
14157
+
14158
+ case exports.VersionUpgrade.MINOR:
14159
+ return {
14160
+ major: base.major,
14161
+ minor: base.minor + 1,
14162
+ patch: 0
14163
+ };
14164
+
14165
+ case exports.VersionUpgrade.PATCH:
14166
+ return {
14167
+ major: base.major,
14168
+ minor: base.minor,
14169
+ patch: base.patch + 1
14170
+ };
14171
+ }
14172
+ }
14173
+
14174
+ var tokenlist = /*#__PURE__*/featuredTokenlist.tokens.concat( //@ts-ignore
14175
+ generatedTokenlist.tokens);
14176
+ function getChains() {
14177
+ return chainlist.chains;
14178
+ }
14179
+ function getChain(chainId) {
13524
14180
  return chainlist.chains.find(function (needle) {
13525
14181
  return needle.chainId === chainId;
13526
14182
  });
@@ -13637,6 +14293,13 @@ function getShortNames() {
13637
14293
  return chain.shortName;
13638
14294
  });
13639
14295
  }
14296
+ function getNativeToken(chainId) {
14297
+ var _chainlist$chains$fin;
14298
+
14299
+ return (_chainlist$chains$fin = chainlist.chains.find(function (chain) {
14300
+ return chain.chainId === chainId;
14301
+ })) == null ? void 0 : _chainlist$chains$fin.nativeTokenName;
14302
+ }
13640
14303
  function getNativeWrappedToken(chainId) {
13641
14304
  var nativeTokens = featuredTokenlist.tokens.filter(function (t) {
13642
14305
  return t.chainId === chainId && t.tags.map(function (tag) {
@@ -13666,6 +14329,7 @@ exports.getFiatCurrencies = getFiatCurrencies;
13666
14329
  exports.getFiatCurrency = getFiatCurrency;
13667
14330
  exports.getFiatFeeds = getFiatFeeds;
13668
14331
  exports.getLatestRouter = getLatestRouter;
14332
+ exports.getNativeToken = getNativeToken;
13669
14333
  exports.getNativeWrappedToken = getNativeWrappedToken;
13670
14334
  exports.getPriceFeed = getPriceFeed;
13671
14335
  exports.getPriceFeeds = getPriceFeeds;