@berachain/berajs 0.2.5 → 0.2.6

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 (460) hide show
  1. package/README.md +0 -0
  2. package/dist/abi/exports.cjs +1 -1
  3. package/dist/abi/exports.cjs.map +1 -1
  4. package/dist/abi/exports.d.cts +17 -1
  5. package/dist/abi/exports.d.ts +17 -1
  6. package/dist/abi/exports.mjs +1 -1
  7. package/dist/abi/exports.mjs.map +1 -1
  8. package/dist/actions/exports.cjs +1 -1
  9. package/dist/actions/exports.cjs.map +1 -1
  10. package/dist/actions/exports.d.cts +9 -38
  11. package/dist/actions/exports.d.ts +9 -38
  12. package/dist/actions/exports.mjs +1 -1
  13. package/dist/actions/exports.mjs.map +1 -1
  14. package/dist/chunk-2YBHAMDV.cjs +2 -0
  15. package/dist/chunk-2YBHAMDV.cjs.map +1 -0
  16. package/dist/chunk-57RINXU6.cjs +2 -0
  17. package/dist/chunk-57RINXU6.cjs.map +1 -0
  18. package/dist/{chunk-AX2YQQFQ.mjs → chunk-74QD4JAH.mjs} +2 -2
  19. package/dist/chunk-74QD4JAH.mjs.map +1 -0
  20. package/dist/chunk-74WA35RI.cjs +2 -0
  21. package/dist/chunk-74WA35RI.cjs.map +1 -0
  22. package/dist/{chunk-7WRTK7RJ.mjs → chunk-BEKH5EYT.mjs} +2 -2
  23. package/dist/chunk-BEKH5EYT.mjs.map +1 -0
  24. package/dist/{chunk-FCWDGE62.cjs → chunk-CF3LFNXG.cjs} +2 -2
  25. package/dist/chunk-CF3LFNXG.cjs.map +1 -0
  26. package/dist/chunk-COMMLZ3O.mjs +2 -0
  27. package/dist/chunk-COMMLZ3O.mjs.map +1 -0
  28. package/dist/chunk-DDEQFR3M.cjs +2 -0
  29. package/dist/chunk-DDEQFR3M.cjs.map +1 -0
  30. package/dist/{chunk-6LDOG5RL.cjs → chunk-DK42F2ZM.cjs} +2 -2
  31. package/dist/chunk-DK42F2ZM.cjs.map +1 -0
  32. package/dist/{chunk-7SMWQ6SN.mjs → chunk-FM3WDBFH.mjs} +2 -2
  33. package/dist/chunk-FM3WDBFH.mjs.map +1 -0
  34. package/dist/chunk-HWOGQSNL.cjs +4 -0
  35. package/dist/chunk-HWOGQSNL.cjs.map +1 -0
  36. package/dist/chunk-I7M43BB4.cjs +2 -0
  37. package/dist/chunk-I7M43BB4.cjs.map +1 -0
  38. package/dist/chunk-IBJOI5SN.mjs +4 -0
  39. package/dist/chunk-IBJOI5SN.mjs.map +1 -0
  40. package/dist/chunk-IDFMLLDY.mjs +2 -0
  41. package/dist/chunk-IDFMLLDY.mjs.map +1 -0
  42. package/dist/{chunk-YZV5LKIP.cjs → chunk-LNVR4BW6.cjs} +2 -2
  43. package/dist/chunk-LNVR4BW6.cjs.map +1 -0
  44. package/dist/{chunk-3YXSUBA5.mjs → chunk-MJZHJFZO.mjs} +2 -2
  45. package/dist/chunk-MK5NS5B5.mjs +2 -0
  46. package/dist/chunk-MK5NS5B5.mjs.map +1 -0
  47. package/dist/{chunk-C6ZGUO4H.cjs → chunk-NMH7LHPW.cjs} +2 -2
  48. package/dist/chunk-NMH7LHPW.cjs.map +1 -0
  49. package/dist/{chunk-PKXAW6MO.cjs → chunk-NVHV2LDK.cjs} +2 -2
  50. package/dist/chunk-NVHV2LDK.cjs.map +1 -0
  51. package/dist/chunk-OGBD5YOG.mjs +2 -0
  52. package/dist/chunk-OGBD5YOG.mjs.map +1 -0
  53. package/dist/chunk-OIYXOKTT.cjs.map +1 -1
  54. package/dist/chunk-OUD27MU7.cjs.map +1 -1
  55. package/dist/{chunk-ECRMUMTA.mjs → chunk-PLIH6KQM.mjs} +2 -2
  56. package/dist/chunk-PLIH6KQM.mjs.map +1 -0
  57. package/dist/chunk-QRAIGQF2.mjs +2 -0
  58. package/dist/chunk-QRAIGQF2.mjs.map +1 -0
  59. package/dist/chunk-RWOICHRW.cjs +2 -0
  60. package/dist/chunk-RWOICHRW.cjs.map +1 -0
  61. package/dist/chunk-T5FSQ3YE.mjs +2 -0
  62. package/dist/chunk-T5FSQ3YE.mjs.map +1 -0
  63. package/dist/chunk-WRFDB3QJ.cjs.map +1 -1
  64. package/dist/chunk-XNJLSA6P.cjs.map +1 -1
  65. package/dist/contexts/exports.cjs +1 -1
  66. package/dist/contexts/exports.cjs.map +1 -1
  67. package/dist/contexts/exports.d.cts +1 -1
  68. package/dist/contexts/exports.d.ts +1 -1
  69. package/dist/contexts/exports.mjs +1 -1
  70. package/dist/contexts/exports.mjs.map +1 -1
  71. package/dist/{defaultFlags-d0kPbT0i.d.cts → defaultFlags-D6KfkTZx.d.cts} +1 -1
  72. package/dist/{defaultFlags-d0kPbT0i.d.ts → defaultFlags-D6KfkTZx.d.ts} +1 -1
  73. package/dist/enum/exports.cjs +1 -1
  74. package/dist/enum/exports.cjs.map +1 -1
  75. package/dist/enum/exports.d.cts +1 -1
  76. package/dist/enum/exports.d.ts +1 -1
  77. package/dist/enum/exports.mjs +1 -1
  78. package/dist/errors/exports.cjs +1 -1
  79. package/dist/errors/exports.cjs.map +1 -1
  80. package/dist/errors/exports.d.cts +8 -3
  81. package/dist/errors/exports.d.ts +8 -3
  82. package/dist/errors/exports.mjs +1 -1
  83. package/dist/{getValidatorQueuedOperatorAddress-DZgrPmZ2.d.cts → getValidatorQueuedOperatorAddress-BdDYHycN.d.cts} +15 -4
  84. package/dist/{getValidatorQueuedOperatorAddress-CqR6cyqC.d.ts → getValidatorQueuedOperatorAddress-CmiPJmsr.d.ts} +15 -4
  85. package/dist/{global.d-BeYWDreg.d.ts → global.d-3GQMgC9k.d.ts} +1 -1
  86. package/dist/{global.d-DghRxpHd.d.cts → global.d-CwT1Phzf.d.cts} +1 -1
  87. package/dist/hooks/exports.cjs +3 -3
  88. package/dist/hooks/exports.cjs.map +1 -1
  89. package/dist/hooks/exports.d.cts +54 -75
  90. package/dist/hooks/exports.d.ts +54 -75
  91. package/dist/hooks/exports.mjs +3 -3
  92. package/dist/hooks/exports.mjs.map +1 -1
  93. package/dist/{txnEnum-DxPRHSJt.d.cts → txnEnum-CCuQUFlh.d.cts} +7 -0
  94. package/dist/{txnEnum-DxPRHSJt.d.ts → txnEnum-CCuQUFlh.d.ts} +7 -0
  95. package/dist/types/exports.cjs.map +1 -1
  96. package/dist/types/exports.d.cts +37 -4
  97. package/dist/types/exports.d.ts +37 -4
  98. package/dist/utils/exports.cjs +1 -1
  99. package/dist/utils/exports.cjs.map +1 -1
  100. package/dist/utils/exports.d.cts +2 -2
  101. package/dist/utils/exports.d.ts +2 -2
  102. package/dist/utils/exports.mjs +1 -1
  103. package/dist/utils/exports.mjs.map +1 -1
  104. package/package.json +40 -40
  105. package/src/abi/enso/ensoWalletV2Factory.ts +9 -0
  106. package/src/abi/exports.ts +1 -0
  107. package/src/abi/pyth/pyth.ts +0 -0
  108. package/src/actions/clients/BeraApolloClient.ts +3 -3
  109. package/src/actions/clients/getApolloClient.ts +5 -5
  110. package/src/actions/clients/getEnsoClient.ts +1 -1
  111. package/src/actions/dex/__tests__/aggregators.unit.test.ts +3 -3
  112. package/src/actions/dex/__tests__/getOnChainPool.unit.test.ts +1 -1
  113. package/src/actions/dex/aggregators/base.ts +12 -8
  114. package/src/actions/dex/aggregators/bex.ts +8 -8
  115. package/src/actions/dex/aggregators/bgt.ts +4 -4
  116. package/src/actions/dex/aggregators/enso/enso.ts +28 -20
  117. package/src/actions/dex/aggregators/enso/ensoErc4626.debug.test.ts +1 -1
  118. package/src/actions/dex/aggregators/enso/ensoErc4626.ts +7 -4
  119. package/src/actions/dex/aggregators/erc4626.ts +10 -6
  120. package/src/actions/dex/aggregators/fly.ts +9 -5
  121. package/src/actions/dex/aggregators/haiku.integration.test.ts +3 -3
  122. package/src/actions/dex/aggregators/haiku.ts +9 -5
  123. package/src/actions/dex/aggregators/honey.ts +15 -15
  124. package/src/actions/dex/aggregators/kyberswap.ts +8 -4
  125. package/src/actions/dex/aggregators/oogabooga.ts +8 -4
  126. package/src/actions/dex/aggregators/openOcean.ts +12 -8
  127. package/src/actions/dex/aggregators/wbera.ts +8 -4
  128. package/src/actions/dex/b-sdk.ts +2 -2
  129. package/src/actions/dex/getAllPools.ts +2 -2
  130. package/src/actions/dex/getApiPool.ts +2 -2
  131. package/src/actions/dex/getGlobalLiquidityAndSwapVolume.ts +2 -2
  132. package/src/actions/dex/getIsTokenExploited.ts +1 -1
  133. package/src/actions/dex/getOnChainPool.ts +3 -3
  134. package/src/actions/dex/getPoolEvents.ts +2 -2
  135. package/src/actions/dex/getPoolHistoricalData.ts +2 -2
  136. package/src/actions/dex/getVaultPausedState.ts +1 -1
  137. package/src/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.ts +175 -0
  138. package/src/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.ts +150 -0
  139. package/src/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.ts +138 -0
  140. package/src/actions/enso/__tests__/getBendMultiplyBundle.unit.test.ts +194 -0
  141. package/src/actions/enso/{getEnsoUserTokensWithBalances.debug.test.ts → __tests__/getEnsoUserTokensWithBalances.debug.test.ts} +3 -3
  142. package/src/actions/enso/__tests__/helpers.ts +42 -0
  143. package/src/actions/enso/__tests__/util.unit.test.ts +95 -0
  144. package/src/actions/enso/flashloan.ts +127 -0
  145. package/src/actions/enso/getBendDemultiplyBundle.ts +325 -0
  146. package/src/actions/enso/getBendMultiplyBundle.ts +348 -0
  147. package/src/actions/enso/getEnsoSwapBundle.ts +2 -2
  148. package/src/actions/enso/getEnsoUserTokensWithBalances.ts +5 -5
  149. package/src/actions/enso/util.ts +150 -5
  150. package/src/actions/exports.ts +0 -2
  151. package/src/actions/governance/__tests__/checkProposalField.unit.test.ts +2 -2
  152. package/src/actions/governance/__tests__/getDecodedFunctionData.integration.test.ts +2 -2
  153. package/src/actions/governance/__tests__/getQuorum.integration.test.ts +2 -2
  154. package/src/actions/governance/checkProposalField.ts +1 -1
  155. package/src/actions/governance/computeActualStatus.ts +1 -1
  156. package/src/actions/governance/getAllProposals.ts +1 -1
  157. package/src/actions/governance/getBodyErrors.ts +1 -1
  158. package/src/actions/governance/getProposalDetails.ts +1 -1
  159. package/src/actions/governance/getProposalFromTx.ts +1 -1
  160. package/src/actions/governance/getProposalParams.ts +3 -3
  161. package/src/actions/governance/getProposalVotes.ts +1 -1
  162. package/src/actions/governance/getQuorum.ts +2 -2
  163. package/src/actions/honey/getCollateralWeights.ts +2 -2
  164. package/src/actions/honey/getGlobalCapLimit.ts +4 -4
  165. package/src/actions/honey/getHoneyCollaterals.ts +5 -5
  166. package/src/actions/honey/getHoneyFees.ts +1 -1
  167. package/src/actions/honey/getHoneyPausedState.ts +1 -1
  168. package/src/actions/honey/getHoneyPreview.ts +3 -3
  169. package/src/actions/honey/getHoneyRootPriceOracle.ts +1 -1
  170. package/src/actions/honey/getHoneyVaultsBalance.ts +2 -2
  171. package/src/actions/honey/getRelativeCapLimit.ts +3 -3
  172. package/src/actions/honey/getSharesWithoutFees.ts +1 -1
  173. package/src/actions/honey/getSwapPayload.ts +6 -6
  174. package/src/actions/honey/isBadCollateralAsset.ts +2 -2
  175. package/src/actions/honey/isBasketModeEnabled.ts +2 -2
  176. package/src/actions/honey/tests/pyth.integration.test.ts +3 -3
  177. package/src/actions/misc/getBlockTimestamp.ts +2 -2
  178. package/src/actions/pol/__tests__/getAllValidators.integration.test.ts +2 -2
  179. package/src/actions/pol/__tests__/rewardVaults.integration.test.ts +1 -1
  180. package/src/actions/pol/getBGTGlobalInfo.ts +2 -2
  181. package/src/actions/pol/getBgtAprSimulation.ts +1 -1
  182. package/src/actions/pol/getBgtAprSimultaion.unit.test.ts +1 -1
  183. package/src/actions/pol/getBgtTokenTotalBoosts.ts +2 -2
  184. package/src/actions/pol/getBgtTokenTotalSupply.ts +2 -2
  185. package/src/actions/pol/getBlockTime.debug.test.ts +13 -0
  186. package/src/actions/pol/getBlockTime.ts +14 -23
  187. package/src/actions/pol/getEarnedStakedBeraVault.ts +3 -3
  188. package/src/actions/pol/getGlobalCuttingBoard.ts +0 -0
  189. package/src/actions/pol/getGlobalData.ts +2 -2
  190. package/src/actions/pol/getIncentiveFeeClaimStats.ts +4 -4
  191. package/src/actions/pol/getLSTStakeConfig.ts +5 -5
  192. package/src/actions/pol/getMarkets.ts +2 -2
  193. package/src/actions/pol/getRewardProofsByValidator.ts +4 -4
  194. package/src/actions/pol/getRewardTokenToBeraRate.ts +1 -1
  195. package/src/actions/pol/getRewardVault.ts +3 -3
  196. package/src/actions/pol/getRewardVaultBeaconImplementation.integration.test.ts +1 -1
  197. package/src/actions/pol/getRewardVaultBeaconImplementation.ts +3 -3
  198. package/src/actions/pol/getRewardVaultDurationConstants.integration.test.ts +1 -1
  199. package/src/actions/pol/getRewardVaultDurationConstants.ts +1 -1
  200. package/src/actions/pol/getRewardVaultFromToken.ts +1 -1
  201. package/src/actions/pol/getRewardVaultIncentives.ts +2 -2
  202. package/src/actions/pol/getRewardVaultRewards.ts +1 -1
  203. package/src/actions/pol/getRewardVaults.ts +1 -1
  204. package/src/actions/pol/getSWBeraVaultMetadata.ts +20 -22
  205. package/src/actions/pol/getSWBeraWithdrawal.ts +4 -4
  206. package/src/actions/pol/getStakedBeraAPR.ts +2 -2
  207. package/src/actions/pol/getStakedBeraSnapshots.ts +2 -2
  208. package/src/actions/pol/getStakingDailyAssets.ts +3 -3
  209. package/src/actions/pol/getStakingTokenInformation.ts +2 -2
  210. package/src/actions/pol/getTotalStakedAmount.ts +1 -1
  211. package/src/actions/pol/getUserClaimableIncentives.ts +4 -4
  212. package/src/actions/pol/getUserVaultInfo.ts +1 -1
  213. package/src/actions/pol/getUserVaults.ts +4 -4
  214. package/src/actions/pol/getUserVaultsBalance.ts +1 -1
  215. package/src/actions/pol/getUserVaultsReward.ts +0 -0
  216. package/src/actions/pol/getVaultHistory.ts +2 -2
  217. package/src/actions/pol/getVaultValidators.ts +1 -1
  218. package/src/actions/pol/getVaultsSupply.ts +0 -0
  219. package/src/actions/prices/__tests__/prices.integration.test.ts +2 -2
  220. package/src/actions/prices/getTokenCurrentPrices.ts +5 -5
  221. package/src/actions/pyth/getHoneyPythFeeds.ts +2 -2
  222. package/src/actions/pyth/getUpdateFee.ts +2 -2
  223. package/src/actions/tokens/getAllowances.ts +2 -2
  224. package/src/actions/tokens/getTokenInformation.ts +2 -2
  225. package/src/actions/tokens/getTokens.ts +3 -3
  226. package/src/actions/tokens/getUnderlyingToken.ts +4 -4
  227. package/src/actions/tokens/getWalletBalances.integration.test.ts +1 -1
  228. package/src/actions/tokens/getWalletBalances.ts +4 -4
  229. package/src/actions/transactions/beraWriteContract.integration.test.ts +6 -6
  230. package/src/actions/transactions/beraWriteContract.ts +12 -12
  231. package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.ts +1 -1
  232. package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.ts +1 -1
  233. package/src/actions/validators/getAllValidators.ts +2 -2
  234. package/src/actions/validators/getApiValidator.ts +2 -2
  235. package/src/actions/validators/getBaselineRewardAllocation.ts +1 -1
  236. package/src/actions/validators/getDailyValidatorBlockStats.ts +1 -1
  237. package/src/actions/validators/getDefaultRewardAllocation.ts +1 -1
  238. package/src/actions/validators/getUserActiveValidators.ts +31 -33
  239. package/src/actions/validators/getUserBoosts.ts +12 -8
  240. package/src/actions/validators/getUserBoostsOnValidator.ts +15 -3
  241. package/src/actions/validators/getUserStakingPositions.ts +1 -1
  242. package/src/actions/validators/getValidatorAnalytics.ts +2 -2
  243. package/src/actions/validators/getValidatorCommission.ts +1 -1
  244. package/src/actions/validators/getValidatorEstimatedBgtPerYear.ts +1 -1
  245. package/src/actions/validators/getValidatorOperatorAddress.ts +1 -1
  246. package/src/actions/validators/getValidatorQueuedCommission.ts +1 -1
  247. package/src/actions/validators/getValidatorQueuedOperatorAddress.ts +1 -1
  248. package/src/actions/validators/getValidatorQueuedRewardAllocation.ts +1 -1
  249. package/src/actions/validators/getValidatorRewardAllocation.ts +1 -1
  250. package/src/actions/validators/getValidatorRewardAllocatorAddress.ts +1 -1
  251. package/src/actions/validators/utils/__tests__/validatorUtils.integration.test.ts +4 -4
  252. package/src/contexts/BeraFlags/defaultFlags.ts +4 -0
  253. package/src/contexts/BexStatusProvider.tsx +1 -1
  254. package/src/contexts/HoneyConfigProvider.tsx +3 -3
  255. package/src/contexts/SwrFallback.tsx +2 -2
  256. package/src/contexts/TokensProvider.tsx +3 -3
  257. package/src/contexts/block-time-provider.tsx +1 -1
  258. package/src/contexts/exports.ts +0 -0
  259. package/src/data/contracts.ts +10 -0
  260. package/src/enum/exports.ts +0 -0
  261. package/src/enum/polling.ts +0 -0
  262. package/src/enum/txnEnum.ts +9 -0
  263. package/src/errors/BeraMonitoring.ts +2 -2
  264. package/src/errors/BeraTracing.ts +2 -2
  265. package/src/errors/RequestError.ts +1 -1
  266. package/src/errors/assert.ts +18 -0
  267. package/src/errors/getErrorMessage.ts +0 -0
  268. package/src/errors/getRevertReason.integration.test.ts +7 -7
  269. package/src/errors/getRevertReason.ts +1 -1
  270. package/src/errors/parseViemError.ts +1 -1
  271. package/src/hooks/bend/useGetConvertToAssets.ts +4 -4
  272. package/src/hooks/dex/useAggregatorsQuotes.ts +19 -19
  273. package/src/hooks/dex/useAggregatorsRouterFeeBps.ts +2 -2
  274. package/src/hooks/dex/useAllUserPools.ts +3 -3
  275. package/src/hooks/dex/useApiPool.ts +3 -3
  276. package/src/hooks/dex/useBexStatus.ts +1 -1
  277. package/src/hooks/dex/useCreatePool.ts +9 -9
  278. package/src/hooks/dex/useExploitedTokens.ts +3 -3
  279. package/src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts +1 -1
  280. package/src/hooks/dex/useLiquidityMismatch.ts +3 -3
  281. package/src/hooks/dex/useLpPosition.ts +7 -4
  282. package/src/hooks/dex/useMultipleTokenApprovalsWithSlippage.ts +4 -4
  283. package/src/hooks/dex/useOnChainPoolData.ts +3 -3
  284. package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +3 -3
  285. package/src/hooks/dex/usePool.ts +7 -40
  286. package/src/hooks/dex/usePoolEvents.ts +2 -2
  287. package/src/hooks/dex/usePoolHistoricalData.ts +6 -3
  288. package/src/hooks/dex/usePools.ts +3 -3
  289. package/src/hooks/dex/usePriceImpact.ts +2 -2
  290. package/src/hooks/dex/useSingleAggregatorQuote.ts +13 -13
  291. package/src/hooks/enso/useBendDemultiply.ts +158 -0
  292. package/src/hooks/enso/useBendMultiply.ts +163 -0
  293. package/src/hooks/enso/useBendZapSupply.ts +7 -7
  294. package/src/hooks/enso/useEnsoSwapBundle.ts +6 -6
  295. package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +5 -5
  296. package/src/hooks/enso/useEnsoWalletV2Address.ts +38 -0
  297. package/src/hooks/enso/useIsBendAuthorized.ts +47 -0
  298. package/src/hooks/enso/useZapStakeBera.ts +4 -4
  299. package/src/hooks/exports.ts +4 -3
  300. package/src/hooks/governance/useCreateProposal.ts +3 -3
  301. package/src/hooks/governance/useGetPastVotes.ts +2 -2
  302. package/src/hooks/governance/useHasVoted.ts +2 -2
  303. package/src/hooks/governance/useIsCanceller.ts +4 -4
  304. package/src/hooks/governance/usePollAllProposals.ts +3 -3
  305. package/src/hooks/governance/usePollProposal.ts +7 -4
  306. package/src/hooks/governance/usePollProposalThreshold.ts +3 -3
  307. package/src/hooks/governance/usePollProposalVotes.ts +1 -1
  308. package/src/hooks/governance/usePollUserDelegates.ts +7 -4
  309. package/src/hooks/governance/useProposalFromTx.ts +1 -1
  310. package/src/hooks/governance/useProposalSnapshot.ts +2 -2
  311. package/src/hooks/governance/useProposalState.ts +2 -2
  312. package/src/hooks/governance/useProposalTimelockState.ts +2 -2
  313. package/src/hooks/governance/useQuorum.ts +1 -1
  314. package/src/hooks/honey/useCappedGlobally.ts +8 -5
  315. package/src/hooks/honey/useCappedRelatively.ts +7 -4
  316. package/src/hooks/honey/useCollateralWeights.ts +8 -5
  317. package/src/hooks/honey/useHoneyAlerts.ts +5 -5
  318. package/src/hooks/honey/useHoneyBalances.ts +7 -7
  319. package/src/hooks/honey/useHoneyChartData.ts +1 -1
  320. package/src/hooks/honey/useHoneySwapState.ts +4 -4
  321. package/src/hooks/honey/useHoneyVaultsBalance.ts +8 -5
  322. package/src/hooks/honey/useIsBadCollateralAsset.ts +9 -6
  323. package/src/hooks/honey/useIsBasketModeEnabled.ts +8 -5
  324. package/src/hooks/honey/usePythLatestPrices.ts +4 -4
  325. package/src/hooks/perps/usePythUpdateFee.ts +4 -4
  326. package/src/hooks/pol/useBgtAprSimulation.ts +1 -1
  327. package/src/hooks/pol/useBgtUnstakedBalance.ts +7 -4
  328. package/src/hooks/pol/useClaimableFees.ts +4 -4
  329. package/src/hooks/pol/useOnChainRewardVault.ts +7 -7
  330. package/src/hooks/pol/usePollGlobalData.ts +9 -3
  331. package/src/hooks/pol/usePollMarkets.ts +5 -2
  332. package/src/hooks/pol/useQueuedBeraUnlock.ts +4 -4
  333. package/src/hooks/pol/useRewardTokenToBeraRate.ts +4 -4
  334. package/src/hooks/pol/useRewardVault.ts +5 -2
  335. package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +2 -2
  336. package/src/hooks/pol/useRewardVaultFromToken.ts +2 -2
  337. package/src/hooks/pol/useRewardVaultIncentives.ts +2 -2
  338. package/src/hooks/pol/useRewardVaultRewards.ts +3 -3
  339. package/src/hooks/pol/useRewardVaults.ts +2 -2
  340. package/src/hooks/pol/useStakedAPR.ts +3 -3
  341. package/src/hooks/pol/useStakedData.ts +10 -10
  342. package/src/hooks/pol/useStakedSnapshots.ts +3 -3
  343. package/src/hooks/pol/useStakingVaultsMetadata.ts +40 -0
  344. package/src/hooks/pol/useTotalStakedAmount.ts +2 -2
  345. package/src/hooks/pol/useUserVaultInfo.ts +8 -5
  346. package/src/hooks/pol/useUserVaults.ts +7 -4
  347. package/src/hooks/pol/useVaultAddress.ts +2 -2
  348. package/src/hooks/pol/useVaultHistory.ts +2 -2
  349. package/src/hooks/pol/useVaultValidators.ts +5 -2
  350. package/src/hooks/tokens/useBeraCurrentPrice.ts +1 -1
  351. package/src/hooks/tokens/useMultipleTokenInformation.ts +7 -4
  352. package/src/hooks/tokens/usePollAllowances.ts +7 -4
  353. package/src/hooks/tokens/usePollBalance.ts +8 -5
  354. package/src/hooks/tokens/usePollWalletBalances.ts +8 -5
  355. package/src/hooks/tokens/useStakingTokenInformation.ts +7 -4
  356. package/src/hooks/tokens/useTokenCurrentPrice.ts +1 -1
  357. package/src/hooks/tokens/useTokenCurrentPrices.ts +6 -6
  358. package/src/hooks/tokens/useTokenInformation.ts +8 -5
  359. package/src/hooks/tokens/useTokenPrice.ts +1 -1
  360. package/src/hooks/tokens/useTokenPrices.ts +4 -4
  361. package/src/hooks/tokens/useTokens.ts +3 -3
  362. package/src/hooks/tokens/useTotalSupply.ts +1 -1
  363. package/src/hooks/tokens/useUnderlyingAsset.ts +3 -3
  364. package/src/hooks/useBlockToTimestamp.ts +5 -5
  365. package/src/hooks/useContractWrite/index.ts +0 -0
  366. package/src/hooks/useContractWrite/stateReducer.ts +0 -0
  367. package/src/hooks/useContractWrite/types.ts +2 -2
  368. package/src/hooks/useContractWrite/useBeraContractWrite.ts +5 -6
  369. package/src/hooks/useGetVerifiedAbi.ts +1 -1
  370. package/src/hooks/usePrevious.ts +0 -0
  371. package/src/hooks/validators/useAllValidators.ts +7 -4
  372. package/src/hooks/validators/useApiEnrichedAllocation.ts +2 -2
  373. package/src/hooks/validators/useApiValidator.ts +5 -2
  374. package/src/hooks/validators/useBaselineRewardAllocation.ts +2 -2
  375. package/src/hooks/validators/useDailyValidatorBlockStats.ts +3 -3
  376. package/src/hooks/validators/useDefaultRewardAllocation.ts +4 -4
  377. package/src/hooks/validators/useManagedValidatorRole.ts +8 -5
  378. package/src/hooks/validators/useOnChainValidator.ts +6 -3
  379. package/src/hooks/validators/useStakingPoolBatch.ts +7 -4
  380. package/src/hooks/validators/useUserActiveValidators.ts +6 -3
  381. package/src/hooks/validators/useUserBoostsOnValidator.ts +3 -3
  382. package/src/hooks/validators/useUserClaimableIncentives.ts +9 -9
  383. package/src/hooks/validators/useUserStakingPositions.ts +1 -1
  384. package/src/hooks/validators/useValidator.ts +1 -1
  385. package/src/hooks/validators/useValidatorAnalytics.ts +3 -3
  386. package/src/hooks/validators/useValidatorCommission.ts +5 -2
  387. package/src/hooks/validators/useValidatorEstimatedBgtPerYear.ts +3 -3
  388. package/src/hooks/validators/useValidatorQueuedCommission.ts +6 -3
  389. package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +5 -2
  390. package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +6 -3
  391. package/src/hooks/validators/useValidatorRewardAllocation.ts +2 -2
  392. package/src/types/dex.d.ts +1 -1
  393. package/src/types/enso.d.ts +34 -0
  394. package/src/types/exports.ts +0 -0
  395. package/src/types/global.d.ts +3 -3
  396. package/src/types/governance.d.ts +1 -1
  397. package/src/types/honeySwap.d.ts +3 -3
  398. package/src/types/staking.d.ts +0 -0
  399. package/src/utils/beraFetch.ts +1 -1
  400. package/src/utils/createEmitter.ts +1 -1
  401. package/src/utils/exports.ts +0 -0
  402. package/src/utils/filter.ts +0 -0
  403. package/src/utils/formatIncentivesTokenMap.ts +1 -1
  404. package/src/utils/formatInputTokenValue.ts +0 -0
  405. package/src/utils/formatNumber.ts +0 -0
  406. package/src/utils/getContractName.ts +1 -1
  407. package/src/utils/getHoneySwapMessage.test.ts +1 -1
  408. package/src/utils/getHoneySwapMessage.ts +1 -1
  409. package/src/utils/parseBaseArgs.ts +1 -1
  410. package/src/utils/parseBaseArgs.unit.test.ts +1 -1
  411. package/src/utils/parseWhiskToken.ts +1 -1
  412. package/src/utils/poolNamings.ts +1 -1
  413. package/src/utils/tokens.ts +2 -2
  414. package/src/utils/tokens.unit.test.ts +1 -1
  415. package/src/utils/truncateHash.ts +0 -0
  416. package/.claude/skills/berajs/SKILL.md +0 -222
  417. package/.claude/skills/berajs/references/dex.md +0 -235
  418. package/.claude/skills/berajs/references/pol.md +0 -194
  419. package/.claude/skills/berajs/references/staking.md +0 -198
  420. package/.claude/skills/berajs/references/tokens.md +0 -170
  421. package/LICENSE +0 -21
  422. package/dist/chunk-22J3YJDN.cjs +0 -2
  423. package/dist/chunk-22J3YJDN.cjs.map +0 -1
  424. package/dist/chunk-2LL3P5PN.mjs +0 -2
  425. package/dist/chunk-2LL3P5PN.mjs.map +0 -1
  426. package/dist/chunk-55L7STYD.mjs +0 -2
  427. package/dist/chunk-55L7STYD.mjs.map +0 -1
  428. package/dist/chunk-6LDOG5RL.cjs.map +0 -1
  429. package/dist/chunk-7LNBSOVV.cjs +0 -2
  430. package/dist/chunk-7LNBSOVV.cjs.map +0 -1
  431. package/dist/chunk-7SMWQ6SN.mjs.map +0 -1
  432. package/dist/chunk-7WRTK7RJ.mjs.map +0 -1
  433. package/dist/chunk-AX2YQQFQ.mjs.map +0 -1
  434. package/dist/chunk-BKDBIBVO.mjs +0 -4
  435. package/dist/chunk-BKDBIBVO.mjs.map +0 -1
  436. package/dist/chunk-C3FHGFLK.mjs +0 -2
  437. package/dist/chunk-C3FHGFLK.mjs.map +0 -1
  438. package/dist/chunk-C6ZGUO4H.cjs.map +0 -1
  439. package/dist/chunk-ECRMUMTA.mjs.map +0 -1
  440. package/dist/chunk-FCWDGE62.cjs.map +0 -1
  441. package/dist/chunk-P2Q7CMUD.cjs +0 -2
  442. package/dist/chunk-P2Q7CMUD.cjs.map +0 -1
  443. package/dist/chunk-PKXAW6MO.cjs.map +0 -1
  444. package/dist/chunk-SWMJQOH6.cjs +0 -2
  445. package/dist/chunk-SWMJQOH6.cjs.map +0 -1
  446. package/dist/chunk-THATXCJK.mjs +0 -2
  447. package/dist/chunk-THATXCJK.mjs.map +0 -1
  448. package/dist/chunk-UXGB54NE.cjs +0 -4
  449. package/dist/chunk-UXGB54NE.cjs.map +0 -1
  450. package/dist/chunk-VXL2ZZ4X.cjs +0 -2
  451. package/dist/chunk-VXL2ZZ4X.cjs.map +0 -1
  452. package/dist/chunk-YXLFOEZN.mjs +0 -2
  453. package/dist/chunk-YXLFOEZN.mjs.map +0 -1
  454. package/dist/chunk-YZV5LKIP.cjs.map +0 -1
  455. package/src/actions/dex/getSubgraphPool.ts +0 -30
  456. package/src/actions/validators/getManagedValidatorByAccount.ts +0 -32
  457. package/src/hooks/pol/useSWBeraVaultMetadata.ts +0 -35
  458. package/src/hooks/validators/useManagedValidatorByAccount.ts +0 -40
  459. package/src/hooks/validators/useSubgraphUserValidators.ts +0 -36
  460. /package/dist/{chunk-3YXSUBA5.mjs.map → chunk-MJZHJFZO.mjs.map} +0 -0
