@berachain/berajs 0.2.4 → 0.2.6-patch.1

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 (463) 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-MJZHJFZO.mjs +2 -0
  45. package/dist/{chunk-YNO7BCCM.mjs.map → chunk-MJZHJFZO.mjs.map} +1 -1
  46. package/dist/chunk-MK5NS5B5.mjs +2 -0
  47. package/dist/chunk-MK5NS5B5.mjs.map +1 -0
  48. package/dist/{chunk-C6ZGUO4H.cjs → chunk-NMH7LHPW.cjs} +2 -2
  49. package/dist/chunk-NMH7LHPW.cjs.map +1 -0
  50. package/dist/chunk-NVHV2LDK.cjs +2 -0
  51. package/dist/chunk-NVHV2LDK.cjs.map +1 -0
  52. package/dist/chunk-OGBD5YOG.mjs +2 -0
  53. package/dist/chunk-OGBD5YOG.mjs.map +1 -0
  54. package/dist/chunk-OIYXOKTT.cjs.map +1 -1
  55. package/dist/chunk-OUD27MU7.cjs.map +1 -1
  56. package/dist/chunk-PLIH6KQM.mjs +2 -0
  57. package/dist/chunk-PLIH6KQM.mjs.map +1 -0
  58. package/dist/chunk-QRAIGQF2.mjs +2 -0
  59. package/dist/chunk-QRAIGQF2.mjs.map +1 -0
  60. package/dist/chunk-RWOICHRW.cjs +2 -0
  61. package/dist/chunk-RWOICHRW.cjs.map +1 -0
  62. package/dist/chunk-T5FSQ3YE.mjs +2 -0
  63. package/dist/chunk-T5FSQ3YE.mjs.map +1 -0
  64. package/dist/chunk-WRFDB3QJ.cjs.map +1 -1
  65. package/dist/chunk-XNJLSA6P.cjs.map +1 -1
  66. package/dist/contexts/exports.cjs +1 -1
  67. package/dist/contexts/exports.cjs.map +1 -1
  68. package/dist/contexts/exports.d.cts +1 -1
  69. package/dist/contexts/exports.d.ts +1 -1
  70. package/dist/contexts/exports.mjs +1 -1
  71. package/dist/contexts/exports.mjs.map +1 -1
  72. package/dist/{defaultFlags-d0kPbT0i.d.cts → defaultFlags-D6KfkTZx.d.cts} +1 -1
  73. package/dist/{defaultFlags-d0kPbT0i.d.ts → defaultFlags-D6KfkTZx.d.ts} +1 -1
  74. package/dist/enum/exports.cjs +1 -1
  75. package/dist/enum/exports.cjs.map +1 -1
  76. package/dist/enum/exports.d.cts +1 -1
  77. package/dist/enum/exports.d.ts +1 -1
  78. package/dist/enum/exports.mjs +1 -1
  79. package/dist/errors/exports.cjs +1 -1
  80. package/dist/errors/exports.cjs.map +1 -1
  81. package/dist/errors/exports.d.cts +8 -3
  82. package/dist/errors/exports.d.ts +8 -3
  83. package/dist/errors/exports.mjs +1 -1
  84. package/dist/{getValidatorQueuedOperatorAddress-DZgrPmZ2.d.cts → getValidatorQueuedOperatorAddress-BdDYHycN.d.cts} +15 -4
  85. package/dist/{getValidatorQueuedOperatorAddress-CqR6cyqC.d.ts → getValidatorQueuedOperatorAddress-CmiPJmsr.d.ts} +15 -4
  86. package/dist/{global.d-BeYWDreg.d.ts → global.d-3GQMgC9k.d.ts} +1 -1
  87. package/dist/{global.d-DghRxpHd.d.cts → global.d-CwT1Phzf.d.cts} +1 -1
  88. package/dist/hooks/exports.cjs +3 -3
  89. package/dist/hooks/exports.cjs.map +1 -1
  90. package/dist/hooks/exports.d.cts +54 -75
  91. package/dist/hooks/exports.d.ts +54 -75
  92. package/dist/hooks/exports.mjs +3 -3
  93. package/dist/hooks/exports.mjs.map +1 -1
  94. package/dist/{txnEnum-DxPRHSJt.d.cts → txnEnum-CCuQUFlh.d.cts} +7 -0
  95. package/dist/{txnEnum-DxPRHSJt.d.ts → txnEnum-CCuQUFlh.d.ts} +7 -0
  96. package/dist/types/exports.cjs.map +1 -1
  97. package/dist/types/exports.d.cts +37 -4
  98. package/dist/types/exports.d.ts +37 -4
  99. package/dist/utils/exports.cjs +1 -1
  100. package/dist/utils/exports.cjs.map +1 -1
  101. package/dist/utils/exports.d.cts +2 -2
  102. package/dist/utils/exports.d.ts +2 -2
  103. package/dist/utils/exports.mjs +1 -1
  104. package/dist/utils/exports.mjs.map +1 -1
  105. package/package.json +25 -25
  106. package/src/abi/enso/ensoWalletV2Factory.ts +9 -0
  107. package/src/abi/exports.ts +1 -0
  108. package/src/abi/pyth/pyth.ts +0 -0
  109. package/src/actions/clients/BeraApolloClient.ts +3 -3
  110. package/src/actions/clients/getApolloClient.ts +5 -5
  111. package/src/actions/clients/getEnsoClient.ts +1 -1
  112. package/src/actions/dex/__tests__/aggregators.unit.test.ts +3 -3
  113. package/src/actions/dex/__tests__/getOnChainPool.unit.test.ts +1 -1
  114. package/src/actions/dex/aggregators/base.ts +12 -8
  115. package/src/actions/dex/aggregators/bex.ts +8 -8
  116. package/src/actions/dex/aggregators/bgt.ts +4 -4
  117. package/src/actions/dex/aggregators/enso/enso.ts +28 -20
  118. package/src/actions/dex/aggregators/enso/ensoErc4626.debug.test.ts +1 -1
  119. package/src/actions/dex/aggregators/enso/ensoErc4626.ts +7 -4
  120. package/src/actions/dex/aggregators/erc4626.ts +10 -6
  121. package/src/actions/dex/aggregators/fly.ts +9 -5
  122. package/src/actions/dex/aggregators/haiku.integration.test.ts +3 -3
  123. package/src/actions/dex/aggregators/haiku.ts +9 -5
  124. package/src/actions/dex/aggregators/honey.ts +15 -15
  125. package/src/actions/dex/aggregators/kyberswap.ts +8 -4
  126. package/src/actions/dex/aggregators/oogabooga.ts +8 -4
  127. package/src/actions/dex/aggregators/openOcean.ts +12 -8
  128. package/src/actions/dex/aggregators/wbera.ts +8 -4
  129. package/src/actions/dex/b-sdk.ts +2 -2
  130. package/src/actions/dex/getAllPools.ts +2 -2
  131. package/src/actions/dex/getApiPool.ts +2 -2
  132. package/src/actions/dex/getGlobalLiquidityAndSwapVolume.ts +2 -2
  133. package/src/actions/dex/getIsTokenExploited.ts +1 -1
  134. package/src/actions/dex/getOnChainPool.ts +3 -3
  135. package/src/actions/dex/getPoolEvents.ts +2 -2
  136. package/src/actions/dex/getPoolHistoricalData.ts +2 -2
  137. package/src/actions/dex/getVaultPausedState.ts +1 -1
  138. package/src/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.ts +175 -0
  139. package/src/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.ts +150 -0
  140. package/src/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.ts +138 -0
  141. package/src/actions/enso/__tests__/getBendMultiplyBundle.unit.test.ts +194 -0
  142. package/src/actions/enso/{getEnsoUserTokensWithBalances.debug.test.ts → __tests__/getEnsoUserTokensWithBalances.debug.test.ts} +3 -3
  143. package/src/actions/enso/__tests__/helpers.ts +42 -0
  144. package/src/actions/enso/__tests__/util.unit.test.ts +95 -0
  145. package/src/actions/enso/flashloan.ts +127 -0
  146. package/src/actions/enso/getBendDemultiplyBundle.ts +325 -0
  147. package/src/actions/enso/getBendMultiplyBundle.ts +348 -0
  148. package/src/actions/enso/getEnsoSwapBundle.ts +2 -2
  149. package/src/actions/enso/getEnsoUserTokensWithBalances.ts +5 -5
  150. package/src/actions/enso/util.ts +150 -5
  151. package/src/actions/exports.ts +0 -2
  152. package/src/actions/governance/__tests__/checkProposalField.unit.test.ts +2 -2
  153. package/src/actions/governance/__tests__/getDecodedFunctionData.integration.test.ts +2 -2
  154. package/src/actions/governance/__tests__/getQuorum.integration.test.ts +2 -2
  155. package/src/actions/governance/checkProposalField.ts +1 -1
  156. package/src/actions/governance/computeActualStatus.ts +1 -1
  157. package/src/actions/governance/getAllProposals.ts +1 -1
  158. package/src/actions/governance/getBodyErrors.ts +1 -1
  159. package/src/actions/governance/getProposalDetails.ts +1 -1
  160. package/src/actions/governance/getProposalFromTx.ts +1 -1
  161. package/src/actions/governance/getProposalParams.ts +3 -3
  162. package/src/actions/governance/getProposalVotes.ts +1 -1
  163. package/src/actions/governance/getQuorum.ts +2 -2
  164. package/src/actions/honey/getCollateralWeights.ts +2 -2
  165. package/src/actions/honey/getGlobalCapLimit.ts +4 -4
  166. package/src/actions/honey/getHoneyCollaterals.ts +5 -5
  167. package/src/actions/honey/getHoneyFees.ts +1 -1
  168. package/src/actions/honey/getHoneyPausedState.ts +1 -1
  169. package/src/actions/honey/getHoneyPreview.ts +3 -3
  170. package/src/actions/honey/getHoneyRootPriceOracle.ts +1 -1
  171. package/src/actions/honey/getHoneyVaultsBalance.ts +2 -2
  172. package/src/actions/honey/getRelativeCapLimit.ts +3 -3
  173. package/src/actions/honey/getSharesWithoutFees.ts +1 -1
  174. package/src/actions/honey/getSwapPayload.ts +6 -6
  175. package/src/actions/honey/isBadCollateralAsset.ts +2 -2
  176. package/src/actions/honey/isBasketModeEnabled.ts +2 -2
  177. package/src/actions/honey/tests/pyth.integration.test.ts +3 -3
  178. package/src/actions/misc/getBlockTimestamp.ts +2 -2
  179. package/src/actions/pol/__tests__/getAllValidators.integration.test.ts +2 -2
  180. package/src/actions/pol/__tests__/rewardVaults.integration.test.ts +1 -1
  181. package/src/actions/pol/getBGTGlobalInfo.ts +2 -2
  182. package/src/actions/pol/getBgtAprSimulation.ts +1 -1
  183. package/src/actions/pol/getBgtAprSimultaion.unit.test.ts +1 -1
  184. package/src/actions/pol/getBgtTokenTotalBoosts.ts +2 -2
  185. package/src/actions/pol/getBgtTokenTotalSupply.ts +2 -2
  186. package/src/actions/pol/getBlockTime.debug.test.ts +13 -0
  187. package/src/actions/pol/getBlockTime.ts +14 -23
  188. package/src/actions/pol/getEarnedStakedBeraVault.ts +3 -3
  189. package/src/actions/pol/getGlobalCuttingBoard.ts +0 -0
  190. package/src/actions/pol/getGlobalData.ts +2 -2
  191. package/src/actions/pol/getIncentiveFeeClaimStats.ts +4 -4
  192. package/src/actions/pol/getLSTStakeConfig.ts +5 -5
  193. package/src/actions/pol/getMarkets.ts +2 -2
  194. package/src/actions/pol/getRewardProofsByValidator.ts +4 -4
  195. package/src/actions/pol/getRewardTokenToBeraRate.ts +1 -1
  196. package/src/actions/pol/getRewardVault.ts +3 -3
  197. package/src/actions/pol/getRewardVaultBeaconImplementation.integration.test.ts +1 -1
  198. package/src/actions/pol/getRewardVaultBeaconImplementation.ts +3 -3
  199. package/src/actions/pol/getRewardVaultDurationConstants.integration.test.ts +1 -1
  200. package/src/actions/pol/getRewardVaultDurationConstants.ts +1 -1
  201. package/src/actions/pol/getRewardVaultFromToken.ts +1 -1
  202. package/src/actions/pol/getRewardVaultIncentives.ts +2 -2
  203. package/src/actions/pol/getRewardVaultRewards.ts +1 -1
  204. package/src/actions/pol/getRewardVaults.ts +1 -1
  205. package/src/actions/pol/getSWBeraVaultMetadata.ts +20 -22
  206. package/src/actions/pol/getSWBeraWithdrawal.ts +4 -4
  207. package/src/actions/pol/getStakedBeraAPR.ts +2 -2
  208. package/src/actions/pol/getStakedBeraSnapshots.ts +2 -2
  209. package/src/actions/pol/getStakingDailyAssets.ts +3 -3
  210. package/src/actions/pol/getStakingTokenInformation.ts +2 -2
  211. package/src/actions/pol/getTotalStakedAmount.ts +1 -1
  212. package/src/actions/pol/getUserClaimableIncentives.ts +4 -4
  213. package/src/actions/pol/getUserVaultInfo.ts +1 -1
  214. package/src/actions/pol/getUserVaults.ts +4 -4
  215. package/src/actions/pol/getUserVaultsBalance.ts +1 -1
  216. package/src/actions/pol/getUserVaultsReward.ts +0 -0
  217. package/src/actions/pol/getVaultHistory.ts +2 -2
  218. package/src/actions/pol/getVaultValidators.ts +1 -1
  219. package/src/actions/pol/getVaultsSupply.ts +0 -0
  220. package/src/actions/prices/__tests__/prices.integration.test.ts +2 -2
  221. package/src/actions/prices/getTokenCurrentPrices.ts +5 -5
  222. package/src/actions/pyth/getHoneyPythFeeds.ts +2 -2
  223. package/src/actions/pyth/getUpdateFee.ts +2 -2
  224. package/src/actions/tokens/getAllowances.ts +2 -2
  225. package/src/actions/tokens/getTokenInformation.ts +2 -2
  226. package/src/actions/tokens/getTokens.ts +3 -3
  227. package/src/actions/tokens/getUnderlyingToken.ts +4 -4
  228. package/src/actions/tokens/getWalletBalances.integration.test.ts +1 -1
  229. package/src/actions/tokens/getWalletBalances.ts +4 -4
  230. package/src/actions/transactions/beraWriteContract.integration.test.ts +6 -6
  231. package/src/actions/transactions/beraWriteContract.ts +12 -12
  232. package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.ts +1 -1
  233. package/src/actions/validators/getActiveBoostAndCommissionChangeDelay.ts +1 -1
  234. package/src/actions/validators/getAllValidators.ts +2 -2
  235. package/src/actions/validators/getApiValidator.ts +2 -2
  236. package/src/actions/validators/getBaselineRewardAllocation.ts +1 -1
  237. package/src/actions/validators/getDailyValidatorBlockStats.ts +1 -1
  238. package/src/actions/validators/getDefaultRewardAllocation.ts +1 -1
  239. package/src/actions/validators/getUserActiveValidators.ts +31 -33
  240. package/src/actions/validators/getUserBoosts.ts +12 -8
  241. package/src/actions/validators/getUserBoostsOnValidator.ts +15 -3
  242. package/src/actions/validators/getUserStakingPositions.ts +1 -1
  243. package/src/actions/validators/getValidatorAnalytics.ts +2 -2
  244. package/src/actions/validators/getValidatorCommission.ts +1 -1
  245. package/src/actions/validators/getValidatorEstimatedBgtPerYear.ts +1 -1
  246. package/src/actions/validators/getValidatorOperatorAddress.ts +1 -1
  247. package/src/actions/validators/getValidatorQueuedCommission.ts +1 -1
  248. package/src/actions/validators/getValidatorQueuedOperatorAddress.ts +1 -1
  249. package/src/actions/validators/getValidatorQueuedRewardAllocation.ts +1 -1
  250. package/src/actions/validators/getValidatorRewardAllocation.ts +1 -1
  251. package/src/actions/validators/getValidatorRewardAllocatorAddress.ts +1 -1
  252. package/src/actions/validators/utils/__tests__/validatorUtils.integration.test.ts +4 -4
  253. package/src/contexts/BeraFlags/defaultFlags.ts +4 -0
  254. package/src/contexts/BexStatusProvider.tsx +1 -1
  255. package/src/contexts/HoneyConfigProvider.tsx +3 -3
  256. package/src/contexts/SwrFallback.tsx +2 -2
  257. package/src/contexts/TokensProvider.tsx +3 -3
  258. package/src/contexts/block-time-provider.tsx +1 -1
  259. package/src/contexts/exports.ts +0 -0
  260. package/src/data/contracts.ts +10 -0
  261. package/src/enum/exports.ts +0 -0
  262. package/src/enum/polling.ts +0 -0
  263. package/src/enum/txnEnum.ts +9 -0
  264. package/src/errors/BeraMonitoring.ts +2 -2
  265. package/src/errors/BeraTracing.ts +2 -2
  266. package/src/errors/RequestError.ts +1 -1
  267. package/src/errors/assert.ts +18 -0
  268. package/src/errors/getErrorMessage.ts +0 -0
  269. package/src/errors/getRevertReason.integration.test.ts +7 -7
  270. package/src/errors/getRevertReason.ts +1 -1
  271. package/src/errors/parseViemError.ts +1 -1
  272. package/src/hooks/bend/useGetConvertToAssets.ts +4 -4
  273. package/src/hooks/dex/useAggregatorsQuotes.ts +19 -19
  274. package/src/hooks/dex/useAggregatorsRouterFeeBps.ts +2 -2
  275. package/src/hooks/dex/useAllUserPools.ts +3 -3
  276. package/src/hooks/dex/useApiPool.ts +3 -3
  277. package/src/hooks/dex/useBexStatus.ts +1 -1
  278. package/src/hooks/dex/useCreatePool.ts +9 -9
  279. package/src/hooks/dex/useExploitedTokens.ts +3 -3
  280. package/src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts +1 -1
  281. package/src/hooks/dex/useLiquidityMismatch.ts +3 -3
  282. package/src/hooks/dex/useLpPosition.ts +7 -4
  283. package/src/hooks/dex/useMultipleTokenApprovalsWithSlippage.ts +4 -4
  284. package/src/hooks/dex/useOnChainPoolData.ts +3 -3
  285. package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +3 -3
  286. package/src/hooks/dex/usePool.ts +7 -40
  287. package/src/hooks/dex/usePoolEvents.ts +2 -2
  288. package/src/hooks/dex/usePoolHistoricalData.ts +6 -3
  289. package/src/hooks/dex/usePools.ts +3 -3
  290. package/src/hooks/dex/usePriceImpact.ts +2 -2
  291. package/src/hooks/dex/useSingleAggregatorQuote.ts +13 -13
  292. package/src/hooks/enso/useBendDemultiply.ts +158 -0
  293. package/src/hooks/enso/useBendMultiply.ts +163 -0
  294. package/src/hooks/enso/useBendZapSupply.ts +7 -7
  295. package/src/hooks/enso/useEnsoSwapBundle.ts +6 -6
  296. package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +5 -5
  297. package/src/hooks/enso/useEnsoWalletV2Address.ts +38 -0
  298. package/src/hooks/enso/useIsBendAuthorized.ts +47 -0
  299. package/src/hooks/enso/useZapStakeBera.ts +4 -4
  300. package/src/hooks/exports.ts +4 -3
  301. package/src/hooks/governance/useCreateProposal.ts +3 -3
  302. package/src/hooks/governance/useGetPastVotes.ts +2 -2
  303. package/src/hooks/governance/useHasVoted.ts +2 -2
  304. package/src/hooks/governance/useIsCanceller.ts +4 -4
  305. package/src/hooks/governance/usePollAllProposals.ts +3 -3
  306. package/src/hooks/governance/usePollProposal.ts +7 -4
  307. package/src/hooks/governance/usePollProposalThreshold.ts +3 -3
  308. package/src/hooks/governance/usePollProposalVotes.ts +1 -1
  309. package/src/hooks/governance/usePollUserDelegates.ts +7 -4
  310. package/src/hooks/governance/useProposalFromTx.ts +1 -1
  311. package/src/hooks/governance/useProposalSnapshot.ts +2 -2
  312. package/src/hooks/governance/useProposalState.ts +2 -2
  313. package/src/hooks/governance/useProposalTimelockState.ts +2 -2
  314. package/src/hooks/governance/useQuorum.ts +1 -1
  315. package/src/hooks/honey/useCappedGlobally.ts +8 -5
  316. package/src/hooks/honey/useCappedRelatively.ts +7 -4
  317. package/src/hooks/honey/useCollateralWeights.ts +8 -5
  318. package/src/hooks/honey/useHoneyAlerts.ts +5 -5
  319. package/src/hooks/honey/useHoneyBalances.ts +7 -7
  320. package/src/hooks/honey/useHoneyChartData.ts +1 -1
  321. package/src/hooks/honey/useHoneySwapState.ts +4 -4
  322. package/src/hooks/honey/useHoneyVaultsBalance.ts +8 -5
  323. package/src/hooks/honey/useIsBadCollateralAsset.ts +9 -6
  324. package/src/hooks/honey/useIsBasketModeEnabled.ts +8 -5
  325. package/src/hooks/honey/usePythLatestPrices.ts +4 -4
  326. package/src/hooks/perps/usePythUpdateFee.ts +4 -4
  327. package/src/hooks/pol/useBgtAprSimulation.ts +1 -1
  328. package/src/hooks/pol/useBgtUnstakedBalance.ts +7 -4
  329. package/src/hooks/pol/useClaimableFees.ts +4 -4
  330. package/src/hooks/pol/useOnChainRewardVault.ts +7 -7
  331. package/src/hooks/pol/usePollGlobalData.ts +9 -3
  332. package/src/hooks/pol/usePollMarkets.ts +5 -2
  333. package/src/hooks/pol/useQueuedBeraUnlock.ts +4 -4
  334. package/src/hooks/pol/useRewardTokenToBeraRate.ts +4 -4
  335. package/src/hooks/pol/useRewardVault.ts +5 -2
  336. package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +2 -2
  337. package/src/hooks/pol/useRewardVaultFromToken.ts +2 -2
  338. package/src/hooks/pol/useRewardVaultIncentives.ts +2 -2
  339. package/src/hooks/pol/useRewardVaultRewards.ts +3 -3
  340. package/src/hooks/pol/useRewardVaults.ts +2 -2
  341. package/src/hooks/pol/useStakedAPR.ts +3 -3
  342. package/src/hooks/pol/useStakedData.ts +10 -10
  343. package/src/hooks/pol/useStakedSnapshots.ts +3 -3
  344. package/src/hooks/pol/useStakingVaultsMetadata.ts +40 -0
  345. package/src/hooks/pol/useTotalStakedAmount.ts +2 -2
  346. package/src/hooks/pol/useUserVaultInfo.ts +8 -5
  347. package/src/hooks/pol/useUserVaults.ts +7 -4
  348. package/src/hooks/pol/useVaultAddress.ts +2 -2
  349. package/src/hooks/pol/useVaultHistory.ts +2 -2
  350. package/src/hooks/pol/useVaultValidators.ts +5 -2
  351. package/src/hooks/tokens/useBeraCurrentPrice.ts +1 -1
  352. package/src/hooks/tokens/useMultipleTokenInformation.ts +7 -4
  353. package/src/hooks/tokens/usePollAllowances.ts +7 -4
  354. package/src/hooks/tokens/usePollBalance.ts +8 -5
  355. package/src/hooks/tokens/usePollWalletBalances.ts +8 -5
  356. package/src/hooks/tokens/useStakingTokenInformation.ts +7 -4
  357. package/src/hooks/tokens/useTokenCurrentPrice.ts +1 -1
  358. package/src/hooks/tokens/useTokenCurrentPrices.ts +6 -6
  359. package/src/hooks/tokens/useTokenInformation.ts +8 -5
  360. package/src/hooks/tokens/useTokenPrice.ts +1 -1
  361. package/src/hooks/tokens/useTokenPrices.ts +4 -4
  362. package/src/hooks/tokens/useTokens.ts +3 -3
  363. package/src/hooks/tokens/useTotalSupply.ts +1 -1
  364. package/src/hooks/tokens/useUnderlyingAsset.ts +3 -3
  365. package/src/hooks/useBlockToTimestamp.ts +5 -5
  366. package/src/hooks/useContractWrite/index.ts +0 -0
  367. package/src/hooks/useContractWrite/stateReducer.ts +0 -0
  368. package/src/hooks/useContractWrite/types.ts +2 -2
  369. package/src/hooks/useContractWrite/useBeraContractWrite.ts +5 -6
  370. package/src/hooks/useGetVerifiedAbi.ts +1 -1
  371. package/src/hooks/usePrevious.ts +0 -0
  372. package/src/hooks/validators/useAllValidators.ts +7 -4
  373. package/src/hooks/validators/useApiEnrichedAllocation.ts +2 -2
  374. package/src/hooks/validators/useApiValidator.ts +5 -2
  375. package/src/hooks/validators/useBaselineRewardAllocation.ts +2 -2
  376. package/src/hooks/validators/useDailyValidatorBlockStats.ts +3 -3
  377. package/src/hooks/validators/useDefaultRewardAllocation.ts +4 -4
  378. package/src/hooks/validators/useManagedValidatorRole.ts +8 -5
  379. package/src/hooks/validators/useOnChainValidator.ts +6 -3
  380. package/src/hooks/validators/useStakingPoolBatch.ts +7 -4
  381. package/src/hooks/validators/useUserActiveValidators.ts +6 -3
  382. package/src/hooks/validators/useUserBoostsOnValidator.ts +3 -3
  383. package/src/hooks/validators/useUserClaimableIncentives.ts +9 -9
  384. package/src/hooks/validators/useUserStakingPositions.ts +1 -1
  385. package/src/hooks/validators/useValidator.ts +1 -1
  386. package/src/hooks/validators/useValidatorAnalytics.ts +3 -3
  387. package/src/hooks/validators/useValidatorCommission.ts +5 -2
  388. package/src/hooks/validators/useValidatorEstimatedBgtPerYear.ts +3 -3
  389. package/src/hooks/validators/useValidatorQueuedCommission.ts +6 -3
  390. package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +5 -2
  391. package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +6 -3
  392. package/src/hooks/validators/useValidatorRewardAllocation.ts +2 -2
  393. package/src/types/dex.d.ts +1 -1
  394. package/src/types/enso.d.ts +34 -0
  395. package/src/types/exports.ts +0 -0
  396. package/src/types/global.d.ts +3 -3
  397. package/src/types/governance.d.ts +1 -1
  398. package/src/types/honeySwap.d.ts +3 -3
  399. package/src/types/staking.d.ts +0 -0
  400. package/src/utils/beraFetch.ts +1 -1
  401. package/src/utils/createEmitter.ts +1 -1
  402. package/src/utils/exports.ts +0 -0
  403. package/src/utils/filter.ts +0 -0
  404. package/src/utils/formatIncentivesTokenMap.ts +1 -1
  405. package/src/utils/formatInputTokenValue.ts +0 -0
  406. package/src/utils/formatNumber.ts +0 -0
  407. package/src/utils/getContractName.ts +1 -1
  408. package/src/utils/getHoneySwapMessage.test.ts +1 -1
  409. package/src/utils/getHoneySwapMessage.ts +1 -1
  410. package/src/utils/parseBaseArgs.ts +1 -1
  411. package/src/utils/parseBaseArgs.unit.test.ts +1 -1
  412. package/src/utils/parseWhiskToken.ts +1 -1
  413. package/src/utils/poolNamings.ts +1 -1
  414. package/src/utils/tokens.ts +2 -2
  415. package/src/utils/tokens.unit.test.ts +1 -1
  416. package/src/utils/truncateHash.ts +0 -0
  417. package/.claude/skills/berajs/SKILL.md +0 -222
  418. package/.claude/skills/berajs/references/dex.md +0 -235
  419. package/.claude/skills/berajs/references/pol.md +0 -194
  420. package/.claude/skills/berajs/references/staking.md +0 -198
  421. package/.claude/skills/berajs/references/tokens.md +0 -170
  422. package/LICENSE +0 -21
  423. package/dist/chunk-22J3YJDN.cjs +0 -2
  424. package/dist/chunk-22J3YJDN.cjs.map +0 -1
  425. package/dist/chunk-2LL3P5PN.mjs +0 -2
  426. package/dist/chunk-2LL3P5PN.mjs.map +0 -1
  427. package/dist/chunk-4GU2O2OW.cjs +0 -4
  428. package/dist/chunk-4GU2O2OW.cjs.map +0 -1
  429. package/dist/chunk-55L7STYD.mjs +0 -2
  430. package/dist/chunk-55L7STYD.mjs.map +0 -1
  431. package/dist/chunk-5XWELBWR.mjs +0 -2
  432. package/dist/chunk-5XWELBWR.mjs.map +0 -1
  433. package/dist/chunk-6LDOG5RL.cjs.map +0 -1
  434. package/dist/chunk-7LNBSOVV.cjs +0 -2
  435. package/dist/chunk-7LNBSOVV.cjs.map +0 -1
  436. package/dist/chunk-7SMWQ6SN.mjs.map +0 -1
  437. package/dist/chunk-7WRTK7RJ.mjs.map +0 -1
  438. package/dist/chunk-AX2YQQFQ.mjs.map +0 -1
  439. package/dist/chunk-BS6K7HGH.cjs +0 -2
  440. package/dist/chunk-BS6K7HGH.cjs.map +0 -1
  441. package/dist/chunk-C3FHGFLK.mjs +0 -2
  442. package/dist/chunk-C3FHGFLK.mjs.map +0 -1
  443. package/dist/chunk-C6ZGUO4H.cjs.map +0 -1
  444. package/dist/chunk-FCWDGE62.cjs.map +0 -1
  445. package/dist/chunk-RW3JFPED.mjs +0 -4
  446. package/dist/chunk-RW3JFPED.mjs.map +0 -1
  447. package/dist/chunk-S3EAKCVM.cjs +0 -2
  448. package/dist/chunk-S3EAKCVM.cjs.map +0 -1
  449. package/dist/chunk-SWMJQOH6.cjs +0 -2
  450. package/dist/chunk-SWMJQOH6.cjs.map +0 -1
  451. package/dist/chunk-THATXCJK.mjs +0 -2
  452. package/dist/chunk-THATXCJK.mjs.map +0 -1
  453. package/dist/chunk-VXL2ZZ4X.cjs +0 -2
  454. package/dist/chunk-VXL2ZZ4X.cjs.map +0 -1
  455. package/dist/chunk-YNO7BCCM.mjs +0 -2
  456. package/dist/chunk-YXLFOEZN.mjs +0 -2
  457. package/dist/chunk-YXLFOEZN.mjs.map +0 -1
  458. package/dist/chunk-YZV5LKIP.cjs.map +0 -1
  459. package/src/actions/dex/getSubgraphPool.ts +0 -30
  460. package/src/actions/validators/getManagedValidatorByAccount.ts +0 -32
  461. package/src/hooks/pol/useSWBeraVaultMetadata.ts +0 -35
  462. package/src/hooks/validators/useManagedValidatorByAccount.ts +0 -40
  463. package/src/hooks/validators/useSubgraphUserValidators.ts +0 -36
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors/errorMap.ts","../src/errors/getErrorMessage.ts","../src/errors/BeraError.ts","../src/abi/utils/bundler3errors.ts","../src/abi/utils/erc20errors.ts","../src/abi/utils/openChainErrors.ts","../src/abi/utils/commonAbiErrors.ts","../src/errors/parseViemError.ts"],"names":["GENERAL_ERROR","errorMsgMap","findMatchingError","reason","message","category","errors","type","errorType","r","keyword","getErrorMessage","bundler3errorsAbi","erc20errorsAbi","openChainErrorsAbi","commonAbiErrors","isBaseError","error","BaseError","isViemError","name","shouldBeInstanceOf","parseDecodedError","parseViemError","abi","revertIfUnknown","cause","ContractFunctionExecutionError","TransactionExecutionError","AtomicReadyWalletRejectedUpgradeError","RpcRequestError","decodedError","decodeErrorResult","ContractFunctionRevertedError","UserRejectedRequestError","HttpRequestError","rpcErrorToReason","errCode"],"mappings":"AAuBO,8sBAAMA,CAAAA,CAAgB,+CAAA,CAEhBC,CAAAA,CAAc,CACzB,KAAA,CAAO,CACL,kBAAA,CAAoB,CAClB,OAAA,CAAS,CAAC,kBAAkB,CAAA,CAC5B,QAAA,CAAU,wDACZ,CAAA,CACA,mBAAA,CAAqB,CACnB,OAAA,CAAS,CAAC,qBAAqB,CAAA,CAC/B,QAAA,CAAU,4BACZ,CAAA,CACA,sBAAA,CAAwB,CACtB,OAAA,CAAS,CACP,YAAA,CACA,uBAAA,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esContent":["export interface ErrorType {\n /**\n * Keywords to match in the error message. Use carefully. Do not use this for contract revert reasons\n * as they might match to other error messages.\n *\n * For instance InsufficientBalance might match to InsufficientBalanceToPayPythFee if used as keyword.\n */\n keywords?: string[];\n /**\n * The exact error code or contract revert reason.\n */\n reasons?: string[];\n errorMSG: string;\n}\n\nexport interface ErrorCategory {\n [key: string]: ErrorType;\n}\n\ninterface ErrorMessages {\n [key: string]: ErrorCategory | string;\n}\n\nexport const GENERAL_ERROR = \"Something went wrong. Please try again later.\";\n\nexport const errorMsgMap = {\n ERC20: {\n NOT_ENOUGH_BALANCE: {\n reasons: [\"NotEnoughBalance\"],\n errorMSG: \"You do not have enough balance to perform this action.\",\n },\n InsufficientBalance: {\n reasons: [\"InsufficientBalance\"],\n errorMSG: \"Insufficient token balance\",\n },\n INSUFFICIENT_ALLOWANCE: {\n reasons: [\n \"0x13be252b\",\n \"InsufficientAllowance\",\n \"ERC20InsufficientAllowance\",\n ],\n errorMSG: \"You do not have enough allowance to perform this action.\",\n },\n SIGNATURE_EXPIRED: {\n reasons: [\"SignatureExpired\"],\n errorMSG: \"Transaction took too long to complete. Please try again.\",\n },\n },\n HTTP: {\n RATE_LIMITED_429: {\n reasons: [\"429\"],\n errorMSG: \"Too many requests. Please try again later.\",\n },\n },\n ENSO: {\n COULD_NOT_BUILD_SHORTCUT: {\n keywords: [\n \"Could not build shortcuts for route\",\n \"Could not quote shortcuts for route\",\n ],\n\n errorMSG:\n \"There was an error building the zap route. Try with lower amounts.\",\n },\n NOT_ENOUGH_LIQUIDITY: {\n keywords: [\n \"Swap not found for a required underlying of defi route, please make sure your amountIn is within an acceptable range\",\n ],\n\n errorMSG:\n \"The amount you’re trying to swap might be too high. Please make sure that your amount is within an acceptable range.\",\n },\n NO_ROUTE_FOUND: {\n keywords: [\"No route found from\"],\n errorMSG: \"No swap route found for the given tokens.\",\n },\n },\n RPC: {\n NOT_ENOUGH_GAS_TOKEN: {\n reasons: [\"InsufficientFundsError\"],\n keywords: [\n \"insufficient funds for gas * price + value:\",\n \"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.\",\n ],\n errorMSG: \"Insufficient BERA balance to perform this action.\",\n },\n NONCE_TOO_LOW: {\n keywords: [\"nonce too low: next nonce\"],\n errorMSG:\n \"Nonce is too low. Your wallet might have unconfirmed transactions.\",\n },\n GAS_PRICE: {\n keywords: [\"gasLimit\"],\n errorMSG:\n \"It seems an RPC error has occurred while estimating gas. Please try your request later.\",\n },\n JSON_RPC: {\n keywords: [\"JSON-RPC\"],\n\n errorMSG:\n \"It seems an RPC error has occurred. Please try your request one more later.\",\n },\n HASH: {\n keywords: [\"hash\"],\n errorMSG:\n \"It seems an RPC error has occurred. Please check if your transaction was finalized. If not, please try again.\",\n },\n USER_REJECTION: {\n reasons: [\"UserRejectedRequestError\"],\n keywords: [\"User denied transaction signature\"],\n errorMSG: \"You rejected the transaction.\",\n },\n SMART_UPGRADE_REJECTION: {\n reasons: [\"AtomicReadyWalletRejectedUpgradeError\"],\n errorMSG:\n \"You've declined to upgrade to batch transactions for now, try again for the traditional method.\",\n },\n CHAIN_MISMATCH: {\n reasons: [\"ChainMismatchError\"],\n errorMSG:\n \"Wallet seems to be on the wrong chain, please refresh the page and try again.\",\n },\n },\n EIP7702: {\n SESSION_KEY_EXPIRED: {\n reasons: [\"SessionKeyExpired\"],\n errorMSG: \"Session key has expired. Please create a new one.\",\n },\n CALL_POLICY_VIOLATED: {\n reasons: [\"CallPolicyViolated\"],\n errorMSG: \"Call policy violated. Please check your call policies.\",\n },\n },\n HONEY: {\n BLACKLISTED_WALLET: {\n reasons: [\"BlacklistedWallet\", \"0x265693b4\"],\n errorMSG: \"Your wallet is blacklisted from minting or redeeming HONEY.\",\n },\n LIQUIDITY_ERROR: {\n reasons: [\"0x4656425a\"],\n errorMSG:\n \"You are trying to redeem more than the liquidity available in the vault.\",\n },\n },\n // NOTE: these codes are from https://github.com/balancer/balancer-v2-monorepo/blob/master/pkg/balancer-js/src/utils/errors.ts\n // ... and additionally from https://docs.balancer.fi/reference/contracts/error-codes.html\n // NOTE: descriptions are generated by GPT where not available.\n BEX: {\n SLIPPAGE_EXCEEDED: {\n reasons: [\"SlippageExceeded\", \"TooMuchSlippage\"],\n errorMSG:\n \"Price changed while executing the transaction and exceeded the allowed slippage.\",\n },\n // math\n BAL000: {\n reasons: [\"BAL#000\"],\n errorMSG: \"Addition overflow occurred during calculation. (BEX#000)\",\n },\n BAL001: {\n reasons: [\"BAL#001\"],\n errorMSG: \"Subtraction overflow occurred during calculation. (BEX#001)\",\n },\n BAL002: {\n reasons: [\"BAL#002\"],\n errorMSG: \"Subtraction underflow occurred during calculation. (BEX#002)\",\n },\n BAL003: {\n reasons: [\"BAL#003\"],\n errorMSG:\n \"Multiplication overflow occurred during calculation. (BEX#003)\",\n },\n BAL004: {\n reasons: [\"BAL#004\"],\n errorMSG: \"Attempted division by zero. (BEX#004)\",\n },\n BAL005: {\n reasons: [\"BAL#005\"],\n errorMSG: \"Multiplication overflow during FixedPoint Division. (BEX#005)\",\n },\n BAL006: {\n reasons: [\"BAL#006\"],\n errorMSG: \"Invalid x in ExpMath.pow(x, y). (BEX#006)\",\n },\n BAL007: {\n reasons: [\"BAL#007\"],\n errorMSG: \"Invalid y in ExpMath.pow(x, y). (BEX#007)\",\n },\n BAL008: {\n reasons: [\"BAL#008\"],\n errorMSG:\n \"In LogExpMath.pow(x, y), error computing x^y as exp(y * ln(x)). (BEX#008)\",\n },\n BAL009: {\n reasons: [\"BAL#009\"],\n errorMSG: \"In LogExpMath.exp(x) = e^x; x out of bounds. (BEX#009)\",\n },\n // Input\n BAL100: {\n reasons: [\"BAL#100\"],\n errorMSG: \"Value is out of acceptable bounds. (BEX#100)\",\n },\n BAL101: {\n reasons: [\"BAL#101\"],\n errorMSG:\n \"Tokens must be sorted in address order on pool registration. (BEX#101)\",\n },\n BAL102: {\n reasons: [\"BAL#102\"],\n errorMSG:\n \"Tokens must be sorted in address order on pool registration. (BEX#102)\",\n },\n BAL103: {\n reasons: [\"BAL#103\"],\n errorMSG: \"Parallel array inputs must have the same length. (BEX#103)\",\n },\n BAL104: {\n reasons: [\"BAL#104\"],\n errorMSG: \"Address to be interpreted as a token cannot be 0. (BEX#104)\",\n },\n BAL105: {\n reasons: [\"BAL#105\"],\n errorMSG: \"Insufficient byte length. (BEX#105)\",\n },\n // Shared Pools\n BAL200: {\n reasons: [\"BAL#200\"],\n errorMSG: \"All pools must contain at least two tokens. (BEX#200)\",\n },\n BAL201: {\n reasons: [\"BAL#201\"],\n errorMSG:\n \"Token count exceeds the maximum for a given pool type. (BEX#201)\",\n },\n BAL202: {\n reasons: [\"BAL#202\"],\n errorMSG: \"Swap fee percentage exceeds the maximum allowed. (BEX#202)\",\n },\n BAL203: {\n reasons: [\"BAL#203\"],\n errorMSG: \"Swap fee percentage is below the minimum allowed. (BEX#203)\",\n },\n BAL204: {\n reasons: [\"BAL#204\"],\n errorMSG:\n \"Pool initialization failed: a small amount of BPT is minted to the zero address to maintain mathematical consistency. If initial balances are too low, the initialization process may fail. (BEX#204)\",\n },\n BAL205: {\n reasons: [\"BAL#205\"],\n errorMSG:\n \"User attempted to execute a callback intended for the vault contract. (BEX#205)\",\n },\n BAL206: {\n reasons: [\"BAL#206\"],\n errorMSG:\n \"Pools must be initialized with a special 'Init' join, before they can be joined by LPs. (BEX#206)\",\n },\n BAL207: {\n reasons: [\"BAL#207\"],\n errorMSG:\n \"Slippage/front-running protection check failed on a pool exit. (BEX#207)\",\n },\n BAL208: {\n reasons: [\"BAL#208\"],\n errorMSG: \"Minimum BPT output amount not met. (BEX#208)\",\n },\n BAL209: {\n reasons: [\"BAL#209\"],\n errorMSG:\n \"Slippage/front-running protection check failed on a pool join. (BEX#209)\",\n },\n BAL210: {\n reasons: [\"BAL#210\"],\n errorMSG:\n \"Pools with oracles are limited to two tokens. A pool with the TWO_TOKEN specialization must have exactly two tokens. (BEX#210)\",\n },\n BAL211: {\n reasons: [\"BAL#211\"],\n errorMSG:\n \"The pool factory is disabled and new pools cannot be created at this time. (BEX#211)\",\n },\n // Pools\n BAL300: {\n reasons: [\"BAL#300\"],\n errorMSG:\n \"The amplification parameter is below the minimum allowed. (BEX#300)\",\n },\n BAL301: {\n reasons: [\"BAL#301\"],\n errorMSG:\n \"The amplification parameter exceeds the maximum allowed. (BEX#301)\",\n },\n BAL302: {\n reasons: [\"BAL#302\"],\n errorMSG: \"The weight parameter is below the minimum allowed. (BEX#302)\",\n },\n BAL303: {\n reasons: [\"BAL#303\"],\n errorMSG:\n \"The number of stable tokens exceeds the maximum allowed. (BEX#303)\",\n },\n BAL304: {\n reasons: [\"BAL#304\"],\n errorMSG: \"The amount of tokens in would unbalance the pool. (BEX#304)\",\n },\n BAL305: {\n reasons: [\"BAL#305\"],\n errorMSG: \"The amount of tokens out would unbalance the pool. (BEX#305)\",\n },\n BAL306: {\n reasons: [\"BAL#306\"],\n errorMSG:\n \"Disproportionate pool exit would unbalance the pool. (BEX#306)\",\n },\n BAL307: {\n reasons: [\"BAL#307\"],\n errorMSG:\n \"Disproportionate pool join would unbalance the pool. (BEX#307)\",\n },\n BAL308: {\n reasons: [\"BAL#308\"],\n errorMSG: \"Normalized weights do not add to 1.0 exactly. (BEX#308)\",\n },\n BAL309: {\n reasons: [\"BAL#309\"],\n errorMSG: \"Invalid token provided for operation. (BEX#309)\",\n },\n BAL310: {\n reasons: [\"BAL#310\"],\n errorMSG: \"Unhandled pool join operation for this pool type. (BEX#310)\",\n },\n BAL311: {\n reasons: [\"BAL#311\"],\n errorMSG: \"Pool balances must be > 0. (BEX#311)\",\n },\n BAL312: {\n reasons: [\"BAL#312\"],\n errorMSG:\n \"Invalid query for oracle data ('ago' timestamp was not in the past). (BEX#312)\",\n },\n BAL313: {\n reasons: [\"BAL#313\"],\n errorMSG: \"Oracle has no data to query. (BEX#313)\",\n },\n BAL314: {\n reasons: [\"BAL#314\"],\n errorMSG:\n \"Oracle query data is before its earliest data sample. (BEX#314)\",\n },\n BAL315: {\n reasons: [\"BAL#315\"],\n errorMSG:\n \"Cannot query an oracle sample outside the buffer of 1024. (BEX#315)\",\n },\n BAL316: {\n reasons: [\"BAL#316\"],\n errorMSG: \"Oracle query window must have non-zero duration. (BEX#316)\",\n },\n BAL317: {\n reasons: [\"BAL#317\"],\n errorMSG:\n \"Amplification parameter change has less than the minimum duration. (BEX#317)\",\n },\n BAL318: {\n reasons: [\"BAL#318\"],\n errorMSG:\n \"Cannot start an amplification parameter update if one is already ongoing. (BEX#318)\",\n },\n BAL319: {\n reasons: [\"BAL#319\"],\n errorMSG:\n \"The requested amplification parameter change is too fast (cannot halve or double over less than a day). (BEX#319)\",\n },\n BAL320: {\n reasons: [\"BAL#320\"],\n errorMSG:\n \"Cannot cancel an update if there isn't one already ongoing. (BEX#320)\",\n },\n BAL321: {\n reasons: [\"BAL#321\"],\n errorMSG: \"Stable pool invariant calculation did not converge. (BEX#321)\",\n },\n BAL322: {\n reasons: [\"BAL#322\"],\n errorMSG: \"Stable pool balance calculation did not converge. (BEX#322)\",\n },\n BAL323: {\n reasons: [\"BAL#323\"],\n errorMSG: \"Relayer must be a valid contract. (BEX#323)\",\n },\n BAL324: {\n reasons: [\"BAL#324\"],\n errorMSG: \"Base pool relayer was not called correctly. (BEX#324)\",\n },\n BAL325: {\n reasons: [\"BAL#325\"],\n errorMSG:\n \"Rebalancing relayer operation re-entered unexpectedly. (BEX#325)\",\n },\n BAL326: {\n reasons: [\"BAL#326\"],\n errorMSG:\n \"Detected time travel in gradual updates (start > end time in a gradual weights update). (BEX#326)\",\n },\n BAL327: {\n reasons: [\"BAL#327\"],\n errorMSG: \"Swaps are disabled for this pool. (BEX#327)\",\n },\n BAL328: {\n reasons: [\"BAL#328\"],\n errorMSG: \"Caller is not the owner of the LBP. (BEX#328)\",\n },\n BAL329: {\n reasons: [\"BAL#329\"],\n errorMSG:\n \"Rate returned from a rateProvider must fit within 128 bits. (BEX#329)\",\n },\n BAL330: {\n reasons: [\"BAL#330\"],\n errorMSG:\n \"Investment pools only allow proportional joins and exits when swaps are disabled (to prevent unbalancing the pool). (BEX#330)\",\n },\n BAL331: {\n reasons: [\"BAL#331\"],\n errorMSG:\n \"Gradual weight update duration too short (minimum 1 day). (BEX#331)\",\n },\n BAL332: {\n reasons: [\"BAL#332\"],\n errorMSG: \"Invalid Linear Pool operating range. (BEX#332)\",\n },\n BAL333: {\n reasons: [\"BAL#333\"],\n errorMSG: \"Linear Pool max balance must fit in 112 bits. (BEX#333)\",\n },\n BAL334: {\n reasons: [\"BAL#334\"],\n errorMSG:\n \"Unhandled pool join/exit operation for linear pool type. (BEX#334)\",\n },\n BAL335: {\n reasons: [\"BAL#335\"],\n errorMSG:\n \"Cannot reset Linear Pool targets if pool is unbalanced. (BEX#335)\",\n },\n BAL336: {\n reasons: [\"BAL#336\"],\n errorMSG: \"Unhandled pool exit operation for this pool type. (BEX#336)\",\n },\n BAL337: {\n reasons: [\"BAL#337\"],\n errorMSG:\n \"Management fees can only be collected by the pool owner. (BEX#337)\",\n },\n BAL338: {\n reasons: [\"BAL#338\"],\n errorMSG:\n \"Management swap fee percentage exceeded the maximum. (BEX#338)\",\n },\n BAL339: {\n reasons: [\"BAL#339\"],\n errorMSG:\n \"Unhandled pool join/exit operation for managed pool type. (BEX#339)\",\n },\n BAL340: {\n reasons: [\"BAL#340\"],\n errorMSG:\n \"Unhandled pool join/exit operation for phantom pool type. (BEX#340)\",\n },\n BAL341: {\n reasons: [\"BAL#341\"],\n errorMSG: \"Token does not have a valid rate provider. (BEX#341)\",\n },\n BAL342: {\n reasons: [\"BAL#342\"],\n errorMSG: \"Invalid pool initialization parameters provided. (BEX#342)\",\n },\n BAL343: {\n reasons: [\"BAL#343\"],\n errorMSG:\n \"Value is out of the new target range for the operation. (BEX#343)\",\n },\n BAL344: {\n reasons: [\"BAL#344\"],\n errorMSG: \"This feature is currently disabled. (BEX#344)\",\n },\n BAL345: {\n reasons: [\"BAL#345\"],\n errorMSG: \"The pool controller is uninitialized. (BEX#345)\",\n },\n BAL346: {\n reasons: [\"BAL#346\"],\n errorMSG: \"Cannot set swap fee during an ongoing fee change. (BEX#346)\",\n },\n BAL347: {\n reasons: [\"BAL#347\"],\n errorMSG: \"Cannot set swap fee during pending fee changes. (BEX#347)\",\n },\n BAL348: {\n reasons: [\"BAL#348\"],\n errorMSG: \"Cannot change tokens during a weight change. (BEX#348)\",\n },\n BAL349: {\n reasons: [\"BAL#349\"],\n errorMSG: \"Cannot change tokens during pending weight changes. (BEX#349)\",\n },\n BAL350: {\n reasons: [\"BAL#350\"],\n errorMSG: \"Weight parameter exceeds the maximum allowed. (BEX#350)\",\n },\n BAL351: {\n reasons: [\"BAL#351\"],\n errorMSG: \"Unauthorized join operation. (BEX#351)\",\n },\n BAL352: {\n reasons: [\"BAL#352\"],\n errorMSG:\n \"Management AUM fee percentage exceeded the maximum allowed. (BEX#352)\",\n },\n BAL353: {\n reasons: [\"BAL#353\"],\n errorMSG: \"Fractional target values are not supported. (BEX#353)\",\n },\n BAL354: {\n reasons: [\"BAL#354\"],\n errorMSG:\n \"Adding or removing BPT is not allowed in this context. (BEX#354)\",\n },\n BAL355: {\n reasons: [\"BAL#355\"],\n errorMSG: \"Invalid circuit breaker bounds configuration. (BEX#355)\",\n },\n BAL356: {\n reasons: [\"BAL#356\"],\n errorMSG: \"The circuit breaker has been triggered. (BEX#356)\",\n },\n BAL357: {\n reasons: [\"BAL#357\"],\n errorMSG: \"Malicious query detected and reverted. (BEX#357)\",\n },\n BAL358: {\n reasons: [\"BAL#358\"],\n errorMSG:\n \"Joins and exits are currently disabled for this pool. (BEX#358)\",\n },\n // Lib\n BAL400: {\n reasons: [\"BAL#400\"],\n errorMSG: \"Reentrancy detected. (BEX#400)\",\n },\n BAL401: {\n reasons: [\"BAL#401\"],\n errorMSG: \"The sender is not allowed to perform this action. (BEX#401)\",\n },\n BAL402: {\n reasons: [\"BAL#402\"],\n errorMSG: \"The contract is currently paused. (BEX#402)\",\n },\n BAL403: {\n reasons: [\"BAL#403\"],\n errorMSG: \"The pause window has expired. (BEX#403)\",\n },\n BAL404: {\n reasons: [\"BAL#404\"],\n errorMSG:\n \"The maximum pause window duration has been exceeded. (BEX#404)\",\n },\n BAL405: {\n reasons: [\"BAL#405\"],\n errorMSG:\n \"The maximum buffer period duration has been exceeded. (BEX#405)\",\n },\n BAL406: {\n reasons: [\"BAL#406\"],\n errorMSG: \"The account has insufficient balance. (BEX#406)\",\n },\n BAL407: {\n reasons: [\"BAL#407\"],\n errorMSG: \"The account has insufficient allowance. (BEX#407)\",\n },\n BAL408: {\n reasons: [\"BAL#408\"],\n errorMSG: \"ERC20: Transfer from zero address. (BEX#408)\",\n },\n BAL409: {\n reasons: [\"BAL#409\"],\n errorMSG: \"ERC20: Transfer to zero address. (BEX#409)\",\n },\n BAL410: {\n reasons: [\"BAL#410\"],\n errorMSG: \"ERC20: Mint to zero address. (BEX#410)\",\n },\n BAL411: {\n reasons: [\"BAL#411\"],\n errorMSG: \"ERC20: Burn from zero address. (BEX#411)\",\n },\n BAL412: {\n reasons: [\"BAL#412\"],\n errorMSG: \"ERC20: Approve from zero address. (BEX#412)\",\n },\n BAL413: {\n reasons: [\"BAL#413\"],\n errorMSG: \"ERC20: Approve to zero address. (BEX#413)\",\n },\n BAL414: {\n reasons: [\"BAL#414\"],\n errorMSG: \"ERC20: Transfer exceeds allowance. (BEX#414)\",\n },\n BAL415: {\n reasons: [\"BAL#415\"],\n errorMSG: \"ERC20: Decreased allowance below zero. (BEX#415)\",\n },\n BAL416: {\n reasons: [\"BAL#416\"],\n errorMSG: \"ERC20: Transfer exceeds balance. (BEX#416)\",\n },\n BAL417: {\n reasons: [\"BAL#417\"],\n errorMSG: \"ERC20: Burn exceeds allowance. (BEX#417)\",\n },\n BAL418: {\n reasons: [\"BAL#418\"],\n errorMSG: \"SafeERC20: Call failed. (BEX#418)\",\n },\n BAL419: {\n reasons: [\"BAL#419\"],\n errorMSG: \"Address has insufficient balance. (BEX#419)\",\n },\n BAL420: {\n reasons: [\"BAL#420\"],\n errorMSG: \"Address cannot send value. (BEX#420)\",\n },\n BAL421: {\n reasons: [\"BAL#421\"],\n errorMSG: \"SafeCast: Value cannot fit into int256. (BEX#421)\",\n },\n BAL422: {\n reasons: [\"BAL#422\"],\n errorMSG: \"AccessControl: Grant sender is not an admin. (BEX#422)\",\n },\n BAL423: {\n reasons: [\"BAL#423\"],\n errorMSG: \"AccessControl: Revoke sender is not an admin. (BEX#423)\",\n },\n BAL424: {\n reasons: [\"BAL#424\"],\n errorMSG:\n \"AccessControl: Renounce sender not allowed for accounts other than self. (BEX#424)\",\n },\n BAL425: {\n reasons: [\"BAL#425\"],\n errorMSG: \"Buffer period has expired. (BEX#425)\",\n },\n BAL426: {\n reasons: [\"BAL#426\"],\n errorMSG: \"Caller is not the owner. (BEX#426)\",\n },\n BAL427: {\n reasons: [\"BAL#427\"],\n errorMSG: \"New owner cannot be zero address. (BEX#427)\",\n },\n BAL428: {\n reasons: [\"BAL#428\"],\n errorMSG: \"Code deployment failed. (BEX#428)\",\n },\n BAL429: {\n reasons: [\"BAL#429\"],\n errorMSG: \"Call to non-contract address. (BEX#429)\",\n },\n BAL430: {\n reasons: [\"BAL#430\"],\n errorMSG: \"Low-level call failed. (BEX#430)\",\n },\n BAL431: {\n reasons: [\"BAL#431\"],\n errorMSG: \"The contract is not paused. (BEX#431)\",\n },\n BAL432: {\n reasons: [\"BAL#432\"],\n errorMSG: \"Address is already allowlisted. (BEX#432)\",\n },\n BAL433: {\n reasons: [\"BAL#433\"],\n errorMSG: \"Address is not allowlisted. (BEX#433)\",\n },\n BAL434: {\n reasons: [\"BAL#434\"],\n errorMSG: \"ERC20: Burn exceeds balance. (BEX#434)\",\n },\n BAL435: {\n reasons: [\"BAL#435\"],\n errorMSG: \"Invalid operation. (BEX#435)\",\n },\n BAL436: {\n reasons: [\"BAL#436\"],\n errorMSG: \"Codec overflow detected. (BEX#436)\",\n },\n BAL437: {\n reasons: [\"BAL#437\"],\n errorMSG: \"The system is in recovery mode. (BEX#437)\",\n },\n BAL438: {\n reasons: [\"BAL#438\"],\n errorMSG: \"The system is not in recovery mode. (BEX#438)\",\n },\n BAL439: {\n reasons: [\"BAL#439\"],\n errorMSG: \"Induced failure. (BEX#439)\",\n },\n BAL440: {\n reasons: [\"BAL#440\"],\n errorMSG: \"Expired signature. (BEX#440)\",\n },\n BAL441: {\n reasons: [\"BAL#441\"],\n errorMSG: \"Malformed signature. (BEX#441)\",\n },\n BAL442: {\n reasons: [\"BAL#442\"],\n errorMSG: \"SafeCast: Value cannot fit into uint64. (BEX#442)\",\n },\n BAL443: {\n reasons: [\"BAL#443\"],\n errorMSG: \"Unhandled fee type. (BEX#443)\",\n },\n BAL444: {\n reasons: [\"BAL#444\"],\n errorMSG: \"ERC20: Burn from zero address. (BEX#444)\",\n },\n // Vault\n BAL500: {\n reasons: [\"BAL#500\"],\n errorMSG: \"Invalid pool ID. (BEX#500)\",\n },\n BAL501: {\n reasons: [\"BAL#501\"],\n errorMSG: \"Caller is not the pool. (BEX#501)\",\n },\n BAL502: {\n reasons: [\"BAL#502\"],\n errorMSG: \"Sender is not the asset manager. (BEX#502)\",\n },\n BAL503: {\n reasons: [\"BAL#503\"],\n errorMSG: \"User does not allow the relayer. (BEX#503)\",\n },\n BAL504: {\n reasons: [\"BAL#504\"],\n errorMSG: \"Invalid signature. (BEX#504)\",\n },\n BAL505: {\n reasons: [\"BAL#505\"],\n errorMSG: \"Exit would yield fewer than the minimum tokens out. (BEX#505)\",\n },\n BAL506: {\n reasons: [\"BAL#506\"],\n errorMSG: \"Join would cost more than the maximum tokens in. (BEX#506)\",\n },\n BAL507: {\n reasons: [\"BAL#507\"],\n errorMSG: \"Swap violates user-supplied limits. (BEX#507)\",\n },\n BAL508: {\n reasons: [\"BAL#508\"],\n errorMSG: \"Swap transaction not mined within the deadline. (BEX#508)\",\n },\n BAL509: {\n reasons: [\"BAL#509\"],\n errorMSG: \"Cannot swap the same token. (BEX#509)\",\n },\n BAL510: {\n reasons: [\"BAL#510\"],\n errorMSG: \"Unknown amount in the first swap of a batch. (BEX#510)\",\n },\n BAL511: {\n reasons: [\"BAL#511\"],\n errorMSG: \"Malconstructed multihop swap. (BEX#511)\",\n },\n BAL512: {\n reasons: [\"BAL#512\"],\n errorMSG: \"Internal balance overflow. (BEX#512)\",\n },\n BAL513: {\n reasons: [\"BAL#513\"],\n errorMSG: \"Insufficient internal balance. (BEX#513)\",\n },\n BAL514: {\n reasons: [\"BAL#514\"],\n errorMSG: \"Invalid BERA internal balance. (BEX#514)\",\n },\n BAL515: {\n reasons: [\"BAL#515\"],\n errorMSG:\n \"Flashloan must repay the loan in the same transaction. (BEX#515)\",\n },\n BAL516: {\n reasons: [\"BAL#516\"],\n errorMSG: \"Insufficient BERA balance. (BEX#516)\",\n },\n BAL517: {\n reasons: [\"BAL#517\"],\n errorMSG: \"Unallocated BERA. (BEX#517)\",\n },\n BAL518: {\n reasons: [\"BAL#518\"],\n errorMSG:\n \"Relayers cannot receive BERA directly (only through the Vault). (BEX#518)\",\n },\n BAL519: {\n reasons: [\"BAL#519\"],\n errorMSG: \"Cannot use BERA sentinel for internal balance. (BEX#519)\",\n },\n BAL520: {\n reasons: [\"BAL#520\"],\n errorMSG: \"Tokens mismatch. (BEX#520)\",\n },\n BAL521: {\n reasons: [\"BAL#521\"],\n errorMSG: \"Token is not registered. (BEX#521)\",\n },\n BAL522: {\n reasons: [\"BAL#522\"],\n errorMSG: \"Token is already registered. (BEX#522)\",\n },\n BAL523: {\n reasons: [\"BAL#523\"],\n errorMSG: \"Tokens are already set. (BEX#523)\",\n },\n BAL524: {\n reasons: [\"BAL#524\"],\n errorMSG: \"Tokens length must be 2. (BEX#524)\",\n },\n BAL525: {\n reasons: [\"BAL#525\"],\n errorMSG: \"Nonzero token balance detected. (BEX#525)\",\n },\n BAL526: {\n reasons: [\"BAL#526\"],\n errorMSG: \"Balance total overflow detected. (BEX#526)\",\n },\n BAL527: {\n reasons: [\"BAL#527\"],\n errorMSG: \"Pool has no tokens. (BEX#527)\",\n },\n BAL528: {\n reasons: [\"BAL#528\"],\n errorMSG: \"Insufficient flash loan balance. (BEX#528)\",\n },\n // Fees\n BAL600: {\n reasons: [\"BAL#600\"],\n errorMSG: \"Swap fee percentage is too high. (BEX#600)\",\n },\n BAL601: {\n reasons: [\"BAL#601\"],\n errorMSG: \"Flash loan fee percentage is too high. (BEX#601)\",\n },\n BAL602: {\n reasons: [\"BAL#602\"],\n errorMSG: \"Insufficient flash loan fee amount. (BEX#602)\",\n },\n // FeeSplitter\n BAL700: {\n reasons: [\"BAL#700\"],\n errorMSG: \"Splitter fee percentage is too high. (BEX#700)\",\n },\n // Misc\n BAL998: {\n reasons: [\"BAL#998\"],\n errorMSG: \"Unimplemented functionality. (BEX#998)\",\n },\n BAL999: {\n reasons: [\"BAL#999\"],\n errorMSG: \"An unexpected error occurred. (BEX#999)\",\n },\n // SoR swap paths\n NO_SWAP_PATHS: {\n keywords: [\"No swap paths returned\"],\n errorMSG: \"No swap paths were found.\",\n },\n },\n AGGREGATOR: {\n NOT_ENOUGH_LIQUIDITY: {\n keywords: [\"Not enough liquidity\"],\n errorMSG: \"Not enough liquidity. Try a lower amount.\",\n },\n },\n POL: {\n REWARD_VAULT_FACTORY: {\n reasons: [\"VaultAlreadyExists\"],\n errorMSG:\n \"Failed to create action. An action already exists with this staking token.\",\n },\n NOT_REWARD_VAULT_MANAGER: {\n reasons: [\"NotRewardVaultManager\"],\n errorMSG: \"You are not the manager of this action.\",\n },\n NOT_INCENTIVE_MANAGER: {\n reasons: [\"NotIncentiveManager\"],\n errorMSG: \"You are not the incentive manager of this token.\",\n },\n DURATION_CHANGE_NOT_ALLOWED: {\n reasons: [\"DurationChangeNotAllowed\"],\n errorMSG: \"You cannot change the duration of this action.\",\n },\n INVALID_PROOF: {\n reasons: [\"InvalidProof\"],\n errorMSG: \"Tokens already claimed or invalid proof.\",\n },\n CONTRACT_PAUSED: {\n reasons: [\"EnforcedPause\"],\n errorMSG: \"The contract you're interacting with is temporarily paused.\",\n },\n DISTRIBUTION_PAUSED: {\n reasons: [\"DistributionEnforcedPause\"],\n errorMSG: \"Distribution is temporarily paused.\",\n },\n INVALID_VALIDATOR_COMMISSION: {\n reasons: [\"InvalidCommissionValue\"],\n errorMSG: \"Invalid commission percentage.\",\n },\n NOT_REWARD_ALLOCATOR: {\n reasons: [\"NotRewardAllocator\"],\n errorMSG: \"You are not the reward allocator of this validator.\",\n },\n NOT_OPERATOR: {\n reasons: [\"NotOperator\"],\n errorMSG: \"You are not the operator of this validator.\",\n },\n INVALID_REWARD_ALLOCATION: {\n reasons: [\"InvalidRewardAllocationWeights\"],\n errorMSG: \"Invalid reward allocation weights.\",\n },\n NOT_REWARD_DURATION_MANAGER: {\n reasons: [\"NotRewardDurationManager\"],\n errorMSG: \"You are not the reward duration manager of this validator.\",\n },\n },\n BEND: {\n INSUFFICIENT_POSITION: {\n keywords: [\"insufficient position\"],\n errorMSG: \"Insufficient position\",\n },\n INSUFFICIENT_LIQUIDITY: {\n keywords: [\"insufficient liquidity on market\"],\n errorMSG: \"Insufficient liquidity on market.\",\n },\n ALL_CAPS_REACHED: {\n reasons: [\"AllCapsReached\"],\n errorMSG: \"All caps reached on vault.\",\n },\n AboveMaxTimelock: {\n reasons: [\"AboveMaxTimelock\"],\n errorMSG: \"Above max timelock\",\n },\n AddressEmptyCode: {\n reasons: [\"AddressEmptyCode\"],\n errorMSG: \"Address empty code\",\n },\n AddressInsufficientBalance: {\n reasons: [\"AddressInsufficientBalance\"],\n errorMSG: \"Address insufficient balance\",\n },\n AllCapsReached: {\n reasons: [\"AllCapsReached\"],\n errorMSG: \"All caps reached\",\n },\n AlreadyPending: {\n reasons: [\"AlreadyPending\"],\n errorMSG: \"Already pending\",\n },\n AlreadySet: {\n reasons: [\"AlreadySet\"],\n errorMSG: \"Already set\",\n },\n BelowMinTimelock: {\n reasons: [\"BelowMinTimelock\"],\n errorMSG: \"Below min timelock\",\n },\n DuplicateMarket: {\n reasons: [\"DuplicateMarket\"],\n errorMSG: \"Duplicate market\",\n },\n ECDSAInvalidSignature: {\n reasons: [\"ECDSAInvalidSignature\"],\n errorMSG: \"Invalid ECDSA signature\",\n },\n ECDSAInvalidSignatureLength: {\n reasons: [\"ECDSAInvalidSignatureLength\"],\n errorMSG: \"Invalid ECDSA signature length\",\n },\n ECDSAInvalidSignatureS: {\n reasons: [\"ECDSAInvalidSignatureS\"],\n errorMSG: \"Invalid ECDSA signature S value\",\n },\n ERC20InsufficientBalance: {\n reasons: [\"ERC20InsufficientBalance\"],\n errorMSG: \"ERC20 insufficient balance\",\n },\n ERC20InvalidApprover: {\n reasons: [\"ERC20InvalidApprover\"],\n errorMSG: \"ERC20 invalid approver\",\n },\n ERC20InvalidReceiver: {\n reasons: [\"ERC20InvalidReceiver\"],\n errorMSG: \"ERC20 invalid receiver\",\n },\n ERC20InvalidSender: {\n reasons: [\"ERC20InvalidSender\"],\n errorMSG: \"ERC20 invalid sender\",\n },\n ERC20InvalidSpender: {\n reasons: [\"ERC20InvalidSpender\"],\n errorMSG: \"ERC20 invalid spender\",\n },\n ERC2612ExpiredSignature: {\n reasons: [\"ERC2612ExpiredSignature\"],\n errorMSG: \"ERC2612 expired signature\",\n },\n ERC2612InvalidSigner: {\n reasons: [\"ERC2612InvalidSigner\"],\n errorMSG: \"ERC2612 invalid signer\",\n },\n ERC4626ExceededMaxDeposit: {\n reasons: [\"ERC4626ExceededMaxDeposit\"],\n errorMSG: \"ERC4626 exceeded max deposit\",\n },\n ERC4626ExceededMaxMint: {\n reasons: [\"ERC4626ExceededMaxMint\"],\n errorMSG: \"ERC4626 exceeded max mint\",\n },\n ERC4626ExceededMaxRedeem: {\n reasons: [\"ERC4626ExceededMaxRedeem\"],\n errorMSG: \"ERC4626 exceeded max redeem\",\n },\n ERC4626ExceededMaxWithdraw: {\n reasons: [\"ERC4626ExceededMaxWithdraw\"],\n errorMSG: \"ERC4626 exceeded max withdraw\",\n },\n FailedInnerCall: {\n reasons: [\"FailedInnerCall\"],\n errorMSG: \"Failed inner call\",\n },\n InconsistentAsset: {\n reasons: [\"InconsistentAsset\"],\n errorMSG: \"Inconsistent asset\",\n },\n InconsistentReallocation: {\n reasons: [\"InconsistentReallocation\"],\n errorMSG: \"Inconsistent reallocation\",\n },\n InvalidAccountNonce: {\n reasons: [\"InvalidAccountNonce\"],\n errorMSG: \"Invalid account nonce\",\n },\n InvalidMarketRemovalNonZeroCap: {\n reasons: [\"InvalidMarketRemovalNonZeroCap\"],\n errorMSG: \"Invalid market removal (non-zero cap)\",\n },\n InvalidMarketRemovalNonZeroSupply: {\n reasons: [\"InvalidMarketRemovalNonZeroSupply\"],\n errorMSG: \"Invalid market removal (non-zero supply)\",\n },\n InvalidMarketRemovalTimelockNotElapsed: {\n reasons: [\"InvalidMarketRemovalTimelockNotElapsed\"],\n errorMSG: \"Invalid market removal (timelock not elapsed)\",\n },\n InvalidShortString: {\n reasons: [\"InvalidShortString\"],\n errorMSG: \"Invalid short string\",\n },\n MarketNotCreated: {\n reasons: [\"MarketNotCreated\"],\n errorMSG: \"Market not created\",\n },\n MarketNotEnabled: {\n reasons: [\"MarketNotEnabled\"],\n errorMSG: \"Market not enabled\",\n },\n MathOverflowedMulDiv: {\n reasons: [\"MathOverflowedMulDiv\"],\n errorMSG: \"Math overflow\",\n },\n MaxFeeExceeded: {\n reasons: [\"MaxFeeExceeded\"],\n errorMSG: \"Max fee exceeded\",\n },\n MaxQueueLengthExceeded: {\n reasons: [\"MaxQueueLengthExceeded\"],\n errorMSG: \"Max queue length exceeded\",\n },\n NoPendingValue: {\n reasons: [\"NoPendingValue\"],\n errorMSG: \"No pending value\",\n },\n NonZeroCap: {\n reasons: [\"NonZeroCap\"],\n errorMSG: \"Non-zero cap\",\n },\n NotAllocatorRole: {\n reasons: [\"NotAllocatorRole\"],\n errorMSG: \"Not allocator role\",\n },\n NotCuratorNorGuardianRole: {\n reasons: [\"NotCuratorNorGuardianRole\"],\n errorMSG: \"Not curator or guardian role\",\n },\n NotCuratorRole: {\n reasons: [\"NotCuratorRole\"],\n errorMSG: \"Not curator role\",\n },\n NotEnoughLiquidity: {\n reasons: [\"NotEnoughLiquidity\"],\n errorMSG: \"Not enough liquidity\",\n },\n NotGuardianRole: {\n reasons: [\"NotGuardianRole\"],\n errorMSG: \"Not guardian role\",\n },\n OwnableInvalidOwner: {\n reasons: [\"OwnableInvalidOwner\"],\n errorMSG: \"Invalid owner\",\n },\n OwnableUnauthorizedAccount: {\n reasons: [\"OwnableUnauthorizedAccount\"],\n errorMSG: \"Unauthorized account\",\n },\n PendingCap: {\n reasons: [\"PendingCap\"],\n errorMSG: \"Pending cap\",\n },\n PendingRemoval: {\n reasons: [\"PendingRemoval\"],\n errorMSG: \"Pending removal\",\n },\n SafeCastOverflowedUintDowncast: {\n reasons: [\"SafeCastOverflowedUintDowncast\"],\n errorMSG: \"SafeCast overflow\",\n },\n SafeERC20FailedOperation: {\n reasons: [\"SafeERC20FailedOperation\"],\n errorMSG: \"SafeERC20 failed operation\",\n },\n StringTooLong: {\n reasons: [\"StringTooLong\"],\n errorMSG: \"String too long\",\n },\n SupplyCapExceeded: {\n reasons: [\"SupplyCapExceeded\"],\n errorMSG: \"Supply cap exceeded\",\n },\n TimelockNotElapsed: {\n reasons: [\"TimelockNotElapsed\"],\n errorMSG: \"Timelock not elapsed\",\n },\n UnauthorizedMarket: {\n reasons: [\"UnauthorizedMarket\"],\n errorMSG: \"Unauthorized market\",\n },\n ZeroAddress: {\n reasons: [\"ZeroAddress\"],\n errorMSG: \"Zero address\",\n },\n ZeroFeeRecipient: {\n reasons: [\"ZeroFeeRecipient\"],\n errorMSG: \"Zero fee recipient\",\n },\n },\n} as const satisfies ErrorMessages;\n","import { type ErrorCategory, errorMsgMap, GENERAL_ERROR } from \"./errorMap\";\n\nexport interface MatchedError {\n /** The error key in the errorMap (e.g. \"NOT_ENOUGH_GAS_TOKEN\") */\n key: string;\n /** The category in the errorMap (e.g. \"RPC\", \"BEX\") */\n category: string;\n /** The user-friendly display message */\n errorMSG: string;\n /** Whether the match was by exact reason (true) or keyword (false) */\n matchedByReason: boolean;\n}\n\n/**\n * Finds the matching error entry in errorMap by reason or message.\n *\n * ## Matching priority:\n * 1. **Exact reason match** (preferred): checks `errorType.reasons` for an exact string match.\n * 2. **Keyword fallback**: checks `errorType.keywords` for case-insensitive substring matches in `message`.\n *\n * @returns The matched error entry with key and category, or null if no match found.\n */\nexport function findMatchingError({\n reason,\n message,\n}: {\n reason?: string | null;\n message?: string;\n}): MatchedError | null {\n for (const category in errorMsgMap) {\n const categoryKey = category as keyof typeof errorMsgMap;\n const errors = errorMsgMap[categoryKey] as ErrorCategory;\n\n for (const type in errors) {\n const errorType = errors[type];\n\n // Priority 1: Exact reason match (deterministic, preferred for contract revert reasons)\n if (reason) {\n if (\n errorType?.reasons?.some((r) => {\n return r === reason;\n })\n ) {\n return {\n key: type,\n category,\n errorMSG: errorType.errorMSG,\n matchedByReason: true,\n };\n }\n }\n\n // Priority 2: Keyword substring match on message (case-insensitive fallback, use carefully)\n if (\n errorType?.keywords?.some((keyword) => {\n return message?.toLowerCase().includes(keyword.toLowerCase().trim());\n })\n ) {\n return {\n key: type,\n category,\n errorMSG: errorType.errorMSG,\n matchedByReason: false,\n };\n }\n }\n }\n\n return null;\n}\n\n/**\n * Resolves a user-friendly displayMessage by matching `reason` and `message` against `errorMap.ts`.\n *\n * This is the bridge between the automatic reason detection pipeline (parseViemError) and\n * the user-facing error messages. Called by the BeraError constructor.\n *\n * ## Matching priority:\n * 1. **Exact reason match** (preferred): checks `errorType.reasons` for an exact string match.\n * This is the most reliable path — contract revert reasons like \"NotEnoughBalance\" or \"BAL#508\"\n * are matched deterministically.\n * 2. **Keyword fallback**: checks `errorType.keywords` for case-insensitive substring matches in `message`.\n * Use sparingly — keyword matching can cause false positives (e.g. \"InsufficientBalance\"\n * keyword would also match \"InsufficientBalanceToPayPythFee\").\n * 3. **GENERAL_ERROR fallback**: \"Something went wrong. Please try again later.\"\n *\n * To ensure new contract errors get good displayMessages, add their reason to `errorMap.ts`.\n * The reason is auto-detected by parseViemError — you only need to map it to a message here.\n */\nexport function getErrorMessage({\n reason,\n message,\n}: {\n reason?: string | null;\n message?: string;\n}): string {\n return findMatchingError({ reason, message })?.errorMSG ?? GENERAL_ERROR;\n}\n","import { type Abi, BaseError } from \"viem\";\n\nimport { appConfig } from \"@berachain/config/internal\";\n\nimport { GENERAL_ERROR } from \"./errorMap\";\nimport { findMatchingError } from \"./getErrorMessage\";\nimport { parseViemError, rpcErrorToReason } from \"./parseViemError\";\nimport type { SeverityLevel } from \"./severity\";\n\nexport interface IBeraErrorArgs {\n message?: string;\n displayMessage?: string;\n cause?: unknown;\n reason?: string;\n chainId?: number;\n fingerprint?: string[];\n /**\n * The level of the error to be used for error reporting.\n */\n level?: SeverityLevel;\n tags?: {\n [key in TagsKey]?: Primitive;\n };\n extra?: Record<string, unknown>;\n /**\n * Optional ABI to be used to parse the error.\n */\n abi?: Abi;\n}\n\ntype Primitive = number | string | boolean | bigint | symbol | null | undefined;\n\n/**\n * An helper type to make sure we only use the allowed tags. Sync this with docs/errors.md\n */\ntype TagsKey =\n | \"wallet.chain\"\n | \"wallet.connector\"\n | \"wallet.address\"\n | \"error.reason\"\n | \"operation.type\"\n | \"operation.key\"\n | \"operation.txn.functionName\"\n | \"operation.txn.to\"\n | \"operation.txn.status\"\n | \"operation.source.url\"\n | \"operation.source.name\"\n | \"operation.source.queryName\"\n | \"operation.source.type\";\n\n/**\n * Base error class for the entire berajs SDK.\n *\n * All errors should be a BeraError or one of its subclasses. Unknown errors should be\n * normalized via `initBeraError({ cause })`.\n *\n * Key design: the constructor runs an **automatic reason detection pipeline** when `reason`\n * is not explicitly provided. It calls `parseViemError` on the `cause` to extract a\n * machine-readable reason code (e.g. \"NotEnoughBalance\", \"BAL#508\", \"UserRejectedRequestError\").\n * That reason is then matched against `errorMap.ts` to resolve a user-friendly `displayMessage`.\n *\n * This means: for most viem errors, you only need to pass `cause` and everything else\n * (reason, displayMessage, level) is derived automatically.\n *\n * @see parseViemError — the reason extraction engine\n * @see errorMap.ts — reason → displayMessage mapping\n * @see initBeraError — normalizes any error into a BeraError (preferred entry point)\n */\nexport class BeraError extends Error {\n /**\n * A human-readable message that can be displayed to end user.\n *\n * In berachain dapps, this is shown in the error pop-up.\n */\n displayMessage: string;\n\n /**\n * The cause of the error.\n *\n * This is typically the error that was thrown.\n */\n cause: unknown;\n\n /**\n * The chain id of the error.\n */\n chainId?: number;\n\n /**\n * The code for the reason for the error.\n *\n * This is typically the error code can be found in the errorMap.ts file. I.e. NotEnoughBalance or BAL#508\n */\n reason: string | null = null;\n\n /**\n * The fingerprint for the error.\n *\n * This is typically used to group errors in Sentry.\n */\n fingerprint: string[] | undefined;\n\n private _tags: {\n [key: string | TagsKey]: Primitive;\n } = {};\n\n set tags(tags: {\n [key: string | TagsKey]: Primitive;\n }) {\n this._tags = tags;\n }\n\n get tags(): {\n [key: string | TagsKey]: Primitive;\n } {\n return {\n ...this._tags,\n \"error.displayMessage\": this.displayMessage,\n \"error.reason\": this.reason,\n \"error.level\": this.level,\n };\n }\n\n level: SeverityLevel = \"error\";\n\n extra: Record<string, unknown> = {};\n\n constructor({\n message: m,\n displayMessage: dm,\n cause,\n reason,\n level,\n abi,\n tags,\n chainId,\n fingerprint,\n }: IBeraErrorArgs) {\n let message = m;\n\n if (!message) {\n if (cause instanceof BaseError) {\n // Using shortMesage as it doesn't include the payload.\n message = cause.shortMessage;\n } else if (cause instanceof Error) {\n message = cause.message;\n } else if (\n typeof cause === \"object\" &&\n cause !== null &&\n \"message\" in cause &&\n typeof cause.message === \"string\"\n ) {\n // this covers responses from HTTP requests\n message = cause.message;\n }\n }\n super(message, {\n cause,\n });\n\n this.name = \"BeraError\";\n\n this.fingerprint = fingerprint;\n\n this.cause = cause;\n\n this.chainId = chainId;\n\n // ── Automatic reason detection ──────────────────────────────────────\n // If `reason` was provided explicitly, use it directly.\n // Otherwise, attempt to extract it from the `cause` by unwrapping the viem error chain.\n // parseViemError walks nested errors (ContractFunctionExecutionError →\n // ContractFunctionRevertedError → RpcRequestError) and decodes revert data using ABI.\n // The extracted reason (e.g. \"NotEnoughBalance\", \"BAL#508\") is the key that drives\n // displayMessage resolution and Sentry fingerprinting.\n if (reason) {\n this.reason = reason;\n } else if (cause instanceof Error) {\n try {\n const parsed = parseViemError({\n error: cause,\n revertIfUnknown: true,\n abi,\n });\n\n this.reason = parsed?.reason ?? null;\n } catch {\n // parseViemError throws when it can't identify the error type and revertIfUnknown=true.\n // In that case, reason stays null and displayMessage falls back to GENERAL_ERROR.\n }\n }\n\n // ── Level inference ─────────────────────────────────────────────────\n // User rejections are \"info\" (not actionable by devs), everything else defaults to \"error\".\n if (level) {\n this.level = level;\n } else if (this.reason === rpcErrorToReason(\"UserRejectedRequestError\")) {\n this.level = \"info\";\n } else {\n this.level = \"error\";\n }\n\n // ── displayMessage resolution ─────────────────────────────────────────\n // Priority:\n // 1. Explicit `displayMessage` passed by caller\n // 2. Cascaded from a BeraError cause (if it has a non-generic message)\n // 3. Looked up from errorMap.ts using the detected `reason` and `message`\n // 4. GENERAL_ERROR fallback: \"Something went wrong. Please try again later.\"\n let displayMessage = dm;\n\n if (\n this.cause instanceof BeraError &&\n this.cause.displayMessage !== GENERAL_ERROR\n ) {\n // Cascade: inner BeraError already resolved a good displayMessage, reuse it\n displayMessage = this.cause.displayMessage;\n }\n\n if (!displayMessage) {\n // Match reason (exact) or message (keyword) against errorMap.ts\n const matched = findMatchingError(this);\n displayMessage = matched?.errorMSG;\n\n // ── Reason normalization ──────────────────────────────────────────\n // If the reason was resolved from a raw error message (e.g. \"insufficient funds for\n // gas * price + value: have X want Y\") rather than a stable key (e.g. \"InsufficientFundsError\"),\n // normalize it to the matched errorMap key (e.g. \"NOT_ENOUGH_GAS\") for stable Sentry fingerprinting.\n if (matched && !matched.matchedByReason && this.reason) {\n this.reason = matched.key;\n }\n }\n\n this.displayMessage = displayMessage ?? GENERAL_ERROR;\n\n this.tags = {\n ...this.tags,\n ...tags,\n };\n // Useful for debugging in development or on vercel preview links\n if (!appConfig.env.isProduction && process.env.NODE_ENV !== \"test\") {\n console.group(\"BeraError thrown\");\n console.debug(\"Level\", this.level);\n console.debug(\"Reason\", this.reason);\n console.debug(\"Message\", this.message);\n console.debug(\"Display Message\", this.displayMessage);\n console.debug(\"Cause\", this.cause);\n console.groupEnd();\n }\n }\n}\n","export const bundler3errorsAbi = [\n { inputs: [], name: \"AlreadyInitiated\", type: \"error\" },\n { inputs: [], name: \"EmptyBundle\", type: \"error\" },\n { inputs: [], name: \"IncorrectReenterHash\", type: \"error\" },\n { inputs: [], name: \"MissingExpectedReenter\", type: \"error\" },\n] as const;\n","/**\n * A list of ERC20 error codes according to eip-6093 and solady.\n *\n * This is needed since viem erc20Abi does not include error codes.\n */\nexport const erc20errorsAbi = [\n { inputs: [], name: \"AllowanceOverflow\", type: \"error\" },\n { inputs: [], name: \"AllowanceUnderflow\", type: \"error\" },\n { inputs: [], name: \"ETHTransferFailed\", type: \"error\" },\n { inputs: [], name: \"InsufficientAllowance\", type: \"error\" },\n { inputs: [], name: \"InsufficientBalance\", type: \"error\" },\n { inputs: [], name: \"InvalidPermit\", type: \"error\" },\n { inputs: [], name: \"Permit2AllowanceIsFixedAtInfinity\", type: \"error\" },\n { inputs: [], name: \"PermitExpired\", type: \"error\" },\n { inputs: [], name: \"TotalSupplyOverflow\", type: \"error\" },\n { name: \"AllowanceOverflow\", type: \"error\", inputs: [] },\n { name: \"AllowanceUnderflow\", type: \"error\", inputs: [] },\n { name: \"InsufficientAllowance\", type: \"error\", inputs: [] },\n { name: \"InsufficientBalance\", type: \"error\", inputs: [] },\n { name: \"InvalidPermit\", type: \"error\", inputs: [] },\n { name: \"Permit2AllowanceIsFixedAtInfinity\", type: \"error\", inputs: [] },\n { name: \"PermitExpired\", type: \"error\", inputs: [] },\n { name: \"TotalSupplyOverflow\", type: \"error\", inputs: [] },\n { name: \"ECDSAInvalidSignature\", type: \"error\", inputs: [] },\n {\n name: \"ECDSAInvalidSignatureLength\",\n type: \"error\",\n inputs: [{ type: \"uint256\" }],\n },\n {\n name: \"ECDSAInvalidSignatureS\",\n type: \"error\",\n inputs: [{ type: \"bytes32\" }],\n },\n {\n name: \"ERC20InsufficientAllowance\",\n type: \"error\",\n inputs: [{ type: \"address\" }, { type: \"uint256\" }, { type: \"uint256\" }],\n },\n {\n name: \"ERC20InsufficientBalance\",\n type: \"error\",\n inputs: [{ type: \"address\" }, { type: \"uint256\" }, { type: \"uint256\" }],\n },\n {\n name: \"ERC20InvalidApprover\",\n type: \"error\",\n inputs: [{ type: \"address\" }],\n },\n {\n name: \"ERC20InvalidReceiver\",\n type: \"error\",\n inputs: [{ type: \"address\" }],\n },\n { name: \"ERC20InvalidSender\", type: \"error\", inputs: [{ type: \"address\" }] },\n { name: \"ERC20InvalidSpender\", type: \"error\", inputs: [{ type: \"address\" }] },\n {\n name: \"ERC2612ExpiredSignature\",\n type: \"error\",\n inputs: [{ type: \"uint256\" }],\n },\n {\n name: \"ERC2612InvalidSigner\",\n type: \"error\",\n inputs: [{ type: \"address\" }, { type: \"address\" }],\n },\n {\n name: \"InvalidAccountNonce\",\n type: \"error\",\n inputs: [{ type: \"address\" }, { type: \"uint256\" }],\n },\n { name: \"InvalidShortString\", type: \"error\", inputs: [] },\n { name: \"StringTooLong\", type: \"error\", inputs: [{ type: \"string\" }] },\n] as const;\n","export const openChainErrorsAbi = [\n {\n name: \"AllowanceExpired\",\n type: \"error\",\n inputs: [\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"AssetNotRegistered\",\n type: \"error\",\n inputs: [\n {\n type: \"address\",\n },\n ],\n },\n {\n name: \"ERC20InsufficientAllowance\",\n type: \"error\",\n inputs: [\n {\n type: \"address\",\n },\n {\n type: \"uint256\",\n },\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"ERC4626ExceededMaxWithdraw\",\n type: \"error\",\n inputs: [\n {\n type: \"address\",\n },\n {\n type: \"uint256\",\n },\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"ERC721NonexistentToken\",\n type: \"error\",\n inputs: [\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"ExecutionFailed\",\n type: \"error\",\n inputs: [\n {\n type: \"uint256\",\n },\n {\n type: \"address\",\n },\n {\n type: \"string\",\n },\n ],\n },\n {\n name: \"ExpiredTransaction\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"FailedToCallFunction\",\n type: \"error\",\n inputs: [\n {\n type: \"bytes\",\n },\n ],\n },\n {\n name: \"InsufficientAmountOut\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"MinimalOutputBalanceViolation\",\n type: \"error\",\n inputs: [\n {\n type: \"address\",\n },\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"NotPegged\",\n type: \"error\",\n inputs: [\n {\n type: \"address\",\n },\n ],\n },\n {\n name: \"RedeemMoreThanMax\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"SignatureExpired\",\n type: \"error\",\n inputs: [\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"SlippageExceeded\",\n type: \"error\",\n inputs: [\n {\n type: \"uint256\",\n },\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"SlippageExceeded\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"StalePrice\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"TooMuchSlippage\",\n type: \"error\",\n inputs: [\n {\n type: \"address\",\n },\n {\n type: \"uint256\",\n },\n {\n type: \"uint256\",\n },\n ],\n },\n {\n name: \"TransferFromFailed\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"UnexpectedBasketModeStatus\",\n type: \"error\",\n inputs: [],\n },\n {\n name: \"zeroAmountRequired\",\n type: \"error\",\n inputs: [],\n },\n] as const;\n","import { bundler3errorsAbi } from \"./bundler3errors\";\nimport { erc20errorsAbi } from \"./erc20errors\";\nimport { openChainErrorsAbi } from \"./openChainErrors\";\n\nexport const commonAbiErrors = [\n ...erc20errorsAbi,\n ...bundler3errorsAbi,\n ...openChainErrorsAbi,\n] as const;\n","import {\n type Abi,\n AtomicReadyWalletRejectedUpgradeError,\n BaseError,\n ContractFunctionExecutionError,\n ContractFunctionRevertedError,\n type DecodeErrorResultReturnType,\n decodeErrorResult,\n HttpRequestError,\n type ProviderRpcErrorCode,\n RpcRequestError,\n TransactionExecutionError,\n UserRejectedRequestError,\n} from \"viem\";\n\nimport { commonAbiErrors } from \"../abi/utils/commonAbiErrors\";\n\n/**\n * Duck-type check for viem's BaseError.\n *\n * We can't always rely on `instanceof BaseError` because viem errors may originate\n * from a different version of the `viem` package (e.g. in dependency tree mismatches).\n * The duck-type fallback checks for the structural shape that all viem errors share:\n * `shortMessage`, `message`, and `details`.\n */\nfunction isBaseError(error: unknown): error is BaseError {\n if (error instanceof BaseError) {\n return true;\n }\n\n if (\n error instanceof Error &&\n \"shortMessage\" in error &&\n \"message\" in error &&\n \"details\" in error\n ) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Type-guard for specific viem error types.\n *\n * Uses both `instanceof` and `error.name` to handle cases where the error\n * was created by a different viem version (name-based fallback).\n */\nfunction isViemError<T extends Error>(\n error: Error,\n name: T[\"name\"],\n shouldBeInstanceOf: new (...args: any[]) => T,\n): error is T {\n if (error instanceof shouldBeInstanceOf) {\n return true;\n }\n\n if (error.name === name) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Extracts a human-readable reason string from a decoded Solidity error.\n *\n * Solidity has two kinds of revert errors:\n * - `revert(\"some message\")` → decoded as `Error(string)` where the message is in `args[0]`.\n * In this case we return the string argument (e.g. `\"BAL#508\"`).\n * - `revert CustomError(...)` → decoded as `CustomError(...)` where `errorName` is the\n * custom error name. In this case we return `errorName` (e.g. `\"NotEnoughBalance\"`).\n *\n * The returned string is used as the `reason` field in BeraError and is matched against\n * `errorMap.ts` to resolve a user-friendly `displayMessage`.\n */\nexport function parseDecodedError<const abi extends Abi | readonly unknown[]>(\n error: DecodeErrorResultReturnType<abi>,\n): string | undefined {\n if (\n error.errorName === \"Error\" &&\n Array.isArray(error.args) &&\n error.args?.at(0)\n ) {\n // Solidity `revert(\"message\")` — the message string is the reason\n return error.args?.at(0) as string;\n }\n\n // Custom error `revert CustomError(...)` — the error name is the reason\n return error.errorName;\n}\n\n/**\n * The reason extraction engine — recursively unwraps viem error chains to extract\n * a machine-readable `reason` string.\n *\n * This function is the core of the automatic reason detection system. It is called by:\n * - `BeraError` constructor (when `reason` is not manually provided)\n * - `initBeraError` (to detect if the error is a RequestError)\n * - `getRevertReason` (after replaying a failed on-chain transaction)\n *\n * ## Viem error chain structure\n *\n * Viem errors are deeply nested. The typical chains look like:\n *\n * **From `simulateContract`:**\n * ```\n * ContractFunctionExecutionError ← wrapper, skipped\n * └── ContractFunctionRevertedError ← reason extracted here (cause.reason / cause.signature)\n * ```\n *\n * **From `publicClient.call` (raw call):**\n * ```\n * CallExecutionError ← wrapper, skipped\n * └── ExecutionRevertedError ← wrapper, skipped\n * └── RpcRequestError ← reason decoded from cause.data using ABI\n * ```\n *\n * **From `writeContract` / `sendTransaction`:**\n * ```\n * TransactionExecutionError ← checked for special wallet errors\n * └── UserRejectedRequestError ← \"UserRejectedRequestError\"\n * └── AtomicReadyWalletRejectedUpgradeError ← \"AtomicReadyWalletRejectedUpgradeError\"\n * ```\n *\n * **From RPC transport failures:**\n * ```\n * ContractFunctionExecutionError ← wrapper, skipped\n * └── HttpRequestError ← \"HttpRequestError(status:<code>)\", isRequestError=true\n * ```\n *\n * The function walks `cause.cause` in a while loop until it finds an error type it can\n * extract a reason from, or runs out of nested causes.\n *\n * ## Parameters\n *\n * @param error - Any Error instance (typically a viem BaseError).\n * @param abi - Optional contract ABI. Merged with `commonAbiErrors` to decode revert data.\n * Passing the correct ABI enables decoding custom error names (e.g. \"SlippageExceeded\")\n * instead of falling back to hex selectors (e.g. \"0xa3b1e29f\").\n * @param revertIfUnknown - If true, throws when the error doesn't match any known pattern.\n * The BeraError constructor calls with `true`; `initBeraError` calls with `false`.\n *\n * @returns `{ reason, rootCause, isRequestError? }` where:\n * - `reason` is the extracted error code/name (matched against errorMap.ts for displayMessage)\n * - `rootCause` is the deepest error in the chain that was identified\n * - `isRequestError` is true if the error is an HTTP/RPC transport failure\n */\nexport function parseViemError({\n error,\n abi,\n revertIfUnknown = true,\n}: {\n error: Error;\n abi?: Abi;\n revertIfUnknown: boolean;\n}): {\n reason: string | undefined;\n rootCause: unknown;\n isRequestError?: boolean;\n} {\n // If it's not a viem-shaped error, either rethrow or return the message as-is\n if (!isBaseError(error)) {\n if (revertIfUnknown) {\n throw error;\n }\n\n if (error instanceof BaseError) {\n return { reason: error.shortMessage, rootCause: error };\n }\n\n return { reason: error.message, rootCause: error };\n }\n\n // Begin unwrapping the nested error chain\n let cause: unknown = error;\n\n // Walk the nested viem error chain from outermost to innermost.\n // Each iteration checks for known error types and either extracts the reason or\n // skips the wrapper to go deeper into `cause.cause`.\n while (isBaseError(cause)) {\n // ── Step 1: Skip wrapper errors that don't carry reason data ────────────\n // ContractFunctionExecutionError is a top-level wrapper from simulateContract/writeContract.\n // The actual revert info is in its nested cause.\n if (\n isViemError(\n cause,\n \"ContractFunctionExecutionError\",\n ContractFunctionExecutionError,\n )\n ) {\n cause = cause.cause;\n continue;\n }\n\n // ── Step 2: Check for wallet-level errors ──────────────────────────────\n // TransactionExecutionError wraps errors from wallet interactions (sendTransaction).\n // Check for EIP-7702 smart wallet upgrade rejection specifically.\n if (\n isViemError(cause, \"TransactionExecutionError\", TransactionExecutionError)\n ) {\n if (cause.cause instanceof AtomicReadyWalletRejectedUpgradeError) {\n return {\n reason: \"AtomicReadyWalletRejectedUpgradeError\",\n rootCause: cause.cause,\n };\n }\n }\n\n // ── Step 3: RpcRequestError — from raw `publicClient.call` ─────────────\n // Error chain: CallExecutionError → ExecutionRevertedError → RpcRequestError\n // The revert data is in `cause.data` as raw hex bytes.\n // We decode it using the provided ABI + commonAbiErrors to get the error name.\n if (isViemError(cause, \"RpcRequestError\", RpcRequestError)) {\n if (!cause.data) {\n // No revert data available — check if there's a nested message (special RPC cases)\n if (\n typeof cause.cause === \"object\" &&\n cause.cause &&\n \"message\" in cause.cause &&\n typeof cause.cause.message === \"string\"\n ) {\n return { reason: cause.cause.message, rootCause: cause.cause };\n }\n\n throw new Error(\"No data\", { cause });\n }\n\n // Decode the raw revert bytes into a structured error using ABI.\n // commonAbiErrors includes Error(string) and Panic(uint256) so standard reverts\n // are always decodable even without a user-provided ABI.\n const decodedError = decodeErrorResult({\n data: cause.data as `0x${string}`,\n abi: [...commonAbiErrors, ...(abi ?? [])],\n });\n\n return {\n reason: parseDecodedError(decodedError) ?? cause.shortMessage,\n rootCause: cause,\n };\n }\n\n // ── Step 4: ContractFunctionRevertedError — from `simulateContract` ────\n // Error chain: ContractFunctionExecutionError → ContractFunctionRevertedError\n // Viem already decoded the revert using the ABI passed to simulateContract.\n // `cause.reason` is the decoded error name (e.g. \"NotEnoughBalance\").\n // `cause.signature` is the 4-byte selector fallback (e.g. \"0x13be252b\").\n // `cause.data?.errorName` is another fallback from the decoded data.\n if (\n isViemError(\n cause,\n \"ContractFunctionRevertedError\",\n ContractFunctionRevertedError,\n )\n ) {\n return {\n reason:\n cause.reason ??\n cause.signature ??\n cause.data?.errorName ??\n cause.shortMessage,\n rootCause: cause,\n };\n }\n\n // ── Step 5: UserRejectedRequestError — wallet popup dismissed ──────────\n // The user clicked \"Reject\" in their wallet. Level is set to \"info\" by BeraError constructor.\n if (\n isViemError(cause, \"UserRejectedRequestError\", UserRejectedRequestError)\n ) {\n return { reason: \"UserRejectedRequestError\", rootCause: cause };\n }\n\n // ── Step 6: HttpRequestError — RPC transport failure ───────────────────\n // The RPC endpoint returned an HTTP error (e.g. 502, 503).\n // Flagged as isRequestError so initBeraError can wrap it in a RequestError.\n if (isViemError(cause, \"HttpRequestError\", HttpRequestError)) {\n return {\n reason: `HttpRequestError(status:${cause.status})`,\n rootCause: cause,\n isRequestError: true,\n };\n }\n\n // ── Step 7: End of chain — no deeper cause to unwrap ───────────────────\n if (!cause.cause) {\n return { reason: cause.name, rootCause: cause };\n }\n\n // Keep unwrapping\n cause = cause.cause;\n }\n\n if (!revertIfUnknown) {\n return { reason: undefined, rootCause: cause };\n }\n\n // Cannot use BeraError here because of circular dependency\n throw new Error(\"UnknownErrorInGetRevertReason\", {\n cause: cause,\n });\n}\n\n/**\n * Returns the error code thrown by RpcError.\n *\n * @see {@link RpcError}\n * @param errCode - The error code to get the name for.\n * @returns The name of the error code.\n */\nexport function rpcErrorToReason(\n errCode:\n | number\n | ProviderRpcErrorCode\n // Here we add errors for which we know the code\n | \"UserRejectedRequestError\",\n): string {\n switch (errCode) {\n // Actually this should not get here if UserRejectedRequestError is thrown\n case \"UserRejectedRequestError\":\n case 4001:\n return \"UserRejectedRequestError\";\n default:\n return `RPC_ERROR_${errCode}`;\n }\n}\n"]}
@@ -0,0 +1,2 @@
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 _chunkNMH7LHPWcjs = require('./chunk-NMH7LHPW.cjs');async function F(e){if(_optionalChain([e, 'access', _2 => _2.headers, 'access', _3 => _3.get, 'call', _4 => _4("content-type"), 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("application/json")]))return await e.json();{let t=await e.text();try{return JSON.parse(t)}catch (e2){return{message:"Unknown error, can't decode response into JSON",cause:t}}}}async function C(e,n){try{let t=await fetch(typeof e=="string"||e instanceof URL?e:e.url,{...n});if(!t.ok){let r=await F(t);throw new (0, _chunkNMH7LHPWcjs.g)({cause:r,response:t,endpoint:e})}return t}catch(t){throw t instanceof _chunkNMH7LHPWcjs.g?t:new (0, _chunkNMH7LHPWcjs.g)({cause:t,endpoint:e,response:void 0})}}async function te(e,n){return(await C(e,{...n,headers:{Accept:"application/json",..._optionalChain([n, 'optionalAccess', _7 => _7.headers])}})).json()}var _viem = require('viem');var oe=_viem.parseEther.call(void 0, "0.005"),se= exports.f =1e5,ue= exports.g =1,ie= exports.h =.1,ae= exports.i =50,me= exports.j =7920027n;var fe=e=>2n*BigInt(e);function be(e){return Math.floor(e/1e3)}function V(e){return e*1e3}function j(e){return e*V(60)}function J(e){return e*60}function q(e){return e*j(60)}function G(e){return e*J(60)}function S(e){return e*q(24)}function w(e){return e*G(24)}function pe(e){return e*S(7)}function de(e){return e*w(7)}function he(e){return e*S(30)}function Ne(e){return e*w(30)}function ge(e){return e*S(365)}function xe(e){return e*w(365)}function Me(e){let n=new Date;return n.setDate(n.getDate()-e)*1e3}var X=["January","February","March","April","May","June","July","August","September","October","November","December"],k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ie(e,n){let t=new Date(e*1e3),r=t.getDate(),u="th";return r===1||r===21||r===31?u="st":r===2||r===22?u="nd":(r===3||r===23)&&(u="rd"),n?`${k[t.getMonth()]} ${r}`:`${X[t.getMonth()]} ${r}${u}, ${t.getFullYear()}`}function Te(...e){let n=e[0],t,r,u,l;if(typeof e[1]!="object")t=_nullishCoalesce(e[1], () => (!1)),r=_nullishCoalesce(e[2], () => (!1)),l=_nullishCoalesce(e[3], () => (!1)),u=!0;else{let s=e[1];t=_nullishCoalesce(s.condensed, () => (!1));let o=_nullishCoalesce(s.greaterUnit, () => ("hours"));o==="days"?(r=!0,u=!0):o==="hours"?(r=!1,u=!0,l=!1):(r=!1,u=!0),l=_nullishCoalesce(s.showSeconds, () => (!1))}let a=Math.floor(n/(3600*24)),i=Math.floor(n%(3600*24)/3600),c=Math.floor(n%3600/60),m=n%60;if(r||(i+=a*24,a=0),a===0&&i===0&&c===0)return t?"< 1 M":"less than a minute";let N=a>0?`${a}${t?"D":" day"}${!t&&a!==1?"s":""}`:"",g=i>0?`${i}${t?"H":" hour"}${!t&&i!==1?"s":""}`:"",M=c>0&&u||!a&&!i?`${c}${t?"M":" minute"}${!t&&c!==1?"s":""}`:"",I=m>0&&l?`${m}${t?"S":" second"}${!t&&m!==1?"s":""}`:"";return[N,g,M,I].filter(Boolean).join(t?" ":", ")}var _bignumberjs = require('bignumber.js'); var _bignumberjs2 = _interopRequireDefault(_bignumberjs);_bignumberjs2.default.set({EXPONENTIAL_AT:1e9});var D=_bignumberjs2.default;var _=["","K","M","B","T","P","E","Z","Y"];function L(e){return e instanceof D?e:new D(e)}function Y(e,n){return L(e).shiftedBy(n*-1)}function $e(e,n={}){if(typeof n=="number"){let d=n;if(e==null)return"";if(typeof e=="object")throw new Error("Value must be a number if using deprecated version");let b=Number(e).toFixed(d);return b=b.replace(/(\.\d*?[1-9])0+$|\.0*$/,"$1"),b}let{visibleDecimals:t,compact:r=!0,percent:u=!1,roundDown:l=!1,roundUp:a=!1,compactThreshold:i,maxValue:c,symbol:m,prefixText:N="",suffixText:g="",showIsSmallerThanMin:M=!0,ifNullish:I=""}=n||{};if(e==null)return I;let s=u?Number(e)*100:Number(e);if(Number.isNaN(s))return"NaN";if(s===Number.POSITIVE_INFINITY)return"Infinity";if(s===Number.NEGATIVE_INFINITY)return"-Infinity";let o=_nullishCoalesce(t, () => (0));s===0?o=0:t===void 0&&(Math.abs(s)>1||u||m==="USD"?o=2:o=7);let E=10**-o,$=s!==0&&Math.abs(s)<Math.abs(E),R=s<0,B=c?Math.abs(s)>c:!1,p=$?E:s,T=r&&(!i||Math.abs(s)>i);l&&!T?p=Math.trunc(Number(p)*10**o)/10**o:a&&!T&&(p=Math.ceil(Number(p)*10**o)/10**o);let x;if(B)x=s>c?"\u221E":"-\u221E";else if(T){let d=L(p),b=d.abs().toFixed(0).length;i&&Math.abs(s)<=i&&(b=0);let A=Math.min(Math.floor(b?(b-1)/3:0),_.length-1),P=_[A],h=Y(d,3*A).toNumber();l?h=Math.trunc(Number(h)*10**o)/10**o:a&&(h=Math.ceil(Number(h)*10**o)/10**o),x=`${new Intl.NumberFormat("en-US",{maximumFractionDigits:o,minimumFractionDigits:o}).format(h)}${P}`}else{let d=new Intl.NumberFormat("en-US",{maximumFractionDigits:o,minimumFractionDigits:o}).format(Math.abs(p));x=`${R?"-":""}${d}`}let f=[];return N&&f.push(N),$&&M&&f.push(s<0?">":"<"),_optionalChain([m, 'optionalAccess', _8 => _8.toLowerCase, 'call', _9 => _9()])==="usd"&&!u&&f.push("$"),f.push(x),u&&f.push("%"),_optionalChain([m, 'optionalAccess', _10 => _10.toLowerCase, 'call', _11 => _11()])!=="usd"&&typeof m<"u"&&f.push(" ",m),g&&f.push(g),f.join("")}var Ae=e=>e?Number(e)>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:_nullishCoalesce(Number(e), () => (0)):0,Fe= exports.E =(e,n)=>{if(!e)return"0";let[t="0",r="0"]=`${e}`.split(".");return`${t}.${r.substring(0,n)}`};var _internal = require('@berachain/config/internal');function Re(e=_internal.defaultChainId){let n=_internal.getRpcUrls.call(void 0, e);if(!n.isAnvil)throw new Error("No anvil RPC URL found");return _viem.createTestClient.call(void 0, {mode:"anvil",transport:_viem.http.call(void 0, n.jsonRpcUrl)})}exports.a = D; exports.b = F; exports.c = C; exports.d = te; exports.e = oe; exports.f = se; exports.g = ue; exports.h = ie; exports.i = ae; exports.j = me; exports.k = fe; exports.l = be; exports.m = V; exports.n = j; exports.o = J; exports.p = q; exports.q = G; exports.r = S; exports.s = w; exports.t = pe; exports.u = de; exports.v = he; exports.w = Ne; exports.x = ge; exports.y = xe; exports.z = Me; exports.A = Ie; exports.B = Te; exports.C = $e; exports.D = Ae; exports.E = Fe; exports.F = Re;
2
+ //# sourceMappingURL=chunk-NVHV2LDK.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/snowbera/Documents/workspace/monobera/packages/berajs/dist/chunk-NVHV2LDK.cjs","../src/utils/getErrorResponse.ts","../src/utils/beraFetch.ts","../src/utils/constants.ts","../src/utils/pythHoneyUtils.ts","../src/utils/time.ts","../src/utils/formatTimestamps.ts"],"names":["getErrorResponse","response","text","beraFetch","endpoint","options","error","RequestError","beraFetchJson","CAP_LIMIT_BUFFER","parseEther","MAX_CUSTOM_DEADLINE","MIN_CUSTOM_DEADLINE","MIN_CUSTOM_SLIPPAGE","MAX_CUSTOM_SLIPPAGE","DEFAULT_METAMASK_GAS_LIMIT","getPythDefaultUpdateFee","tokenListLength","msToSeconds","ms","seconds","minutes","minutesInSeconds","hours","hoursInSeconds","days","daysInSeconds","weeks","weeksInSeconds","months","monthsInSeconds","years","yearsInSeconds","calculateTimestampFromDays","daysRange","currentDate","monthNames","shortMonthNames","formatUnixTimestamp","unixTimestamp","isShort","date","day","daySuffix"],"mappings":"AAAA,y0BAAwC,MCGxC,SAAsBA,CAAAA,CAAiBC,CAAAA,CAAoB,CAGzD,EAAA,iBAFoBA,CAAAA,qBAAS,OAAA,qBAAQ,GAAA,mBAAI,cAAc,CAAA,6BAEtC,QAAA,mBAAS,kBAAkB,GAAA,CAC1C,OAAO,MAAMA,CAAAA,CAAS,IAAA,CAAK,CAAA,CACtB,CACL,IAAMC,CAAAA,CAAO,MAAMD,CAAAA,CAAS,IAAA,CAAK,CAAA,CACjC,GAAI,CACF,OAAO,IAAA,CAAK,KAAA,CAAMC,CAAI,CACxB,CAAA,UAAQ,CACN,MAAO,CACL,OAAA,CAAS,gDAAA,CACT,KAAA,CAAOA,CACT,CACF,CACF,CACF,CCdA,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACAC,CAAAA,CACA,CACA,GAAI,CACF,IAAMJ,CAAAA,CA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AA,CAA2BC,CAAAA,CAA2B,CACpE,IAAMC,CAAAA,CAAc,IAAI,IAAA,CACxB,OAAOA,CAAAA,CAAY,OAAA,CAAQA,CAAAA,CAAY,OAAA,CAAQ,CAAA,CAAID,CAAS,CAAA,CAAI,GAClE,CAEA,IAAME,CAAAA,CAAa,CACjB,SAAA,CACA,UAAA,CACA,OAAA,CACA,OAAA,CACA,KAAA,CACA,MAAA,CACA,MAAA,CACA,QAAA,CACA,WAAA,CACA,SAAA,CACA,UAAA,CACA,UACF,CAAA,CAEMC,CAAAA,CAAkB,CACtB,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KAAA,CACA,KACF,CAAA,CAEO,SAASC,EAAAA,CAAoBC,CAAAA,CAAuBC,CAAAA,CAAmB,CAC5E,IAAMC,CAAAA,CAAO,IAAI,IAAA,CAAKF,CAAAA,CAAgB,GAAI,CAAA,CAEpCG,CAAAA,CAAMD,CAAAA,CAAK,OAAA,CAAQ,CAAA,CACrBE,CAAAA,CAAY,IAAA,CAUhB,OARID,CAAAA,GAAQ,CAAA,EAAKA,CAAAA,GAAQ,EAAA,EAAMA,CAAAA,GAAQ,EAAA,CACrCC,CAAAA,CAAY,IAAA,CACHD,CAAAA,GAAQ,CAAA,EAAKA,CAAAA,GAAQ,EAAA,CAC9BC,CAAAA,CAAY,IAAA,CAAA,CACHD,CAAAA,GAAQ,CAAA,EAAKA,CAAAA,GAAQ,EAAA,CAAA,EAAA,CAC9BC,CAAAA,CAAY,IAAA,CAAA,CAGVH,CAAAA,CACK,CAAA,EAAA","file":"/Users/snowbera/Documents/workspace/monobera/packages/berajs/dist/chunk-NVHV2LDK.cjs","sourcesContent":[null,"/**\n * @deprecated use beraFetch instead\n */\nexport async function getErrorResponse(response: Response) {\n const contentType = response.headers.get(\"content-type\");\n\n if (contentType?.includes(\"application/json\")) {\n return await response.json();\n } else {\n const text = await response.text();\n try {\n return JSON.parse(text);\n } catch {\n return {\n message: \"Unknown error, can't decode response into JSON\",\n cause: text,\n };\n }\n }\n}\n","import { RequestError } from \"../errors/RequestError\";\nimport { getErrorResponse } from \"./getErrorResponse\";\n\ntype RequestOptions = RequestInit;\n\nexport async function beraFetch(\n endpoint: ConstructorParameters<typeof RequestError>[0][\"endpoint\"],\n options?: RequestOptions,\n) {\n try {\n const response = await fetch(\n typeof endpoint === \"string\" || endpoint instanceof URL\n ? endpoint\n : endpoint.url,\n {\n ...options,\n },\n );\n if (!response.ok) {\n const error = await getErrorResponse(response);\n throw new RequestError({\n cause: error,\n // @to-do import getErrorResponse logic in this function\n // when it's removed from other places\n response: response,\n endpoint,\n });\n }\n return response;\n } catch (error) {\n if (error instanceof RequestError) {\n throw error;\n }\n\n throw new RequestError({\n cause: error,\n endpoint,\n response: undefined,\n });\n }\n}\n\nexport async function beraFetchJson<T>(\n endpoint: ConstructorParameters<typeof RequestError>[0][\"endpoint\"],\n options?: RequestOptions,\n) {\n const response = await beraFetch(endpoint, {\n ...options,\n headers: {\n Accept: \"application/json\",\n ...options?.headers,\n },\n });\n return response.json() as Promise<T>;\n}\n","import { parseEther } from \"viem\";\n\n// the buffer of the cap limit, if the user gets close to 10% of the cap limit\n// they should be warned\nexport const CAP_LIMIT_BUFFER = parseEther(\"0.005\");\n\n/**\n * Maximum allowed input for a custom deadline in seconds.\n * @type {number}\n */\nexport const MAX_CUSTOM_DEADLINE = 100000;\n\n/**\n * Minimum allowed input for a custom deadline in seconds.\n * @type {number}\n */\nexport const MIN_CUSTOM_DEADLINE = 1;\n\n/**\n * Minimum allowed input for a custom slippage tolerance percentage.\n * @type {number}\n */\nexport const MIN_CUSTOM_SLIPPAGE = 0.1;\n\n/**\n * Maximum allowed input for a custom slippage tolerance percentage.\n * @type {number}\n */\nexport const MAX_CUSTOM_SLIPPAGE = 50;\n\n/**\n * Default gas limit used by MetaMask\n * @see {@link https://github.com/MetaMask/metamask-extension/blob/06cf7459b963e26d0ae60312d4f9a342d07ab89d/ui/pages/confirmations/send/send.constants.js#L8}\n */\nexport const DEFAULT_METAMASK_GAS_LIMIT = 7920027n;\n","export const getPythDefaultUpdateFee = (tokenListLength: number) => {\n return 2n * BigInt(tokenListLength);\n};\n","/**\n * Convert milliseconds to seconds\n */\nexport function msToSeconds(ms: number): number {\n return Math.floor(ms / 1000);\n}\n\n/**\n * Time utility functions for converting between different time units.\n *\n * This utility file provides functions to convert between seconds, minutes, hours, and days.\n * Note on naming conventions: We use \"seconds\" instead of \"secondsToMs\" because JavaScript\n * is typically based in milliseconds, so the conversion to milliseconds is the more common\n * and expected operation. We use \"xxxInSeconds\" when converting to second-based units.\n */\n\n/**\n * Convert seconds to milliseconds\n */\nexport function seconds(seconds: number): number {\n return seconds * 1000;\n}\n\n/**\n * Convert minutes to milliseconds\n */\nexport function minutes(minutes: number): number {\n return minutes * seconds(60);\n}\n\n/**\n * Convert minutes to seconds\n */\nexport function minutesInSeconds(minutes: number): number {\n return minutes * 60;\n}\n\n/**\n * Convert hours to milliseconds\n */\nexport function hours(hours: number): number {\n return hours * minutes(60);\n}\n\n/**\n * Convert hours to seconds\n */\nexport function hoursInSeconds(hours: number): number {\n return hours * minutesInSeconds(60);\n}\n\n/**\n * Convert days to milliseconds\n */\nexport function days(days: number): number {\n return days * hours(24);\n}\n\n/**\n * Convert days to seconds\n */\nexport function daysInSeconds(days: number): number {\n return days * hoursInSeconds(24);\n}\n\n/**\n * Convert weeks to milliseconds\n */\nexport function weeks(weeks: number): number {\n return weeks * days(7);\n}\n\n/**\n * Convert weeks to seconds\n */\nexport function weeksInSeconds(weeks: number): number {\n return weeks * daysInSeconds(7);\n}\n\n/**\n * Convert months to milliseconds using 30 days per month\n */\nexport function months(months: number): number {\n return months * days(30);\n}\n\n/**\n * Convert months to seconds using 30 days per month\n */\nexport function monthsInSeconds(months: number): number {\n return months * daysInSeconds(30);\n}\n\n/**\n * Convert years to milliseconds using 365 days per year\n */\nexport function years(years: number): number {\n return years * days(365);\n}\n\n/**\n * Convert years to seconds using 365 days per year\n */\nexport function yearsInSeconds(years: number): number {\n return years * daysInSeconds(365);\n}\n","export function calculateTimestampFromDays(daysRange: number): number {\n const currentDate = new Date();\n return currentDate.setDate(currentDate.getDate() - daysRange) * 1000;\n}\n\nconst monthNames = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nconst shortMonthNames = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport function formatUnixTimestamp(unixTimestamp: number, isShort?: boolean) {\n const date = new Date(unixTimestamp * 1000);\n\n const day = date.getDate();\n let daySuffix = \"th\";\n\n if (day === 1 || day === 21 || day === 31) {\n daySuffix = \"st\";\n } else if (day === 2 || day === 22) {\n daySuffix = \"nd\";\n } else if (day === 3 || day === 23) {\n daySuffix = \"rd\";\n }\n\n if (isShort) {\n return `${shortMonthNames[date.getMonth()]} ${day}`;\n }\n\n return `${\n monthNames[date.getMonth()]\n } ${day}${daySuffix}, ${date.getFullYear()}`;\n}\n\ntype LegacyArgs = [number, boolean?, boolean?, boolean?];\ntype FormatTimeLeftArgs = [\n number,\n {\n condensed?: boolean;\n greaterUnit?: \"days\" | \"hours\" | \"minutes\";\n showSeconds?: boolean;\n },\n];\n\n/**\n * Formats the time left into a string like \"8 hours, 23 minutes\".\n *\n * @param timeLeftInSeconds - The time left in seconds.\n * @returns A formatted string representing the time left.\n */\nexport function formatTimeLeft(\n ...args: FormatTimeLeftArgs | LegacyArgs\n): string {\n const timeLeftInSeconds = args[0];\n let condensed: boolean;\n\n let showDays: boolean;\n\n let showMinutes: boolean;\n let showSeconds: boolean;\n\n if (typeof args[1] !== \"object\") {\n condensed = args[1] ?? false;\n showDays = args[2] ?? false;\n showSeconds = args[3] ?? false;\n showMinutes = true;\n } else {\n const opts = args[1];\n condensed = opts.condensed ?? false;\n const greaterUnit = opts.greaterUnit ?? \"hours\";\n\n if (greaterUnit === \"days\") {\n showDays = true;\n showMinutes = true;\n } else if (greaterUnit === \"hours\") {\n showDays = false;\n showMinutes = true;\n showSeconds = false;\n } else {\n // minutes is the default\n showDays = false;\n showMinutes = true;\n }\n showSeconds = opts.showSeconds ?? false;\n }\n\n let days = Math.floor(timeLeftInSeconds / (3600 * 24));\n let hours = Math.floor((timeLeftInSeconds % (3600 * 24)) / 3600);\n const minutes = Math.floor((timeLeftInSeconds % 3600) / 60);\n const seconds = timeLeftInSeconds % 60;\n\n // If showDays=false, roll days into hours\n if (!showDays) {\n hours += days * 24;\n days = 0;\n }\n\n if (days === 0 && hours === 0 && minutes === 0) {\n return condensed ? \"< 1 M\" : \"less than a minute\";\n }\n\n const daysDisplay =\n days > 0\n ? `${days}${condensed ? \"D\" : \" day\"}${\n !condensed && days !== 1 ? \"s\" : \"\"\n }`\n : \"\";\n\n const hoursDisplay =\n hours > 0\n ? `${hours}${condensed ? \"H\" : \" hour\"}${\n !condensed && hours !== 1 ? \"s\" : \"\"\n }`\n : \"\";\n\n const minutesDisplay =\n (minutes > 0 && showMinutes) || (!days && !hours)\n ? `${minutes}${condensed ? \"M\" : \" minute\"}${\n !condensed && minutes !== 1 ? \"s\" : \"\"\n }`\n : \"\";\n const secondsDisplay =\n seconds > 0 && showSeconds\n ? `${seconds}${condensed ? \"S\" : \" second\"}${\n !condensed && seconds !== 1 ? \"s\" : \"\"\n }`\n : \"\";\n return [daysDisplay, hoursDisplay, minutesDisplay, secondsDisplay]\n .filter(Boolean)\n .join(condensed ? \" \" : \", \");\n}\n"]}
@@ -0,0 +1,2 @@
1
+ var e=[{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];export{e as a};
2
+ //# sourceMappingURL=chunk-OGBD5YOG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/abi/enso/ensoWalletV2Factory.ts"],"sourcesContent":["export const ensoWalletV2FactoryAbi = [\n {\n inputs: [{ internalType: \"address\", name: \"user\", type: \"address\" }],\n name: \"getAddress\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n"],"mappings":"AAAO,IAAMA,EAAyB,CACpC,CACE,OAAQ,CAAC,CAAE,aAAc,UAAW,KAAM,OAAQ,KAAM,SAAU,CAAC,EACnE,KAAM,aACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,GAAI,KAAM,SAAU,CAAC,EAChE,gBAAiB,OACjB,KAAM,UACR,CACF","names":["ensoWalletV2FactoryAbi"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/abi/utils/multicall3.ts"],"names":["multicall3Abi"],"mappings":"AAIO,6EAAMA,CAAAA,CAAgB,CAC3B,CACE,MAAA,CAAQ,CACN,CACE,UAAA,CAAY,CACV,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,CAAM,QAAA,CAAU,IAAA,CAAM,SAAU,CAAA,CAC3D,CAAE,YAAA,CAAc,OAAA,CAAS,IAAA,CAAM,UAAA,CAAY,IAAA,CAAM,OAAQ,CAC3D,CAAA,CACA,YAAA,CAAc,0BAAA,CACd,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,SACR,CACF,CAAA,CACA,IAAA,CAAM,WAAA,CACN,OAAA,CAAS,CACP,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,CAAM,aAAA,CAAe,IAAA,CAAM,SAAU,CAAA,CAChE,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,CAAM,YAAA,CAAc,IAAA,CAAM,SAAU,CACjE,CAAA,CACA,eAAA,CAAiB,SAAA,CACjB,IAAA,CAAM,UACR,CAAA,CACA,CACE,MAAA,CAAQ,CACN,CACE,UAAA,CAAY,CACV,CAAE,YAA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Q,IAAA,CAAM,SAAA,CAAW,IAAA,CAAM,MAAO,CAAA,CACtD,CAAE,YAAA,CAAc,OAAA,CAAS,IAAA,CAAM,YAAA,CAAc,IAAA,CAAM,OAAQ,CAC7D,CAAA,CACA,YAAA,CAAc,4BAAA,CACd,IAAA,CAAM,YAAA,CACN,IAAA,CAAM,SACR,CACF,CAAA,CACA,eAAA,CAAiB,SAAA,CACjB,IAAA,CAAM,UACR,CACF,CAAA,CAAA,cAAA","file":"/Users/liammcaweeney/Work/bera/monobera/packages/berajs/dist/chunk-OIYXOKTT.cjs","sourcesContent":["/**\n * This ABI is needed because viem exports a reduced version of this ABI.\n * For instance\n */\nexport const multicall3Abi = [\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n { internalType: \"bytes[]\", name: \"returnData\", type: \"bytes[]\" },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bool\", name: \"allowFailure\", type: \"bool\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call3[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bool\", name: \"allowFailure\", type: \"bool\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call3Value[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3Value\",\n outputs: [\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"blockAndAggregate\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n { internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" },\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBasefee\",\n outputs: [{ internalType: \"uint256\", name: \"basefee\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" }],\n name: \"getBlockHash\",\n outputs: [{ internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBlockNumber\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [{ internalType: \"uint256\", name: \"chainid\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockCoinbase\",\n outputs: [{ internalType: \"address\", name: \"coinbase\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockDifficulty\",\n outputs: [{ internalType: \"uint256\", name: \"difficulty\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockGasLimit\",\n outputs: [{ internalType: \"uint256\", name: \"gaslimit\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [{ internalType: \"uint256\", name: \"timestamp\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"addr\", type: \"address\" }],\n name: \"getEthBalance\",\n outputs: [{ internalType: \"uint256\", name: \"balance\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastBlockHash\",\n outputs: [{ internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"bool\", name: \"requireSuccess\", type: \"bool\" },\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryAggregate\",\n outputs: [\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"bool\", name: \"requireSuccess\", type: \"bool\" },\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryBlockAndAggregate\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n { internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" },\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n"]}
1
+ {"version":3,"sources":["../src/abi/utils/multicall3.ts"],"names":["multicall3Abi"],"mappings":"AAIO,6EAAMA,CAAAA,CAAgB,CAC3B,CACE,MAAA,CAAQ,CACN,CACE,UAAA,CAAY,CACV,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,CAAM,QAAA,CAAU,IAAA,CAAM,SAAU,CAAA,CAC3D,CAAE,YAAA,CAAc,OAAA,CAAS,IAAA,CAAM,UAAA,CAAY,IAAA,CAAM,OAAQ,CAC3D,CAAA,CACA,YAAA,CAAc,0BAAA,CACd,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,SACR,CACF,CAAA,CACA,IAAA,CAAM,WAAA,CACN,OAAA,CAAS,CACP,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,CAAM,aAAA,CAAe,IAAA,CAAM,SAAU,CAAA,CAChE,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,CAAM,YAAA,CAAc,IAAA,CAAM,SAAU,CACjE,CAAA,CACA,eAAA,CAAiB,SAAA,CACjB,IAAA,CAAM,UACR,CAAA,CACA,CACE,MAAA,CAAQ,CACN,CACE,UAAA,CAAY,CACV,CAAE,YAAA,CAAc,SAAA,CAAW,IAAA,C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IAAA,CAAM,MAAO,CAAA,CACtD,CAAE,YAAA,CAAc,OAAA,CAAS,IAAA,CAAM,YAAA,CAAc,IAAA,CAAM,OAAQ,CAC7D,CAAA,CACA,YAAA,CAAc,4BAAA,CACd,IAAA,CAAM,YAAA,CACN,IAAA,CAAM,SACR,CACF,CAAA,CACA,eAAA,CAAiB,SAAA,CACjB,IAAA,CAAM,UACR,CACF,CAAA,CAAA,cAAA","file":"/Users/snowbera/Documents/workspace/monobera/packages/berajs/dist/chunk-OIYXOKTT.cjs","sourcesContent":["/**\n * This ABI is needed because viem exports a reduced version of this ABI.\n * For instance\n */\nexport const multicall3Abi = [\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n { internalType: \"bytes[]\", name: \"returnData\", type: \"bytes[]\" },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bool\", name: \"allowFailure\", type: \"bool\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call3[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bool\", name: \"allowFailure\", type: \"bool\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call3Value[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3Value\",\n outputs: [\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"blockAndAggregate\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n { internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" },\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBasefee\",\n outputs: [{ internalType: \"uint256\", name: \"basefee\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" }],\n name: \"getBlockHash\",\n outputs: [{ internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBlockNumber\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [{ internalType: \"uint256\", name: \"chainid\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockCoinbase\",\n outputs: [{ internalType: \"address\", name: \"coinbase\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockDifficulty\",\n outputs: [{ internalType: \"uint256\", name: \"difficulty\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockGasLimit\",\n outputs: [{ internalType: \"uint256\", name: \"gaslimit\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [{ internalType: \"uint256\", name: \"timestamp\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"addr\", type: \"address\" }],\n name: \"getEthBalance\",\n outputs: [{ internalType: \"uint256\", name: \"balance\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastBlockHash\",\n outputs: [{ internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"bool\", name: \"requireSuccess\", type: \"bool\" },\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryAggregate\",\n outputs: [\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"bool\", name: \"requireSuccess\", type: \"bool\" },\n {\n components: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryBlockAndAggregate\",\n outputs: [\n { internalType: \"uint256\", name: \"blockNumber\", type: \"uint256\" },\n { internalType: \"bytes32\", name: \"blockHash\", type: \"bytes32\" },\n {\n components: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"returnData\", type: \"bytes\" },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/abi/pyth/pyth.ts"],"names":["pythAbi"],"mappings":"AAAO,6EAAMA,CAAAA,CAAU,CACrB,CACE,IAAA,CAAM,UAAA,CACN,IAAA,CAAM,aAAA,CACN,MAAA,CAAQ,CACN,CACE,IAAA,CAAM,IAAA,CACN,IAAA,CAAM,SAAA,CACN,YAAA,CAAc,SAChB,CACF,CAAA,CACA,OAAA,CAAS,CACP,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,0BAAA,CACd,UAAA,CAAY,CACV,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,OAChB,CAAA,CACA,CACE,IAAA,CAAM,MAAA,CACN,IAAA,CAAM,QAAA,CACN,YAAA,CAAc,QAChB,CAAA,CACA,CACE,IAAA,CAAM,MAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,OAChB,CAAA,CACA,CACE,IAAA,CAAM,aAAA,CACN,IAAA,CAAM,SAAA,CACN,YAAA,CAAc,SAChB,CACF,CACF,CACF,CAAA,CACA,eAAA,CAAiB,MACnB,CAAA,CACA,CACE,IAAA,CAAM,UAAA,CACN,IAAA,CAAM,wBAAA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T,YAAA,CAAc,QAChB,CAAA,CACA,CACE,IAAA,CAAM,gBAAA,CACN,IAAA,CAAM,QAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,QAChB,CACF,CAAA,CACA,SAAA,CAAW,CAAA,CACb,CAAA,CACA,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,iBAAA,CACN,MAAA,CAAQ,CACN,CACE,IAAA,CAAM,IAAA,CACN,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,SAChB,CAAA,CACA,CACE,IAAA,CAAM,aAAA,CACN,IAAA,CAAM,QAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,QAChB,CAAA,CACA,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,OAChB,CAAA,CACA,CACE,IAAA,CAAM,MAAA,CACN,IAAA,CAAM,QAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,QAChB,CACF,CAAA,CACA,SAAA,CAAW,CAAA,CACb,CACF,CAAA,CAAA,cAAA","file":"/Users/liammcaweeney/Work/bera/monobera/packages/berajs/dist/chunk-OUD27MU7.cjs","sourcesContent":["export const pythAbi = [\n {\n type: \"function\",\n name: \"getEmaPrice\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getEmaPriceNoOlderThan\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"age\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getEmaPriceUnsafe\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPrice\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPriceNoOlderThan\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"age\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPriceUnsafe\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUpdateFee\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n ],\n outputs: [\n {\n name: \"feeAmount\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getValidTimePeriod\",\n inputs: [],\n outputs: [\n {\n name: \"validTimePeriod\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"parsePriceFeedUpdates\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n {\n name: \"priceIds\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"minPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n outputs: [\n {\n name: \"priceFeeds\",\n type: \"tuple[]\",\n internalType: \"struct PythStructs.PriceFeed[]\",\n components: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n name: \"emaPrice\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"parsePriceFeedUpdatesUnique\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n {\n name: \"priceIds\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"minPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n outputs: [\n {\n name: \"priceFeeds\",\n type: \"tuple[]\",\n internalType: \"struct PythStructs.PriceFeed[]\",\n components: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n name: \"emaPrice\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"updatePriceFeeds\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"updatePriceFeedsIfNecessary\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n {\n name: \"priceIds\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"publishTimes\",\n type: \"uint64[]\",\n internalType: \"uint64[]\",\n },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"event\",\n name: \"BatchPriceFeedUpdate\",\n inputs: [\n {\n name: \"chainId\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"sequenceNumber\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"PriceFeedUpdate\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"publishTime\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"price\",\n type: \"int64\",\n indexed: false,\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n] as const;\n"]}
1
+ {"version":3,"sources":["../src/abi/pyth/pyth.ts"],"names":["pythAbi"],"mappings":"AAAO,6EAAMA,CAAAA,CAAU,CACrB,CACE,IAAA,CAAM,UAAA,CACN,IAAA,CAAM,aAAA,CACN,MAAA,CAAQ,CACN,CACE,IAAA,CAAM,IAAA,CACN,IAAA,CAAM,SAAA,CACN,YAAA,CAAc,SAChB,CACF,CAAA,CACA,OAAA,CAAS,CACP,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,0BAAA,CACd,UAAA,CAAY,CACV,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,OAChB,CAAA,CACA,CACE,IAAA,CAAM,MAAA,CACN,IAAA,CAAM,QAAA,CACN,YAAA,CAAc,QAChB,CAAA,CACA,CACE,IAAA,CAAM,MAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,OAChB,CAAA,CACA,CACE,IAAA,CAAM,aAAA,CACN,IAAA,CAAM,SAAA,CACN,YAAA,CAAc,SAChB,CACF,CACF,CACF,CAAA,CACA,eAAA,CAAiB,MACnB,CAAA,CACA,CACE,IAAA,CAAM,UAAA,CACN,IAAA,CAAM,wBAAA,CACN,MAAA,CAAQ,CACN,CACE,IAAA,CAAM,IAAA,CACN,IAAA,CAAM,SAAA,CACN,YAAA,CAAc,SAChB,CAAA,CACA,CACE,IAAA,CAAM,KAAA,CACN,IAAA,CAAM,SAAA,CACN,YAAA,CAAc,SAChB,CACF,CAAA,CACA,OAAA,CAAS,CACP,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,YAAA,CAAc,0BAAA,CACd,UAAA,CAAY,CACV,CACE,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AAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,SAChB,CAAA,CACA,CACE,IAAA,CAAM,aAAA,CACN,IAAA,CAAM,QAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,QAChB,CAAA,CACA,CACE,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,OAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,OAChB,CAAA,CACA,CACE,IAAA,CAAM,MAAA,CACN,IAAA,CAAM,QAAA,CACN,OAAA,CAAS,CAAA,CAAA,CACT,YAAA,CAAc,QAChB,CACF,CAAA,CACA,SAAA,CAAW,CAAA,CACb,CACF,CAAA,CAAA,cAAA","file":"/Users/snowbera/Documents/workspace/monobera/packages/berajs/dist/chunk-OUD27MU7.cjs","sourcesContent":["export const pythAbi = [\n {\n type: \"function\",\n name: \"getEmaPrice\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getEmaPriceNoOlderThan\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"age\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getEmaPriceUnsafe\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPrice\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPriceNoOlderThan\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"age\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPriceUnsafe\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUpdateFee\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n ],\n outputs: [\n {\n name: \"feeAmount\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getValidTimePeriod\",\n inputs: [],\n outputs: [\n {\n name: \"validTimePeriod\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"parsePriceFeedUpdates\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n {\n name: \"priceIds\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"minPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n outputs: [\n {\n name: \"priceFeeds\",\n type: \"tuple[]\",\n internalType: \"struct PythStructs.PriceFeed[]\",\n components: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n name: \"emaPrice\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"parsePriceFeedUpdatesUnique\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n {\n name: \"priceIds\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"minPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPublishTime\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n outputs: [\n {\n name: \"priceFeeds\",\n type: \"tuple[]\",\n internalType: \"struct PythStructs.PriceFeed[]\",\n components: [\n {\n name: \"id\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"price\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n name: \"emaPrice\",\n type: \"tuple\",\n internalType: \"struct PythStructs.Price\",\n components: [\n {\n name: \"price\",\n type: \"int64\",\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"expo\",\n type: \"int32\",\n internalType: \"int32\",\n },\n {\n name: \"publishTime\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"updatePriceFeeds\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"updatePriceFeedsIfNecessary\",\n inputs: [\n {\n name: \"updateData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\",\n },\n {\n name: \"priceIds\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"publishTimes\",\n type: \"uint64[]\",\n internalType: \"uint64[]\",\n },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"event\",\n name: \"BatchPriceFeedUpdate\",\n inputs: [\n {\n name: \"chainId\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"sequenceNumber\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"PriceFeedUpdate\",\n inputs: [\n {\n name: \"id\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"publishTime\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"price\",\n type: \"int64\",\n indexed: false,\n internalType: \"int64\",\n },\n {\n name: \"conf\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n] as const;\n"]}
@@ -0,0 +1,2 @@
1
+ import{g as y}from"./chunk-74QD4JAH.mjs";async function F(e){if(e.headers.get("content-type")?.includes("application/json"))return await e.json();{let t=await e.text();try{return JSON.parse(t)}catch{return{message:"Unknown error, can't decode response into JSON",cause:t}}}}async function C(e,n){try{let t=await fetch(typeof e=="string"||e instanceof URL?e:e.url,{...n});if(!t.ok){let r=await F(t);throw new y({cause:r,response:t,endpoint:e})}return t}catch(t){throw t instanceof y?t:new y({cause:t,endpoint:e,response:void 0})}}async function te(e,n){return(await C(e,{...n,headers:{Accept:"application/json",...n?.headers}})).json()}import{parseEther as O}from"viem";var oe=O("0.005"),se=1e5,ue=1,ie=.1,ae=50,me=7920027n;var fe=e=>2n*BigInt(e);function be(e){return Math.floor(e/1e3)}function V(e){return e*1e3}function j(e){return e*V(60)}function J(e){return e*60}function q(e){return e*j(60)}function G(e){return e*J(60)}function S(e){return e*q(24)}function w(e){return e*G(24)}function pe(e){return e*S(7)}function de(e){return e*w(7)}function he(e){return e*S(30)}function Ne(e){return e*w(30)}function ge(e){return e*S(365)}function xe(e){return e*w(365)}function Me(e){let n=new Date;return n.setDate(n.getDate()-e)*1e3}var X=["January","February","March","April","May","June","July","August","September","October","November","December"],k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ie(e,n){let t=new Date(e*1e3),r=t.getDate(),u="th";return r===1||r===21||r===31?u="st":r===2||r===22?u="nd":(r===3||r===23)&&(u="rd"),n?`${k[t.getMonth()]} ${r}`:`${X[t.getMonth()]} ${r}${u}, ${t.getFullYear()}`}function Te(...e){let n=e[0],t,r,u,l;if(typeof e[1]!="object")t=e[1]??!1,r=e[2]??!1,l=e[3]??!1,u=!0;else{let s=e[1];t=s.condensed??!1;let o=s.greaterUnit??"hours";o==="days"?(r=!0,u=!0):o==="hours"?(r=!1,u=!0,l=!1):(r=!1,u=!0),l=s.showSeconds??!1}let a=Math.floor(n/(3600*24)),i=Math.floor(n%(3600*24)/3600),c=Math.floor(n%3600/60),m=n%60;if(r||(i+=a*24,a=0),a===0&&i===0&&c===0)return t?"< 1 M":"less than a minute";let N=a>0?`${a}${t?"D":" day"}${!t&&a!==1?"s":""}`:"",g=i>0?`${i}${t?"H":" hour"}${!t&&i!==1?"s":""}`:"",M=c>0&&u||!a&&!i?`${c}${t?"M":" minute"}${!t&&c!==1?"s":""}`:"",I=m>0&&l?`${m}${t?"S":" second"}${!t&&m!==1?"s":""}`:"";return[N,g,M,I].filter(Boolean).join(t?" ":", ")}import U from"bignumber.js";U.set({EXPONENTIAL_AT:1e9});var D=U;var _=["","K","M","B","T","P","E","Z","Y"];function L(e){return e instanceof D?e:new D(e)}function Y(e,n){return L(e).shiftedBy(n*-1)}function $e(e,n={}){if(typeof n=="number"){let d=n;if(e==null)return"";if(typeof e=="object")throw new Error("Value must be a number if using deprecated version");let b=Number(e).toFixed(d);return b=b.replace(/(\.\d*?[1-9])0+$|\.0*$/,"$1"),b}let{visibleDecimals:t,compact:r=!0,percent:u=!1,roundDown:l=!1,roundUp:a=!1,compactThreshold:i,maxValue:c,symbol:m,prefixText:N="",suffixText:g="",showIsSmallerThanMin:M=!0,ifNullish:I=""}=n||{};if(e==null)return I;let s=u?Number(e)*100:Number(e);if(Number.isNaN(s))return"NaN";if(s===Number.POSITIVE_INFINITY)return"Infinity";if(s===Number.NEGATIVE_INFINITY)return"-Infinity";let o=t??0;s===0?o=0:t===void 0&&(Math.abs(s)>1||u||m==="USD"?o=2:o=7);let E=10**-o,$=s!==0&&Math.abs(s)<Math.abs(E),R=s<0,B=c?Math.abs(s)>c:!1,p=$?E:s,T=r&&(!i||Math.abs(s)>i);l&&!T?p=Math.trunc(Number(p)*10**o)/10**o:a&&!T&&(p=Math.ceil(Number(p)*10**o)/10**o);let x;if(B)x=s>c?"\u221E":"-\u221E";else if(T){let d=L(p),b=d.abs().toFixed(0).length;i&&Math.abs(s)<=i&&(b=0);let A=Math.min(Math.floor(b?(b-1)/3:0),_.length-1),P=_[A],h=Y(d,3*A).toNumber();l?h=Math.trunc(Number(h)*10**o)/10**o:a&&(h=Math.ceil(Number(h)*10**o)/10**o),x=`${new Intl.NumberFormat("en-US",{maximumFractionDigits:o,minimumFractionDigits:o}).format(h)}${P}`}else{let d=new Intl.NumberFormat("en-US",{maximumFractionDigits:o,minimumFractionDigits:o}).format(Math.abs(p));x=`${R?"-":""}${d}`}let f=[];return N&&f.push(N),$&&M&&f.push(s<0?">":"<"),m?.toLowerCase()==="usd"&&!u&&f.push("$"),f.push(x),u&&f.push("%"),m?.toLowerCase()!=="usd"&&typeof m<"u"&&f.push(" ",m),g&&f.push(g),f.join("")}var Ae=e=>e?Number(e)>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Number(e)??0:0,Fe=(e,n)=>{if(!e)return"0";let[t="0",r="0"]=`${e}`.split(".");return`${t}.${r.substring(0,n)}`};import{createTestClient as K,http as z}from"viem";import{defaultChainId as H,getRpcUrls as Z}from"@berachain/config/internal";function Re(e=H){let n=Z(e);if(!n.isAnvil)throw new Error("No anvil RPC URL found");return K({mode:"anvil",transport:z(n.jsonRpcUrl)})}export{D as a,F as b,C as c,te as d,oe as e,se as f,ue as g,ie as h,ae as i,me as j,fe as k,be as l,V as m,j as n,J as o,q as p,G as q,S as r,w as s,pe as t,de as u,he as v,Ne as w,ge as x,xe as y,Me as z,Ie as A,Te as B,$e as C,Ae as D,Fe as E,Re as F};
2
+ //# sourceMappingURL=chunk-PLIH6KQM.mjs.map