@berachain/berajs 0.2.8-beta.9 → 0.2.10
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/{BeraError-_mQdkanr.d.cts → BeraError-7-A5JYy_.d.ts} +31 -2
- package/dist/{HoneyConfigProvider-DVP_9KZn.d.ts → HoneyConfigProvider-Dkj-_a5x.d.ts} +1 -1
- package/dist/{RequestError-BRIiJgHk.d.ts → RequestError-DBOIV65x.d.ts} +1 -1
- package/dist/abi/exports.mjs +4452 -2
- package/dist/actions/clients/exports.d.ts +78 -0
- package/dist/actions/clients/exports.mjs +21 -0
- package/dist/actions/exports.d.ts +154 -207
- package/dist/actions/exports.mjs +853 -2
- package/dist/actions/governance/exports.d.ts +140 -0
- package/dist/actions/governance/exports.mjs +226 -0
- package/dist/actions/server/exports.d.ts +13 -0
- package/dist/actions/server/exports.mjs +27 -0
- package/dist/chunk-3JJLQ2JX.mjs +211 -0
- package/dist/chunk-7YVNSDXG.mjs +86 -0
- package/dist/chunk-AUOPN6NK.mjs +96 -0
- package/dist/chunk-BGMRHTBQ.mjs +23 -0
- package/dist/chunk-CDK4YV3D.mjs +571 -0
- package/dist/chunk-DKMAIU74.mjs +62 -0
- package/dist/chunk-DQRH5VE3.mjs +25 -0
- package/dist/chunk-E7YFXBBQ.mjs +349 -0
- package/dist/chunk-GUURQAME.mjs +326 -0
- package/dist/chunk-GY6B3PD5.mjs +89 -0
- package/dist/chunk-HQCOU6GY.mjs +243 -0
- package/dist/chunk-HYDP32P6.mjs +135 -0
- package/dist/chunk-IXIBY5FP.mjs +80 -0
- package/dist/chunk-KHXJDYA4.mjs +1776 -0
- package/dist/chunk-NBYLMO2L.mjs +14 -0
- package/dist/chunk-O2NQFKJK.mjs +170 -0
- package/dist/chunk-P5WXXULM.mjs +54 -0
- package/dist/chunk-QBBOWFMH.mjs +4129 -0
- package/dist/chunk-QVHEM4BG.mjs +35 -0
- package/dist/chunk-SGIJVHZO.mjs +12 -0
- package/dist/chunk-SZ5C44L5.mjs +35 -0
- package/dist/chunk-WNBWX23Q.mjs +426 -0
- package/dist/chunk-Y6THHG77.mjs +126 -0
- package/dist/chunk-ZLTMIFCZ.mjs +165 -0
- package/dist/contexts/exports.d.ts +2 -2
- package/dist/contexts/exports.mjs +85 -2
- package/dist/enum/exports.d.ts +1 -1
- package/dist/enum/exports.mjs +46 -2
- package/dist/enum/governance/exports.d.ts +60 -0
- package/dist/enum/governance/exports.mjs +14 -0
- package/dist/errors/exports.d.ts +4 -3
- package/dist/errors/exports.mjs +48 -2
- package/dist/getApolloClient-BcUTGFUb.d.ts +40 -0
- package/dist/{getValidatorQueuedOperatorAddress-BcyxE9uw.d.ts → getValidatorQueuedOperatorAddress-DphU3qhE.d.ts} +2 -2
- package/dist/{global.d-5w_lvl2J.d.ts → global.d-BuGDKh4k.d.ts} +4 -240
- package/dist/hooks/exports.d.ts +83 -226
- package/dist/hooks/exports.mjs +7463 -4
- package/dist/hooks/governance/exports.d.ts +181 -0
- package/dist/hooks/governance/exports.mjs +888 -0
- package/dist/pol.d-Dw5SQcRX.d.ts +153 -0
- package/dist/{txnEnum-7_o92X3N.d.cts → txnEnum-ByI5dtDi.d.ts} +2 -60
- package/dist/types/exports.d.ts +9 -9
- package/dist/types/exports.mjs +0 -1
- package/dist/types/governance/exports.d.ts +109 -0
- package/dist/types/governance/exports.mjs +0 -0
- package/dist/{useHoneySwapState-B494PQDl.d.ts → useHoneySwapState-vFmuFF0g.d.ts} +1 -1
- package/dist/utils/exports.d.ts +15 -6
- package/dist/utils/exports.mjs +827 -2
- package/package.json +49 -13
- package/src/actions/__test/transports.ts +61 -0
- package/src/actions/clients/exports.ts +7 -0
- package/src/actions/clients/fetchBeep.ts +34 -0
- package/src/actions/clients/fetchOpenApi.ts +93 -0
- package/src/actions/clients/fetchOpenApi.unit.test.ts +223 -0
- package/src/actions/clients/fetchRailwayBackend.ts +34 -0
- package/src/actions/clients/getApolloClient.ts +58 -23
- package/src/actions/clients/getEnsoClient.ts +20 -9
- package/src/actions/dex/aggregators/enso/enso.ts +27 -17
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +2 -2
- package/src/actions/dex/aggregators/kyberswap.ts +18 -23
- package/src/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.ts +3 -6
- package/src/actions/enso/getEnsoUserTokensWithBalances.ts +18 -0
- package/src/actions/exports.ts +5 -9
- package/src/actions/governance/exports.ts +9 -0
- package/src/actions/governance/getAllProposals.ts +10 -65
- package/src/actions/governance/getProposalDetails.ts +6 -33
- package/src/actions/governance/getProposalVotes.ts +8 -15
- package/src/actions/honey/getChartData.ts +27 -21
- package/src/actions/honey/getHoney24hVolume.ts +19 -22
- package/src/actions/honey/getPythLatestPrices.ts +7 -0
- package/src/actions/pol/__tests__/rewardVaults.integration.test.ts +1 -1
- package/src/actions/pol/getAutoclaimedIncentives.ts +41 -0
- package/src/actions/pol/getAutoclaimedIncentivesTxHash.ts +41 -0
- package/src/actions/pol/getBeraTokenTotalSupply.ts +45 -0
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +28 -0
- package/src/actions/pol/getEarnedStakedBeraVault.ts +20 -20
- package/src/actions/pol/getGlobalData.ts +1 -0
- package/src/actions/pol/getHeroEarnVaults.ts +62 -0
- package/src/actions/pol/getIncentiveFeeClaimStats.ts +19 -38
- package/src/actions/pol/getRewardVaults.ts +4 -4
- package/src/actions/pol/getSWBeraVaultMetadata.ts +1 -1
- package/src/actions/pol/getStakingDailyAssets.ts +18 -17
- package/src/actions/server/exports.ts +1 -0
- package/src/actions/server/getDailyValidatorBlockStats.ts +33 -0
- package/src/actions/tokens/getWalletBalances.integration.test.ts +3 -6
- package/src/actions/transactions/beraWriteContract.integration.test.ts +3 -6
- package/src/actions/validators/getDailyValidatorBlockStats.ts +25 -24
- package/src/actions/validators/getValidatorAnalytics.ts +20 -21
- package/src/actions/validators/getValidatorIncentiveDistribution.ts +33 -0
- package/src/actions/validators/utils/getValidatorBoostApy.ts +1 -1
- package/src/enum/contracts.ts +1 -0
- package/src/enum/exports.ts +0 -1
- package/src/enum/governance/exports.ts +1 -0
- package/src/errors/BeraError.ts +47 -7
- package/src/errors/BeraTracing.unit.test.ts +65 -0
- package/src/errors/RequestError.ts +25 -4
- package/src/errors/RequestError.unit.test.ts +55 -0
- package/src/errors/errorMap.ts +8 -0
- package/src/errors/exports.ts +5 -0
- package/src/errors/getRevertReason.integration.test.ts +3 -3
- package/src/errors/spanStatus.ts +78 -0
- package/src/errors/spanStatus.unit.test.ts +62 -0
- package/src/hooks/dex/useCreatePool.ts +1 -88
- package/src/hooks/dex/useOnChainPoolData.ts +27 -2
- package/src/hooks/dex/usePriceImpact.ts +12 -5
- package/src/hooks/enso/useBendDemultiply.ts +9 -1
- package/src/hooks/enso/useBendMultiply.ts +9 -1
- package/src/hooks/enso/useBendZapSupply.ts +26 -7
- package/src/hooks/enso/useEnsoSwapBundle.ts +17 -3
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +13 -2
- package/src/hooks/exports.ts +3 -15
- package/src/hooks/governance/exports.ts +14 -0
- package/src/hooks/pol/useAutoclaimedIncentives.ts +40 -0
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +45 -0
- package/src/hooks/pol/useStakedAPR.ts +2 -2
- package/src/hooks/pol/useStakedSnapshots.ts +5 -9
- package/src/hooks/validators/useValidator.ts +6 -8
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +39 -0
- package/src/types/bribe-boost.d.ts +19 -0
- package/src/types/exports.ts +0 -1
- package/src/types/governance/exports.ts +1 -0
- package/src/utils/beraFetch.ts +9 -3
- package/src/utils/exports.ts +1 -0
- package/src/utils/getServerSideClient.ts +4 -2
- package/src/utils/polyfillAbortSignalAny.ts +53 -0
- package/src/utils/polyfillAbortSignalAny.unit.test.ts +81 -0
- package/src/utils/sanitizeRpcUrl.ts +22 -0
- package/src/utils/tracedTransport.ts +35 -0
- package/dist/BeraError-_mQdkanr.d.ts +0 -94
- package/dist/BexStatusProvider-DRymVlQf.d.cts +0 -70
- package/dist/HoneyConfigProvider-DfkjmzEf.d.cts +0 -390
- package/dist/RequestError-DSUzJ1Iy.d.cts +0 -144
- package/dist/abi/exports.cjs +0 -2
- package/dist/abi/exports.cjs.map +0 -1
- package/dist/abi/exports.d.cts +0 -6574
- package/dist/abi/exports.mjs.map +0 -1
- package/dist/actions/exports.cjs +0 -2
- package/dist/actions/exports.cjs.map +0 -1
- package/dist/actions/exports.d.cts +0 -1650
- package/dist/actions/exports.mjs.map +0 -1
- package/dist/chunk-45HIEVNI.cjs +0 -4
- package/dist/chunk-45HIEVNI.cjs.map +0 -1
- package/dist/chunk-47ILYVHC.mjs +0 -2
- package/dist/chunk-47ILYVHC.mjs.map +0 -1
- package/dist/chunk-575OK77P.mjs +0 -2
- package/dist/chunk-575OK77P.mjs.map +0 -1
- package/dist/chunk-5NVZG5N6.mjs +0 -2
- package/dist/chunk-5NVZG5N6.mjs.map +0 -1
- package/dist/chunk-6DIA6PXV.cjs +0 -2
- package/dist/chunk-6DIA6PXV.cjs.map +0 -1
- package/dist/chunk-6JJIZCVY.cjs +0 -2
- package/dist/chunk-6JJIZCVY.cjs.map +0 -1
- package/dist/chunk-7F72ZH4Q.mjs +0 -2
- package/dist/chunk-7F72ZH4Q.mjs.map +0 -1
- package/dist/chunk-AUA42YIG.mjs +0 -4
- package/dist/chunk-AUA42YIG.mjs.map +0 -1
- package/dist/chunk-BC2WX6O6.cjs +0 -2
- package/dist/chunk-BC2WX6O6.cjs.map +0 -1
- package/dist/chunk-CJOZC5Z2.cjs +0 -2
- package/dist/chunk-CJOZC5Z2.cjs.map +0 -1
- package/dist/chunk-D6L7LTA2.cjs +0 -2
- package/dist/chunk-D6L7LTA2.cjs.map +0 -1
- package/dist/chunk-DDEQFR3M.cjs +0 -2
- package/dist/chunk-DDEQFR3M.cjs.map +0 -1
- package/dist/chunk-GXV2JA36.mjs +0 -2
- package/dist/chunk-GXV2JA36.mjs.map +0 -1
- package/dist/chunk-ISYNEDET.mjs +0 -2
- package/dist/chunk-ISYNEDET.mjs.map +0 -1
- package/dist/chunk-JDDRTHFG.mjs +0 -2
- package/dist/chunk-JDDRTHFG.mjs.map +0 -1
- package/dist/chunk-JDZGYU5T.mjs +0 -2
- package/dist/chunk-JDZGYU5T.mjs.map +0 -1
- package/dist/chunk-LVOXBZMA.cjs +0 -2
- package/dist/chunk-LVOXBZMA.cjs.map +0 -1
- package/dist/chunk-MK5NS5B5.mjs +0 -2
- package/dist/chunk-MK5NS5B5.mjs.map +0 -1
- package/dist/chunk-NAXAZJJY.mjs +0 -2
- package/dist/chunk-NAXAZJJY.mjs.map +0 -1
- package/dist/chunk-NLVWRMGD.mjs +0 -2
- package/dist/chunk-NLVWRMGD.mjs.map +0 -1
- package/dist/chunk-OGBD5YOG.mjs +0 -2
- package/dist/chunk-OGBD5YOG.mjs.map +0 -1
- package/dist/chunk-OGJMSGB2.mjs +0 -2
- package/dist/chunk-OGJMSGB2.mjs.map +0 -1
- package/dist/chunk-OIYXOKTT.cjs +0 -2
- package/dist/chunk-OIYXOKTT.cjs.map +0 -1
- package/dist/chunk-OUD27MU7.cjs +0 -2
- package/dist/chunk-OUD27MU7.cjs.map +0 -1
- package/dist/chunk-PRLVZIKD.mjs +0 -2
- package/dist/chunk-PRLVZIKD.mjs.map +0 -1
- package/dist/chunk-Q2SNRLW3.cjs +0 -2
- package/dist/chunk-Q2SNRLW3.cjs.map +0 -1
- package/dist/chunk-REWME3FY.cjs +0 -2
- package/dist/chunk-REWME3FY.cjs.map +0 -1
- package/dist/chunk-RJN36GBU.mjs +0 -2
- package/dist/chunk-RJN36GBU.mjs.map +0 -1
- package/dist/chunk-RWOICHRW.cjs +0 -2
- package/dist/chunk-RWOICHRW.cjs.map +0 -1
- package/dist/chunk-S4CDSVLK.cjs +0 -2
- package/dist/chunk-S4CDSVLK.cjs.map +0 -1
- package/dist/chunk-SFEULGSX.cjs +0 -2
- package/dist/chunk-SFEULGSX.cjs.map +0 -1
- package/dist/chunk-WBTS6KFG.mjs +0 -2
- package/dist/chunk-WBTS6KFG.mjs.map +0 -1
- package/dist/chunk-WRFDB3QJ.cjs +0 -2
- package/dist/chunk-WRFDB3QJ.cjs.map +0 -1
- package/dist/chunk-XNJLSA6P.cjs +0 -2
- package/dist/chunk-XNJLSA6P.cjs.map +0 -1
- package/dist/contexts/exports.cjs +0 -2
- package/dist/contexts/exports.cjs.map +0 -1
- package/dist/contexts/exports.d.cts +0 -66
- package/dist/contexts/exports.mjs.map +0 -1
- package/dist/defaultFlags-D6KfkTZx.d.cts +0 -10
- package/dist/dex-C_BB0b0O.d.cts +0 -37
- package/dist/enum/exports.cjs +0 -2
- package/dist/enum/exports.cjs.map +0 -1
- package/dist/enum/exports.d.cts +0 -23
- package/dist/enum/exports.mjs.map +0 -1
- package/dist/errors/exports.cjs +0 -2
- package/dist/errors/exports.cjs.map +0 -1
- package/dist/errors/exports.d.cts +0 -327
- package/dist/errors/exports.mjs.map +0 -1
- package/dist/getValidatorQueuedOperatorAddress-Cql_D50j.d.cts +0 -562
- package/dist/global.d-B7IeayVX.d.cts +0 -474
- package/dist/honey-CYm0RWf4.d.cts +0 -14
- package/dist/hooks/exports.cjs +0 -4
- package/dist/hooks/exports.cjs.map +0 -1
- package/dist/hooks/exports.d.cts +0 -1734
- package/dist/hooks/exports.mjs.map +0 -1
- package/dist/polling-BKnyavLI.d.cts +0 -8
- package/dist/txnEnum-7_o92X3N.d.ts +0 -164
- package/dist/types/exports.cjs +0 -1
- package/dist/types/exports.cjs.map +0 -1
- package/dist/types/exports.d.cts +0 -90
- package/dist/types/exports.mjs.map +0 -1
- package/dist/useHoneySwapState-D6vpv19r.d.cts +0 -32
- package/dist/utils/exports.cjs +0 -2
- package/dist/utils/exports.cjs.map +0 -1
- package/dist/utils/exports.d.cts +0 -420
- package/dist/utils/exports.mjs.map +0 -1
- package/src/actions/dex/getIsTokenExploited.ts +0 -63
- package/src/hooks/dex/useExploitedTokens.ts +0 -57
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bignumber_js_default
|
|
3
|
+
} from "./chunk-E7YFXBBQ.mjs";
|
|
4
|
+
import {
|
|
5
|
+
isToken,
|
|
6
|
+
wBeraToken
|
|
7
|
+
} from "./chunk-IXIBY5FP.mjs";
|
|
8
|
+
|
|
9
|
+
// src/utils/tokenWrapping.ts
|
|
10
|
+
function wrapNativeToken(token) {
|
|
11
|
+
return {
|
|
12
|
+
...token,
|
|
13
|
+
...isToken(token, "BERA") && wBeraToken
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function wrapNativeTokens(tokens) {
|
|
17
|
+
return tokens.map((token) => wrapNativeToken(token));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// src/utils/math.ts
|
|
21
|
+
var computePriceImpact = (tokenInPrice, tokenOutPrice, inAmount, outAmount) => {
|
|
22
|
+
if (!tokenInPrice || !tokenOutPrice || !inAmount || !outAmount) return 0;
|
|
23
|
+
const usdIn = new bignumber_js_default(tokenInPrice).times(inAmount);
|
|
24
|
+
const usdOut = new bignumber_js_default(tokenOutPrice).times(outAmount);
|
|
25
|
+
if (usdIn.lt(0.01) || usdOut.lt(0.01)) return 0;
|
|
26
|
+
if (usdIn.isZero() || usdOut.isZero()) return 0;
|
|
27
|
+
const ratio = usdOut.div(usdIn);
|
|
28
|
+
return Number(new bignumber_js_default(1).minus(ratio).toFixed());
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
wrapNativeToken,
|
|
33
|
+
wrapNativeTokens,
|
|
34
|
+
computePriceImpact
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/enum/polling.ts
|
|
2
|
+
var POLLING = /* @__PURE__ */ ((POLLING2) => {
|
|
3
|
+
POLLING2[POLLING2["FAST"] = 1e4] = "FAST";
|
|
4
|
+
POLLING2[POLLING2["NORMAL"] = 1e5] = "NORMAL";
|
|
5
|
+
POLLING2[POLLING2["SLOW"] = 18e4] = "SLOW";
|
|
6
|
+
POLLING2[POLLING2["REFRESH_BLOCK_INTERVAL"] = 1e4] = "REFRESH_BLOCK_INTERVAL";
|
|
7
|
+
return POLLING2;
|
|
8
|
+
})(POLLING || {});
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
POLLING
|
|
12
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/errors/BeraTracing.ts
|
|
2
|
+
var _handlers = [];
|
|
3
|
+
var BeraTracing = {
|
|
4
|
+
/**
|
|
5
|
+
* Execute a callback, wrapping it in all registered span handlers.
|
|
6
|
+
*
|
|
7
|
+
* Handlers chain so each wraps the next. First registered = outermost wrapper.
|
|
8
|
+
* If no handlers are registered, the callback is executed directly.
|
|
9
|
+
*/
|
|
10
|
+
startSpan(context, callback) {
|
|
11
|
+
if (_handlers.length === 0) return callback();
|
|
12
|
+
return _handlers.reduceRight(
|
|
13
|
+
(next, handler) => () => handler(context, next),
|
|
14
|
+
callback
|
|
15
|
+
)();
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* Register a span tracing handler.
|
|
19
|
+
*
|
|
20
|
+
* @param _event - Must be "span". Exists for API consistency with BeraMonitoring.
|
|
21
|
+
* @param handler - A StartSpanFn, e.g. Sentry.startSpan.
|
|
22
|
+
* @returns An unsubscribe function to remove the handler.
|
|
23
|
+
*/
|
|
24
|
+
addSpanHandler(handler) {
|
|
25
|
+
_handlers.push(handler);
|
|
26
|
+
return () => {
|
|
27
|
+
const idx = _handlers.indexOf(handler);
|
|
28
|
+
if (idx !== -1) _handlers.splice(idx, 1);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
BeraTracing
|
|
35
|
+
};
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBalanceCall,
|
|
3
|
+
getEnsoClient
|
|
4
|
+
} from "./chunk-HYDP32P6.mjs";
|
|
5
|
+
import {
|
|
6
|
+
BeraMonitoring,
|
|
7
|
+
initBeraError
|
|
8
|
+
} from "./chunk-7YVNSDXG.mjs";
|
|
9
|
+
import {
|
|
10
|
+
defaultFlags
|
|
11
|
+
} from "./chunk-BGMRHTBQ.mjs";
|
|
12
|
+
import {
|
|
13
|
+
beraToken,
|
|
14
|
+
isToken
|
|
15
|
+
} from "./chunk-IXIBY5FP.mjs";
|
|
16
|
+
import {
|
|
17
|
+
parseBaseArgs
|
|
18
|
+
} from "./chunk-DQRH5VE3.mjs";
|
|
19
|
+
import {
|
|
20
|
+
BeraError,
|
|
21
|
+
InvalidArgumentError
|
|
22
|
+
} from "./chunk-KHXJDYA4.mjs";
|
|
23
|
+
|
|
24
|
+
// src/contexts/BeraFlags/BeraFlags.tsx
|
|
25
|
+
import { createContext, useContext } from "react";
|
|
26
|
+
import {
|
|
27
|
+
isFlagEnabled
|
|
28
|
+
} from "@berachain/config/internal/edge-config";
|
|
29
|
+
import { jsx } from "react/jsx-runtime";
|
|
30
|
+
var BeraFlagContext = createContext(
|
|
31
|
+
void 0
|
|
32
|
+
);
|
|
33
|
+
function BeraFlagsProvider({
|
|
34
|
+
children,
|
|
35
|
+
flags,
|
|
36
|
+
aggregators,
|
|
37
|
+
swberaAprWindow = "DAY"
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
BeraFlagContext.Provider,
|
|
41
|
+
{
|
|
42
|
+
value: {
|
|
43
|
+
...defaultFlags,
|
|
44
|
+
...flags,
|
|
45
|
+
aggregators: aggregators ? Object.entries(aggregators).filter(([, value]) => isFlagEnabled(value)).map(([key]) => key) : void 0,
|
|
46
|
+
swberaAprWindow
|
|
47
|
+
},
|
|
48
|
+
children
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function useBeraFlags() {
|
|
53
|
+
const context = useContext(BeraFlagContext);
|
|
54
|
+
if (!context) {
|
|
55
|
+
throw new Error("BeraFlagsProvider not found");
|
|
56
|
+
}
|
|
57
|
+
return context;
|
|
58
|
+
}
|
|
59
|
+
function useBeraFlag(key) {
|
|
60
|
+
const flags = useBeraFlags();
|
|
61
|
+
return flags[key];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/contexts/BexStatusProvider.tsx
|
|
65
|
+
import {
|
|
66
|
+
createContext as createContext2,
|
|
67
|
+
useContext as useContext2,
|
|
68
|
+
useState
|
|
69
|
+
} from "react";
|
|
70
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
71
|
+
var BexStateContext = createContext2({
|
|
72
|
+
protocol: {
|
|
73
|
+
isPaused: false,
|
|
74
|
+
factories: {
|
|
75
|
+
composableStable: "enabled",
|
|
76
|
+
weighted: "enabled",
|
|
77
|
+
allPaused: false
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
onPoolChange: () => {
|
|
81
|
+
},
|
|
82
|
+
pool: void 0
|
|
83
|
+
});
|
|
84
|
+
function useBexStatus() {
|
|
85
|
+
const context = useContext2(BexStateContext);
|
|
86
|
+
if (!context) {
|
|
87
|
+
throw new BeraError({
|
|
88
|
+
level: "fatal",
|
|
89
|
+
message: "BexStateContext is not defined"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return context;
|
|
93
|
+
}
|
|
94
|
+
function BexStatusProvider({
|
|
95
|
+
children,
|
|
96
|
+
isVaultPaused,
|
|
97
|
+
labels,
|
|
98
|
+
factories
|
|
99
|
+
}) {
|
|
100
|
+
const [poolState, setPoolState] = useState();
|
|
101
|
+
const disablePoolWithdrawals = (poolState?.isPaused && !poolState?.isInRecoveryMode) ?? false;
|
|
102
|
+
const disablePoolDeposits = isVaultPaused || poolState?.isPaused;
|
|
103
|
+
return /* @__PURE__ */ jsx2(
|
|
104
|
+
BexStateContext.Provider,
|
|
105
|
+
{
|
|
106
|
+
value: {
|
|
107
|
+
protocol: {
|
|
108
|
+
isPaused: isVaultPaused,
|
|
109
|
+
factories: {
|
|
110
|
+
...factories,
|
|
111
|
+
allPaused: factories.composableStable === "paused" && factories.weighted === "paused"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
labels,
|
|
115
|
+
onPoolChange: setPoolState,
|
|
116
|
+
pool: poolState ? {
|
|
117
|
+
...poolState,
|
|
118
|
+
disablePoolWithdrawals: !!disablePoolWithdrawals,
|
|
119
|
+
disablePoolDeposits: !!disablePoolDeposits
|
|
120
|
+
} : void 0
|
|
121
|
+
},
|
|
122
|
+
children
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// src/contexts/block-time-provider.tsx
|
|
128
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
129
|
+
import { mainnet } from "@berachain/config/mainnet";
|
|
130
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
131
|
+
function useBlockTime() {
|
|
132
|
+
return useContext3(BlockTimeContext);
|
|
133
|
+
}
|
|
134
|
+
var BlockTimeContext = createContext3(
|
|
135
|
+
// this is the default block time for berachain, but actually overridden by the block time provider
|
|
136
|
+
mainnet.averageBlockTime
|
|
137
|
+
);
|
|
138
|
+
function BlockTimeProvider({
|
|
139
|
+
children,
|
|
140
|
+
blockTime,
|
|
141
|
+
...args
|
|
142
|
+
}) {
|
|
143
|
+
const { config } = parseBaseArgs(args);
|
|
144
|
+
return /* @__PURE__ */ jsx3(BlockTimeContext.Provider, { value: blockTime ?? config.averageBlockTime, children });
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/contexts/HoneyConfigProvider.tsx
|
|
148
|
+
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
149
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
150
|
+
var HoneyConfigContext = createContext4(void 0);
|
|
151
|
+
function HoneyConfigProvider({
|
|
152
|
+
children,
|
|
153
|
+
...props
|
|
154
|
+
}) {
|
|
155
|
+
return /* @__PURE__ */ jsx4(HoneyConfigContext.Provider, { value: props, children });
|
|
156
|
+
}
|
|
157
|
+
function useHoneyConfig() {
|
|
158
|
+
const context = useContext4(HoneyConfigContext);
|
|
159
|
+
if (!context) {
|
|
160
|
+
throw new Error("useHoneyConfig must be used within a HoneyConfigProvider");
|
|
161
|
+
}
|
|
162
|
+
return context;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// src/hooks/enso/useEnsoUserTokensWithBalances.ts
|
|
166
|
+
import useSWR from "swr";
|
|
167
|
+
import { useBeraWallet, useConfig } from "@berachain/wagmi/hooks";
|
|
168
|
+
|
|
169
|
+
// src/actions/enso/getEnsoUserTokensWithBalances.ts
|
|
170
|
+
import { getChains, multicall } from "@wagmi/core";
|
|
171
|
+
import { formatUnits } from "viem";
|
|
172
|
+
async function getEnsoUserTokensWithBalances({
|
|
173
|
+
account,
|
|
174
|
+
wagmiConfig,
|
|
175
|
+
chainId,
|
|
176
|
+
ensoClient
|
|
177
|
+
}) {
|
|
178
|
+
const ensoBalances = await ensoClient.getBalances({
|
|
179
|
+
useEoa: true,
|
|
180
|
+
chainId: chainId ?? "all",
|
|
181
|
+
eoaAddress: account
|
|
182
|
+
});
|
|
183
|
+
if (!Array.isArray(ensoBalances)) {
|
|
184
|
+
BeraMonitoring.captureException(
|
|
185
|
+
new InvalidArgumentError({
|
|
186
|
+
property: "ensoBalances",
|
|
187
|
+
value: ensoBalances,
|
|
188
|
+
expected: "BalanceToken[]",
|
|
189
|
+
chainId: typeof chainId === "number" ? chainId : void 0,
|
|
190
|
+
extra: { account, chainId }
|
|
191
|
+
})
|
|
192
|
+
);
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
const tokens = ensoBalances.map(
|
|
196
|
+
(balance) => ({
|
|
197
|
+
name: balance.name,
|
|
198
|
+
symbol: balance.symbol,
|
|
199
|
+
decimals: balance.decimals,
|
|
200
|
+
address: isToken(balance.token, "ETH") ? beraToken.address : balance.token,
|
|
201
|
+
logoURI: balance.logoUri,
|
|
202
|
+
balance: {
|
|
203
|
+
raw: balance.amount.toString(),
|
|
204
|
+
formatted: formatUnits(BigInt(balance.amount), balance.decimals)
|
|
205
|
+
},
|
|
206
|
+
chainId: Number(
|
|
207
|
+
// @ts-expect-error - balance.chainId is defined just not typed by enso
|
|
208
|
+
balance.chainId
|
|
209
|
+
),
|
|
210
|
+
price: Number(balance.price)
|
|
211
|
+
})
|
|
212
|
+
);
|
|
213
|
+
const tokenByChainId = Object.groupBy(tokens, (a) => a.chainId ?? 0);
|
|
214
|
+
const balances = await Promise.allSettled(
|
|
215
|
+
Object.entries(tokenByChainId).map(async ([chainId2, chainTokens]) => {
|
|
216
|
+
if (!chainTokens) return void 0;
|
|
217
|
+
const chainConfig = getChains(wagmiConfig).find(
|
|
218
|
+
(chain) => chain.id === Number(chainId2)
|
|
219
|
+
);
|
|
220
|
+
if (!chainConfig) {
|
|
221
|
+
return void 0;
|
|
222
|
+
}
|
|
223
|
+
const multicall3 = chainConfig.contracts?.multicall3;
|
|
224
|
+
const multicallAddress = multicall3?.address;
|
|
225
|
+
if (!multicallAddress) {
|
|
226
|
+
BeraMonitoring.captureException(
|
|
227
|
+
new InvalidArgumentError({
|
|
228
|
+
property: "multicallAddress",
|
|
229
|
+
value: multicallAddress,
|
|
230
|
+
expected: "Address",
|
|
231
|
+
chainId: Number(chainId2)
|
|
232
|
+
})
|
|
233
|
+
);
|
|
234
|
+
return chainTokens;
|
|
235
|
+
}
|
|
236
|
+
const balances2 = await multicall(wagmiConfig, {
|
|
237
|
+
chainId: Number(chainId2),
|
|
238
|
+
contracts: chainTokens.map(
|
|
239
|
+
(token) => getBalanceCall({
|
|
240
|
+
token,
|
|
241
|
+
account,
|
|
242
|
+
multicallAddress
|
|
243
|
+
})
|
|
244
|
+
),
|
|
245
|
+
allowFailure: true
|
|
246
|
+
});
|
|
247
|
+
const tokensWithBalances = [];
|
|
248
|
+
for (let index = 0; index < chainTokens.length; index++) {
|
|
249
|
+
const token = chainTokens[index];
|
|
250
|
+
if (balances2[index].status === "success") {
|
|
251
|
+
const balance = balances2[index].result;
|
|
252
|
+
tokensWithBalances.push({
|
|
253
|
+
...token,
|
|
254
|
+
balance: {
|
|
255
|
+
raw: balance?.toString() ?? "0",
|
|
256
|
+
formatted: formatUnits(balance ?? 0n, token.decimals)
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
} else {
|
|
260
|
+
console.error("error getting balance", balances2[index].error);
|
|
261
|
+
BeraMonitoring.captureException(
|
|
262
|
+
initBeraError({ cause: balances2[index].error })
|
|
263
|
+
);
|
|
264
|
+
tokensWithBalances.push(token);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return tokensWithBalances;
|
|
268
|
+
})
|
|
269
|
+
);
|
|
270
|
+
const flattenedBalances = [];
|
|
271
|
+
for (const result of balances) {
|
|
272
|
+
if (result.status === "fulfilled") {
|
|
273
|
+
flattenedBalances.push(...result.value ?? []);
|
|
274
|
+
} else {
|
|
275
|
+
BeraMonitoring.captureException(initBeraError({ cause: result.reason }));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return flattenedBalances.sort((a, b) => {
|
|
279
|
+
const aValue = Number(a.balance.formatted) * (a.price ?? 0);
|
|
280
|
+
const bValue = Number(b.balance.formatted) * (b.price ?? 0);
|
|
281
|
+
return bValue - aValue;
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// src/hooks/enso/useEnsoUserTokensWithBalances.ts
|
|
286
|
+
function useEnsoUserTokensWithBalances({ chainId } = {}, options) {
|
|
287
|
+
const { address: fromAddress } = useBeraWallet();
|
|
288
|
+
const wagmiConfig = useConfig();
|
|
289
|
+
const proxyAggregatorsThroughVercel = useBeraFlag(
|
|
290
|
+
"proxyAggregatorsThroughVercel"
|
|
291
|
+
);
|
|
292
|
+
const isEnabled = !!fromAddress && (options?.opts?.isEnabled ?? true);
|
|
293
|
+
const QUERY_KEY = isEnabled && wagmiConfig ? [
|
|
294
|
+
"useEnsoUserTokensWithBalances",
|
|
295
|
+
fromAddress,
|
|
296
|
+
chainId,
|
|
297
|
+
proxyAggregatorsThroughVercel ?? false
|
|
298
|
+
] : null;
|
|
299
|
+
const swrResponse = useSWR(
|
|
300
|
+
QUERY_KEY,
|
|
301
|
+
async ([, fromAddress2, chainId2]) => getEnsoUserTokensWithBalances({
|
|
302
|
+
account: fromAddress2,
|
|
303
|
+
wagmiConfig,
|
|
304
|
+
chainId: chainId2 ?? "all",
|
|
305
|
+
ensoClient: getEnsoClient({
|
|
306
|
+
baseURL: proxyAggregatorsThroughVercel ? "/api/enso" : void 0
|
|
307
|
+
})
|
|
308
|
+
}),
|
|
309
|
+
{
|
|
310
|
+
refreshInterval: 1e5 /* NORMAL */,
|
|
311
|
+
isEnabled,
|
|
312
|
+
...options?.opts
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
return {
|
|
316
|
+
...swrResponse,
|
|
317
|
+
refresh: () => swrResponse.mutate()
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// src/contexts/TokensProvider.tsx
|
|
322
|
+
import { createContext as createContext5, useMemo } from "react";
|
|
323
|
+
import {
|
|
324
|
+
isFlagEnabled as isFlagEnabled2
|
|
325
|
+
} from "@berachain/config/internal/edge-config";
|
|
326
|
+
|
|
327
|
+
// src/utils/formatTokenList.ts
|
|
328
|
+
function formatTokenList({
|
|
329
|
+
defaultTokenList = [],
|
|
330
|
+
externalList = []
|
|
331
|
+
}) {
|
|
332
|
+
if (defaultTokenList.length === 0) {
|
|
333
|
+
return {
|
|
334
|
+
tokenList: externalList,
|
|
335
|
+
customTokenList: externalList,
|
|
336
|
+
featuredTokenList: []
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
const defaultList = defaultTokenList.map((token) => {
|
|
340
|
+
return { ...token, default: true };
|
|
341
|
+
});
|
|
342
|
+
const featuredTokenList = defaultList.filter((token) => {
|
|
343
|
+
return token.tags?.some((tag) => tag === "featured");
|
|
344
|
+
});
|
|
345
|
+
const mergedList = [...defaultList, ...externalList];
|
|
346
|
+
const uniqueList = mergedList.filter(
|
|
347
|
+
(item, index) => mergedList.findIndex((i) => isToken(i, item)) === index
|
|
348
|
+
);
|
|
349
|
+
return {
|
|
350
|
+
tokenList: uniqueList,
|
|
351
|
+
customTokenList: externalList,
|
|
352
|
+
featuredTokenList
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// src/contexts/TokensProvider.tsx
|
|
357
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
358
|
+
var TokenContext = createContext5(
|
|
359
|
+
void 0
|
|
360
|
+
);
|
|
361
|
+
function TokensProvider({
|
|
362
|
+
children,
|
|
363
|
+
defaultTokens,
|
|
364
|
+
edgeConfigTokenList,
|
|
365
|
+
userTokens,
|
|
366
|
+
onAddToken,
|
|
367
|
+
onRemoveToken
|
|
368
|
+
}) {
|
|
369
|
+
const { data: ensoTokens, refresh } = useEnsoUserTokensWithBalances();
|
|
370
|
+
const { tokenList = [], featuredTokenList = [] } = useMemo(
|
|
371
|
+
() => formatTokenList({
|
|
372
|
+
defaultTokenList: [
|
|
373
|
+
...defaultTokens,
|
|
374
|
+
...edgeConfigTokenList?.filter(
|
|
375
|
+
(token) => isFlagEnabled2(token.enabled)
|
|
376
|
+
)
|
|
377
|
+
],
|
|
378
|
+
externalList: [
|
|
379
|
+
...userTokens,
|
|
380
|
+
...(ensoTokens ?? []).map((t) => ({
|
|
381
|
+
...t,
|
|
382
|
+
balance: void 0,
|
|
383
|
+
price: void 0
|
|
384
|
+
}))
|
|
385
|
+
]
|
|
386
|
+
}),
|
|
387
|
+
[defaultTokens, userTokens, edgeConfigTokenList, ensoTokens]
|
|
388
|
+
);
|
|
389
|
+
return /* @__PURE__ */ jsx5(
|
|
390
|
+
TokenContext.Provider,
|
|
391
|
+
{
|
|
392
|
+
value: {
|
|
393
|
+
tokenList,
|
|
394
|
+
userTokens,
|
|
395
|
+
featuredTokens: featuredTokenList,
|
|
396
|
+
ensoTokens,
|
|
397
|
+
onAddToken(tk) {
|
|
398
|
+
onAddToken(tk, { defaultTokens, userTokens, tokenList });
|
|
399
|
+
},
|
|
400
|
+
onRemoveToken,
|
|
401
|
+
refresh: () => {
|
|
402
|
+
refresh();
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
children
|
|
406
|
+
}
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export {
|
|
411
|
+
BeraFlagsProvider,
|
|
412
|
+
useBeraFlags,
|
|
413
|
+
useBeraFlag,
|
|
414
|
+
BexStateContext,
|
|
415
|
+
useBexStatus,
|
|
416
|
+
BexStatusProvider,
|
|
417
|
+
useBlockTime,
|
|
418
|
+
BlockTimeContext,
|
|
419
|
+
BlockTimeProvider,
|
|
420
|
+
HoneyConfigContext,
|
|
421
|
+
HoneyConfigProvider,
|
|
422
|
+
useHoneyConfig,
|
|
423
|
+
useEnsoUserTokensWithBalances,
|
|
424
|
+
TokenContext,
|
|
425
|
+
TokensProvider
|
|
426
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BeraTracing
|
|
3
|
+
} from "./chunk-SZ5C44L5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
RequestError
|
|
6
|
+
} from "./chunk-ZLTMIFCZ.mjs";
|
|
7
|
+
|
|
8
|
+
// src/utils/getErrorResponse.ts
|
|
9
|
+
async function getErrorResponse(response) {
|
|
10
|
+
const contentType = response.headers.get("content-type");
|
|
11
|
+
if (contentType?.includes("application/json")) {
|
|
12
|
+
return response.json();
|
|
13
|
+
} else {
|
|
14
|
+
const text = await response.text();
|
|
15
|
+
try {
|
|
16
|
+
return JSON.parse(text);
|
|
17
|
+
} catch {
|
|
18
|
+
return {
|
|
19
|
+
message: "Unknown error, can't decode response into JSON",
|
|
20
|
+
cause: text
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// src/utils/sanitizeRpcUrl.ts
|
|
27
|
+
function sanitizeRpcUrl(url) {
|
|
28
|
+
if (!url) return "";
|
|
29
|
+
try {
|
|
30
|
+
const parsed = new URL(url);
|
|
31
|
+
if (parsed.hostname.endsWith(".quiknode.pro")) {
|
|
32
|
+
parsed.pathname = "/";
|
|
33
|
+
parsed.search = "";
|
|
34
|
+
return parsed.toString();
|
|
35
|
+
}
|
|
36
|
+
return url;
|
|
37
|
+
} catch {
|
|
38
|
+
return url;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/utils/beraFetch.ts
|
|
43
|
+
async function beraFetch(endpoint, options, spanContext) {
|
|
44
|
+
try {
|
|
45
|
+
let spanUrl = sanitizeRpcUrl(
|
|
46
|
+
typeof endpoint === "string" || endpoint instanceof URL ? endpoint.toString() : endpoint.url.toString()
|
|
47
|
+
).replace(/0x[a-fA-F0-9]{40}/g, ":address");
|
|
48
|
+
if (spanContext?.keepQueryParams !== true && URL.canParse(spanUrl)) {
|
|
49
|
+
const queryParams = new URL(spanUrl).searchParams;
|
|
50
|
+
if (Array.isArray(spanContext?.keepQueryParams)) {
|
|
51
|
+
const searchParams = new URLSearchParams();
|
|
52
|
+
for (const param of spanContext.keepQueryParams) {
|
|
53
|
+
searchParams.set(param, queryParams.get(param) ?? "");
|
|
54
|
+
}
|
|
55
|
+
const newUrl = new URL(spanUrl);
|
|
56
|
+
newUrl.search = searchParams.toString();
|
|
57
|
+
spanUrl = newUrl.toString();
|
|
58
|
+
} else {
|
|
59
|
+
const newUrl = new URL(spanUrl);
|
|
60
|
+
newUrl.search = "";
|
|
61
|
+
spanUrl = newUrl.toString();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const endpointName = typeof endpoint === "string" || endpoint instanceof URL ? void 0 : endpoint.name;
|
|
65
|
+
return await BeraTracing.startSpan(
|
|
66
|
+
{
|
|
67
|
+
op: "beraFetch",
|
|
68
|
+
name: endpointName ? `beraFetch ${endpointName}` : "beraFetch",
|
|
69
|
+
attributes: typeof endpoint === "string" || endpoint instanceof URL ? {
|
|
70
|
+
"operation.source.url": spanUrl,
|
|
71
|
+
...spanContext?.attributes
|
|
72
|
+
} : {
|
|
73
|
+
"operation.source.url": spanUrl,
|
|
74
|
+
"operation.source.type": endpoint.type,
|
|
75
|
+
"operation.source.name": endpoint.name,
|
|
76
|
+
...spanContext?.attributes
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
async () => {
|
|
80
|
+
const response = await fetch(
|
|
81
|
+
typeof endpoint === "string" || endpoint instanceof URL ? endpoint : endpoint.url,
|
|
82
|
+
{
|
|
83
|
+
...options
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
if (!response.ok) {
|
|
87
|
+
const error = await getErrorResponse(response);
|
|
88
|
+
throw new RequestError({
|
|
89
|
+
cause: error,
|
|
90
|
+
// @to-do import getErrorResponse logic in this function
|
|
91
|
+
// when it's removed from other places
|
|
92
|
+
response,
|
|
93
|
+
endpoint
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return response;
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
if (error instanceof RequestError) {
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
throw new RequestError({
|
|
104
|
+
cause: error,
|
|
105
|
+
endpoint,
|
|
106
|
+
response: void 0
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async function beraFetchJson(endpoint, options) {
|
|
111
|
+
const response = await beraFetch(endpoint, {
|
|
112
|
+
...options,
|
|
113
|
+
headers: {
|
|
114
|
+
Accept: "application/json",
|
|
115
|
+
...options?.headers
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return response.json();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export {
|
|
122
|
+
getErrorResponse,
|
|
123
|
+
sanitizeRpcUrl,
|
|
124
|
+
beraFetch,
|
|
125
|
+
beraFetchJson
|
|
126
|
+
};
|