@@ -3,11 +3,14 @@ import type { Address } from "viem";
3
3
 
4
4
  import { useBeraWallet, usePublicClient } from "@berachain/wagmi/hooks";
5
5
 
6
- import { getUserVaultInfo } from "~/actions/pol/getUserVaultInfo";
7
- import { POLLING } from "~/enum/polling";
8
- import { assertPublicClient } from "~/errors/assert";
9
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
10
- import type { UserVaultInfo } from "~/types/pol";
6
+ import { getUserVaultInfo } from "../../actions/pol/getUserVaultInfo";
7
+ import { POLLING } from "../../enum/polling";
8
+ import { assertPublicClient } from "../../errors/assert";
9
+ import type {
10
+ DefaultHookOptions,
11
+ DefaultHookReturnType,
12
+ } from "../../types/global";
13
+ import type { UserVaultInfo } from "../../types/pol";
11
14
 
12
15
  export const useUserVaultInfo = (
13
16
  args: {
@@ -5,10 +5,13 @@ import { useBeraWallet, usePublicClient } from "@berachain/wagmi/hooks";
5
5
  import {
6
6
  type GetUserVaultsResponse,
7
7
  getUserVaults,
8
- } from "~/actions/pol/getUserVaults";
9
- import { POLLING } from "~/enum/polling";
10
- import { assertPublicClient } from "~/errors/assert";
11
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
8
+ } from "../../actions/pol/getUserVaults";
9
+ import { POLLING } from "../../enum/polling";
10
+ import { assertPublicClient } from "../../errors/assert";
11
+ import type {
12
+ DefaultHookOptions,
13
+ DefaultHookReturnType,
14
+ } from "../../types/global";
12
15
 
13
16
  export const useUserVaults = (
14
17
  options?: DefaultHookOptions,
@@ -3,8 +3,8 @@ import type { Address } from "viem";
3
3
 
4
4
  import { usePublicClient } from "@berachain/wagmi/hooks";
5
5
 
6
- import { getRewardVaultStakingToken } from "~/actions/pol/getRewardVaultStakingToken";
7
- import { assertPublicClient } from "~/errors/assert";
6
+ import { getRewardVaultStakingToken } from "../../actions/pol/getRewardVaultStakingToken";
7
+ import { assertPublicClient } from "../../errors/assert";
8
8
 
9
9
  export interface RewardVault {
10
10
  stakeToken: Address;
@@ -5,8 +5,8 @@ import type { GetVaultHistoryQuery } from "@berachain/graphql/pol/api";
5
5
  import {
6
6
  type GetVaultHistoryArgs,
7
7
  getVaultHistory,
8
- } from "~/actions/pol/getVaultHistory";
9
- import type { DefaultHookReturnType } from "~/types/global";
8
+ } from "../../actions/pol/getVaultHistory";
9
+ import type { DefaultHookReturnType } from "../../types/global";
10
10
 
11
11
  export const useVaultHistory = ({
12
12
  vault,
@@ -3,8 +3,11 @@ import type { Address } from "viem";
3
3
 
4
4
  import type { ApiValidatorFragment } from "@berachain/graphql/pol/api";
5
5
 
6
- import { getVaultValidators } from "~/actions/pol/getVaultValidators";
7
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
6
+ import { getVaultValidators } from "../../actions/pol/getVaultValidators";
7
+ import type {
8
+ DefaultHookOptions,
9
+ DefaultHookReturnType,
10
+ } from "../../types/global";
8
11
 
9
12
  export interface UsePollValidatorInfoResponse
10
13
  extends DefaultHookReturnType<ApiValidatorFragment[] | undefined> {}
@@ -1,6 +1,6 @@
1
1
  import { zeroAddress } from "viem";
2
2
 
3
- import type { DefaultHookOptions } from "~/types/global";
3
+ import type { DefaultHookOptions } from "../../types/global";
4
4
  import { useTokenCurrentPrice } from "./useTokenCurrentPrice";
5
5
 
6
6
  /**
@@ -5,10 +5,13 @@ import { defaultChainId } from "@berachain/config/internal";
5
5
 
6
6
  import { usePublicClient } from "@berachain/wagmi/hooks";
7
7
 
8
- import { getTokenInformation } from "~/actions/tokens/getTokenInformation";
9
- import { assertPublicClient } from "~/errors/assert";
10
- import type { Token } from "~/types/dex";
11
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
8
+ import { getTokenInformation } from "../../actions/tokens/getTokenInformation";
9
+ import { assertPublicClient } from "../../errors/assert";
10
+ import type { Token } from "../../types/dex";
11
+ import type {
12
+ DefaultHookOptions,
13
+ DefaultHookReturnType,
14
+ } from "../../types/global";
12
15
 
13
16
  export type UseMultipleTokenInformationResponse = DefaultHookReturnType<
14
17
  Token[]
@@ -2,10 +2,13 @@ import useSWR from "swr";
2
2
 
3
3
  import { useBeraWallet, useConfig } from "@berachain/wagmi/hooks";
4
4
 
5
- import { getAllowances } from "~/actions/tokens/getAllowances";
6
- import { POLLING } from "~/enum/polling";
7
- import type { AllowanceQueryItem, AllowanceToken } from "~/types/dex";
8
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
5
+ import { getAllowances } from "../../actions/tokens/getAllowances";
6
+ import { POLLING } from "../../enum/polling";
7
+ import type { AllowanceQueryItem, AllowanceToken } from "../../types/dex";
8
+ import type {
9
+ DefaultHookOptions,
10
+ DefaultHookReturnType,
11
+ } from "../../types/global";
9
12
 
10
13
  export type UsePollAllowancesArgs = {
11
14
  items: AllowanceQueryItem[];
@@ -12,11 +12,14 @@ import { defaultChainId } from "@berachain/config/internal";
12
12
 
13
13
  import { useBeraWallet, usePublicClient } from "@berachain/wagmi/hooks";
14
14
 
15
- import { POLLING } from "~/enum/polling";
16
- import { assertPublicClient } from "~/errors/assert";
17
- import type { BalanceToken } from "~/types/dex";
18
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
19
- import { beraToken, isToken } from "~/utils/tokens";
15
+ import { POLLING } from "../../enum/polling";
16
+ import { assertPublicClient } from "../../errors/assert";
17
+ import type { BalanceToken } from "../../types/dex";
18
+ import type {
19
+ DefaultHookOptions,
20
+ DefaultHookReturnType,
21
+ } from "../../types/global";
22
+ import { beraToken, isToken } from "../../utils/tokens";
20
23
  import { useTokenInformation } from "./useTokenInformation";
21
24
 
22
25
  export function usePollBalance(
@@ -8,11 +8,14 @@ import {
8
8
  usePublicClient,
9
9
  } from "@berachain/wagmi/hooks";
10
10
 
11
- import { getWalletBalances } from "~/actions/tokens/getWalletBalances";
12
- import { POLLING } from "~/enum/polling";
13
- import { useTokens } from "~/hooks/tokens/useTokens";
14
- import type { BalanceToken, Token } from "~/types/dex";
15
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
11
+ import { getWalletBalances } from "../../actions/tokens/getWalletBalances";
12
+ import { POLLING } from "../../enum/polling";
13
+ import type { BalanceToken, Token } from "../../types/dex";
14
+ import type {
15
+ DefaultHookOptions,
16
+ DefaultHookReturnType,
17
+ } from "../../types/global";
18
+ import { useTokens } from "./useTokens";
16
19
 
17
20
  export type UsePollWalletBalancesArgs = {
18
21
  /**
@@ -3,10 +3,13 @@ import { isAddress, zeroAddress } from "viem";
3
3
 
4
4
  import { usePublicClient } from "@berachain/wagmi/hooks";
5
5
 
6
- import { getStakingTokenInformation } from "~/actions/pol/getStakingTokenInformation";
7
- import type { Token } from "~/types/dex";
8
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
9
- import { beraToken, isToken } from "~/utils/tokens";
6
+ import { getStakingTokenInformation } from "../../actions/pol/getStakingTokenInformation";
7
+ import type { Token } from "../../types/dex";
8
+ import type {
9
+ DefaultHookOptions,
10
+ DefaultHookReturnType,
11
+ } from "../../types/global";
12
+ import { beraToken, isToken } from "../../utils/tokens";
10
13
 
11
14
  export type UseStakingTokenInformationResponse = DefaultHookReturnType<
12
15
  Partial<Token> | undefined
@@ -1,4 +1,4 @@
1
- import type { DefaultHookOptions } from "~/types/global";
1
+ import type { DefaultHookOptions } from "../../types/global";
2
2
  import { useTokenCurrentPrices } from "./useTokenCurrentPrices";
3
3
 
4
4
  /**
@@ -4,12 +4,12 @@ import { type Address, isAddress, zeroAddress } from "viem";
4
4
 
5
5
  import { defaultChainId } from "@berachain/config/internal";
6
6
 
7
- import { getTokenCurrentPrices } from "~/actions/prices/getTokenCurrentPrices";
8
- import { POLLING } from "~/enum/polling";
9
- import { useTokens } from "~/hooks/tokens/useTokens";
10
- import type { TokenCurrentPriceMap, TokenWithPrice } from "~/types/dex";
11
- import type { DefaultHookOptions } from "~/types/global";
12
- import { isToken } from "~/utils/tokens";
7
+ import { getTokenCurrentPrices } from "../../actions/prices/getTokenCurrentPrices";
8
+ import { POLLING } from "../../enum/polling";
9
+ import type { TokenCurrentPriceMap, TokenWithPrice } from "../../types/dex";
10
+ import type { DefaultHookOptions } from "../../types/global";
11
+ import { isToken } from "../../utils/tokens";
12
+ import { useTokens } from "./useTokens";
13
13
 
14
14
  /**
15
15
  * @deprecated use useTokenPrices instead that supports multichain tokens
@@ -5,11 +5,14 @@ import { defaultChainId } from "@berachain/config/internal";
5
5
 
6
6
  import { usePublicClient } from "@berachain/wagmi/hooks";
7
7
 
8
- import { getTokenInformation } from "~/actions/tokens/getTokenInformation";
9
- import { assertPublicClient } from "~/errors/assert";
10
- import type { Token } from "~/types/dex";
11
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
12
- import { beraToken, isToken } from "~/utils/tokens";
8
+ import { getTokenInformation } from "../../actions/tokens/getTokenInformation";
9
+ import { assertPublicClient } from "../../errors/assert";
10
+ import type { Token } from "../../types/dex";
11
+ import type {
12
+ DefaultHookOptions,
13
+ DefaultHookReturnType,
14
+ } from "../../types/global";
15
+ import { beraToken, isToken } from "../../utils/tokens";
13
16
 
14
17
  export type UseTokenInformationResponse = DefaultHookReturnType<
15
18
  Token | undefined
@@ -1,6 +1,6 @@
1
1
  import type { Address } from "viem";
2
2
 
3
- import type { DefaultHookOptions } from "~/types/global";
3
+ import type { DefaultHookOptions } from "../../types/global";
4
4
  import { type TokenPriceInput, useTokenPrices } from "./useTokenPrices";
5
5
 
6
6
  export function useTokenPrice(
@@ -3,11 +3,11 @@ import type { Address } from "viem";
3
3
 
4
4
  import { defaultChainId } from "@berachain/config/internal";
5
5
 
6
- import { POLLING } from "~/enum/polling";
7
- import { useTokens } from "~/hooks/tokens/useTokens";
8
- import type { Token } from "~/types/dex";
9
- import type { DefaultHookOptions } from "~/types/global";
6
+ import { POLLING } from "../../enum/polling";
7
+ import type { Token } from "../../types/dex";
8
+ import type { DefaultHookOptions } from "../../types/global";
10
9
  import { useTokenCurrentPrices } from "./useTokenCurrentPrices";
10
+ import { useTokens } from "./useTokens";
11
11
 
12
12
  export type TokenPriceInput = Pick<Token, "address" | "chainId">;
13
13
 
@@ -1,8 +1,8 @@
1
1
  import { useContext } from "react";
2
2
 
3
- import { TokenContext } from "~/contexts/TokensProvider";
4
- import { BeraError } from "~/errors/BeraError";
5
- import type { FormatTokenListReturnType } from "~/utils/formatTokenList";
3
+ import { TokenContext } from "../../contexts/TokensProvider";
4
+ import { BeraError } from "../../errors/BeraError";
5
+ import type { FormatTokenListReturnType } from "../../utils/formatTokenList";
6
6
 
7
7
  export function useTokens() {
8
8
  const context = useContext(TokenContext);
@@ -3,7 +3,7 @@ import { type Address, erc20Abi } from "viem";
3
3
 
4
4
  import { usePublicClient } from "@berachain/wagmi/hooks";
5
5
 
6
- import { assertPublicClient } from "~/errors/assert";
6
+ import { assertPublicClient } from "../../errors/assert";
7
7
 
8
8
  export function useTotalSupply({ address }: { address: Address | undefined }) {
9
9
  const publicClient = usePublicClient();
@@ -2,9 +2,9 @@ import useSWRImmutable from "swr/immutable";
2
2
 
3
3
  import { useConfig } from "@berachain/wagmi/hooks";
4
4
 
5
- import { getUnderlyingToken } from "~/actions/tokens/getUnderlyingToken";
6
- import type { MinimalERC20 } from "~/types/dex";
7
- import { isToken } from "~/utils/tokens";
5
+ import { getUnderlyingToken } from "../../actions/tokens/getUnderlyingToken";
6
+ import type { MinimalERC20 } from "../../types/dex";
7
+ import { isToken } from "../../utils/tokens";
8
8
 
9
9
  /**
10
10
  * SWR hook that resolves the underlying asset of an ERC4626 vault token.
@@ -2,11 +2,11 @@ import useSWRImmutable from "swr/immutable";
2
2
 
3
3
  import { useBlockNumber, usePublicClient } from "@berachain/wagmi/hooks";
4
4
 
5
- import { getBlockTimestamp } from "~/actions/misc/getBlockTimestamp";
6
- import { useBlockTime } from "~/contexts/block-time-provider";
7
- import { assertPublicClient } from "~/errors/assert";
8
- import { parseBaseArgs } from "~/utils/parseBaseArgs";
9
- import { msToSeconds, seconds } from "~/utils/time";
5
+ import { getBlockTimestamp } from "../actions/misc/getBlockTimestamp";
6
+ import { useBlockTime } from "../contexts/block-time-provider";
7
+ import { assertPublicClient } from "../errors/assert";
8
+ import { parseBaseArgs } from "../utils/parseBaseArgs";
9
+ import { msToSeconds, seconds } from "../utils/time";
10
10
 
11
11
  /**
12
12
  *
File without changes
File without changes
@@ -7,8 +7,8 @@ import type {
7
7
  WalletCallReceipt,
8
8
  } from "viem";
9
9
 
10
- import type { BeraError } from "~/errors/BeraError";
11
- import type { IContractWrite, IContractWriteFn } from "~/types/global";
10
+ import type { BeraError } from "../../errors/BeraError";
11
+ import type { IContractWrite, IContractWriteFn } from "../../types/global";
12
12
 
13
13
  export interface UseContractWriteApi {
14
14
  isLoading: boolean;
@@ -3,13 +3,12 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from "viem";
3
3
 
4
4
  import { useBeraWagmi, useConfig } from "@berachain/wagmi/hooks";
5
5
 
6
- import { beraWriteContract } from "~/actions/transactions/beraWriteContract";
7
- import { useBeraFlag } from "~/contexts/BeraFlags/BeraFlags";
8
- import { TransactionFailedError } from "~/errors/TransactionFailedError";
9
- import type { IUseContractWriteArgs } from "~/hooks/useContractWrite/types";
10
- import type { IContractWrite } from "~/types/global";
6
+ import { beraWriteContract } from "../../actions/transactions/beraWriteContract";
7
+ import { useBeraFlag } from "../../contexts/BeraFlags/BeraFlags";
8
+ import { TransactionFailedError } from "../../errors/TransactionFailedError";
9
+ import type { IContractWrite } from "../../types/global";
11
10
  import { ActionEnum, initialState, reducer } from "./stateReducer";
12
- import type { UseContractWriteApi } from "./types";
11
+ import type { IUseContractWriteArgs, UseContractWriteApi } from "./types";
13
12
 
14
13
  function useBeraContractWrite({
15
14
  onlyPermissionless,
@@ -3,7 +3,7 @@ import { isAddress, zeroAddress } from "viem";
3
3
 
4
4
  import { chainId } from "@berachain/config/internal";
5
5
 
6
- import { beraFetchJson } from "~/utils/beraFetch";
6
+ import { beraFetchJson } from "../utils/beraFetch";
7
7
 
8
8
  interface SuccessResponse {
9
9
  status: "1";
File without changes
@@ -6,10 +6,13 @@ import type {
6
6
  GqlChain,
7
7
  } from "@berachain/graphql/pol/api";
8
8
 
9
- import { getAllValidators } from "~/actions/validators/getAllValidators";
10
- import { POLLING } from "~/enum/polling";
11
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
12
- import { parseBaseArgs } from "~/utils/parseBaseArgs";
9
+ import { getAllValidators } from "../../actions/validators/getAllValidators";
10
+ import { POLLING } from "../../enum/polling";
11
+ import type {
12
+ DefaultHookOptions,
13
+ DefaultHookReturnType,
14
+ } from "../../types/global";
15
+ import { parseBaseArgs } from "../../utils/parseBaseArgs";
13
16
 
14
17
  export const useAllValidatorsQueryKey = ({
15
18
  variables,
@@ -1,7 +1,7 @@
1
1
  import useSWR from "swr";
2
2
 
3
- import { getApiEnrichedAllocation } from "~/actions/validators/getApiEnrichedAllocation";
4
- import type { ValidatorRewardAllocation } from "~/actions/validators/getValidatorRewardAllocation";
3
+ import { getApiEnrichedAllocation } from "../../actions/validators/getApiEnrichedAllocation";
4
+ import type { ValidatorRewardAllocation } from "../../actions/validators/getValidatorRewardAllocation";
5
5
 
6
6
  export function useApiEnrichedAllocation({
7
7
  allocation,
@@ -3,8 +3,11 @@ import { type Address, isHex } from "viem";
3
3
 
4
4
  import type { GetValidatorQuery } from "@berachain/graphql/pol/api";
5
5
 
6
- import { getApiValidator } from "~/actions/validators/getApiValidator";
7
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
6
+ import { getApiValidator } from "../../actions/validators/getApiValidator";
7
+ import type {
8
+ DefaultHookOptions,
9
+ DefaultHookReturnType,
10
+ } from "../../types/global";
8
11
 
9
12
  export interface UsePollValidatorInfoResponse
10
13
  extends DefaultHookReturnType<GetValidatorQuery> {}
@@ -2,8 +2,8 @@ import useSWR from "swr";
2
2
 
3
3
  import { usePublicClient } from "@berachain/wagmi/hooks";
4
4
 
5
- import { getBaselineRewardAllocation } from "~/actions/validators/getBaselineRewardAllocation";
6
- import { assertPublicClient } from "~/errors/assert";
5
+ import { getBaselineRewardAllocation } from "../../actions/validators/getBaselineRewardAllocation";
6
+ import { assertPublicClient } from "../../errors/assert";
7
7
 
8
8
  export function useBaselineRewardAllocation() {
9
9
  const publicClient = usePublicClient();
@@ -3,9 +3,9 @@ import type { Address } from "viem";
3
3
 
4
4
  import type { GetValidatorBlockStatsQuery } from "@berachain/graphql/pol/subgraph";
5
5
 
6
- import { getDailyValidatorBlockStats } from "~/actions/validators/getDailyValidatorBlockStats";
7
- import { POLLING } from "~/enum/polling";
8
- import type { DefaultHookReturnType } from "~/types/global";
6
+ import { getDailyValidatorBlockStats } from "../../actions/validators/getDailyValidatorBlockStats";
7
+ import { POLLING } from "../../enum/polling";
8
+ import type { DefaultHookReturnType } from "../../types/global";
9
9
 
10
10
  export const useDailyValidatorBlockStats = ({
11
11
  pubKey,
@@ -2,10 +2,10 @@ import useSWR from "swr";
2
2
 
3
3
  import { usePublicClient } from "@berachain/wagmi/hooks";
4
4
 
5
- import { getDefaultRewardAllocation } from "~/actions/validators/getDefaultRewardAllocation";
6
- import type { ValidatorRewardAllocation } from "~/actions/validators/getValidatorRewardAllocation";
7
- import { assertPublicClient } from "~/errors/assert";
8
- import type { DefaultHookOptions } from "~/types/global";
5
+ import { getDefaultRewardAllocation } from "../../actions/validators/getDefaultRewardAllocation";
6
+ import type { ValidatorRewardAllocation } from "../../actions/validators/getValidatorRewardAllocation";
7
+ import { assertPublicClient } from "../../errors/assert";
8
+ import type { DefaultHookOptions } from "../../types/global";
9
9
 
10
10
  export function useDefaultRewardAllocation(options?: DefaultHookOptions) {
11
11
  const publicClient = usePublicClient();
@@ -4,11 +4,14 @@ import type { Address, PublicClient } from "viem";
4
4
 
5
5
  import { useBeraWallet, usePublicClient } from "@berachain/wagmi/hooks";
6
6
 
7
- import { getValidatorOperatorAddress } from "~/actions/validators/getValidatorOperatorAddress";
8
- import { getValidatorRewardAllocatorAddress } from "~/actions/validators/getValidatorRewardAllocatorAddress";
9
- import { useBeraFlag } from "~/contexts/BeraFlags/BeraFlags";
10
- import { assertPublicClient } from "~/errors/assert";
11
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
7
+ import { getValidatorOperatorAddress } from "../../actions/validators/getValidatorOperatorAddress";
8
+ import { getValidatorRewardAllocatorAddress } from "../../actions/validators/getValidatorRewardAllocatorAddress";
9
+ import { useBeraFlag } from "../../contexts/BeraFlags/BeraFlags";
10
+ import { assertPublicClient } from "../../errors/assert";
11
+ import type {
12
+ DefaultHookOptions,
13
+ DefaultHookReturnType,
14
+ } from "../../types/global";
12
15
 
13
16
  export type ManagedValidatorRole = {
14
17
  operator: Address | null;
@@ -8,9 +8,12 @@ import { beraChefAbi } from "@berachain/abis/pol/rewards/beraChef";
8
8
  import type { ApiValidatorFragment } from "@berachain/graphql/pol/api";
9
9
  import { usePublicClient } from "@berachain/wagmi/hooks";
10
10
 
11
- import { assertPublicClient } from "~/errors/assert";
12
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
13
- import { parseBaseArgs } from "~/utils/parseBaseArgs";
11
+ import { assertPublicClient } from "../../errors/assert";
12
+ import type {
13
+ DefaultHookOptions,
14
+ DefaultHookReturnType,
15
+ } from "../../types/global";
16
+ import { parseBaseArgs } from "../../utils/parseBaseArgs";
14
17
 
15
18
  export const useOnChainValidator = (
16
19
  { pubkey }: { pubkey: Address },
@@ -3,10 +3,13 @@ import type { Address } from "viem";
3
3
 
4
4
  import { usePublicClient } from "@berachain/wagmi/hooks";
5
5
 
6
- import { getStakingPoolBatch } from "~/actions/validators/getStakingPoolBatch";
7
- import { POLLING } from "~/enum/polling";
8
- import { assertPublicClient } from "~/errors/assert";
9
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
6
+ import { getStakingPoolBatch } from "../../actions/validators/getStakingPoolBatch";
7
+ import { POLLING } from "../../enum/polling";
8
+ import { assertPublicClient } from "../../errors/assert";
9
+ import type {
10
+ DefaultHookOptions,
11
+ DefaultHookReturnType,
12
+ } from "../../types/global";
10
13
 
11
14
  export const useStakingPoolBatch = ({
12
15
  valPubKey,
@@ -5,9 +5,12 @@ import { useBeraWallet, usePublicClient } from "@berachain/wagmi/hooks";
5
5
  import {
6
6
  getUserActiveValidators,
7
7
  type ValidatorWithUserBoost,
8
- } from "~/actions/validators/getUserActiveValidators";
9
- import { POLLING } from "~/enum/polling";
10
- import type { DefaultHookOptions, DefaultHookReturnType } from "~/types/global";
8
+ } from "../../actions/validators/getUserActiveValidators";
9
+ import { POLLING } from "../../enum/polling";
10
+ import type {
11
+ DefaultHookOptions,
12
+ DefaultHookReturnType,
13
+ } from "../../types/global";
11
14
 
12
15
  interface UseUserActiveValidatorsResponse
13
16
  extends DefaultHookReturnType<ValidatorWithUserBoost[] | undefined> {}
@@ -6,9 +6,9 @@ import { useBeraWallet, usePublicClient } from "@berachain/wagmi/hooks";
6
6
  import {
7
7
  getUserBoostsOnValidator,
8
8
  type UserBoostsOnValidator,
9
- } from "~/actions/validators/getUserBoostsOnValidator";
10
- import { POLLING } from "~/enum/polling";
11
- import type { DefaultHookReturnType } from "~/types/global";
9
+ } from "../../actions/validators/getUserBoostsOnValidator";
10
+ import { POLLING } from "../../enum/polling";
11
+ import type { DefaultHookReturnType } from "../../types/global";
12
12
 
13
13
  export const useUserBoostsOnValidator = ({
14
14
  pubkey,
@@ -3,15 +3,15 @@ import useSWR from "swr";
3
3
 
4
4
  import { useBeraWallet } from "@berachain/wagmi/hooks";
5
5
 
6
- import { getRewardProofsByValidator } from "~/actions/pol/getRewardProofsByValidator";
7
- import { getUserClaimableIncentives } from "~/actions/pol/getUserClaimableIncentives";
8
- import { POLLING } from "~/enum/polling";
9
- import { BeraError } from "~/errors/BeraError";
10
- import { BeraMonitoring } from "~/errors/BeraMonitoring";
11
- import { InvalidArgumentError } from "~/errors/InvalidArgumentError";
12
- import type { BribeBoostRewardProof } from "~/types/bribe-boost";
13
- import type { DefaultHookReturnType } from "~/types/global";
14
- import { formatIncentivesTokenMap } from "~/utils/formatIncentivesTokenMap";
6
+ import { getRewardProofsByValidator } from "../../actions/pol/getRewardProofsByValidator";
7
+ import { getUserClaimableIncentives } from "../../actions/pol/getUserClaimableIncentives";
8
+ import { POLLING } from "../../enum/polling";
9
+ import { BeraError } from "../../errors/BeraError";
10
+ import { BeraMonitoring } from "../../errors/BeraMonitoring";
11
+ import { InvalidArgumentError } from "../../errors/InvalidArgumentError";
12
+ import type { BribeBoostRewardProof } from "../../types/bribe-boost";
13
+ import type { DefaultHookReturnType } from "../../types/global";
14
+ import { formatIncentivesTokenMap } from "../../utils/formatIncentivesTokenMap";
15
15
 
16
16
  interface UseUserClaimableIncentivesReturnType
17
17
  extends DefaultHookReturnType<BribeBoostRewardProof[]> {
@@ -1,7 +1,7 @@
1
1
  import useSWRImmutable from "swr/immutable";
2
2
  import type { Address } from "viem";
3
3
 
4
- import { getUserStakingPositions } from "~/actions/validators/getUserStakingPositions";
4
+ import { getUserStakingPositions } from "../../actions/validators/getUserStakingPositions";
5
5
 
6
6
  /**
7
7
  * Hook to fetch and manage user staking positions for validators
@@ -3,7 +3,7 @@ import { type Address, keccak256 } from "viem";
3
3
  import type { GqlValidatorDynamicData } from "@berachain/graphql/dex/api";
4
4
  import type { ApiValidatorFragment } from "@berachain/graphql/pol/api";
5
5
 
6
- import type { DefaultHookOptions } from "~/types/global";
6
+ import type { DefaultHookOptions } from "../../types/global";
7
7
  import { useApiValidator } from "./useApiValidator";
8
8
  import { useOnChainValidator } from "./useOnChainValidator";
9
9
 
@@ -3,9 +3,9 @@ import type { Address } from "viem";
3
3
 
4
4
  import type { GetValidatorAnalyticsQuery } from "@berachain/graphql/pol/subgraph";
5
5
 
6
- import { getValidatorAnalytics } from "~/actions/validators/getValidatorAnalytics";
7
- import { POLLING } from "~/enum/polling";
8
- import type { DefaultHookReturnType } from "~/types/global";
6
+ import { getValidatorAnalytics } from "../../actions/validators/getValidatorAnalytics";
7
+ import { POLLING } from "../../enum/polling";
8
+ import type { DefaultHookReturnType } from "../../types/global";
9
9
 
10
10
  export function useValidatorAnalytics({
11
11
  pubkey,