@berachain/berajs 0.2.8-beta.1 → 0.2.8-beta.11

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.
Files changed (222) hide show
  1. package/dist/RequestError-BRIiJgHk.d.ts +144 -0
  2. package/dist/RequestError-DSUzJ1Iy.d.cts +144 -0
  3. package/dist/abi/exports.cjs.map +1 -1
  4. package/dist/abi/exports.mjs +1 -1
  5. package/dist/actions/exports.cjs +1 -1
  6. package/dist/actions/exports.cjs.map +1 -1
  7. package/dist/actions/exports.d.cts +22 -105
  8. package/dist/actions/exports.d.ts +22 -105
  9. package/dist/actions/exports.mjs +1 -1
  10. package/dist/actions/exports.mjs.map +1 -1
  11. package/dist/actions/governance/exports.cjs +2 -0
  12. package/dist/actions/governance/exports.cjs.map +1 -0
  13. package/dist/actions/governance/exports.d.cts +140 -0
  14. package/dist/actions/governance/exports.d.ts +140 -0
  15. package/dist/actions/governance/exports.mjs +2 -0
  16. package/dist/actions/governance/exports.mjs.map +1 -0
  17. package/dist/chunk-33XNWMPP.cjs +2 -0
  18. package/dist/chunk-33XNWMPP.cjs.map +1 -0
  19. package/dist/chunk-4TALWNXE.cjs +2 -0
  20. package/dist/chunk-4TALWNXE.cjs.map +1 -0
  21. package/dist/chunk-54BTOQE3.cjs +2 -0
  22. package/dist/chunk-54BTOQE3.cjs.map +1 -0
  23. package/dist/chunk-5QAFKFM5.mjs +2 -0
  24. package/dist/chunk-5QAFKFM5.mjs.map +1 -0
  25. package/dist/chunk-6DIA6PXV.cjs +2 -0
  26. package/dist/chunk-6DIA6PXV.cjs.map +1 -0
  27. package/dist/{chunk-NMH7LHPW.cjs → chunk-6JJIZCVY.cjs} +2 -2
  28. package/dist/chunk-6JJIZCVY.cjs.map +1 -0
  29. package/dist/chunk-BE6B4PQF.cjs +2 -0
  30. package/dist/chunk-BE6B4PQF.cjs.map +1 -0
  31. package/dist/chunk-CHFETMC6.cjs +4 -0
  32. package/dist/chunk-CHFETMC6.cjs.map +1 -0
  33. package/dist/{chunk-I7M43BB4.cjs → chunk-D6L7LTA2.cjs} +2 -2
  34. package/dist/chunk-D6L7LTA2.cjs.map +1 -0
  35. package/dist/chunk-DDEQFR3M.cjs.map +1 -1
  36. package/dist/chunk-ENT2OSXT.mjs +2 -0
  37. package/dist/chunk-ENT2OSXT.mjs.map +1 -0
  38. package/dist/{chunk-74QD4JAH.mjs → chunk-GXV2JA36.mjs} +2 -2
  39. package/dist/chunk-GXV2JA36.mjs.map +1 -0
  40. package/dist/chunk-H6ZO4SLB.mjs +4 -0
  41. package/dist/chunk-H6ZO4SLB.mjs.map +1 -0
  42. package/dist/chunk-JDDRTHFG.mjs +2 -0
  43. package/dist/chunk-JDDRTHFG.mjs.map +1 -0
  44. package/dist/{chunk-T5FSQ3YE.mjs → chunk-JDZGYU5T.mjs} +2 -2
  45. package/dist/{chunk-T5FSQ3YE.mjs.map → chunk-JDZGYU5T.mjs.map} +1 -1
  46. package/dist/chunk-JIPSTWKO.mjs +2 -0
  47. package/dist/{chunk-KI66MQ43.mjs.map → chunk-JIPSTWKO.mjs.map} +1 -1
  48. package/dist/chunk-JSTCUTXP.cjs +2 -0
  49. package/dist/chunk-JSTCUTXP.cjs.map +1 -0
  50. package/dist/{chunk-MJZHJFZO.mjs → chunk-JXM5S4IU.mjs} +2 -2
  51. package/dist/chunk-K5L2B4DU.mjs +2 -0
  52. package/dist/{chunk-EFG3OYYQ.mjs.map → chunk-K5L2B4DU.mjs.map} +1 -1
  53. package/dist/chunk-KUQEX7H3.mjs +2 -0
  54. package/dist/chunk-KUQEX7H3.mjs.map +1 -0
  55. package/dist/chunk-NXXMW2O7.mjs +2 -0
  56. package/dist/chunk-NXXMW2O7.mjs.map +1 -0
  57. package/dist/chunk-OIYXOKTT.cjs.map +1 -1
  58. package/dist/chunk-OUD27MU7.cjs.map +1 -1
  59. package/dist/chunk-PRLVZIKD.mjs +2 -0
  60. package/dist/chunk-PRLVZIKD.mjs.map +1 -0
  61. package/dist/chunk-QVIAMSZ6.cjs +2 -0
  62. package/dist/chunk-QVIAMSZ6.cjs.map +1 -0
  63. package/dist/chunk-RCWM55DE.cjs +2 -0
  64. package/dist/chunk-RCWM55DE.cjs.map +1 -0
  65. package/dist/chunk-REWME3FY.cjs +2 -0
  66. package/dist/chunk-REWME3FY.cjs.map +1 -0
  67. package/dist/chunk-RJN36GBU.mjs +2 -0
  68. package/dist/chunk-RJN36GBU.mjs.map +1 -0
  69. package/dist/chunk-RWOICHRW.cjs.map +1 -1
  70. package/dist/chunk-S4CDSVLK.cjs +2 -0
  71. package/dist/chunk-S4CDSVLK.cjs.map +1 -0
  72. package/dist/chunk-WLJHFHKF.mjs +2 -0
  73. package/dist/chunk-WLJHFHKF.mjs.map +1 -0
  74. package/dist/chunk-WRFDB3QJ.cjs.map +1 -1
  75. package/dist/chunk-XNJLSA6P.cjs.map +1 -1
  76. package/dist/chunk-XZC34BHM.cjs +2 -0
  77. package/dist/chunk-XZC34BHM.cjs.map +1 -0
  78. package/dist/chunk-Y2FETC6T.cjs +2 -0
  79. package/dist/chunk-Y2FETC6T.cjs.map +1 -0
  80. package/dist/chunk-ZW2N63FI.mjs +2 -0
  81. package/dist/chunk-ZW2N63FI.mjs.map +1 -0
  82. package/dist/contexts/exports.cjs +1 -1
  83. package/dist/contexts/exports.cjs.map +1 -1
  84. package/dist/contexts/exports.mjs +1 -1
  85. package/dist/contexts/exports.mjs.map +1 -1
  86. package/dist/enum/exports.cjs +1 -1
  87. package/dist/enum/exports.cjs.map +1 -1
  88. package/dist/enum/exports.d.cts +1 -1
  89. package/dist/enum/exports.d.ts +1 -1
  90. package/dist/enum/exports.mjs +1 -1
  91. package/dist/enum/exports.mjs.map +1 -1
  92. package/dist/enum/governance/exports.cjs +2 -0
  93. package/dist/enum/governance/exports.cjs.map +1 -0
  94. package/dist/enum/governance/exports.d.cts +60 -0
  95. package/dist/enum/governance/exports.d.ts +60 -0
  96. package/dist/enum/governance/exports.mjs +2 -0
  97. package/dist/enum/governance/exports.mjs.map +1 -0
  98. package/dist/errors/exports.cjs +1 -1
  99. package/dist/errors/exports.cjs.map +1 -1
  100. package/dist/errors/exports.d.cts +3 -89
  101. package/dist/errors/exports.d.ts +3 -89
  102. package/dist/errors/exports.mjs +1 -1
  103. package/dist/{getValidatorQueuedOperatorAddress-BQXkSFd9.d.cts → getValidatorQueuedOperatorAddress-CPuIw7n5.d.cts} +2 -2
  104. package/dist/{getValidatorQueuedOperatorAddress-DUZOmxLV.d.ts → getValidatorQueuedOperatorAddress-CbZQ0kv2.d.ts} +2 -2
  105. package/dist/{global.d-6aSWIkV_.d.cts → global.d-B9nLZ7ul.d.cts} +3 -239
  106. package/dist/{global.d-SU9Epq0M.d.ts → global.d-ylUk_etZ.d.ts} +3 -239
  107. package/dist/hooks/exports.cjs +3 -3
  108. package/dist/hooks/exports.cjs.map +1 -1
  109. package/dist/hooks/exports.d.cts +19 -198
  110. package/dist/hooks/exports.d.ts +19 -198
  111. package/dist/hooks/exports.mjs +3 -3
  112. package/dist/hooks/exports.mjs.map +1 -1
  113. package/dist/hooks/governance/exports.cjs +2 -0
  114. package/dist/hooks/governance/exports.cjs.map +1 -0
  115. package/dist/hooks/governance/exports.d.cts +181 -0
  116. package/dist/hooks/governance/exports.d.ts +181 -0
  117. package/dist/hooks/governance/exports.mjs +2 -0
  118. package/dist/hooks/governance/exports.mjs.map +1 -0
  119. package/dist/pol.d-o6Iw75bK.d.cts +134 -0
  120. package/dist/pol.d-qR8bGEP5.d.ts +134 -0
  121. package/dist/{txnEnum-CCuQUFlh.d.cts → txnEnum-CwAJN4zV.d.cts} +3 -60
  122. package/dist/{txnEnum-CCuQUFlh.d.ts → txnEnum-CwAJN4zV.d.ts} +3 -60
  123. package/dist/types/exports.cjs.map +1 -1
  124. package/dist/types/exports.d.cts +7 -7
  125. package/dist/types/exports.d.ts +7 -7
  126. package/dist/types/governance/exports.cjs +1 -0
  127. package/dist/types/governance/exports.cjs.map +1 -0
  128. package/dist/types/governance/exports.d.cts +109 -0
  129. package/dist/types/governance/exports.d.ts +109 -0
  130. package/dist/types/governance/exports.mjs +1 -0
  131. package/dist/types/governance/exports.mjs.map +1 -0
  132. package/dist/utils/exports.cjs +1 -1
  133. package/dist/utils/exports.cjs.map +1 -1
  134. package/dist/utils/exports.d.cts +10 -2
  135. package/dist/utils/exports.d.ts +10 -2
  136. package/dist/utils/exports.mjs +1 -1
  137. package/dist/utils/exports.mjs.map +1 -1
  138. package/package.json +49 -8
  139. package/src/actions/clients/BeraApolloClient.ts +9 -0
  140. package/src/actions/clients/getApolloClient.ts +23 -6
  141. package/src/actions/dex/getOnChainPool.ts +1 -1
  142. package/src/actions/enso/getBendMultiplyBundle.ts +9 -2
  143. package/src/actions/enso/util.ts +6 -8
  144. package/src/actions/exports.ts +1 -10
  145. package/src/actions/governance/checkProposalField.ts +108 -54
  146. package/src/actions/governance/computeActualStatus.ts +7 -3
  147. package/src/actions/governance/exports.ts +9 -0
  148. package/src/actions/governance/getAllProposals.ts +15 -8
  149. package/src/actions/governance/getBodyErrors.ts +13 -5
  150. package/src/actions/governance/getDecodedFunctionData.ts +31 -22
  151. package/src/actions/governance/getProposalDetails.ts +8 -4
  152. package/src/actions/governance/getProposalFromTx.ts +19 -10
  153. package/src/actions/governance/getProposalParams.ts +17 -17
  154. package/src/actions/governance/getProposalVotes.ts +7 -3
  155. package/src/actions/governance/getQuorum.ts +7 -7
  156. package/src/actions/governance/parseProposalBody.ts +19 -9
  157. package/src/actions/honey/getChartData.ts +5 -5
  158. package/src/actions/honey/getHoney24hVolume.ts +30 -0
  159. package/src/actions/honey/getHoneyPythPriceOracle.ts +1 -1
  160. package/src/actions/honey/getHoneyRootPriceOracle.ts +1 -1
  161. package/src/actions/pol/getEarnedStakedBeraVault.ts +12 -2
  162. package/src/actions/pol/getRewardVaultBeaconImplementation.ts +1 -1
  163. package/src/actions/pol/getRewardVaultIncentives.ts +2 -2
  164. package/src/actions/pol/getStakingDailyAssets.ts +7 -1
  165. package/src/actions/pol/getTotalStakedAmount.ts +1 -1
  166. package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
  167. package/src/actions/pol/getUserVaultsReward.ts +1 -1
  168. package/src/actions/tokens/getTokenInformation.ts +8 -15
  169. package/src/actions/tokens/getUnderlyingToken.ts +1 -1
  170. package/src/actions/validators/getUserBoosts.ts +1 -1
  171. package/src/enum/exports.ts +0 -1
  172. package/src/enum/governance/exports.ts +1 -0
  173. package/src/enum/txnEnum.ts +2 -0
  174. package/src/errors/BeraError.ts +7 -2
  175. package/src/errors/RequestError.ts +2 -1
  176. package/src/hooks/dex/usePoolHistoricalData.ts +1 -1
  177. package/src/hooks/enso/useBendZapSupply.ts +1 -1
  178. package/src/hooks/exports.ts +1 -15
  179. package/src/hooks/governance/exports.ts +14 -0
  180. package/src/hooks/honey/useHoney24hVolume.ts +16 -0
  181. package/src/hooks/perps/usePythUpdateFee.ts +1 -1
  182. package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
  183. package/src/types/exports.ts +0 -1
  184. package/src/types/governance/exports.ts +1 -0
  185. package/src/utils/beraFetch.ts +70 -15
  186. package/src/utils/getErrorResponse.ts +1 -1
  187. package/dist/RequestError-A8XJ6QR9.d.cts +0 -57
  188. package/dist/RequestError-Dk97z8rm.d.ts +0 -57
  189. package/dist/chunk-2EN6PPAW.cjs +0 -2
  190. package/dist/chunk-2EN6PPAW.cjs.map +0 -1
  191. package/dist/chunk-2YBHAMDV.cjs +0 -2
  192. package/dist/chunk-2YBHAMDV.cjs.map +0 -1
  193. package/dist/chunk-57RINXU6.cjs +0 -2
  194. package/dist/chunk-57RINXU6.cjs.map +0 -1
  195. package/dist/chunk-74QD4JAH.mjs.map +0 -1
  196. package/dist/chunk-74WA35RI.cjs +0 -2
  197. package/dist/chunk-74WA35RI.cjs.map +0 -1
  198. package/dist/chunk-7ITWLMO7.cjs +0 -4
  199. package/dist/chunk-7ITWLMO7.cjs.map +0 -1
  200. package/dist/chunk-BEKH5EYT.mjs +0 -2
  201. package/dist/chunk-BEKH5EYT.mjs.map +0 -1
  202. package/dist/chunk-DK42F2ZM.cjs +0 -2
  203. package/dist/chunk-DK42F2ZM.cjs.map +0 -1
  204. package/dist/chunk-EFG3OYYQ.mjs +0 -2
  205. package/dist/chunk-GO5E7UUD.cjs +0 -2
  206. package/dist/chunk-GO5E7UUD.cjs.map +0 -1
  207. package/dist/chunk-I7M43BB4.cjs.map +0 -1
  208. package/dist/chunk-IDFMLLDY.mjs +0 -2
  209. package/dist/chunk-IDFMLLDY.mjs.map +0 -1
  210. package/dist/chunk-JE5GI2OC.mjs +0 -4
  211. package/dist/chunk-JE5GI2OC.mjs.map +0 -1
  212. package/dist/chunk-KI66MQ43.mjs +0 -2
  213. package/dist/chunk-NMH7LHPW.cjs.map +0 -1
  214. package/dist/chunk-NVHV2LDK.cjs +0 -2
  215. package/dist/chunk-NVHV2LDK.cjs.map +0 -1
  216. package/dist/chunk-PLIH6KQM.mjs +0 -2
  217. package/dist/chunk-PLIH6KQM.mjs.map +0 -1
  218. package/dist/chunk-QRAIGQF2.mjs +0 -2
  219. package/dist/chunk-QRAIGQF2.mjs.map +0 -1
  220. package/src/actions/honey/getHoneyGlobalData.ts +0 -21
  221. package/src/hooks/honey/useHoneyGlobalData.ts +0 -23
  222. /package/dist/{chunk-MJZHJFZO.mjs.map → chunk-JXM5S4IU.mjs.map} +0 -0
