@ape.swap/bonds-sdk 3.0.0-test.1 → 3.0.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/main.js
CHANGED
|
@@ -4008,6 +4008,7 @@ var icons;
|
|
|
4008
4008
|
icons["IOTA"] = "iota";
|
|
4009
4009
|
icons["BASE"] = "base";
|
|
4010
4010
|
icons["BLAST"] = "blast";
|
|
4011
|
+
icons["CROSSFI"] = "crossfi";
|
|
4011
4012
|
//Social media icons
|
|
4012
4013
|
icons["DISCORD"] = "discord";
|
|
4013
4014
|
icons["REDDIT"] = "reddit";
|
|
@@ -7132,6 +7133,10 @@ const BLAST = ({ width }) => {
|
|
|
7132
7133
|
return (jsxs("svg", { width: width || '30', height: width || '30', viewBox: "0 0 120 120", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxs("g", { clipPath: "url(#clip0_3081_2691)", children: [jsx$2("rect", { x: "0", y: "0", width: "120", height: "120", fill: "#000" }), jsx$2("path", { d: "M82.7405 59.5388L95.0113 53.4243L99.2411 40.4415L90.7814 34.2852H34.4529L21.4282 43.9594H87.6404L84.1225 54.8482H57.5706L55.0159 62.8054H81.5678L74.1132 85.7137L86.5515 79.5574L90.9908 65.8208L82.6567 59.7063L82.7405 59.5388Z", fill: "#FCFC03" }), jsx$2("path", { d: "M40.1491 75.8726L47.8131 52.001L39.3115 45.6353L26.5381 85.7144H74.1137L77.2966 75.8726H40.1491Z", fill: "#FCFC03" })] }), jsx$2("defs", { children: jsx$2("clipPath", { id: "clip0_3081_2691", children: jsx$2("rect", { width: "120", height: "120", fill: "white" }) }) })] }));
|
|
7133
7134
|
};
|
|
7134
7135
|
|
|
7136
|
+
const CROSSFI = ({ width }) => {
|
|
7137
|
+
return (jsx$2("svg", { width: width || '30', height: width || '30', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 30 30", children: jsxs("g", { children: [jsx$2("title", { children: "Layer 1" }), jsxs("g", { stroke: "null", id: "svg_6", children: [jsx$2("rect", { stroke: "null", id: "svg_7", fill: "#1d2022", height: "48.28147", width: "48.28147", y: "-2.74187", x: "-1.02475" }), jsx$2("rect", { stroke: "null", id: "svg_1", fill: "#34393E", rx: "595.5", height: "25.54054", width: "25.54054", y: "2.48368", x: "2.44511" }), jsx$2("rect", { stroke: "null", id: "svg_2", "fill-opacity": "0.2", fill: "black", rx: "595.5", height: "25.54054", width: "25.54054", y: "2.48368", x: "2.44511" }), jsx$2("rect", { stroke: "null", id: "svg_3", "fill-opacity": "0.2", fill: "black", rx: "595.5", height: "25.54054", width: "25.54054", y: "2.48368", x: "2.44511" }), jsx$2("path", { stroke: "null", id: "svg_4", fill: "white", d: "m10.68808,10.67793c0,1.21364 0.48227,2.37756 1.34072,3.23574c0.85845,0.85817 2.02277,1.34028 3.23679,1.34028l-9.22885,0c-0.00019,-1.20527 0.23711,-2.3988 0.69839,-3.51239c0.46125,-1.1136 1.13742,-2.12546 1.98989,-2.9778c0.85247,-0.85232 1.86454,-1.52844 2.97842,-1.98974c1.11388,-0.46127 2.30774,-0.69871 3.51343,-0.69871l0.04872,0l0,0.02659c-1.21402,0 -2.37834,0.48209 -3.23679,1.34028c-0.85845,0.85817 -1.34072,2.0221 -1.34072,3.23574l0,0.00001z" }), jsx$2("path", { stroke: "null", id: "svg_5", fill: "white", d: "m24.39411,15.25395c0,2.42515 -0.9601,4.75174 -2.6705,6.47156c-1.7104,1.71979 -4.03214,2.69302 -6.45802,2.70717l0,-0.02659c1.21402,0 2.37834,-0.4822 3.23679,-1.34037c0.85845,-0.85817 1.34072,-2.0221 1.34072,-3.23574c0,-1.21364 -0.48227,-2.37756 -1.34072,-3.23574c-0.85845,-0.85817 -2.02277,-1.34028 -3.23679,-1.34028l9.12853,0l0,-0.00001z" })] })] }) }));
|
|
7138
|
+
};
|
|
7139
|
+
|
|
7135
7140
|
const Icon$a = ({ width }) => {
|
|
7136
7141
|
return (jsxs("svg", { viewBox: "0 0 32 32", width: width || '128px', children: [jsx$2("path", { d: "M24 0H8C3.58172 0 0 3.58172 0 8V24C0 28.4183 3.58172 32 8 32H24C28.4183 32 32 28.4183 32 24V8C32 3.58172 28.4183 0 24 0Z", fill: "#1E2026" }), jsx$2("path", { d: "M16.2857 4L9.97035 7.6761L12.2922 9.03415L16.2857 6.7161L20.2792 9.03415L22.6011 7.6761L16.2857 4Z", fill: "#F0B90B" }), jsx$2("path", { d: "M20.2792 10.9541L22.6011 12.3122V15.0283L18.6075 17.3463V21.9824L16.2857 23.3405L13.9639 21.9824V17.3463L9.97035 15.0283V12.3122L12.2922 10.9541L16.2857 13.2722L20.2792 10.9541Z", fill: "#F0B90B" }), jsx$2("path", { d: "M22.6011 16.9483V19.6644L20.2792 21.0224V18.3063L22.6011 16.9483Z", fill: "#F0B90B" }), jsx$2("path", { d: "M20.2561 22.9424L24.2496 20.6244V15.9883L26.5714 14.6302V21.9824L20.2561 25.6585V22.9424Z", fill: "#F0B90B" }), jsx$2("path", { d: "M24.2496 11.3522L21.9278 9.99414L24.2496 8.63609L26.5714 9.99414V12.7102L24.2496 14.0683V11.3522Z", fill: "#F0B90B" }), jsx$2("path", { d: "M13.9639 26.642V23.9259L16.2857 25.2839L18.6075 23.9259V26.642L16.2857 28L13.9639 26.642Z", fill: "#F0B90B" }), jsx$2("path", { d: "M12.2922 21.0224L9.97035 19.6644V16.9483L12.2922 18.3063V21.0224Z", fill: "#F0B90B" }), jsx$2("path", { d: "M16.2857 11.3522L13.9639 9.99414L16.2857 8.63609L18.6075 9.99414L16.2857 11.3522Z", fill: "#F0B90B" }), jsx$2("path", { d: "M10.6437 9.99414L8.32183 11.3522V14.0683L6 12.7102V9.99414L8.32183 8.63609L10.6437 9.99414Z", fill: "#F0B90B" }), jsx$2("path", { d: "M6 14.6302L8.32183 15.9883V20.6244L12.3154 22.9424V25.6585L6 21.9824V14.6302Z", fill: "#F0B90B" })] }));
|
|
7137
7142
|
};
|
|
@@ -7534,6 +7539,8 @@ const Svg = (_a) => {
|
|
|
7534
7539
|
return jsx$2(Timer, Object.assign({}, props, { getStyles: getStyles }));
|
|
7535
7540
|
case icons.BLAST:
|
|
7536
7541
|
return jsx$2(BLAST, Object.assign({}, props, { getStyles: getStyles }));
|
|
7542
|
+
case icons.CROSSFI:
|
|
7543
|
+
return jsx$2(CROSSFI, Object.assign({}, props, { getStyles: getStyles }));
|
|
7537
7544
|
default:
|
|
7538
7545
|
return null;
|
|
7539
7546
|
}
|
|
@@ -18095,12 +18102,12 @@ var types = {};
|
|
|
18095
18102
|
_10,
|
|
18096
18103
|
_11,
|
|
18097
18104
|
_12,
|
|
18098
|
-
_13
|
|
18099
|
-
|
|
18105
|
+
_13,
|
|
18106
|
+
_14,
|
|
18100
18107
|
_15,
|
|
18101
18108
|
_16,
|
|
18102
|
-
_17
|
|
18103
|
-
|
|
18109
|
+
_17;
|
|
18110
|
+
var _18,
|
|
18104
18111
|
_19,
|
|
18105
18112
|
_20,
|
|
18106
18113
|
_21,
|
|
@@ -18151,7 +18158,15 @@ var types = {};
|
|
|
18151
18158
|
_66,
|
|
18152
18159
|
_67,
|
|
18153
18160
|
_68,
|
|
18154
|
-
_69
|
|
18161
|
+
_69,
|
|
18162
|
+
_70,
|
|
18163
|
+
_71,
|
|
18164
|
+
_72,
|
|
18165
|
+
_73,
|
|
18166
|
+
_74,
|
|
18167
|
+
_75,
|
|
18168
|
+
_76,
|
|
18169
|
+
_77;
|
|
18155
18170
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
18156
18171
|
exports.dexToZapMapping =
|
|
18157
18172
|
exports.defaultDexFactories =
|
|
@@ -18208,6 +18223,8 @@ var types = {};
|
|
|
18208
18223
|
ChainId[(ChainId['GRAPHLINQ'] = 614)] = 'GRAPHLINQ';
|
|
18209
18224
|
ChainId[(ChainId['AVAX'] = 43114)] = 'AVAX';
|
|
18210
18225
|
ChainId[(ChainId['BLAST'] = 81457)] = 'BLAST';
|
|
18226
|
+
ChainId[(ChainId['SINGULARITY_TESTNET'] = 751)] = 'SINGULARITY_TESTNET';
|
|
18227
|
+
ChainId[(ChainId['CROSSFI'] = 4158)] = 'CROSSFI';
|
|
18211
18228
|
})((ChainId = exports.ChainId || (exports.ChainId = {})));
|
|
18212
18229
|
var LiquidityDex
|
|
18213
18230
|
;(function (LiquidityDex) {
|
|
@@ -18253,6 +18270,10 @@ var types = {};
|
|
|
18253
18270
|
LiquidityDex['ThrusterV2_03'] = 'ThrusterV2_03';
|
|
18254
18271
|
LiquidityDex['ThrusterV2_1'] = 'ThrusterV2_1';
|
|
18255
18272
|
LiquidityDex['ThrusterV3'] = 'ThrusterV3';
|
|
18273
|
+
//SINGULARITY TESTNET
|
|
18274
|
+
LiquidityDex['Citea'] = 'Citea';
|
|
18275
|
+
//CROSSFI
|
|
18276
|
+
LiquidityDex['XSwap'] = 'XSwap';
|
|
18256
18277
|
})((LiquidityDex = exports.LiquidityDex || (exports.LiquidityDex = {})));
|
|
18257
18278
|
(function (IchiSupportedDex) {
|
|
18258
18279
|
IchiSupportedDex['Ascent'] = 'Ascent';
|
|
@@ -18563,229 +18584,262 @@ var types = {};
|
|
|
18563
18584
|
protocol: Protocols.V3,
|
|
18564
18585
|
}),
|
|
18565
18586
|
_l)),
|
|
18566
|
-
_a
|
|
18567
|
-
|
|
18568
|
-
|
|
18569
|
-
|
|
18587
|
+
(_a[ChainId.SINGULARITY_TESTNET] =
|
|
18588
|
+
((_m = {}),
|
|
18589
|
+
(_m[LiquidityDex.Citea] = {
|
|
18590
|
+
factory: '0xd8388EECE67C003eF952D32c4E3943113C5f5608',
|
|
18591
|
+
protocol: Protocols.V2,
|
|
18592
|
+
}),
|
|
18593
|
+
_m)),
|
|
18594
|
+
(_a[ChainId.CROSSFI] =
|
|
18570
18595
|
((_o = {}),
|
|
18571
|
-
(_o[
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
: _15.factory),
|
|
18576
|
-
(_o[Protocols.V3] =
|
|
18577
|
-
(_17 = (_16 = exports.dexFactories[ChainId.MAINNET]) === null || _16 === void 0 ? void 0 : _16.UniswapV3) ===
|
|
18578
|
-
null || _17 === void 0
|
|
18579
|
-
? void 0
|
|
18580
|
-
: _17.factory),
|
|
18596
|
+
(_o[LiquidityDex.XSwap] = {
|
|
18597
|
+
factory: '0x3ca837175312070f4E4fF64972a199122Ee03805',
|
|
18598
|
+
protocol: Protocols.V2,
|
|
18599
|
+
}),
|
|
18581
18600
|
_o)),
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18601
|
+
_a);
|
|
18602
|
+
exports.defaultDexFactories =
|
|
18603
|
+
((_p = {}),
|
|
18604
|
+
(_p[ChainId.MAINNET] =
|
|
18605
|
+
((_q = {}),
|
|
18606
|
+
(_q[Protocols.V2] =
|
|
18607
|
+
(_19 = (_18 = exports.dexFactories[ChainId.MAINNET]) === null || _18 === void 0 ? void 0 : _18.ApeSwapV2) ===
|
|
18608
|
+
null || _19 === void 0
|
|
18587
18609
|
? void 0
|
|
18588
18610
|
: _19.factory),
|
|
18589
|
-
(
|
|
18590
|
-
(_21 = (_20 = exports.dexFactories[ChainId.
|
|
18591
|
-
|
|
18611
|
+
(_q[Protocols.V3] =
|
|
18612
|
+
(_21 = (_20 = exports.dexFactories[ChainId.MAINNET]) === null || _20 === void 0 ? void 0 : _20.UniswapV3) ===
|
|
18613
|
+
null || _21 === void 0
|
|
18592
18614
|
? void 0
|
|
18593
18615
|
: _21.factory),
|
|
18594
|
-
|
|
18595
|
-
|
|
18616
|
+
_q)),
|
|
18617
|
+
(_p[ChainId.BSC] =
|
|
18618
|
+
((_r = {}),
|
|
18619
|
+
(_r[Protocols.V2] =
|
|
18620
|
+
(_23 = (_22 = exports.dexFactories[ChainId.BSC]) === null || _22 === void 0 ? void 0 : _22.ApeSwapV2) === null ||
|
|
18596
18621
|
_23 === void 0
|
|
18597
18622
|
? void 0
|
|
18598
18623
|
: _23.factory),
|
|
18599
|
-
(
|
|
18600
|
-
(_25 = (_24 = exports.dexFactories[ChainId.BSC]) === null || _24 === void 0 ? void 0 : _24.
|
|
18624
|
+
(_r[Protocols.V3] =
|
|
18625
|
+
(_25 = (_24 = exports.dexFactories[ChainId.BSC]) === null || _24 === void 0 ? void 0 : _24.UniswapV3) === null ||
|
|
18601
18626
|
_25 === void 0
|
|
18602
18627
|
? void 0
|
|
18603
18628
|
: _25.factory),
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
(_q[Protocols.V2] =
|
|
18608
|
-
(_27 = (_26 = exports.dexFactories[ChainId.MATIC]) === null || _26 === void 0 ? void 0 : _26.ApeSwapV2) ===
|
|
18609
|
-
null || _27 === void 0
|
|
18629
|
+
(_r[Protocols.Algebra] =
|
|
18630
|
+
(_27 = (_26 = exports.dexFactories[ChainId.BSC]) === null || _26 === void 0 ? void 0 : _26.Algebra) === null ||
|
|
18631
|
+
_27 === void 0
|
|
18610
18632
|
? void 0
|
|
18611
18633
|
: _27.factory),
|
|
18612
|
-
(
|
|
18613
|
-
(_29 = (_28 = exports.dexFactories[ChainId.
|
|
18614
|
-
|
|
18634
|
+
(_r[Protocols.Solidly] =
|
|
18635
|
+
(_29 = (_28 = exports.dexFactories[ChainId.BSC]) === null || _28 === void 0 ? void 0 : _28.ThenaV1) === null ||
|
|
18636
|
+
_29 === void 0
|
|
18615
18637
|
? void 0
|
|
18616
18638
|
: _29.factory),
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18639
|
+
_r)),
|
|
18640
|
+
(_p[ChainId.MATIC] =
|
|
18641
|
+
((_s = {}),
|
|
18642
|
+
(_s[Protocols.V2] =
|
|
18643
|
+
(_31 = (_30 = exports.dexFactories[ChainId.MATIC]) === null || _30 === void 0 ? void 0 : _30.ApeSwapV2) ===
|
|
18644
|
+
null || _31 === void 0
|
|
18620
18645
|
? void 0
|
|
18621
18646
|
: _31.factory),
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
((_r = {}),
|
|
18625
|
-
(_r[Protocols.V2] =
|
|
18626
|
-
(_33 = (_32 = exports.dexFactories[ChainId.ARBITRUM]) === null || _32 === void 0 ? void 0 : _32.ApeSwapV2) ===
|
|
18647
|
+
(_s[Protocols.V3] =
|
|
18648
|
+
(_33 = (_32 = exports.dexFactories[ChainId.MATIC]) === null || _32 === void 0 ? void 0 : _32.UniswapV3) ===
|
|
18627
18649
|
null || _33 === void 0
|
|
18628
18650
|
? void 0
|
|
18629
18651
|
: _33.factory),
|
|
18630
|
-
(
|
|
18631
|
-
(_35 = (_34 = exports.dexFactories[ChainId.
|
|
18632
|
-
|
|
18652
|
+
(_s[Protocols.Algebra] =
|
|
18653
|
+
(_35 = (_34 = exports.dexFactories[ChainId.MATIC]) === null || _34 === void 0 ? void 0 : _34.Algebra) === null ||
|
|
18654
|
+
_35 === void 0
|
|
18633
18655
|
? void 0
|
|
18634
18656
|
: _35.factory),
|
|
18635
|
-
|
|
18636
|
-
|
|
18657
|
+
_s)),
|
|
18658
|
+
(_p[ChainId.ARBITRUM] =
|
|
18659
|
+
((_t = {}),
|
|
18660
|
+
(_t[Protocols.V2] =
|
|
18661
|
+
(_37 = (_36 = exports.dexFactories[ChainId.ARBITRUM]) === null || _36 === void 0 ? void 0 : _36.ApeSwapV2) ===
|
|
18637
18662
|
null || _37 === void 0
|
|
18638
18663
|
? void 0
|
|
18639
18664
|
: _37.factory),
|
|
18640
|
-
(
|
|
18641
|
-
(_39 = (_38 = exports.dexFactories[ChainId.ARBITRUM]) === null || _38 === void 0 ? void 0 : _38.
|
|
18642
|
-
|
|
18665
|
+
(_t[Protocols.V3] =
|
|
18666
|
+
(_39 = (_38 = exports.dexFactories[ChainId.ARBITRUM]) === null || _38 === void 0 ? void 0 : _38.UniswapV3) ===
|
|
18667
|
+
null || _39 === void 0
|
|
18643
18668
|
? void 0
|
|
18644
18669
|
: _39.factory),
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
((_s = {}),
|
|
18648
|
-
(_s[Protocols.V2] =
|
|
18649
|
-
(_41 = (_40 = exports.dexFactories[ChainId.LINEA]) === null || _40 === void 0 ? void 0 : _40.Spartadex) ===
|
|
18670
|
+
(_t[Protocols.Algebra] =
|
|
18671
|
+
(_41 = (_40 = exports.dexFactories[ChainId.ARBITRUM]) === null || _40 === void 0 ? void 0 : _40.Algebra) ===
|
|
18650
18672
|
null || _41 === void 0
|
|
18651
18673
|
? void 0
|
|
18652
18674
|
: _41.factory),
|
|
18653
|
-
(
|
|
18654
|
-
(_43 = (_42 = exports.dexFactories[ChainId.
|
|
18675
|
+
(_t[Protocols.Curve] =
|
|
18676
|
+
(_43 = (_42 = exports.dexFactories[ChainId.ARBITRUM]) === null || _42 === void 0 ? void 0 : _42.Curve) === null ||
|
|
18655
18677
|
_43 === void 0
|
|
18656
18678
|
? void 0
|
|
18657
18679
|
: _43.factory),
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18680
|
+
_t)),
|
|
18681
|
+
(_p[ChainId.LINEA] =
|
|
18682
|
+
((_u = {}),
|
|
18683
|
+
(_u[Protocols.V2] =
|
|
18684
|
+
(_45 = (_44 = exports.dexFactories[ChainId.LINEA]) === null || _44 === void 0 ? void 0 : _44.Spartadex) ===
|
|
18685
|
+
null || _45 === void 0
|
|
18661
18686
|
? void 0
|
|
18662
18687
|
: _45.factory),
|
|
18663
|
-
(
|
|
18664
|
-
(_47 = (_46 = exports.dexFactories[ChainId.LINEA]) === null || _46 === void 0 ? void 0 : _46.
|
|
18688
|
+
(_u[Protocols.V3] =
|
|
18689
|
+
(_47 = (_46 = exports.dexFactories[ChainId.LINEA]) === null || _46 === void 0 ? void 0 : _46.Nile) === null ||
|
|
18665
18690
|
_47 === void 0
|
|
18666
18691
|
? void 0
|
|
18667
18692
|
: _47.factory),
|
|
18668
|
-
(
|
|
18669
|
-
(_49 = (_48 = exports.dexFactories[ChainId.LINEA]) === null || _48 === void 0 ? void 0 : _48.
|
|
18693
|
+
(_u[Protocols.Algebra] =
|
|
18694
|
+
(_49 = (_48 = exports.dexFactories[ChainId.LINEA]) === null || _48 === void 0 ? void 0 : _48.Algebra) === null ||
|
|
18670
18695
|
_49 === void 0
|
|
18671
18696
|
? void 0
|
|
18672
18697
|
: _49.factory),
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
(_t[Protocols.V3] =
|
|
18677
|
-
(_51 = (_50 = exports.dexFactories[ChainId.LIGHTLINK]) === null || _50 === void 0 ? void 0 : _50.Elektrik) ===
|
|
18678
|
-
null || _51 === void 0
|
|
18698
|
+
(_u[Protocols.Solidly] =
|
|
18699
|
+
(_51 = (_50 = exports.dexFactories[ChainId.LINEA]) === null || _50 === void 0 ? void 0 : _50.Lynex) === null ||
|
|
18700
|
+
_51 === void 0
|
|
18679
18701
|
? void 0
|
|
18680
18702
|
: _51.factory),
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
((_u = {}),
|
|
18684
|
-
(_u[Protocols.V2] =
|
|
18685
|
-
(_53 = (_52 = exports.dexFactories[ChainId.BASE]) === null || _52 === void 0 ? void 0 : _52.SmarDex) === null ||
|
|
18703
|
+
(_u[Protocols.XFAI] =
|
|
18704
|
+
(_53 = (_52 = exports.dexFactories[ChainId.LINEA]) === null || _52 === void 0 ? void 0 : _52.XFAI) === null ||
|
|
18686
18705
|
_53 === void 0
|
|
18687
18706
|
? void 0
|
|
18688
18707
|
: _53.factory),
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18708
|
+
_u)),
|
|
18709
|
+
(_p[ChainId.LIGHTLINK] =
|
|
18710
|
+
((_v = {}),
|
|
18711
|
+
(_v[Protocols.V3] =
|
|
18712
|
+
(_55 = (_54 = exports.dexFactories[ChainId.LIGHTLINK]) === null || _54 === void 0 ? void 0 : _54.Elektrik) ===
|
|
18713
|
+
null || _55 === void 0
|
|
18692
18714
|
? void 0
|
|
18693
18715
|
: _55.factory),
|
|
18694
|
-
|
|
18695
|
-
|
|
18716
|
+
_v)),
|
|
18717
|
+
(_p[ChainId.BASE] =
|
|
18718
|
+
((_w = {}),
|
|
18719
|
+
(_w[Protocols.V2] =
|
|
18720
|
+
(_57 = (_56 = exports.dexFactories[ChainId.BASE]) === null || _56 === void 0 ? void 0 : _56.SmarDex) === null ||
|
|
18696
18721
|
_57 === void 0
|
|
18697
18722
|
? void 0
|
|
18698
18723
|
: _57.factory),
|
|
18699
|
-
(
|
|
18700
|
-
(_59 = (_58 = exports.dexFactories[ChainId.BASE]) === null || _58 === void 0 ? void 0 : _58.
|
|
18724
|
+
(_w[Protocols.V3] =
|
|
18725
|
+
(_59 = (_58 = exports.dexFactories[ChainId.BASE]) === null || _58 === void 0 ? void 0 : _58.UniswapV3) === null ||
|
|
18701
18726
|
_59 === void 0
|
|
18702
18727
|
? void 0
|
|
18703
18728
|
: _59.factory),
|
|
18704
|
-
|
|
18705
|
-
|
|
18706
|
-
((_v = {}),
|
|
18707
|
-
(_v[Protocols.V2] =
|
|
18708
|
-
(_61 = (_60 = exports.dexFactories[ChainId.IOTA]) === null || _60 === void 0 ? void 0 : _60.MagicSea) === null ||
|
|
18729
|
+
(_w[Protocols.Algebra] =
|
|
18730
|
+
(_61 = (_60 = exports.dexFactories[ChainId.BASE]) === null || _60 === void 0 ? void 0 : _60.Algebra) === null ||
|
|
18709
18731
|
_61 === void 0
|
|
18710
18732
|
? void 0
|
|
18711
18733
|
: _61.factory),
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
((_w = {}),
|
|
18715
|
-
(_w[Protocols.V2] =
|
|
18716
|
-
(_63 = (_62 = exports.dexFactories[ChainId.AVAX]) === null || _62 === void 0 ? void 0 : _62.LFJ) === null ||
|
|
18734
|
+
(_w[Protocols.Solidly] =
|
|
18735
|
+
(_63 = (_62 = exports.dexFactories[ChainId.BASE]) === null || _62 === void 0 ? void 0 : _62.Aerodrome) === null ||
|
|
18717
18736
|
_63 === void 0
|
|
18718
18737
|
? void 0
|
|
18719
18738
|
: _63.factory),
|
|
18720
|
-
(_w[Protocols.V3] =
|
|
18721
|
-
(_65 = (_64 = exports.dexFactories[ChainId.AVAX]) === null || _64 === void 0 ? void 0 : _64.Pharaoh) === null ||
|
|
18722
|
-
_65 === void 0
|
|
18723
|
-
? void 0
|
|
18724
|
-
: _65.factory),
|
|
18725
18739
|
_w)),
|
|
18726
|
-
(
|
|
18740
|
+
(_p[ChainId.IOTA] =
|
|
18727
18741
|
((_x = {}),
|
|
18728
18742
|
(_x[Protocols.V2] =
|
|
18729
|
-
(
|
|
18730
|
-
|
|
18743
|
+
(_65 = (_64 = exports.dexFactories[ChainId.IOTA]) === null || _64 === void 0 ? void 0 : _64.MagicSea) === null ||
|
|
18744
|
+
_65 === void 0
|
|
18745
|
+
? void 0
|
|
18746
|
+
: _65.factory),
|
|
18747
|
+
_x)),
|
|
18748
|
+
(_p[ChainId.AVAX] =
|
|
18749
|
+
((_y = {}),
|
|
18750
|
+
(_y[Protocols.V2] =
|
|
18751
|
+
(_67 = (_66 = exports.dexFactories[ChainId.AVAX]) === null || _66 === void 0 ? void 0 : _66.LFJ) === null ||
|
|
18752
|
+
_67 === void 0
|
|
18731
18753
|
? void 0
|
|
18732
18754
|
: _67.factory),
|
|
18733
|
-
(
|
|
18734
|
-
(_69 = (_68 = exports.dexFactories[ChainId.
|
|
18735
|
-
|
|
18755
|
+
(_y[Protocols.V3] =
|
|
18756
|
+
(_69 = (_68 = exports.dexFactories[ChainId.AVAX]) === null || _68 === void 0 ? void 0 : _68.Pharaoh) === null ||
|
|
18757
|
+
_69 === void 0
|
|
18736
18758
|
? void 0
|
|
18737
18759
|
: _69.factory),
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
exports.dexToZapMapping =
|
|
18741
|
-
((_y = {}),
|
|
18742
|
-
(_y[LiquidityDex.ApeSwapV2] =
|
|
18760
|
+
_y)),
|
|
18761
|
+
(_p[ChainId.BLAST] =
|
|
18743
18762
|
((_z = {}),
|
|
18744
|
-
(_z[
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
(_z[
|
|
18750
|
-
|
|
18763
|
+
(_z[Protocols.V2] =
|
|
18764
|
+
(_71 = (_70 = exports.dexFactories[ChainId.BLAST]) === null || _70 === void 0 ? void 0 : _70.ThrusterV2_03) ===
|
|
18765
|
+
null || _71 === void 0
|
|
18766
|
+
? void 0
|
|
18767
|
+
: _71.factory),
|
|
18768
|
+
(_z[Protocols.V3] =
|
|
18769
|
+
(_73 = (_72 = exports.dexFactories[ChainId.BLAST]) === null || _72 === void 0 ? void 0 : _72.ThrusterV3) ===
|
|
18770
|
+
null || _73 === void 0
|
|
18771
|
+
? void 0
|
|
18772
|
+
: _73.factory),
|
|
18751
18773
|
_z)),
|
|
18752
|
-
(
|
|
18774
|
+
(_p[ChainId.SINGULARITY_TESTNET] =
|
|
18753
18775
|
((_0 = {}),
|
|
18754
|
-
(_0[
|
|
18755
|
-
|
|
18756
|
-
|
|
18776
|
+
(_0[Protocols.V2] =
|
|
18777
|
+
(_75 =
|
|
18778
|
+
(_74 = exports.dexFactories[ChainId.SINGULARITY_TESTNET]) === null || _74 === void 0 ? void 0 : _74.Citea) ===
|
|
18779
|
+
null || _75 === void 0
|
|
18780
|
+
? void 0
|
|
18781
|
+
: _75.factory),
|
|
18757
18782
|
_0)),
|
|
18758
|
-
(
|
|
18759
|
-
((_1 = {}),
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
(
|
|
18769
|
-
(
|
|
18770
|
-
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
(
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
(
|
|
18786
|
-
|
|
18787
|
-
(
|
|
18788
|
-
|
|
18783
|
+
(_p[ChainId.CROSSFI] =
|
|
18784
|
+
((_1 = {}),
|
|
18785
|
+
(_1[Protocols.V2] =
|
|
18786
|
+
(_77 = (_76 = exports.dexFactories[ChainId.CROSSFI]) === null || _76 === void 0 ? void 0 : _76.XSwap) === null ||
|
|
18787
|
+
_77 === void 0
|
|
18788
|
+
? void 0
|
|
18789
|
+
: _77.factory),
|
|
18790
|
+
_1)),
|
|
18791
|
+
_p);
|
|
18792
|
+
exports.dexToZapMapping =
|
|
18793
|
+
((_2 = {}),
|
|
18794
|
+
(_2[LiquidityDex.ApeSwapV2] =
|
|
18795
|
+
((_3 = {}),
|
|
18796
|
+
(_3[ChainId.BSC] = ZapVersion.SoulZap),
|
|
18797
|
+
(_3[ChainId.BSC_TESTNET] = ZapVersion.ZapV1),
|
|
18798
|
+
(_3[ChainId.MATIC] = ZapVersion.ZapV1),
|
|
18799
|
+
(_3[ChainId.MATIC_TESTNET] = ZapVersion.ZapV1),
|
|
18800
|
+
(_3[ChainId.MAINNET] = ZapVersion.ZapV1),
|
|
18801
|
+
(_3[ChainId.ARBITRUM] = ZapVersion.External),
|
|
18802
|
+
(_3[ChainId.TLOS] = ZapVersion.ZapV1),
|
|
18803
|
+
_3)),
|
|
18804
|
+
(_2[LiquidityDex.Algebra] =
|
|
18805
|
+
((_4 = {}),
|
|
18806
|
+
(_4[ChainId.BSC] = ZapVersion.SoulZapApi),
|
|
18807
|
+
(_4[ChainId.MATIC] = ZapVersion.SoulZapApi),
|
|
18808
|
+
(_4[ChainId.LINEA] = ZapVersion.SoulZapApi),
|
|
18809
|
+
_4)),
|
|
18810
|
+
(_2[LiquidityDex.PancakeSwapV2] =
|
|
18811
|
+
((_5 = {}), (_5[ChainId.BSC] = ZapVersion.SoulZap), (_5[ChainId.MAINNET] = ZapVersion.External), _5)),
|
|
18812
|
+
(_2[LiquidityDex.QuickswapV2] = ((_6 = {}), (_6[ChainId.MATIC] = ZapVersion.SoulZap), _6)),
|
|
18813
|
+
(_2[LiquidityDex.ApeSwapV3] = {}),
|
|
18814
|
+
(_2[LiquidityDex.UniswapV3] =
|
|
18815
|
+
((_7 = {}), (_7[ChainId.ARBITRUM] = ZapVersion.SoulZapApi), (_7[ChainId.MATIC] = ZapVersion.SoulZapApi), _7)),
|
|
18816
|
+
(_2[LiquidityDex.ThenaV1] = ((_8 = {}), (_8[ChainId.BSC] = ZapVersion.SoulZapApi), _8)),
|
|
18817
|
+
(_2[LiquidityDex.UniswapV2] = ((_9 = {}), (_9[ChainId.BASE] = ZapVersion.SoulZapApi), _9)),
|
|
18818
|
+
(_2[LiquidityDex.PancakeSwapV3] = {}),
|
|
18819
|
+
(_2[LiquidityDex.External] = {}),
|
|
18820
|
+
(_2[LiquidityDex.Spartadex] = {}),
|
|
18821
|
+
(_2[LiquidityDex.Nile] = {}),
|
|
18822
|
+
(_2[LiquidityDex.XFAI] = {}),
|
|
18823
|
+
(_2[LiquidityDex.Lynex] = {}),
|
|
18824
|
+
(_2[LiquidityDex.Metavault] = {}),
|
|
18825
|
+
(_2[LiquidityDex.Elektrik] = {}),
|
|
18826
|
+
(_2[LiquidityDex.SushiSwapV3] = {}),
|
|
18827
|
+
(_2[LiquidityDex.Synthswap] = {}),
|
|
18828
|
+
(_2[LiquidityDex.Aerodrome] = ((_10 = {}), (_10[ChainId.BASE] = ZapVersion.SoulZapApi), _10)),
|
|
18829
|
+
(_2[LiquidityDex.SmarDex] = {}),
|
|
18830
|
+
(_2[LiquidityDex.MagicSea] = ((_11 = {}), (_11[ChainId.IOTA] = ZapVersion.External), _11)),
|
|
18831
|
+
(_2[LiquidityDex.Wagmi] = ((_12 = {}), (_12[ChainId.IOTA] = ZapVersion.External), _12)),
|
|
18832
|
+
(_2[LiquidityDex.CamelotV2] = ((_13 = {}), (_13[ChainId.ARBITRUM] = ZapVersion.SoulZapApi), _13)),
|
|
18833
|
+
(_2[LiquidityDex.LFJ] = ((_14 = {}), (_14[ChainId.AVAX] = ZapVersion.SoulZapApi), _14)),
|
|
18834
|
+
(_2[LiquidityDex.Pharaoh] = {}),
|
|
18835
|
+
(_2[LiquidityDex.Pangolin] = ((_15 = {}), (_15[ChainId.AVAX] = ZapVersion.SoulZapApi), _15)),
|
|
18836
|
+
(_2[LiquidityDex.Curve] = {}),
|
|
18837
|
+
(_2[LiquidityDex.ThrusterV2_03] = ((_16 = {}), (_16[ChainId.BLAST] = ZapVersion.SoulZapApi), _16)),
|
|
18838
|
+
(_2[LiquidityDex.ThrusterV2_1] = ((_17 = {}), (_17[ChainId.BLAST] = ZapVersion.SoulZapApi), _17)),
|
|
18839
|
+
(_2[LiquidityDex.ThrusterV3] = {}),
|
|
18840
|
+
(_2[LiquidityDex.Citea] = {}),
|
|
18841
|
+
(_2[LiquidityDex.XSwap] = {}),
|
|
18842
|
+
_2);
|
|
18789
18843
|
|
|
18790
18844
|
} (types));
|
|
18791
18845
|
|
|
@@ -18803,6 +18857,7 @@ const MAINNET_CHAINS = [
|
|
|
18803
18857
|
types.ChainId.GRAPHLINQ,
|
|
18804
18858
|
types.ChainId.AVAX,
|
|
18805
18859
|
types.ChainId.BLAST,
|
|
18860
|
+
types.ChainId.CROSSFI,
|
|
18806
18861
|
];
|
|
18807
18862
|
// Network Icons
|
|
18808
18863
|
const NETWORK_ICONS = {
|
|
@@ -18820,6 +18875,7 @@ const NETWORK_ICONS = {
|
|
|
18820
18875
|
[types.ChainId.GRAPHLINQ]: icons.GRAPHLINQ,
|
|
18821
18876
|
[types.ChainId.AVAX]: icons.AVAX_TOKEN,
|
|
18822
18877
|
[types.ChainId.BLAST]: icons.BLAST,
|
|
18878
|
+
[types.ChainId.CROSSFI]: icons.CROSSFI,
|
|
18823
18879
|
};
|
|
18824
18880
|
// Network labels
|
|
18825
18881
|
const NETWORK_LABEL = {
|
|
@@ -18839,6 +18895,7 @@ const NETWORK_LABEL = {
|
|
|
18839
18895
|
[types.ChainId.GRAPHLINQ]: 'GraphLinq',
|
|
18840
18896
|
[types.ChainId.AVAX]: 'Avalanche',
|
|
18841
18897
|
[types.ChainId.BLAST]: 'Blast',
|
|
18898
|
+
[types.ChainId.CROSSFI]: 'Crossfi',
|
|
18842
18899
|
};
|
|
18843
18900
|
// Network block explorers
|
|
18844
18901
|
const BLOCK_EXPLORER = {
|
|
@@ -18858,6 +18915,7 @@ const BLOCK_EXPLORER = {
|
|
|
18858
18915
|
[types.ChainId.GRAPHLINQ]: 'https://graphlinq.dex.guru',
|
|
18859
18916
|
[types.ChainId.AVAX]: 'https://snowscan.xyz',
|
|
18860
18917
|
[types.ChainId.BLAST]: 'https://blastscan.io',
|
|
18918
|
+
[types.ChainId.CROSSFI]: 'https://xfiscan.com',
|
|
18861
18919
|
};
|
|
18862
18920
|
|
|
18863
18921
|
const supportedByLIFI = [
|
|
@@ -19069,6 +19127,7 @@ const NETWORK_COLORS = {
|
|
|
19069
19127
|
[types.ChainId.GRAPHLINQ]: '#ded2ff',
|
|
19070
19128
|
[types.ChainId.AVAX]: '#e74344',
|
|
19071
19129
|
[types.ChainId.BLAST]: '#fcfc03',
|
|
19130
|
+
[types.ChainId.CROSSFI]: '#7c8084',
|
|
19072
19131
|
};
|
|
19073
19132
|
const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
|
|
19074
19133
|
var _a, _b, _c, _d, _e;
|
|
@@ -22196,17 +22255,15 @@ function formatUSDNumber(input) {
|
|
|
22196
22255
|
if (number.isNaN())
|
|
22197
22256
|
return '0';
|
|
22198
22257
|
// If the number is greater than 0 but less than 0.01
|
|
22199
|
-
|
|
22200
|
-
|
|
22201
|
-
|
|
22202
|
-
// }
|
|
22258
|
+
if (number.gt(0) && number.lt(0.01)) {
|
|
22259
|
+
return '< 0.01';
|
|
22260
|
+
}
|
|
22203
22261
|
// If the number is greater than 1k, round to no decimals.
|
|
22204
22262
|
if (number.gt(1000)) {
|
|
22205
22263
|
return number.toNumber().toLocaleString('en-US', { maximumFractionDigits: 0 });
|
|
22206
22264
|
}
|
|
22207
22265
|
// Note: Between 1k and 0.01 show 2 decimals
|
|
22208
|
-
|
|
22209
|
-
return parseFloat(number.toFixed(6)).toLocaleString('en-US');
|
|
22266
|
+
return parseFloat(number.toFixed(2)).toLocaleString('en-US');
|
|
22210
22267
|
}
|
|
22211
22268
|
const youSpend = (inputValue) => formatNumber$2(inputValue);
|
|
22212
22269
|
const youSpendUSD = (bond, inputValue) => {
|
|
@@ -22249,7 +22306,7 @@ const getFeeAmount = (bond, inputValue) => {
|
|
|
22249
22306
|
var _a;
|
|
22250
22307
|
const fee = bond === null || bond === void 0 ? void 0 : bond.feeInPayout;
|
|
22251
22308
|
if (!bond || !inputValue || !fee)
|
|
22252
|
-
return
|
|
22309
|
+
return 0;
|
|
22253
22310
|
const billValue = new BigNumber$1(inputValue).times(new BigNumber$1(10).pow(18));
|
|
22254
22311
|
const feeAmount = billValue.div(new BigNumber$1((_a = bond.trueBillPrice) !== null && _a !== void 0 ? _a : 0).div(fee / 100));
|
|
22255
22312
|
return feeAmount.toNumber();
|
|
@@ -32460,6 +32517,7 @@ const PRICE_GETTER_ADDRESSES = {
|
|
|
32460
32517
|
[types.ChainId.BASE]: '0xE29C74B4DD05A268B5FFaadeF4fdbAa1de6FDe84', // Price getter V3
|
|
32461
32518
|
[types.ChainId.BLAST]: '0x218EB9ACDC721E235969A30f5DA46FB1224Fa7A7', // Price getter V3
|
|
32462
32519
|
[types.ChainId.AVAX]: '0x01dadaa586D30d93Ac92C79A5Cb02a8F276a8B4F', // Price getter V3
|
|
32520
|
+
[types.ChainId.CROSSFI]: '0xC22Db8dDe3A3591fFB02be868Ce2901d30671FE4', // Price getter V3
|
|
32463
32521
|
};
|
|
32464
32522
|
const MULTICALL_V2 = {
|
|
32465
32523
|
[types.ChainId.BSC]: '0x38ce767d81de3940CFa5020B55af1A400ED4F657',
|
|
@@ -32477,6 +32535,7 @@ const MULTICALL_V2 = {
|
|
|
32477
32535
|
[types.ChainId.GRAPHLINQ]: '0xCc88b233BbcE04c064C627ad5627da6e24a8A067',
|
|
32478
32536
|
[types.ChainId.AVAX]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
32479
32537
|
[types.ChainId.BLAST]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
32538
|
+
[types.ChainId.CROSSFI]: '0x007bAC6A07894A69fBcA94ED6274005093E1c44E',
|
|
32480
32539
|
};
|
|
32481
32540
|
const SoulZapTokenManager = {
|
|
32482
32541
|
[types.ChainId.MAINNET]: '0x2F87f76336A560bbB0d18d357D10646bB96E8802',
|
|
@@ -68286,6 +68345,7 @@ const PUBLIC_RPC_URLS = {
|
|
|
68286
68345
|
[types.ChainId.GRAPHLINQ]: ['https://glq-dataseed.graphlinq.io'],
|
|
68287
68346
|
[types.ChainId.AVAX]: ['https://avax.meowrpc.com'],
|
|
68288
68347
|
[types.ChainId.BLAST]: ['https://rpc.blast.io'],
|
|
68348
|
+
[types.ChainId.CROSSFI]: ['https://rpc.mainnet.ms'],
|
|
68289
68349
|
};
|
|
68290
68350
|
|
|
68291
68351
|
// This is the legacy multicall
|
|
@@ -71728,7 +71788,7 @@ function useBondsData() {
|
|
|
71728
71788
|
return useQuery({
|
|
71729
71789
|
queryKey: [QUERY_KEYS.BONDS_DATA],
|
|
71730
71790
|
queryFn: () => getBondsData(realTimeApiURL, tokenPrices, bondList),
|
|
71731
|
-
refetchInterval:
|
|
71791
|
+
refetchInterval: 20000, // i.e. 20 sec
|
|
71732
71792
|
refetchOnWindowFocus: false,
|
|
71733
71793
|
retry: 1,
|
|
71734
71794
|
initialData: [],
|
|
@@ -71740,6 +71800,7 @@ const getBondsData = (realTimeApiURL, tokenPrices, bondList) => __awaiter$9(void
|
|
|
71740
71800
|
return response.data.bonds;
|
|
71741
71801
|
}
|
|
71742
71802
|
catch (_a) {
|
|
71803
|
+
console.time('Fallback'); // Start debug timer
|
|
71743
71804
|
const billData = [];
|
|
71744
71805
|
if (tokenPrices && bondList) {
|
|
71745
71806
|
yield Promise.all(MAINNET_CHAINS.map((chainId) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
@@ -71754,6 +71815,7 @@ const getBondsData = (realTimeApiURL, tokenPrices, bondList) => __awaiter$9(void
|
|
|
71754
71815
|
billData.push(returnedBills);
|
|
71755
71816
|
})));
|
|
71756
71817
|
}
|
|
71818
|
+
console.timeEnd(`Fallback`); // End chain-specific timer
|
|
71757
71819
|
return billData === null || billData === void 0 ? void 0 : billData.flat();
|
|
71758
71820
|
}
|
|
71759
71821
|
});
|
|
@@ -73487,17 +73549,18 @@ const BondCards = ({ bondData }) => {
|
|
|
73487
73549
|
};
|
|
73488
73550
|
|
|
73489
73551
|
const Estimations = ({ bondData, inputValue, inputToken, depositAmount, inputTokenPrice, isZap, fetchingZapQuote, zapError, }) => {
|
|
73490
|
-
var _a, _b, _c, _d;
|
|
73552
|
+
var _a, _b, _c, _d, _e;
|
|
73491
73553
|
const rawPayoutAmount = getRawPayoutAmount(bondData, depositAmount);
|
|
73492
73554
|
// Estimations
|
|
73493
73555
|
const rawEstimatedOutputUSD = rawPayoutAmount * parseFloat((_a = bondData === null || bondData === void 0 ? void 0 : bondData.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0');
|
|
73494
73556
|
const estimatedInputUSD = parseFloat(inputValue) * (inputTokenPrice !== null && inputTokenPrice !== void 0 ? inputTokenPrice : 0);
|
|
73495
73557
|
const rawBonus = getRawBonus(bondData, depositAmount);
|
|
73496
73558
|
const bonusString = isZap ? (rawEstimatedOutputUSD - estimatedInputUSD).toString() : rawBonus;
|
|
73497
|
-
const
|
|
73559
|
+
const fee = getFeeAmount(bondData, depositAmount);
|
|
73560
|
+
const feeUSD = fee * parseFloat((_b = bondData === null || bondData === void 0 ? void 0 : bondData.payoutTokenPrice) !== null && _b !== void 0 ? _b : '0');
|
|
73498
73561
|
const estimatedOutputAmount = getPayoutAmount(bondData, depositAmount);
|
|
73499
|
-
const estimatedOutputUSD = estimatedOutputAmount * parseFloat((
|
|
73500
|
-
return (jsxs(Flex, { className: "modaltable-container text-container", children: [jsxs(Flex, { className: "text-container row", children: [jsx$2(Flex, { className: "row-container spend", children: "You Spend:" }), jsxs(Flex, { className: "row-container spend-val", children: [youSpend(inputValue), " ", getSymbol(inputToken, bondData.chainId), " = $", ' ', formatUSDNumber(estimatedInputUSD === null || estimatedInputUSD === void 0 ? void 0 : estimatedInputUSD.toString())] })] }), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: ["Bonus:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Premium }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val ${getBonusColor(bonusString)}`, children: ["$ ", bonusString] }))] }), bondData.feeInPayout && (jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: ["Fee:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Fee }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { className: `row-container premium-val`, children: ["$ ", feeUSD] })] })), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container get", children: ["You Get (over ", vestingTime(((
|
|
73562
|
+
const estimatedOutputUSD = estimatedOutputAmount * parseFloat((_c = bondData === null || bondData === void 0 ? void 0 : bondData.payoutTokenPrice) !== null && _c !== void 0 ? _c : '0');
|
|
73563
|
+
return (jsxs(Flex, { className: "modaltable-container text-container", children: [jsxs(Flex, { className: "text-container row", children: [jsx$2(Flex, { className: "row-container spend", children: "You Spend:" }), jsxs(Flex, { className: "row-container spend-val", children: [youSpend(inputValue), " ", getSymbol(inputToken, bondData.chainId), " = $", ' ', formatUSDNumber(estimatedInputUSD === null || estimatedInputUSD === void 0 ? void 0 : estimatedInputUSD.toString())] })] }), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: ["Bonus:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Premium }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val ${getBonusColor(bonusString)}`, children: ["$ ", formatUSDNumber(bonusString)] }))] }), bondData.feeInPayout && (jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: ["Fee:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Fee }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { className: `row-container premium-val`, children: ["$ ", formatUSDNumber(feeUSD.toString())] })] })), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container get", children: ["You Get (over ", vestingTime(((_d = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _d !== void 0 ? _d : 0) - ((_e = bondData.vestingCliff) !== null && _e !== void 0 ? _e : 0)).days, " days):"] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: "row-container get-val", children: [formatNumber$2(estimatedOutputAmount.toString()), " ", bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, " = $", ' ', formatUSDNumber(estimatedOutputUSD.toString())] }))] })] }));
|
|
73501
73564
|
};
|
|
73502
73565
|
|
|
73503
73566
|
// Custom HTML sanitizer
|
|
@@ -74274,7 +74337,7 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
|
|
|
74274
74337
|
};
|
|
74275
74338
|
const openExternal = () => {
|
|
74276
74339
|
if ((bondData === null || bondData === void 0 ? void 0 : bondData.chainId) === types.ChainId.LIGHTLINK) {
|
|
74277
|
-
window.open('https://
|
|
74340
|
+
window.open('https://app.elektrik.network/#/swap', '_blank');
|
|
74278
74341
|
}
|
|
74279
74342
|
if ((bondData === null || bondData === void 0 ? void 0 : bondData.chainId) === types.ChainId.GRAPHLINQ) {
|
|
74280
74343
|
window.open('https://hub.graphlinq.io/swap', '_blank');
|
|
@@ -74695,7 +74758,11 @@ const BondRowsByChain = ({ bonds, hideTitles, isCampaign = false }) => {
|
|
|
74695
74758
|
const SDKConfig = useSDKConfig();
|
|
74696
74759
|
const validatedChains = (_a = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains) === null || _a === void 0 ? void 0 : _a.filter((chain) => MAINNET_CHAINS.includes(chain));
|
|
74697
74760
|
return (jsx$2(Flex$1, { className: "bondrowsbychain", children: validatedChains === null || validatedChains === void 0 ? void 0 : validatedChains.map((chain) => {
|
|
74698
|
-
return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: hideTitles
|
|
74761
|
+
return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: hideTitles
|
|
74762
|
+
? false
|
|
74763
|
+
: !isCampaign && SDKConfig.useHotBonds
|
|
74764
|
+
? chain === types.ChainId.BASE || chain === types.ChainId.MAINNET
|
|
74765
|
+
: false }, chain));
|
|
74699
74766
|
}) }));
|
|
74700
74767
|
};
|
|
74701
74768
|
|
|
@@ -29,5 +29,5 @@ export declare const getRawPayoutAmount: (bond?: BondsData, inputValue?: string)
|
|
|
29
29
|
export declare const getPayoutAmount: (bond?: BondsData, inputValue?: string) => number;
|
|
30
30
|
export declare const youGetUSD: (bond: BondsData, inputValue: string) => string;
|
|
31
31
|
export declare const getRawBonus: (bond?: BondsData, inputValue?: string) => string;
|
|
32
|
-
export declare const getFeeAmount: (bond?: BondsData, inputValue?: string) => number
|
|
32
|
+
export declare const getFeeAmount: (bond?: BondsData, inputValue?: string) => number;
|
|
33
33
|
export declare const getBonusColor: (premiumString: string) => string;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ape Bond SDK",
|
|
4
4
|
"author": "Ape Bond",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.2",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"yalc": "^1.0.0-pre.53"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@ape.swap/apeswap-lists": "4.0.
|
|
59
|
+
"@ape.swap/apeswap-lists": "4.0.1",
|
|
60
60
|
"@emotion/react": "11.11.4",
|
|
61
61
|
"bignumber.js": "^9.1.2",
|
|
62
62
|
"chart.js": "4.2.0",
|