@@ -0,0 +1,30 @@
1
+ import {
2
+ Aggregation_Interval,
3
+ GetSnapshots,
4
+ type GetSnapshotsQuery,
5
+ type GetSnapshotsQueryVariables,
6
+ } from "@berachain/graphql/honey";
7
+ import BigNumber from "@berachain/utils/pkg/bignumber.js";
8
+
9
+ import { getApolloClient } from "../clients/getApolloClient";
10
+
11
+ export async function getHoney24hVolume({
12
+ ...args
13
+ }: BeraJS.BaseFunctionArgs = {}) {
14
+ const client = getApolloClient("honey.subgraph", args);
15
+ const result = await client.query<
16
+ GetSnapshotsQuery,
17
+ GetSnapshotsQueryVariables
18
+ >({
19
+ query: GetSnapshots,
20
+ variables: {
21
+ interval: Aggregation_Interval.Hour,
22
+ first: 24,
23
+ },
24
+ });
25
+
26
+ return result.data?.honeySnapshots.reduce(
27
+ (acc, curr) => new BigNumber(curr.totalVolume).plus(acc),
28
+ new BigNumber(0),
29
+ );
30
+ }
@@ -13,7 +13,7 @@ export async function getHoneyPythOracle({
13
13
  publicClient: PublicClient;
14
14
  pythOracle: Address;
15
15
  }) {
16
- return await publicClient.readContract({
16
+ return publicClient.readContract({
17
17
  address: pythOracle,
18
18
  abi: honeyRootOracleAbi,
19
19
  functionName: "pythOracle",
@@ -16,7 +16,7 @@ export async function getHoneyRootPriceOracle({
16
16
  factory?: Address;
17
17
  }): Promise<Address> {
18
18
  const { config } = parseBaseArgs(args);
19
- return await publicClient.readContract({
19
+ return publicClient.readContract({
20
20
  address: factory ?? config.honey.factory,
21
21
  abi: honeyFactoryAbi,
22
22
  functionName: "priceOracle",
@@ -1,5 +1,7 @@
1
1
  import type { Address } from "viem";
2
2
 
3
+ import { getUriFromLink } from "@berachain/config";
4
+
3
5
  import { beraFetchJson } from "../../utils/beraFetch";
4
6
  import { parseBaseArgs } from "../../utils/parseBaseArgs";
5
7
 
@@ -26,6 +28,14 @@ export async function getEarnedStakedBeraVault({
26
28
  }: BeraJS.BaseFunctionArgs &
27
29
  GetEarnedStakedBeraVaultArgs): Promise<StakingHistoryData> {
28
30
  const { config } = parseBaseArgs(args);
29
- const url = `${config.staking}/vaults/${address}/earnings/${account}`;
30
- return beraFetchJson<StakingHistoryData>({ url, type: "rest" });
31
+
32
+ const url = `${getUriFromLink(config.staking)}/vaults/${address}/earnings/${account}`;
33
+ return beraFetchJson<StakingHistoryData>({
34
+ url,
35
+ name:
36
+ typeof config.staking === "string"
37
+ ? "backend-railway"
38
+ : config.staking.name,
39
+ type: "rest",
40
+ });
31
41
  }
@@ -28,7 +28,7 @@ export async function getRewardVaultBeaconImplementation({
28
28
  });
29
29
 
30
30
  // from the beacon contract, we get the current implementation address
31
- return await publicClient.readContract({
31
+ return publicClient.readContract({
32
32
  address: beacon,
33
33
  abi: upgradableBeaconAbi,
34
34
  functionName: "implementation",
@@ -132,11 +132,11 @@ export async function getRewardVaultIncentives({
132
132
  decimals: decimalsResult,
133
133
  pendingAmount: isSameAddress(stakingToken, token)
134
134
  ? formatUnits(
135
- (totalBalance.result ?? 0n) - totalSupply - remainingAmount,
135
+ multicallResult(totalBalance, 0n) - totalSupply - remainingAmount,
136
136
  decimalsResult,
137
137
  )
138
138
  : formatUnits(
139
- (totalBalance.result ?? 0n) - remainingAmount,
139
+ multicallResult(totalBalance, 0n) - remainingAmount,
140
140
  decimalsResult,
141
141
  ),
142
142
  };
@@ -1,5 +1,7 @@
1
1
  import type { Address } from "viem";
2
2
 
3
+ import { getUriFromLink } from "@berachain/config";
4
+
3
5
  import { beraFetchJson } from "../../utils/beraFetch";
4
6
  import { parseBaseArgs } from "../../utils/parseBaseArgs";
5
7
 
@@ -16,9 +18,13 @@ export async function getStakingDailyAssets({
16
18
  );
17
19
 
18
20
  const { config } = parseBaseArgs({});
19
- const url = `${config.staking}/vaults/${address}/total-assets-by-day?start=${startDayDate.toISOString().split("T")[0]}`;
21
+ const url = `${getUriFromLink(config.staking)}/vaults/${address}/total-assets-by-day?start=${startDayDate.toISOString().split("T")[0]}`;
20
22
  return beraFetchJson<{ _timestamp: number; total_assets: string }[]>({
21
23
  url,
24
+ name:
25
+ typeof config.staking === "string"
26
+ ? "backend-railway"
27
+ : config.staking.name,
22
28
  type: "rest",
23
29
  });
24
30
  }
@@ -24,7 +24,7 @@ export async function getTotalStakedAmount({
24
24
  try {
25
25
  const totalAssets = await Promise.all(
26
26
  vaultAddresses.map(async (address) => {
27
- return await publicClient.readContract({
27
+ return publicClient.readContract({
28
28
  address,
29
29
  abi: stakeBeraVaultAbi,
30
30
  functionName: "totalAssets",
@@ -36,5 +36,5 @@ export async function getUserClaimableIncentives({
36
36
  });
37
37
  }
38
38
 
39
- return await result.json();
39
+ return result.json();
40
40
  }
@@ -23,7 +23,7 @@ export async function getUserVaultsReward({
23
23
  if (!account) throw new Error("Missing user account");
24
24
  if (!vaultAddress) throw new Error("Missing vault address");
25
25
 
26
- return await publicClient.readContract({
26
+ return publicClient.readContract({
27
27
  address: vaultAddress,
28
28
  abi: rewardVaultAbi,
29
29
  functionName: "earned",
@@ -1,15 +1,18 @@
1
1
  import { type Address, erc20Abi, type PublicClient } from "viem";
2
2
 
3
+ import type { ChainId } from "@berachain/config";
4
+
5
+ import { assertPublicClient } from "../../errors/assert";
3
6
  import { initBeraError } from "../../errors/initBeraError";
4
7
  import type { MinimalERC20 } from "../../types/dex";
5
8
 
6
9
  export interface GetTokenInformation {
7
10
  address: Address;
8
11
  publicClient: PublicClient;
9
- chainId: number;
12
+ chainId: ChainId;
10
13
  }
11
14
 
12
- export type GetTokenInformationResponse = MinimalERC20 | undefined;
15
+ export type GetTokenInformationResponse = MinimalERC20;
13
16
 
14
17
  export async function getTokenInformation({
15
18
  address,
@@ -17,9 +20,7 @@ export async function getTokenInformation({
17
20
  chainId,
18
21
  }: GetTokenInformation): Promise<GetTokenInformationResponse> {
19
22
  try {
20
- if (!publicClient) {
21
- throw new Error("Public client not found");
22
- }
23
+ assertPublicClient(publicClient);
23
24
 
24
25
  const [decimals, name, symbol] = await Promise.all([
25
26
  publicClient.readContract({
@@ -39,22 +40,14 @@ export async function getTokenInformation({
39
40
  }),
40
41
  ]);
41
42
 
42
- const token = {
43
+ return {
43
44
  address,
44
45
  decimals,
45
46
  name,
46
47
  symbol,
47
48
  chainId,
48
- };
49
- if (
50
- typeof token.decimals !== "number" ||
51
- typeof token.name !== "string" ||
52
- typeof token.symbol !== "string"
53
- )
54
- throw new Error(`Invalid ERC20 token. Address: ${address}`);
55
- return token satisfies MinimalERC20;
49
+ } satisfies MinimalERC20;
56
50
  } catch (e) {
57
- console.error(e);
58
51
  throw initBeraError({ cause: e });
59
52
  }
60
53
  }
@@ -37,7 +37,7 @@ export async function getUnderlyingToken({
37
37
  functionName: "asset",
38
38
  });
39
39
 
40
- return await getTokenInformation({
40
+ return getTokenInformation({
41
41
  address: address,
42
42
  publicClient,
43
43
  chainId: token.chainId,
@@ -19,7 +19,7 @@ export async function getUserBoosts({
19
19
  const { config } = parseBaseArgs(args);
20
20
  const apiClient = getApolloClient("api", args);
21
21
 
22
- return await apiClient.query<
22
+ return apiClient.query<
23
23
  GetUserValidatorInformationQuery,
24
24
  GetUserValidatorInformationQueryVariables
25
25
  >({
@@ -1,6 +1,5 @@
1
1
  export * from "./contracts";
2
2
  export * from "./dex";
3
- export * from "./governance";
4
3
  export * from "./honey";
5
4
  export * from "./polling";
6
5
  export * from "./slippage";
@@ -0,0 +1 @@
1
+ export * from "../governance";
@@ -94,6 +94,8 @@ export enum TransactionActionType {
94
94
  // BEND
95
95
  BEND_MARKET_REPAY_AND_WITHDRAW_COLLATERAL = "Bend Market Repay and Withdraw Collateral",
96
96
  BEND_MARKET_SUPPLY_COLLATERAL_AND_BORROW = "Bend Market Supply Collateral and Borrow",
97
+ BEND_MARKET_MULTIPLY = "Bend Market Multiply",
98
+ BEND_MARKET_DEMULTIPLY = "Bend Market Demultiply",
97
99
  BEND_VAULT_SUPPLY = "Bend Vault Supply",
98
100
  BEND_VAULT_WITHDRAW = "Bend Vault Withdraw",
99
101
 
@@ -1,6 +1,6 @@
1
1
  import { type Abi, BaseError } from "viem";
2
2
 
3
- import { appConfig } from "@berachain/config/internal";
3
+ import { appConfig, currentDapp } from "@berachain/config/internal";
4
4
 
5
5
  import { GENERAL_ERROR } from "./errorMap";
6
6
  import { findMatchingError } from "./getErrorMessage";
@@ -237,7 +237,12 @@ export class BeraError extends Error {
237
237
  ...tags,
238
238
  };
239
239
  // Useful for debugging in development or on vercel preview links
240
- if (!appConfig.env.isProduction && process.env.NODE_ENV !== "test") {
240
+ if (
241
+ !appConfig.env.isProduction &&
242
+ // skip debug logs on consumer of the berajs package
243
+ (process.env.NEXT_PUBLIC_IS_MONOBERA === "true" || currentDapp) &&
244
+ process.env.NODE_ENV !== "test"
245
+ ) {
241
246
  console.group("BeraError thrown");
242
247
  console.debug("Level", this.level);
243
248
  console.debug("Reason", this.reason);
@@ -1,5 +1,6 @@
1
1
  import type { ErrorLike } from "@apollo/client";
2
2
 
3
+ import { getUriFromLink } from "@berachain/config";
3
4
  import { mainnet } from "@berachain/config/mainnet";
4
5
 
5
6
  import { BeraError, type IBeraErrorArgs } from "./BeraError";
@@ -148,7 +149,7 @@ export class RequestError extends BeraError {
148
149
 
149
150
  if (
150
151
  this.queryRichfulDomains.some((domain) =>
151
- this.endpoint.url.includes(domain),
152
+ this.endpoint.url.includes(getUriFromLink(domain)),
152
153
  )
153
154
  ) {
154
155
  // remove query params if it's an aggregator url
@@ -32,7 +32,7 @@ export const usePoolHistoricalData = (
32
32
  >(
33
33
  QUERY_KEY,
34
34
  async ([, poolId]) => {
35
- return await getPoolHistoricalData({
35
+ return getPoolHistoricalData({
36
36
  poolId,
37
37
  chain: config.bex.chainName as GqlChain,
38
38
  });
@@ -198,7 +198,7 @@ export function useBendZapSupplyHelper(
198
198
  assertAddress(tokenIn?.address, "tokenInAddress");
199
199
  assertDefined(tokenIn?.chainId, "tokenInChainId");
200
200
 
201
- return await ensoErc4626.getQuote({
201
+ return ensoErc4626.getQuote({
202
202
  tokenIn,
203
203
  tokenOut: bendVault,
204
204
  underlyingToken: loanToken,
@@ -36,27 +36,13 @@ export * from "./enso/useBendZapSupply";
36
36
  export * from "./enso/useEnsoSwapBundle";
37
37
  export * from "./enso/useEnsoUserTokensWithBalances";
38
38
  export * from "./enso/useZapStakeBera";
39
- export { useCreateProposal } from "./governance/useCreateProposal";
40
- export * from "./governance/useGetPastVotes";
41
- export * from "./governance/useHasVoted";
42
- export * from "./governance/useIsCanceller";
43
- export * from "./governance/usePollAllProposals";
44
- export * from "./governance/usePollProposal";
45
- export * from "./governance/usePollProposalThreshold";
46
- export * from "./governance/usePollProposalVotes";
47
- export * from "./governance/usePollUserDelegates";
48
- export * from "./governance/useProposalFromTx";
49
- export * from "./governance/useProposalSnapshot";
50
- export * from "./governance/useProposalState";
51
- export * from "./governance/useProposalTimelockState";
52
- export * from "./governance/useQuorum";
53
39
  export * from "./honey/useCappedGlobally";
54
40
  export * from "./honey/useCappedRelatively";
55
41
  export * from "./honey/useCollateralWeights";
42
+ export * from "./honey/useHoney24hVolume";
56
43
  export * from "./honey/useHoneyAlerts";
57
44
  export * from "./honey/useHoneyBalances";
58
45
  export * from "./honey/useHoneyChartData";
59
- export * from "./honey/useHoneyGlobalData";
60
46
  export * from "./honey/useHoneySwapState";
61
47
  export * from "./honey/useHoneyVaultsBalance";
62
48
  export * from "./honey/useIsBadCollateralAsset";
@@ -0,0 +1,14 @@
1
+ export { useCreateProposal } from "./useCreateProposal";
2
+ export * from "./useGetPastVotes";
3
+ export * from "./useHasVoted";
4
+ export * from "./useIsCanceller";
5
+ export * from "./usePollAllProposals";
6
+ export * from "./usePollProposal";
7
+ export * from "./usePollProposalThreshold";
8
+ export * from "./usePollProposalVotes";
9
+ export * from "./usePollUserDelegates";
10
+ export * from "./useProposalFromTx";
11
+ export * from "./useProposalSnapshot";
12
+ export * from "./useProposalState";
13
+ export * from "./useProposalTimelockState";
14
+ export * from "./useQuorum";
@@ -0,0 +1,16 @@
1
+ import useSWR from "swr";
2
+
3
+ import { getHoney24hVolume } from "../../actions/honey/getHoney24hVolume";
4
+ import { POLLING } from "../../enum/polling";
5
+
6
+ export function useHoney24hVolume() {
7
+ const response = useSWR(["useHoney24hVolume"], () => getHoney24hVolume(), {
8
+ refreshInterval: POLLING.SLOW,
9
+ });
10
+
11
+ return {
12
+ ...response,
13
+
14
+ refresh: () => response.mutate(),
15
+ };
16
+ }
@@ -29,7 +29,7 @@ export const usePythUpdateFee = (
29
29
  useSWRImmutable(QUERY_KEY, async ([_, pythPriceFeedCalldata]) => {
30
30
  assertPublicClient(publicClient);
31
31
 
32
- return await getPythUpdateFee({
32
+ return getPythUpdateFee({
33
33
  client: publicClient,
34
34
  priceFeedId: pythPriceFeedCalldata,
35
35
  });
@@ -19,7 +19,7 @@ export function useValidatorRewardAllocation(
19
19
  const swrResponse = useSWR(
20
20
  QUERY_KEY,
21
21
  async ([, pubKey]) => {
22
- return await getValidatorRewardAllocation({
22
+ return getValidatorRewardAllocation({
23
23
  client: publicClient as PublicClient,
24
24
  pubKey,
25
25
  });
@@ -2,7 +2,6 @@ export * from "./bribe-boost.d";
2
2
  export * from "./dex.d";
3
3
  export * from "./enso.d";
4
4
  export * from "./global.d";
5
- export * from "./governance.d";
6
5
  export * from "./honeySwap.d";
7
6
  export * from "./pol.d";
8
7
  export * from "./staking.d";
@@ -0,0 +1 @@
1
+ export * from "../governance.d";
@@ -1,3 +1,4 @@
1
+ import { BeraTracing, type SpanContext } from "../errors/BeraTracing";
1
2
  import { RequestError } from "../errors/RequestError";
2
3
  import { getErrorResponse } from "./getErrorResponse";
3
4
 
@@ -6,27 +7,81 @@ type RequestOptions = RequestInit;
6
7
  export async function beraFetch(
7
8
  endpoint: ConstructorParameters<typeof RequestError>[0]["endpoint"],
8
9
  options?: RequestOptions,
10
+ spanContext?: SpanContext & {
11
+ /**
12
+ * If true, keep all query params in the span URL.
13
+ * If an array of strings, keep only the query params in the array.
14
+ * If false, remove all query params from the span URL.
15
+ * If not provided, remove all query params from the span URL.
16
+ */
17
+ keepQueryParams?: boolean | string[];
18
+ },
9
19
  ) {
10
20
  try {
11
- const response = await fetch(
21
+ let spanUrl = (
12
22
  typeof endpoint === "string" || endpoint instanceof URL
13
- ? endpoint
14
- : endpoint.url,
23
+ ? endpoint.toString()
24
+ : endpoint.url.toString()
25
+ ).replace(/0x[a-fA-F0-9]{40}/g, ":address");
26
+
27
+ if (spanContext?.keepQueryParams !== true && URL.canParse(spanUrl)) {
28
+ const queryParams = new URL(spanUrl).searchParams;
29
+ if (Array.isArray(spanContext?.keepQueryParams)) {
30
+ const searchParams = new URLSearchParams();
31
+
32
+ for (const param of spanContext.keepQueryParams) {
33
+ searchParams.set(param, queryParams.get(param) ?? "");
34
+ }
35
+
36
+ const newUrl = new URL(spanUrl);
37
+ newUrl.search = searchParams.toString();
38
+ spanUrl = newUrl.toString();
39
+ } else {
40
+ const newUrl = new URL(spanUrl);
41
+ newUrl.search = "";
42
+ spanUrl = newUrl.toString();
43
+ }
44
+ }
45
+
46
+ return await BeraTracing.startSpan(
15
47
  {
16
- ...options,
48
+ op: "beraFetch",
49
+ name: "beraFetch",
50
+ attributes:
51
+ typeof endpoint === "string" || endpoint instanceof URL
52
+ ? {
53
+ "operation.source.url": spanUrl,
54
+ ...spanContext?.attributes,
55
+ }
56
+ : ({
57
+ "operation.source.url": spanUrl,
58
+ "operation.source.type": endpoint.type,
59
+ "operation.source.name": endpoint.name,
60
+ ...spanContext?.attributes,
61
+ } satisfies SpanContext["attributes"]),
62
+ },
63
+ async () => {
64
+ const response = await fetch(
65
+ typeof endpoint === "string" || endpoint instanceof URL
66
+ ? endpoint
67
+ : endpoint.url,
68
+ {
69
+ ...options,
70
+ },
71
+ );
72
+ if (!response.ok) {
73
+ const error = await getErrorResponse(response);
74
+ throw new RequestError({
75
+ cause: error,
76
+ // @to-do import getErrorResponse logic in this function
77
+ // when it's removed from other places
78
+ response: response,
79
+ endpoint,
80
+ });
81
+ }
82
+ return response;
17
83
  },
18
84
  );
19
- if (!response.ok) {
20
- const error = await getErrorResponse(response);
21
- throw new RequestError({
22
- cause: error,
23
- // @to-do import getErrorResponse logic in this function
24
- // when it's removed from other places
25
- response: response,
26
- endpoint,
27
- });
28
- }
29
- return response;
30
85
  } catch (error) {
31
86
  if (error instanceof RequestError) {
32
87
  throw error;
@@ -5,7 +5,7 @@ export async function getErrorResponse(response: Response) {
5
5
  const contentType = response.headers.get("content-type");
6
6
 
7
7
  if (contentType?.includes("application/json")) {
8
- return await response.json();
8
+ return response.json();
9
9
  } else {
10
10
  const text = await response.text();
11
11
  try {
@@ -1,57 +0,0 @@
1
- import { ErrorLike } from '@apollo/client';
2
- import { B as BeraError, I as IBeraErrorArgs } from './BeraError-_mQdkanr.cjs';
3
-
4
- /**
5
- * This is an error class that should be used to handle errors from fetch requests.
6
- */
7
- declare class RequestError extends BeraError {
8
- /**
9
- * The error response from the request.
10
- */
11
- response: Response | ErrorLike | undefined;
12
- static isCorsError(error: Error): boolean;
13
- /**
14
- * The endpoint that was requested.
15
- */
16
- endpoint: {
17
- name?: string;
18
- url: string;
19
- type?: "rest" | "graphql" | "rpc";
20
- };
21
- /**
22
- * A list of domains that should have their query params removed.
23
- */
24
- private queryRichfulDomains;
25
- statusCode: number | undefined;
26
- payload?: object;
27
- static readonly REASON_MAP: {
28
- readonly 429: "RATE_LIMITED_429";
29
- readonly NETWORK_ERROR: "NETWORK_ERROR";
30
- readonly CORS_ERROR: "CORS";
31
- };
32
- constructor(args: IBeraErrorArgs & {
33
- response: Response | ErrorLike | undefined;
34
- /**
35
- * The payload sent to the request.
36
- */
37
- payload?: object;
38
- endpoint: string | URL | {
39
- name?: string;
40
- url: string | URL;
41
- type: "rest" | "graphql" | "rpc";
42
- };
43
- statusCode?: number;
44
- });
45
- setEndpoint(endpoint: string | URL | {
46
- name?: string;
47
- url: string | URL;
48
- type?: "rest" | "graphql" | "rpc";
49
- }): {
50
- name?: string;
51
- url: string;
52
- type?: "rest" | "graphql" | "rpc";
53
- };
54
- private tryMatchNetworkError;
55
- }
56
-
57
- export { RequestError as R };
@@ -1,57 +0,0 @@
1
- import { ErrorLike } from '@apollo/client';
2
- import { B as BeraError, I as IBeraErrorArgs } from './BeraError-_mQdkanr.js';
3
-
4
- /**
5
- * This is an error class that should be used to handle errors from fetch requests.
6
- */
7
- declare class RequestError extends BeraError {
8
- /**
9
- * The error response from the request.
10
- */
11
- response: Response | ErrorLike | undefined;
12
- static isCorsError(error: Error): boolean;
13
- /**
14
- * The endpoint that was requested.
15
- */
16
- endpoint: {
17
- name?: string;
18
- url: string;
19
- type?: "rest" | "graphql" | "rpc";
20
- };
21
- /**
22
- * A list of domains that should have their query params removed.
23
- */
24
- private queryRichfulDomains;
25
- statusCode: number | undefined;
26
- payload?: object;
27
- static readonly REASON_MAP: {
28
- readonly 429: "RATE_LIMITED_429";
29
- readonly NETWORK_ERROR: "NETWORK_ERROR";
30
- readonly CORS_ERROR: "CORS";
31
- };
32
- constructor(args: IBeraErrorArgs & {
33
- response: Response | ErrorLike | undefined;
34
- /**
35
- * The payload sent to the request.
36
- */
37
- payload?: object;
38
- endpoint: string | URL | {
39
- name?: string;
40
- url: string | URL;
41
- type: "rest" | "graphql" | "rpc";
42
- };
43
- statusCode?: number;
44
- });
45
- setEndpoint(endpoint: string | URL | {
46
- name?: string;
47
- url: string | URL;
48
- type?: "rest" | "graphql" | "rpc";
49
- }): {
50
- name?: string;
51
- url: string;
52
- type?: "rest" | "graphql" | "rpc";
53
- };
54
- private tryMatchNetworkError;
55
- }
56
-
57
- export { RequestError as R };
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGO5E7UUDcjs = require('./chunk-GO5E7UUD.cjs');var _chunkDDEQFR3Mcjs = require('./chunk-DDEQFR3M.cjs');var _chunk74WA35RIcjs = require('./chunk-74WA35RI.cjs');var _chunk2YBHAMDVcjs = require('./chunk-2YBHAMDV.cjs');var _chunkNMH7LHPWcjs = require('./chunk-NMH7LHPW.cjs');var _react = require('react');var _edgeconfig = require('@berachain/config/internal/edge-config');var _jsxruntime = require('react/jsx-runtime');var W=_react.createContext.call(void 0, void 0);function pe({children:e,flags:t,aggregators:a,swberaAprWindow:n="DAY"}){return _jsxruntime.jsx.call(void 0, W.Provider,{value:{..._chunkDDEQFR3Mcjs.a,...t,aggregators:a?Object.entries(a).filter(([,r])=>_edgeconfig.isFlagEnabled.call(void 0, r)).map(([r])=>r):void 0,swberaAprWindow:n},children:e})}function D(){let e=_react.useContext.call(void 0, W);if(!e)throw new Error("BeraFlagsProvider not found");return e}function fe(e){return D()[e]}var w=_react.createContext.call(void 0, {protocol:{isPaused:!1,factories:{composableStable:"enabled",weighted:"enabled",allPaused:!1}},onPoolChange:()=>{},pool:void 0});function Te(){let e=_react.useContext.call(void 0, w);if(!e)throw new (0, _chunkNMH7LHPWcjs.f)({level:"fatal",message:"BexStateContext is not defined"});return e}function he({children:e,isVaultPaused:t,labels:a,factories:n}){let[r,u]=_react.useState.call(void 0, ),s=_nullishCoalesce((_optionalChain([r, 'optionalAccess', _2 => _2.isPaused])&&!_optionalChain([r, 'optionalAccess', _3 => _3.isInRecoveryMode])), () => (!1)),l=t||_optionalChain([r, 'optionalAccess', _4 => _4.isPaused]);return _jsxruntime.jsx.call(void 0, w.Provider,{value:{protocol:{isPaused:t,factories:{...n,allPaused:n.composableStable==="paused"&&n.weighted==="paused"}},labels:a,onPoolChange:u,pool:r?{...r,disablePoolWithdrawals:!!s,disablePoolDeposits:!!l}:void 0},children:e})}var _mainnet = require('@berachain/config/mainnet');function ve(){return _react.useContext.call(void 0, F)}var F=_react.createContext.call(void 0, _mainnet.mainnet.averageBlockTime);function Ee({children:e,blockTime:t,...a}){let{config:n}=_chunk74WA35RIcjs.a.call(void 0, a);return _jsxruntime.jsx.call(void 0, F.Provider,{value:_nullishCoalesce(t, () => (n.averageBlockTime)),children:e})}var L=_react.createContext.call(void 0, void 0);function Fe({children:e,...t}){return _jsxruntime.jsx.call(void 0, L.Provider,{value:t,children:e})}function Le(){let e=_react.useContext.call(void 0, L);if(!e)throw new Error("useHoneyConfig must be used within a HoneyConfigProvider");return e}var _swr = require('swr'); var _swr2 = _interopRequireDefault(_swr);var _hooks = require('@berachain/wagmi/hooks');var _core = require('@wagmi/core');var _viem = require('viem');async function R({account:e,wagmiConfig:t,chainId:a,ensoClient:n}){let u=(await n.getBalances({useEoa:!0,chainId:_nullishCoalesce(a, () => ("all")),eoaAddress:e})).map(o=>({name:o.name,symbol:o.symbol,decimals:o.decimals,address:_chunk74WA35RIcjs.e.call(void 0, o.token,"ETH")?_chunk74WA35RIcjs.b.address:o.token,logoURI:o.logoUri,balance:{raw:o.amount.toString(),formatted:_viem.formatUnits.call(void 0, BigInt(o.amount),o.decimals)},chainId:Number(o.chainId),price:Number(o.price)})),s=Object.groupBy(u,o=>_nullishCoalesce(o.chainId, () => (0))),l=await Promise.allSettled(Object.entries(s).map(async([o,i])=>{if(!i)return;let p=_core.getChains.call(void 0, t).find(d=>d.id===Number(o));if(!p)return;let k=_optionalChain([p, 'access', _5 => _5.contracts, 'optionalAccess', _6 => _6.multicall3, 'optionalAccess', _7 => _7.address]);if(!k)return _chunk2YBHAMDVcjs.g.captureException(new (0, _chunkNMH7LHPWcjs.h)({property:"multicallAddress",value:k,expected:"Address",chainId:Number(o)})),i;let f=await _core.multicall.call(void 0, t,{chainId:Number(o),contracts:i.map(d=>_chunkGO5E7UUDcjs.b.call(void 0, {token:d,account:e,multicallAddress:k})),allowFailure:!0}),x=[];for(let d=0;d<i.length;d++){let T=i[d];if(f[d].status==="success"){let C=f[d].result;x.push({...T,balance:{raw:_nullishCoalesce(_optionalChain([C, 'optionalAccess', _8 => _8.toString, 'call', _9 => _9()]), () => ("0")),formatted:_viem.formatUnits.call(void 0, _nullishCoalesce(C, () => (0n)),T.decimals)}})}else console.error("error getting balance",f[d].error),_chunk2YBHAMDVcjs.g.captureException(_chunk2YBHAMDVcjs.a.call(void 0, {cause:f[d].error})),x.push(T)}return x})),c=[];for(let o of l)o.status==="fulfilled"?c.push(..._nullishCoalesce(o.value, () => ([]))):_chunk2YBHAMDVcjs.g.captureException(_chunk2YBHAMDVcjs.a.call(void 0, {cause:o.reason}));return c.sort((o,i)=>{let p=Number(o.balance.formatted)*(_nullishCoalesce(o.price, () => (0)));return Number(i.balance.formatted)*(_nullishCoalesce(i.price, () => (0)))-p})}function A({chainId:e}={},t){let{address:a}=_hooks.useBeraWallet.call(void 0, ),n=_hooks.useConfig.call(void 0, ),r=!!a&&(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _10 => _10.opts, 'optionalAccess', _11 => _11.isEnabled]), () => (!0))),s=_swr2.default.call(void 0, r&&n?["useEnsoUserTokensWithBalances",a,e]:null,async([,l,c])=>R({account:l,wagmiConfig:n,chainId:_nullishCoalesce(c, () => ("all")),ensoClient:_chunkGO5E7UUDcjs.a.call(void 0, )}),{refreshInterval:1e5,isEnabled:r,..._optionalChain([t, 'optionalAccess', _12 => _12.opts])});return{...s,refresh:()=>s.mutate()}}function H({defaultTokenList:e=[],externalList:t=[]}){if(e.length===0)return{tokenList:t,customTokenList:t,featuredTokenList:[]};let a=e.map(s=>({...s,default:!0})),n=a.filter(s=>_optionalChain([s, 'access', _13 => _13.tags, 'optionalAccess', _14 => _14.some, 'call', _15 => _15(l=>l==="featured")])),r=[...a,...t];return{tokenList:r.filter((s,l)=>r.findIndex(c=>_chunk74WA35RIcjs.e.call(void 0, c,s))===l),customTokenList:t,featuredTokenList:n}}var ie=_react.createContext.call(void 0, void 0);function je({children:e,defaultTokens:t,edgeConfigTokenList:a,userTokens:n,onAddToken:r,onRemoveToken:u}){let{data:s,refresh:l}=A(),{tokenList:c=[],featuredTokenList:o=[]}=_react.useMemo.call(void 0, ()=>H({defaultTokenList:[...t,..._optionalChain([a, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17(i=>_edgeconfig.isFlagEnabled.call(void 0, i.enabled))])],externalList:[...n,...(_nullishCoalesce(s, () => ([]))).map(i=>({...i,balance:void 0,price:void 0}))]}),[t,n,a,s]);return _jsxruntime.jsx.call(void 0, ie.Provider,{value:{tokenList:c,userTokens:n,featuredTokens:o,ensoTokens:s,onAddToken(i){r(i,{defaultTokens:t,userTokens:n,tokenList:c})},onRemoveToken:u,refresh:()=>{l()}},children:e})}exports.a = pe; exports.b = D; exports.c = fe; exports.d = w; exports.e = Te; exports.f = he; exports.g = ve; exports.h = F; exports.i = Ee; exports.j = L; exports.k = Fe; exports.l = Le; exports.m = A; exports.n = ie; exports.o = je;
2
- //# sourceMappingURL=chunk-2EN6PPAW.cjs.map