@berachain/berajs 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BeraError-D1HS_rbb.d.cts → BeraError-_mQdkanr.d.cts} +35 -10
- package/dist/{BeraError-D1HS_rbb.d.ts → BeraError-_mQdkanr.d.ts} +35 -10
- package/dist/HoneyConfigProvider-CK6mOKFH.d.ts +390 -0
- package/dist/HoneyConfigProvider-Ca3ouozs.d.cts +390 -0
- package/dist/{RequestError-D8AE6xnI.d.cts → RequestError-A8XJ6QR9.d.cts} +1 -1
- package/dist/{RequestError-m4jxyM7D.d.ts → RequestError-Dk97z8rm.d.ts} +1 -1
- package/dist/abi/exports.cjs +2 -0
- package/dist/abi/exports.cjs.map +1 -0
- package/dist/abi/{index.d.cts → exports.d.cts} +12369 -9122
- package/dist/abi/{index.d.ts → exports.d.ts} +12369 -9122
- package/dist/abi/exports.mjs +2 -0
- package/dist/abi/exports.mjs.map +1 -0
- package/dist/actions/exports.cjs +2 -0
- package/dist/actions/exports.cjs.map +1 -0
- package/dist/actions/{index.d.cts → exports.d.cts} +80 -107
- package/dist/actions/{index.d.ts → exports.d.ts} +80 -107
- package/dist/actions/exports.mjs +2 -0
- package/dist/actions/exports.mjs.map +1 -0
- package/dist/chunk-575OK77P.mjs +2 -0
- package/dist/chunk-575OK77P.mjs.map +1 -0
- package/dist/chunk-7GWTHOLO.mjs +2 -0
- package/dist/chunk-7GWTHOLO.mjs.map +1 -0
- package/dist/chunk-7SC4VD3U.cjs +2 -0
- package/dist/chunk-7SC4VD3U.cjs.map +1 -0
- package/dist/chunk-BHNQX4XC.mjs +2 -0
- package/dist/chunk-BHNQX4XC.mjs.map +1 -0
- package/dist/chunk-BOYZVULX.cjs +2 -0
- package/dist/chunk-BOYZVULX.cjs.map +1 -0
- package/dist/chunk-C3FHGFLK.mjs +2 -0
- package/dist/chunk-C3FHGFLK.mjs.map +1 -0
- package/dist/chunk-C3G5KXCH.mjs +2 -0
- package/dist/chunk-C3G5KXCH.mjs.map +1 -0
- package/dist/chunk-CYKCYPFR.cjs +2 -0
- package/dist/chunk-CYKCYPFR.cjs.map +1 -0
- package/dist/chunk-F4BKSBEM.mjs +2 -0
- package/dist/chunk-F4BKSBEM.mjs.map +1 -0
- package/dist/chunk-FL2N3XHK.cjs +2 -0
- package/dist/chunk-FL2N3XHK.cjs.map +1 -0
- package/dist/chunk-G6NA6NSM.mjs +4 -0
- package/dist/chunk-G6NA6NSM.mjs.map +1 -0
- package/dist/chunk-H2QSRMVS.mjs +2 -0
- package/dist/chunk-H2QSRMVS.mjs.map +1 -0
- package/dist/chunk-IJM76AWK.cjs +4 -0
- package/dist/chunk-IJM76AWK.cjs.map +1 -0
- package/dist/chunk-MTS5SZLA.mjs +2 -0
- package/dist/chunk-MTS5SZLA.mjs.map +1 -0
- package/dist/chunk-MUNAP5TM.cjs +2 -0
- package/dist/chunk-MUNAP5TM.cjs.map +1 -0
- package/dist/chunk-NAXAZJJY.mjs +2 -0
- package/dist/chunk-NAXAZJJY.mjs.map +1 -0
- package/dist/chunk-OGJMSGB2.mjs +2 -0
- package/dist/chunk-OGJMSGB2.mjs.map +1 -0
- package/dist/chunk-OIYXOKTT.cjs +2 -0
- package/dist/chunk-OIYXOKTT.cjs.map +1 -0
- package/dist/chunk-OS5AJMYJ.cjs +2 -0
- package/dist/chunk-OS5AJMYJ.cjs.map +1 -0
- package/dist/chunk-Q3SCM6WL.mjs +2 -0
- package/dist/chunk-Q3SCM6WL.mjs.map +1 -0
- package/dist/chunk-SWMJQOH6.cjs +2 -0
- package/dist/chunk-SWMJQOH6.cjs.map +1 -0
- package/dist/chunk-TEBJWAVU.mjs +2 -0
- package/dist/chunk-TEBJWAVU.mjs.map +1 -0
- package/dist/chunk-TJWKS54T.mjs +2 -0
- package/dist/chunk-TJWKS54T.mjs.map +1 -0
- package/dist/chunk-UQUWMHVF.cjs +2 -0
- package/dist/chunk-UQUWMHVF.cjs.map +1 -0
- package/dist/chunk-UXUWSRVV.cjs +2 -0
- package/dist/chunk-UXUWSRVV.cjs.map +1 -0
- package/dist/chunk-VP7XUOSI.cjs +2 -0
- package/dist/chunk-VP7XUOSI.cjs.map +1 -0
- package/dist/chunk-VXL2ZZ4X.cjs +2 -0
- package/dist/chunk-VXL2ZZ4X.cjs.map +1 -0
- package/dist/chunk-WRFDB3QJ.cjs +2 -0
- package/dist/chunk-WRFDB3QJ.cjs.map +1 -0
- package/dist/chunk-WTCBORPB.cjs +2 -0
- package/dist/chunk-WTCBORPB.cjs.map +1 -0
- package/dist/chunk-XNJLSA6P.cjs +2 -0
- package/dist/chunk-XNJLSA6P.cjs.map +1 -0
- package/dist/chunk-YQGZMWDT.mjs +2 -0
- package/dist/chunk-YQGZMWDT.mjs.map +1 -0
- package/dist/chunk-YXLFOEZN.mjs +2 -0
- package/dist/chunk-YXLFOEZN.mjs.map +1 -0
- package/dist/chunk-ZAKA4TGK.cjs +2 -0
- package/dist/chunk-ZAKA4TGK.cjs.map +1 -0
- package/dist/chunk-ZQRACIGR.mjs +2 -0
- package/dist/chunk-ZQRACIGR.mjs.map +1 -0
- package/dist/contexts/exports.cjs +2 -0
- package/dist/contexts/exports.cjs.map +1 -0
- package/dist/contexts/{index.d.ts → exports.d.cts} +19 -28
- package/dist/contexts/{index.d.cts → exports.d.ts} +19 -28
- package/dist/contexts/exports.mjs +2 -0
- package/dist/contexts/exports.mjs.map +1 -0
- package/dist/contracts-CQIPk0Jc.d.cts +74 -0
- package/dist/contracts-CQIPk0Jc.d.ts +74 -0
- package/dist/{defaultFlags-V-tJs2K8.d.cts → defaultFlags-d0kPbT0i.d.cts} +1 -1
- package/dist/{defaultFlags-V-tJs2K8.d.ts → defaultFlags-d0kPbT0i.d.ts} +1 -1
- package/dist/dex-C_BB0b0O.d.cts +37 -0
- package/dist/dex-C_BB0b0O.d.ts +37 -0
- package/dist/enum/exports.cjs +2 -0
- package/dist/enum/exports.cjs.map +1 -0
- package/dist/enum/exports.d.cts +24 -0
- package/dist/enum/exports.d.ts +24 -0
- package/dist/enum/exports.mjs +2 -0
- package/dist/enum/exports.mjs.map +1 -0
- package/dist/errors/exports.cjs +2 -0
- package/dist/errors/exports.cjs.map +1 -0
- package/dist/errors/exports.d.cts +385 -0
- package/dist/errors/exports.d.ts +385 -0
- package/dist/errors/exports.mjs +2 -0
- package/dist/{getValidatorQueuedOperatorAddress-9xY2RUGe.d.cts → getValidatorQueuedOperatorAddress-BX35p2Lv.d.ts} +125 -15
- package/dist/{getValidatorQueuedOperatorAddress-Ne2zoiiV.d.ts → getValidatorQueuedOperatorAddress-It0GsdvQ.d.cts} +125 -15
- package/dist/global.d-Ba-NIojH.d.cts +474 -0
- package/dist/global.d-By70bEv2.d.ts +474 -0
- package/dist/honey-CYm0RWf4.d.cts +14 -0
- package/dist/honey-CYm0RWf4.d.ts +14 -0
- package/dist/hooks/exports.cjs +4 -0
- package/dist/hooks/exports.cjs.map +1 -0
- package/dist/hooks/{index.d.cts → exports.d.cts} +223 -173
- package/dist/hooks/{index.d.ts → exports.d.ts} +223 -173
- package/dist/hooks/exports.mjs +4 -0
- package/dist/hooks/exports.mjs.map +1 -0
- package/dist/{BexStatusProvider-nS3NcdxI.d.cts → transactionStore-BvStaXf3.d.ts} +41 -1
- package/dist/{BexStatusProvider-nS3NcdxI.d.ts → transactionStore-CQrGYSY2.d.cts} +41 -1
- package/dist/{txnEnum-BQKDfaeH.d.cts → txnEnum-BYNbCxla.d.cts} +1 -0
- package/dist/{txnEnum-BQKDfaeH.d.ts → txnEnum-BYNbCxla.d.ts} +1 -0
- package/dist/types/exports.cjs +1 -0
- package/dist/types/exports.cjs.map +1 -0
- package/dist/types/exports.d.cts +58 -0
- package/dist/types/exports.d.ts +58 -0
- package/dist/types/exports.mjs +1 -0
- package/dist/{useHoneySwapState-C-9BV4VB.d.cts → useHoneySwapState-B-vmIP1b.d.cts} +1 -1
- package/dist/{useHoneySwapState-CUY5Sm1b.d.ts → useHoneySwapState-D1DKG_Of.d.ts} +1 -1
- package/dist/utils/exports.cjs +2 -0
- package/dist/utils/exports.cjs.map +1 -0
- package/dist/utils/{index.d.cts → exports.d.cts} +83 -20
- package/dist/utils/{index.d.ts → exports.d.ts} +83 -20
- package/dist/utils/exports.mjs +2 -0
- package/dist/utils/exports.mjs.map +1 -0
- package/package.json +16 -17
- package/src/abi/{index.ts → exports.ts} +3 -0
- package/src/abi/pol/LSTStakerVault.ts +2032 -0
- package/src/abi/utils/openChainErrors.ts +71 -30
- package/src/abi/utils/thirdwebMinimalAccount.ts +616 -0
- package/src/actions/clients/BeraApolloClient.ts +8 -6
- package/src/actions/dex/__tests__/aggregators.unit.test.ts +2 -5
- package/src/actions/dex/aggregators/base.ts +74 -16
- package/src/actions/dex/aggregators/bex.ts +54 -74
- package/src/actions/dex/aggregators/bgt.ts +31 -8
- package/src/actions/dex/aggregators/{enso.ts → enso/enso.ts} +18 -14
- package/src/actions/dex/aggregators/enso/ensoErc4626.debug.test.ts +37 -0
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +176 -0
- package/src/actions/dex/aggregators/erc4626.ts +122 -0
- package/src/actions/dex/aggregators/fly.ts +59 -53
- package/src/actions/dex/aggregators/haiku.ts +52 -54
- package/src/actions/dex/aggregators/honey.ts +54 -45
- package/src/actions/dex/aggregators/kyberswap.ts +41 -39
- package/src/actions/dex/aggregators/oogabooga.ts +47 -46
- package/src/actions/dex/aggregators/openOcean.ts +51 -46
- package/src/actions/dex/aggregators/wbera.ts +54 -42
- package/src/actions/dex/b-sdk.ts +5 -2
- package/src/actions/dex/getIsTokenExploited.ts +2 -2
- package/src/actions/enso/{zap.ts → getEnsoSwapBundle.ts} +4 -5
- package/src/actions/enso/getEnsoUserTokensWithBalances.debug.test.ts +73 -0
- package/src/actions/enso/{getEnsoUserToken.ts → getEnsoUserTokensWithBalances.ts} +42 -30
- package/src/actions/enso/util.ts +1 -1
- package/src/actions/{index.ts → exports.ts} +5 -0
- package/src/actions/governance/__tests__/checkProposalField.unit.test.ts +1 -1
- package/src/actions/governance/__tests__/getQuorum.integration.test.ts +1 -1
- package/src/actions/governance/checkProposalField.ts +1 -1
- package/src/actions/governance/computeActualStatus.ts +1 -1
- package/src/actions/governance/getBodyErrors.ts +1 -1
- package/src/actions/governance/getDecodedFunctionData.ts +1 -4
- package/src/actions/governance/getProposalDetails.ts +2 -2
- package/src/actions/governance/getProposalFromTx.ts +1 -2
- package/src/actions/governance/getProposalParams.ts +7 -8
- package/src/actions/governance/getQuorum.ts +1 -2
- package/src/actions/honey/getCollateralWeights.ts +1 -1
- package/src/actions/honey/getHoneyCollaterals.ts +1 -0
- package/src/actions/honey/getHoneyVaultsBalance.ts +51 -55
- package/src/actions/honey/getSwapPayload.ts +37 -35
- package/src/actions/honey/tests/pyth.integration.test.ts +0 -1
- package/src/actions/pol/__tests__/getAllValidators.integration.test.ts +1 -1
- package/src/actions/pol/getEarnedStakedBeraVault.ts +31 -0
- package/src/actions/pol/getGlobalData.ts +14 -13
- package/src/actions/pol/getLSTStakeConfig.ts +67 -0
- package/src/actions/pol/getMarkets.ts +1 -1
- package/src/actions/pol/getRewardProofsByValidator.ts +1 -1
- package/src/actions/pol/getRewardVaultIncentives.ts +3 -5
- package/src/actions/pol/getRewardVaults.ts +2 -3
- package/src/actions/pol/getSWBeraVaultMetadata.ts +7 -5
- package/src/actions/pol/getSWBeraWithdrawal.ts +41 -27
- package/src/actions/pol/getStakeWithdrawalCooldown.ts +5 -7
- package/src/actions/pol/getStakingDailyAssets.ts +21 -0
- package/src/actions/pol/getStakingTokenInformation.ts +3 -4
- package/src/actions/pol/getTotalStakedAmount.ts +47 -0
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaults.ts +8 -6
- package/src/actions/pol/getUserVaultsBalance.ts +4 -16
- package/src/actions/prices/getTokenCurrentPrices.ts +8 -3
- package/src/actions/tokens/getAllowances.ts +68 -41
- package/src/actions/tokens/getTokenInformation.ts +4 -1
- package/src/actions/tokens/getTokens.ts +1 -1
- package/src/actions/tokens/getUnderlyingToken.ts +53 -0
- package/src/actions/tokens/getWalletBalances.integration.test.ts +53 -14
- package/src/actions/tokens/getWalletBalances.ts +69 -43
- package/src/actions/transactions/beraWriteContract.integration.test.ts +18 -6
- package/src/actions/transactions/beraWriteContract.ts +3 -3
- package/src/actions/validators/getUserActiveValidators.ts +2 -3
- package/src/actions/validators/getUserBoostsOnValidator.ts +2 -3
- package/src/contexts/BeraFlags/defaultFlags.ts +4 -0
- package/src/contexts/SwrFallback.tsx +13 -3
- package/src/contexts/TokensProvider.tsx +35 -8
- package/src/{hooks/transactions → contexts}/TransactionStoreContext.tsx +32 -4
- package/src/contexts/block-time-provider.tsx +1 -1
- package/src/contexts/{index.ts → exports.ts} +1 -1
- package/src/data/contracts.ts +16 -1
- package/src/enum/contracts.ts +13 -0
- package/src/enum/dex.ts +29 -0
- package/src/enum/{index.ts → exports.ts} +3 -0
- package/src/enum/governance.ts +61 -0
- package/src/enum/honey.ts +12 -0
- package/src/enum/txnEnum.ts +1 -0
- package/src/errors/BeraError.ts +50 -11
- package/src/errors/BeraMonitoring.ts +66 -0
- package/src/errors/BeraTracing.ts +79 -0
- package/src/errors/BeraTracing.unit.test.ts +198 -0
- package/src/errors/RequestError.ts +2 -2
- package/src/errors/assert.ts +4 -2
- package/src/errors/assert.unit.test.ts +6 -2
- package/src/errors/errorMap.ts +16 -6
- package/src/errors/{index.ts → exports.ts} +7 -0
- package/src/errors/getErrorMessage.ts +22 -3
- package/src/errors/getRevertReason.integration.test.ts +17 -5
- package/src/errors/getRevertReason.ts +41 -2
- package/src/errors/initBeraError.ts +52 -7
- package/src/errors/parseViemError.ts +114 -27
- package/src/errors/severity.ts +12 -0
- package/src/hooks/bend/useGetConvertToAssets.ts +3 -2
- package/src/hooks/dex/useAggregatorsQuotes.ts +126 -365
- package/src/hooks/dex/useAllUserPools.ts +1 -1
- package/src/hooks/dex/useApiPool.ts +1 -1
- package/src/hooks/dex/useCreatePool.ts +6 -5
- package/src/hooks/dex/useExploitedTokens.ts +1 -1
- package/src/hooks/dex/useLiquidityMismatch.ts +2 -5
- package/src/hooks/dex/useLpPosition.ts +21 -20
- package/src/hooks/dex/useMultipleTokenApprovalsWithSlippage.ts +40 -29
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +1 -1
- package/src/hooks/dex/usePoolEvents.ts +1 -1
- package/src/hooks/dex/usePools.ts +1 -1
- package/src/hooks/dex/usePriceImpact.ts +40 -0
- package/src/hooks/dex/useSingleAggregatorQuote.ts +350 -0
- package/src/hooks/enso/useBendZapSupply.ts +216 -0
- package/src/hooks/enso/useEnsoSwapBundle.ts +107 -0
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +43 -0
- package/src/hooks/enso/useZapStakeBera.ts +113 -0
- package/src/hooks/{index.ts → exports.ts} +18 -7
- package/src/hooks/governance/useCreateProposal.ts +8 -8
- package/src/hooks/governance/usePollAllProposals.ts +1 -1
- package/src/hooks/governance/usePollProposal.ts +1 -1
- package/src/hooks/governance/usePollProposalThreshold.ts +1 -1
- package/src/hooks/governance/usePollUserDelegates.ts +1 -1
- package/src/hooks/governance/useProposalState.ts +2 -2
- package/src/hooks/honey/useCappedGlobally.ts +2 -1
- package/src/hooks/honey/useCappedRelatively.ts +1 -1
- package/src/hooks/honey/useCollateralWeights.ts +2 -1
- package/src/hooks/honey/useHoneyAlerts.ts +11 -11
- package/src/hooks/honey/useHoneyBalances.ts +7 -3
- package/src/hooks/honey/useHoneyGlobalData.ts +2 -1
- package/src/hooks/honey/useHoneySwapState.ts +2 -1
- package/src/hooks/honey/useHoneyVaultsBalance.ts +1 -1
- package/src/hooks/honey/useIsBadCollateralAsset.ts +2 -1
- package/src/hooks/honey/useIsBasketModeEnabled.ts +1 -1
- package/src/hooks/honey/usePythLatestPrices.ts +1 -1
- package/src/hooks/pol/useOnChainRewardVault.ts +3 -2
- package/src/hooks/pol/usePollGlobalData.ts +1 -1
- package/src/hooks/pol/usePollMarkets.ts +1 -1
- package/src/hooks/pol/useQueuedBeraUnlock.ts +17 -15
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +6 -3
- package/src/hooks/pol/useRewardVault.ts +1 -1
- package/src/hooks/pol/useRewardVaults.ts +1 -1
- package/src/hooks/pol/useSWBeraVaultMetadata.ts +35 -0
- package/src/hooks/pol/useStakedAPR.ts +38 -0
- package/src/hooks/pol/useStakedData.ts +117 -0
- package/src/hooks/pol/useStakedSnapshots.ts +52 -0
- package/src/hooks/pol/useTotalStakedAmount.ts +30 -0
- package/src/hooks/pol/useUserVaultInfo.ts +1 -1
- package/src/hooks/pol/useVaultValidators.ts +1 -1
- package/src/hooks/tokens/useMultipleTokenInformation.ts +15 -6
- package/src/hooks/tokens/usePollAllowances.ts +15 -19
- package/src/hooks/tokens/usePollBalance.ts +8 -4
- package/src/hooks/tokens/usePollWalletBalances.ts +14 -11
- package/src/hooks/tokens/useStakingTokenInformation.ts +2 -1
- package/src/hooks/tokens/useTokenCurrentPrice.ts +4 -2
- package/src/hooks/tokens/useTokenCurrentPrices.ts +92 -13
- package/src/hooks/tokens/useTokenInformation.ts +11 -6
- package/src/hooks/tokens/useTokenPrice.ts +21 -0
- package/src/hooks/tokens/useTokenPrices.ts +133 -0
- package/src/hooks/tokens/useTokens.ts +1 -0
- package/src/hooks/tokens/useUnderlyingAsset.ts +23 -0
- package/src/hooks/transactions/transactionStore.ts +86 -65
- package/src/hooks/transactions/transactionStore.unit.test.ts +54 -1
- package/src/hooks/transactions/useAddRecentTransaction.ts +1 -1
- package/src/hooks/transactions/useRecentTransactions.ts +1 -1
- package/src/hooks/transactions/useSetTransactionStatus.ts +31 -0
- package/src/hooks/useContractWrite/useBeraContractWrite.ts +2 -1
- package/src/hooks/validators/useAllValidators.ts +1 -1
- package/src/hooks/validators/useApiValidator.ts +1 -1
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +1 -1
- package/src/hooks/validators/useManagedValidatorByAccount.ts +1 -1
- package/src/hooks/validators/useManagedValidatorRole.ts +1 -1
- package/src/hooks/validators/useOnChainValidator.ts +1 -1
- package/src/hooks/validators/useStakingPoolBatch.ts +1 -1
- package/src/hooks/validators/useUserActiveValidators.ts +1 -1
- package/src/hooks/validators/useUserBoostsOnValidator.ts +1 -1
- package/src/hooks/validators/useUserClaimableIncentives.ts +8 -8
- package/src/hooks/validators/useValidator.ts +1 -1
- package/src/hooks/validators/useValidatorAnalytics.ts +1 -1
- package/src/hooks/validators/useValidatorCommission.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedCommission.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +1 -1
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
- package/src/types/{dex.ts → dex.d.ts} +96 -67
- package/src/types/{enso.ts → enso.d.ts} +1 -1
- package/src/types/exports.ts +8 -0
- package/src/types/{global.ts → global.d.ts} +1 -30
- package/src/types/{governance.ts → governance.d.ts} +2 -64
- package/src/types/{honeySwap.ts → honeySwap.d.ts} +1 -13
- package/src/types/{pol.ts → pol.d.ts} +12 -1
- package/src/types/staking.d.ts +22 -0
- package/src/utils/createEmitter.ts +122 -0
- package/src/utils/createEmitter.unit.test.ts +149 -0
- package/src/utils/{index.ts → exports.ts} +3 -2
- package/src/utils/filter.ts +34 -0
- package/src/utils/formatNumber.ts +1 -1
- package/src/utils/formatNumber.unit.test.ts +2 -1
- package/src/utils/formatTokenList.ts +4 -10
- package/src/utils/getHoneySwapMessage.test.ts +1 -2
- package/src/utils/getServerSideClient.ts +4 -5
- package/src/utils/isDifferenceExceedingThreshold.ts +1 -1
- package/src/utils/layerZeroScan.ts +122 -0
- package/src/utils/math.ts +1 -1
- package/src/utils/parseWhiskToken.ts +15 -0
- package/src/utils/poolNamings.ts +1 -1
- package/src/utils/tokens.ts +23 -7
- package/dist/HoneyConfigProvider-6PXZJMSU.d.cts +0 -562
- package/dist/HoneyConfigProvider-CwDFrt02.d.ts +0 -562
- package/dist/abi/index.cjs +0 -2
- package/dist/abi/index.cjs.map +0 -1
- package/dist/abi/index.mjs +0 -2
- package/dist/actions/index.cjs +0 -2
- package/dist/actions/index.cjs.map +0 -1
- package/dist/actions/index.mjs +0 -2
- package/dist/aggregatorsRouter-Cny4B_MB.d.cts +0 -593
- package/dist/aggregatorsRouter-Cny4B_MB.d.ts +0 -593
- package/dist/chunk-22MQVFHP.cjs +0 -2
- package/dist/chunk-22MQVFHP.cjs.map +0 -1
- package/dist/chunk-3TKSVFZ3.mjs +0 -2
- package/dist/chunk-3TKSVFZ3.mjs.map +0 -1
- package/dist/chunk-6VF3RF53.cjs +0 -3
- package/dist/chunk-6VF3RF53.cjs.map +0 -1
- package/dist/chunk-6W22TFYA.mjs +0 -2
- package/dist/chunk-6W22TFYA.mjs.map +0 -1
- package/dist/chunk-AMRJ4B36.mjs +0 -2
- package/dist/chunk-AMRJ4B36.mjs.map +0 -1
- package/dist/chunk-DS2ZDVKU.mjs +0 -2
- package/dist/chunk-DS2ZDVKU.mjs.map +0 -1
- package/dist/chunk-ED43NYSE.cjs +0 -2
- package/dist/chunk-ED43NYSE.cjs.map +0 -1
- package/dist/chunk-EU4WFADK.cjs +0 -2
- package/dist/chunk-EU4WFADK.cjs.map +0 -1
- package/dist/chunk-HCTFDGXL.mjs +0 -2
- package/dist/chunk-HCTFDGXL.mjs.map +0 -1
- package/dist/chunk-IOSYBHKU.mjs +0 -2
- package/dist/chunk-IOSYBHKU.mjs.map +0 -1
- package/dist/chunk-JMKLDDKY.cjs +0 -2
- package/dist/chunk-JMKLDDKY.cjs.map +0 -1
- package/dist/chunk-KMKUXP2S.mjs +0 -3
- package/dist/chunk-KMKUXP2S.mjs.map +0 -1
- package/dist/chunk-OJXJ6CZ4.mjs +0 -4
- package/dist/chunk-OJXJ6CZ4.mjs.map +0 -1
- package/dist/chunk-PHIOKO3A.mjs +0 -2
- package/dist/chunk-PHIOKO3A.mjs.map +0 -1
- package/dist/chunk-QCK474XD.cjs +0 -2
- package/dist/chunk-QCK474XD.cjs.map +0 -1
- package/dist/chunk-REDXXUK7.cjs +0 -2
- package/dist/chunk-REDXXUK7.cjs.map +0 -1
- package/dist/chunk-S74ZMG2G.cjs +0 -2
- package/dist/chunk-S74ZMG2G.cjs.map +0 -1
- package/dist/chunk-TOAXF4YW.cjs +0 -2
- package/dist/chunk-TOAXF4YW.cjs.map +0 -1
- package/dist/chunk-UZ5CB33M.cjs +0 -2
- package/dist/chunk-UZ5CB33M.cjs.map +0 -1
- package/dist/chunk-VYWYJR63.mjs +0 -2
- package/dist/chunk-VYWYJR63.mjs.map +0 -1
- package/dist/chunk-XFPTQMAK.cjs +0 -4
- package/dist/chunk-XFPTQMAK.cjs.map +0 -1
- package/dist/chunk-YK4NINF5.mjs +0 -2
- package/dist/chunk-YK4NINF5.mjs.map +0 -1
- package/dist/contexts/index.cjs +0 -2
- package/dist/contexts/index.cjs.map +0 -1
- package/dist/contexts/index.mjs +0 -2
- package/dist/contexts/index.mjs.map +0 -1
- package/dist/enum/index.cjs +0 -2
- package/dist/enum/index.cjs.map +0 -1
- package/dist/enum/index.d.cts +0 -31
- package/dist/enum/index.d.ts +0 -31
- package/dist/enum/index.mjs +0 -2
- package/dist/enum/index.mjs.map +0 -1
- package/dist/errors/index.cjs +0 -2
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.d.cts +0 -204
- package/dist/errors/index.d.ts +0 -204
- package/dist/errors/index.mjs +0 -2
- package/dist/errors/index.mjs.map +0 -1
- package/dist/hooks/index.cjs +0 -4
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.mjs +0 -4
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/staking-F9Nx9TKD.d.ts +0 -246
- package/dist/staking-f4BpYH7l.d.cts +0 -246
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -56
- package/dist/types/index.d.ts +0 -56
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
- package/dist/utils/index.cjs +0 -2
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.mjs +0 -2
- package/dist/utils/index.mjs.map +0 -1
- package/src/actions/dex/getTransactionCount.ts +0 -29
- package/src/actions/enso/bend.ts +0 -143
- package/src/actions/enso/getEnsoUserToken.debug.test.ts +0 -57
- package/src/contexts/berajsProvider/context.tsx +0 -49
- package/src/contexts/berajsProvider/index.ts +0 -2
- package/src/contexts/berajsProvider/useBeraJs.ts +0 -18
- package/src/hooks/dex/usePollVaultIsPaused.ts +0 -30
- package/src/hooks/enso/useBendTransactionRequests.ts +0 -247
- package/src/hooks/enso/useEnsoZap.ts +0 -166
- package/src/hooks/enso/useZapTransactionRequests.ts +0 -81
- package/src/hooks/pol/useEarnedStakedBeraVault.ts +0 -59
- package/src/hooks/pol/useStakedBeraSnapshots.ts +0 -27
- package/src/hooks/validators/validatorRoleManager.ts +0 -0
- package/src/types/index.ts +0 -8
- package/src/types/staking.ts +0 -7
- package/src/utils/formatAggregatorsQuotes.ts +0 -57
- package/src/utils/formatAggregatorsQuotes.unit.test.ts +0 -191
- package/src/utils/sentryBeforeSend.ts +0 -52
- /package/dist/{abi/index.mjs.map → errors/exports.mjs.map} +0 -0
- /package/dist/{actions/index.mjs.map → types/exports.mjs.map} +0 -0
- /package/src/actions/dex/{__tests__ → aggregators}/haiku.integration.test.ts +0 -0
- /package/src/types/{bribe-boost.ts → bribe-boost.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var L=(O=>(O.ENSO_ROUTER="enso.router",O.POL_REWARD_VAULT="pol.rewardVault",O.BEX_POOL="bex.pool",O.ERC20="others.erc20",O.ERC4626="others.erc4626",O.POL_STAKE_VAULT="pol.stakeVault",O.BEX_EXPLOITED_FUND_DISTRIBUTOR="bex.exploitedFundDistributor",O.TW_MINIMAL_ACCOUNT="thirdweb.minimalAccount",O))(L||{});var A=(D=>(D.Governance="Governance",D.Fixed="Fixed",D.Custom="Custom",D))(A||{}),I= exports.c =(C=>(C.USDBACKED="USD-Backed Stablecoin",C.ALGORITHMIC="Algorithmic Stablecoin",C))(I||{}),S= exports.d =(N=>(N.POOL_TYPE="Pool Type",N.SELECT_TOKENS="Select Tokens",N.DEPOSIT_LIQUIDITY="Deposit Liquidity",N.SET_PARAMETERS="Set Parameters",N.SET_INFO="Set Info",N))(S||{}),U= exports.e =(_=>(_.ERC4626="Mint",_.Oogabooga="Oogabooga",_.Fly="Fly",_.HubPools="Hub Pools",_.Wrap="Wrap",_.Unwrap="Unwrap",_.KyberSwap="KyberSwap",_.OpenOcean="OpenOcean",_.Haiku="Haiku",_.Enso="Enso",_.EnsoErc4626="Enso (Mint)",_.RedeemBgt="RedeemBgt",_.Honey="Honey",_))(U||{}),P= exports.f =(C=>(C.SWAP="SWAP",C.ZAP="ZAP",C))(P||{});var B=(R=>(R.RESET_AMOUNTS="RESET_AMOUNTS",R.ACTION_TYPE_CHANGE="ACTION_TYPE_CHANGE",R.COLLATERALS_CHANGE="COLLATERALS_CHANGE",R.FROM_AMOUNT_CHANGE="FROM_AMOUNT_CHANGE",R.TO_AMOUNT_CHANGE="TO_AMOUNT_CHANGE",R.PREVIEW_CHANGE="PREVIEW_CHANGE",R.IS_BASKET_MODE_ENABLED_CHANGE="IS_BASKET_MODE_ENABLED_CHANGE",R.IS_TYPING_CHANGE="IS_TYPING_CHANGE",R.IS_SUBMITTING_CHANGE="IS_SUBMITTING_CHANGE",R.IS_LOADING_CHANGE="IS_LOADING_CHANGE",R))(B||{});var d=(E=>(E.TEST="Test",E.SEND="Send tokens",E.APPROVAL="Approval",E.SWAP="Swap",E.WRAP="Wrap",E.UNWRAP="Unwrap",E.CREATE_POOL="Create Pool",E.ADD_LIQUIDITY="Add Liquidity",E.WITHDRAW_LIQUIDITY="Withdraw Liquidity",E.DELEGATE="Delegate",E.REDELEGATE="Redelegate",E.UNBONDING="Unbonding",E.CANCEL_UNBONDING="Cancel Unbonding",E.SUBMIT_PROPOSAL="Submit Proposal",E.CANCEL_PROPOSAL="Cancel Proposal",E.EXECUTE_PROPOSAL="Execute Proposal",E.QUEUE_PROPOSAL="Queue Proposal",E.VOTE="Vote",E.MODIFY_REWARD_DURATION="Change Reward Duration",E.MODIFY_REWARD_RATE="Change Reward Rate",E.RESET_REWARD_MODE="Reset Reward Mode",E.CREATE_BRIBE="Add Incentives",E.CLAIMING_BRIBES="Claiming Incentives",E.CLAIMING_REWARDS="Claiming BGT",E.CLAIM_ALL_REWARDS="Claim All Rewards",E.RECOVER_FUNDS="Recover Bex Funds",E.REDEEM_BGT="Redeem BGT",E.MINT_HONEY="Mint Honey",E.REDEEM_HONEY="Redeem Honey",E.SUPPLY="Supply",E.WITHDRAW="Withdraw",E.BORROW="Borrow",E.REPAY="Repay",E.STAKE="Stake",E.UNSTAKE="Unstake",E.ENSO_ROUTE="Enso Route",E.MARKET_LONG="Market Long",E.MARKET_SHORT="Market Short",E.LIMIT_LONG="Limit Long",E.LIMIT_SHORT="Limit Short",E.CANCEL_ORDER="Cancel Order",E.CANCEL_ALL_ORDERS="Cancel All Orders",E.EDIT_PERPS_ORDER="Edit Perps Order",E.DEPOSIT_HONEY="Deposit Honey",E.START_WITHDRAW_REQUEST="Start Withdraw Request",E.CANCEL_WITHDRAW_REQUEST="Cancel Withdraw Request",E.WITHDRAW_HONEY="Withdraw Honey",E.DELEGATE_OCT="Delegate",E.REVOKE_OCT="Revoke",E.REFER="Refer",E.CREATE_REWARDS_VAULT="Create Reward Vault",E.APPLYING_REWARD_ALLOCATION="Apply Reward Allocation",E.APPLYING_OPERATOR_CHANGE="Apply Operator Change",E.CANCELING_OPERATOR_CHANGE="Cancel Operator Change",E.REQUEST_OPERATOR_CHANGE="Request Operator Change",E.APPLYING_REWARD_ALLOCATOR_CHANGE="Apply Reward Allocator Change",E.APPLYING_COMMISSION_CHANGE="Apply Commission Change",E.BONDING_BERA="Stake BERA",E.ZAP_STAKE_BERA="Zap Stake BERA",E.UNBONDING_BERA="Unstake BERA",E.QUEUE_UNBONDING_BERA="Queue Unstake BERA",E.BEND_MARKET_REPAY_AND_WITHDRAW_COLLATERAL="Bend Market Repay and Withdraw Collateral",E.BEND_MARKET_SUPPLY_COLLATERAL_AND_BORROW="Bend Market Supply Collateral and Borrow",E.BEND_VAULT_SUPPLY="Bend Vault Supply",E.BEND_VAULT_WITHDRAW="Bend Vault Withdraw",E.BEND_CURATOR_REALLOCATE="Bend Curator Reallocate",E.BEND_CURATOR_UPDATE_MARKET_SUPPLY_CAP="Bend Curator Update Market Supply Cap",E.BEND_CURATOR_REVOKE_PENDING_SUPPLY_CAP="Bend Curator Revoke Pending Supply Cap",E.BEND_CURATOR_ACCEPT_PENDING_SUPPLY_CAP="Bend Curator Accept Pending Supply Cap",E.BEND_CURATOR_UPDATE_SUPPLY_QUEUE="Bend Curator Update Supply Queue",E.BEND_CURATOR_UPDATE_WITHDRAW_QUEUE="Bend Curator Update Withdraw Queue",E.BEND_CURATOR_TRANSFER_OWNER="Bend Curator Transfer Owner",E.BEND_CURATOR_CHANGE_GUARDIAN="Bend Curator Change Guardian",E.BEND_CURATOR_SET_CURATOR="Bend Curator Set Curator",E.BEND_CURATOR_SET_ALLOCATOR="Bend Curator Set Allocator",E))(d||{});exports.a = L; exports.b = A; exports.c = I; exports.d = S; exports.e = U; exports.f = P; exports.g = B; exports.h = d;
|
|
2
|
+
//# sourceMappingURL=chunk-SWMJQOH6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/enum/contracts.ts","../src/enum/dex.ts","../src/enum/honey.ts","../src/enum/txnEnum.ts"],"names":["ContractName","OwnershipType","ParameterPreset","PoolCreationStep","Aggregators","SwapReferrer","HoneySwapAction","TransactionActionType"],"mappings":"AAGO,6EAAKA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,WAAA,CA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CAAAA,CAAA,wCAAA,CAA2C,0CAAA,CAC3CA,CAAAA,CAAA,iBAAA,CAAoB,mBAAA,CACpBA,CAAAA,CAAA,mBAAA,CAAsB,qBAAA,CAGtBA,CAAAA,CAAA,uBAAA,CAA0B,yBAAA,CAC1BA,CAAAA,CAAA,qCAAA,CAAwC,uCAAA,CACxCA,CAAAA,CAAA,sCAAA,CAAyC,wCAAA,CACzCA,CAAAA,CAAA,sCAAA,CAAyC,wCAAA,CACzCA,CAAAA,CAAA,gCAAA,CAAmC,kCAAA,CACnCA,CAAAA,CAAA,kCAAA,CAAqC,oCAAA,CACrCA,CAAAA,CAAA,2BAAA,CAA8B,6BAAA,CAC9BA,CAAAA,CAAA,4BAAA,CAA+B,8BAAA,CAC/BA,CAAAA,CAAA,wBAAA,CAA2B,0BAAA,CAC3BA,CAAAA,CAAA,0BAAA,CAA6B,4BAAA,CApGnBA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAAA,uHAAA","file":"/Users/pong/coding/monobera/packages/berajs/dist/chunk-SWMJQOH6.cjs","sourcesContent":["/**\n * A list of contract names that are not mapped in the devrel's contract mapping or that are generated by factories (e.g. RewardVault).\n */\nexport enum ContractName {\n ENSO_ROUTER = \"enso.router\",\n POL_REWARD_VAULT = \"pol.rewardVault\",\n BEX_POOL = \"bex.pool\",\n ERC20 = \"others.erc20\",\n ERC4626 = \"others.erc4626\",\n POL_STAKE_VAULT = \"pol.stakeVault\",\n BEX_EXPLOITED_FUND_DISTRIBUTOR = \"bex.exploitedFundDistributor\",\n TW_MINIMAL_ACCOUNT = \"thirdweb.minimalAccount\",\n}\n","export enum OwnershipType {\n Governance = \"Governance\",\n Fixed = \"Fixed\",\n Custom = \"Custom\",\n}\n\nexport enum ParameterPreset {\n USDBACKED = \"USD-Backed Stablecoin\",\n ALGORITHMIC = \"Algorithmic Stablecoin\",\n}\n\nexport enum PoolCreationStep {\n POOL_TYPE = \"Pool Type\",\n SELECT_TOKENS = \"Select Tokens\",\n DEPOSIT_LIQUIDITY = \"Deposit Liquidity\",\n SET_PARAMETERS = \"Set Parameters\",\n SET_INFO = \"Set Info\",\n}\n\nexport enum Aggregators {\n ERC4626 = \"Mint\",\n Oogabooga = \"Oogabooga\",\n Fly = \"Fly\",\n HubPools = \"Hub Pools\",\n Wrap = \"Wrap\",\n Unwrap = \"Unwrap\",\n KyberSwap = \"KyberSwap\",\n OpenOcean = \"OpenOcean\",\n Haiku = \"Haiku\",\n Enso = \"Enso\",\n EnsoErc4626 = \"Enso (Mint)\",\n RedeemBgt = \"RedeemBgt\",\n Honey = \"Honey\",\n}\n\nexport enum SwapReferrer {\n SWAP = \"SWAP\",\n ZAP = \"ZAP\",\n}\n","export enum HoneySwapAction {\n RESET_AMOUNTS = \"RESET_AMOUNTS\",\n ACTION_TYPE_CHANGE = \"ACTION_TYPE_CHANGE\",\n COLLATERALS_CHANGE = \"COLLATERALS_CHANGE\",\n FROM_AMOUNT_CHANGE = \"FROM_AMOUNT_CHANGE\",\n TO_AMOUNT_CHANGE = \"TO_AMOUNT_CHANGE\",\n PREVIEW_CHANGE = \"PREVIEW_CHANGE\",\n IS_BASKET_MODE_ENABLED_CHANGE = \"IS_BASKET_MODE_ENABLED_CHANGE\",\n IS_TYPING_CHANGE = \"IS_TYPING_CHANGE\",\n IS_SUBMITTING_CHANGE = \"IS_SUBMITTING_CHANGE\",\n IS_LOADING_CHANGE = \"IS_LOADING_CHANGE\",\n}\n","export enum TransactionActionType {\n /**\n * Used for testing purposes.\n */\n TEST = \"Test\",\n\n // used to send gas token on ERC20\n SEND = \"Send tokens\",\n\n APPROVAL = \"Approval\",\n SWAP = \"Swap\",\n WRAP = \"Wrap\",\n UNWRAP = \"Unwrap\",\n\n CREATE_POOL = \"Create Pool\",\n ADD_LIQUIDITY = \"Add Liquidity\",\n WITHDRAW_LIQUIDITY = \"Withdraw Liquidity\",\n\n DELEGATE = \"Delegate\",\n REDELEGATE = \"Redelegate\",\n UNBONDING = \"Unbonding\",\n CANCEL_UNBONDING = \"Cancel Unbonding\",\n\n SUBMIT_PROPOSAL = \"Submit Proposal\",\n CANCEL_PROPOSAL = \"Cancel Proposal\",\n EXECUTE_PROPOSAL = \"Execute Proposal\",\n QUEUE_PROPOSAL = \"Queue Proposal\",\n VOTE = \"Vote\",\n\n MODIFY_REWARD_DURATION = \"Change Reward Duration\",\n MODIFY_REWARD_RATE = \"Change Reward Rate\",\n RESET_REWARD_MODE = \"Reset Reward Mode\",\n CREATE_BRIBE = \"Add Incentives\",\n CLAIMING_BRIBES = \"Claiming Incentives\", // claiming others\n CLAIMING_REWARDS = \"Claiming BGT\",\n CLAIM_ALL_REWARDS = \"Claim All Rewards\",\n\n RECOVER_FUNDS = \"Recover Bex Funds\",\n\n REDEEM_BGT = \"Redeem BGT\",\n\n MINT_HONEY = \"Mint Honey\",\n REDEEM_HONEY = \"Redeem Honey\",\n\n SUPPLY = \"Supply\",\n WITHDRAW = \"Withdraw\",\n BORROW = \"Borrow\",\n REPAY = \"Repay\",\n\n STAKE = \"Stake\",\n UNSTAKE = \"Unstake\",\n\n ENSO_ROUTE = \"Enso Route\",\n // PERPS\n\n MARKET_LONG = \"Market Long\",\n MARKET_SHORT = \"Market Short\",\n LIMIT_LONG = \"Limit Long\",\n LIMIT_SHORT = \"Limit Short\",\n CANCEL_ORDER = \"Cancel Order\",\n CANCEL_ALL_ORDERS = \"Cancel All Orders\",\n EDIT_PERPS_ORDER = \"Edit Perps Order\",\n DEPOSIT_HONEY = \"Deposit Honey\",\n START_WITHDRAW_REQUEST = \"Start Withdraw Request\",\n CANCEL_WITHDRAW_REQUEST = \"Cancel Withdraw Request\",\n WITHDRAW_HONEY = \"Withdraw Honey\",\n DELEGATE_OCT = \"Delegate\",\n REVOKE_OCT = \"Revoke\",\n REFER = \"Refer\",\n\n // POL\n CREATE_REWARDS_VAULT = \"Create Reward Vault\",\n APPLYING_REWARD_ALLOCATION = \"Apply Reward Allocation\",\n APPLYING_OPERATOR_CHANGE = \"Apply Operator Change\",\n CANCELING_OPERATOR_CHANGE = \"Cancel Operator Change\",\n REQUEST_OPERATOR_CHANGE = \"Request Operator Change\",\n APPLYING_REWARD_ALLOCATOR_CHANGE = \"Apply Reward Allocator Change\",\n APPLYING_COMMISSION_CHANGE = \"Apply Commission Change\",\n\n BONDING_BERA = \"Stake BERA\",\n ZAP_STAKE_BERA = \"Zap Stake BERA\",\n UNBONDING_BERA = \"Unstake BERA\",\n QUEUE_UNBONDING_BERA = \"Queue Unstake BERA\",\n\n // BEND\n BEND_MARKET_REPAY_AND_WITHDRAW_COLLATERAL = \"Bend Market Repay and Withdraw Collateral\",\n BEND_MARKET_SUPPLY_COLLATERAL_AND_BORROW = \"Bend Market Supply Collateral and Borrow\",\n BEND_VAULT_SUPPLY = \"Bend Vault Supply\",\n BEND_VAULT_WITHDRAW = \"Bend Vault Withdraw\",\n\n // BEND CURATOR\n BEND_CURATOR_REALLOCATE = \"Bend Curator Reallocate\",\n BEND_CURATOR_UPDATE_MARKET_SUPPLY_CAP = \"Bend Curator Update Market Supply Cap\",\n BEND_CURATOR_REVOKE_PENDING_SUPPLY_CAP = \"Bend Curator Revoke Pending Supply Cap\",\n BEND_CURATOR_ACCEPT_PENDING_SUPPLY_CAP = \"Bend Curator Accept Pending Supply Cap\",\n BEND_CURATOR_UPDATE_SUPPLY_QUEUE = \"Bend Curator Update Supply Queue\",\n BEND_CURATOR_UPDATE_WITHDRAW_QUEUE = \"Bend Curator Update Withdraw Queue\",\n BEND_CURATOR_TRANSFER_OWNER = \"Bend Curator Transfer Owner\",\n BEND_CURATOR_CHANGE_GUARDIAN = \"Bend Curator Change Guardian\",\n BEND_CURATOR_SET_CURATOR = \"Bend Curator Set Curator\",\n BEND_CURATOR_SET_ALLOCATOR = \"Bend Curator Set Allocator\",\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=[{type:"constructor",inputs:[{name:"_wbera",type:"address",internalType:"address"},{name:"_feeReceiver",type:"address",internalType:"address"},{name:"_owner",type:"address",internalType:"address"}],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"},{type:"function",name:"BERACHEF_ADDRESS",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"DEFAULT_ADMIN_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"MANAGER_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"ONE_HUNDRED_PERCENT",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"PAUSER_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"SWAP_FEE_RATE",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"aggregators",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"executor",inputs:[],outputs:[{name:"",type:"address",internalType:"contract MetaAggregatorExecutor"}],stateMutability:"view"},{type:"function",name:"feeReceiver",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getRoleAdmin",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"grantRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"hasRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"pause",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"paused",inputs:[],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"renounceRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"callerConfirmation",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"rescueBERA",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"rescueTokens",inputs:[{name:"token",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"revokeRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setFeeReceiver",inputs:[{name:"_feeReceiver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"swap",inputs:[{name:"inputData",type:"tuple",internalType:"struct SwapInputData",components:[{name:"tokenIn",type:"address",internalType:"address"},{name:"amountIn",type:"uint256",internalType:"uint256"},{name:"isNative",type:"bool",internalType:"bool"},{name:"isPermit2Approval",type:"bool",internalType:"bool"},{name:"permit2SpenderAddress",type:"address",internalType:"address"}]},{name:"outputData",type:"tuple",internalType:"struct SwapOutputData",components:[{name:"tokenOut",type:"address",internalType:"address"},{name:"receiver",type:"address",internalType:"address"},{name:"minAmountOut",type:"uint256",internalType:"uint256"},{name:"isNative",type:"bool",internalType:"bool"}]},{name:"aggregatorData",type:"tuple",internalType:"struct AggregatorData",components:[{name:"aggregator",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}]},{name:"swapAndStakeData",type:"tuple",internalType:"struct SwapAndStakeData",components:[{name:"isSwapAndStake",type:"bool",internalType:"bool"},{name:"rewardVault",type:"address",internalType:"address"}]}],outputs:[{name:"amountOut",type:"uint256",internalType:"uint256"}],stateMutability:"payable"},{type:"function",name:"unpause",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"wbera",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IWBERA"}],stateMutability:"view"},{type:"function",name:"whitelistAggregator",inputs:[{name:"aggregator",type:"address",internalType:"address"},{name:"whitelistStatus",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"event",name:"AggregatorWhitelisted",inputs:[{name:"aggregator",type:"address",indexed:!0,internalType:"address"},{name:"whitelistStatus",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"FeeReceiverSet",inputs:[{name:"newFeeReceiver",type:"address",indexed:!0,internalType:"address"},{name:"previousFeeReceiver",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Paused",inputs:[{name:"account",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"RoleAdminChanged",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"previousAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"newAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"RoleGranted",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"RoleRevoked",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Swap",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"tokenIn",type:"address",indexed:!1,internalType:"address"},{name:"amountIn",type:"uint256",indexed:!1,internalType:"uint256"},{name:"aggregator",type:"address",indexed:!0,internalType:"address"},{name:"tokenOut",type:"address",indexed:!0,internalType:"address"},{name:"amountOut",type:"uint256",indexed:!1,internalType:"uint256"},{name:"fees",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"SwapAndStake",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"rewardVault",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Unpaused",inputs:[{name:"account",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"error",name:"AccessControlBadConfirmation",inputs:[]},{type:"error",name:"AccessControlUnauthorizedAccount",inputs:[{name:"account",type:"address",internalType:"address"},{name:"neededRole",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"AggregatorNotWhitelisted",inputs:[]},{type:"error",name:"EnforcedPause",inputs:[]},{type:"error",name:"ExpectedPause",inputs:[]},{type:"error",name:"InvalidInputToken",inputs:[]},{type:"error",name:"InvalidNativeTokenAmount",inputs:[]},{type:"error",name:"InvalidOutputToken",inputs:[]},{type:"error",name:"Reentrancy",inputs:[]},{type:"error",name:"RewardVaultNotWhitelisted",inputs:[]},{type:"error",name:"TokenOutCannotBeSame",inputs:[]},{type:"error",name:"TokenOutIsNotStakeToken",inputs:[]},{type:"error",name:"ZeroAddress",inputs:[]}];var n=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"},{internalType:"contract WeightedPoolFactory",name:"_weightedPoolFactory",type:"address"},{internalType:"contract IComposableStablePoolFactoryCreateV6",name:"_composableStablePoolFactory",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"ComposableStablePoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"WeightedPoolCreated",type:"event"},{inputs:[],name:"composableStablePoolFactory",outputs:[{internalType:"contract IComposableStablePoolFactoryCreateV6",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"createPoolTokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool",name:"exemptFromYieldProtocolFeeFlag",type:"bool"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"bool",name:"joinWBERAPoolWithBERA",type:"bool"}],name:"createAndJoinStablePool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"createPoolTokens",type:"address[]"},{internalType:"contract IERC20[]",name:"joinPoolTokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"createAndJoinWeightedPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"wBERA",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"weightedPoolFactory",outputs:[{internalType:"contract WeightedPoolFactory",name:"",type:"address"}],stateMutability:"view",type:"function"},{stateMutability:"payable",type:"receive"}];var s=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"},{type:"function",name:"CANCELLER_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"DEFAULT_ADMIN_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"EXECUTOR_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"PROPOSER_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"UPGRADE_INTERFACE_VERSION",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"cancel",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"execute",inputs:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"payload",type:"bytes",internalType:"bytes"},{name:"predecessor",type:"bytes32",internalType:"bytes32"},{name:"salt",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"payable"},{type:"function",name:"executeBatch",inputs:[{name:"targets",type:"address[]",internalType:"address[]"},{name:"values",type:"uint256[]",internalType:"uint256[]"},{name:"payloads",type:"bytes[]",internalType:"bytes[]"},{name:"predecessor",type:"bytes32",internalType:"bytes32"},{name:"salt",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"payable"},{type:"function",name:"getMinDelay",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getOperationState",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint8",internalType:"enum TimelockControllerUpgradeable.OperationState"}],stateMutability:"view"},{type:"function",name:"getRoleAdmin",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getTimestamp",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"grantRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"hasRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"hashOperation",inputs:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"},{name:"predecessor",type:"bytes32",internalType:"bytes32"},{name:"salt",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"hashOperationBatch",inputs:[{name:"targets",type:"address[]",internalType:"address[]"},{name:"values",type:"uint256[]",internalType:"uint256[]"},{name:"payloads",type:"bytes[]",internalType:"bytes[]"},{name:"predecessor",type:"bytes32",internalType:"bytes32"},{name:"salt",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"initialize",inputs:[{name:"minDelay",type:"uint256",internalType:"uint256"},{name:"proposers",type:"address[]",internalType:"address[]"},{name:"executors",type:"address[]",internalType:"address[]"},{name:"admin",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"isOperation",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isOperationDone",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isOperationPending",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isOperationReady",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"onERC1155BatchReceived",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC1155Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC721Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"proxiableUUID",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"renounceRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"callerConfirmation",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"revokeRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"schedule",inputs:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"},{name:"predecessor",type:"bytes32",internalType:"bytes32"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"delay",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"scheduleBatch",inputs:[{name:"targets",type:"address[]",internalType:"address[]"},{name:"values",type:"uint256[]",internalType:"uint256[]"},{name:"payloads",type:"bytes[]",internalType:"bytes[]"},{name:"predecessor",type:"bytes32",internalType:"bytes32"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"delay",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"updateDelay",inputs:[{name:"newDelay",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgradeToAndCall",inputs:[{name:"newImplementation",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"event",name:"CallExecuted",inputs:[{name:"id",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"index",type:"uint256",indexed:!0,internalType:"uint256"},{name:"target",type:"address",indexed:!1,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"},{name:"data",type:"bytes",indexed:!1,internalType:"bytes"}],anonymous:!1},{type:"event",name:"CallSalt",inputs:[{name:"id",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"salt",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"CallScheduled",inputs:[{name:"id",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"index",type:"uint256",indexed:!0,internalType:"uint256"},{name:"target",type:"address",indexed:!1,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"},{name:"data",type:"bytes",indexed:!1,internalType:"bytes"},{name:"predecessor",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"delay",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Cancelled",inputs:[{name:"id",type:"bytes32",indexed:!0,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"Initialized",inputs:[{name:"version",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"MinDelayChange",inputs:[{name:"oldDuration",type:"uint256",indexed:!1,internalType:"uint256"},{name:"newDuration",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"RoleAdminChanged",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"previousAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"newAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"RoleGranted",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"RoleRevoked",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Upgraded",inputs:[{name:"implementation",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"error",name:"AccessControlBadConfirmation",inputs:[]},{type:"error",name:"AccessControlUnauthorizedAccount",inputs:[{name:"account",type:"address",internalType:"address"},{name:"neededRole",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"AddressEmptyCode",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"ERC1967InvalidImplementation",inputs:[{name:"implementation",type:"address",internalType:"address"}]},{type:"error",name:"ERC1967NonPayable",inputs:[]},{type:"error",name:"FailedInnerCall",inputs:[]},{type:"error",name:"InvalidInitialization",inputs:[]},{type:"error",name:"NotInitializing",inputs:[]},{type:"error",name:"TimelockInsufficientDelay",inputs:[{name:"delay",type:"uint256",internalType:"uint256"},{name:"minDelay",type:"uint256",internalType:"uint256"}]},{type:"error",name:"TimelockInvalidOperationLength",inputs:[{name:"targets",type:"uint256",internalType:"uint256"},{name:"payloads",type:"uint256",internalType:"uint256"},{name:"values",type:"uint256",internalType:"uint256"}]},{type:"error",name:"TimelockUnauthorizedCaller",inputs:[{name:"caller",type:"address",internalType:"address"}]},{type:"error",name:"TimelockUnexecutedPredecessor",inputs:[{name:"predecessorId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"TimelockUnexpectedOperationState",inputs:[{name:"operationId",type:"bytes32",internalType:"bytes32"},{name:"expectedStates",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"UUPSUnauthorizedCallContext",inputs:[]},{type:"error",name:"UUPSUnsupportedProxiableUUID",inputs:[{name:"slot",type:"bytes32",internalType:"bytes32"}]}];var p=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];export{e as a,n as b,s as c,p as d};
|
|
2
|
+
//# sourceMappingURL=chunk-TEBJWAVU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/abi/bex/aggregatorsRouter.ts","../src/abi/bex/balancerPoolCreationHelper.ts","../src/abi/governance/governanceTimelock.ts","../src/abi/pol/wbera.ts"],"sourcesContent":["export const aggregatorsRouterAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"_wbera\", type: \"address\", internalType: \"address\" },\n { name: \"_feeReceiver\", type: \"address\", internalType: \"address\" },\n { name: \"_owner\", type: \"address\", internalType: \"address\" },\n ],\n stateMutability: \"nonpayable\",\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"BERACHEF_ADDRESS\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"DEFAULT_ADMIN_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"MANAGER_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"ONE_HUNDRED_PERCENT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"PAUSER_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"SWAP_FEE_RATE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"aggregators\",\n inputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"executor\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract MetaAggregatorExecutor\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"feeReceiver\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getRoleAdmin\",\n inputs: [{ name: \"role\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"grantRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"hasRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"pause\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"paused\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"renounceRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"callerConfirmation\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"rescueBERA\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"rescueTokens\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"revokeRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"setFeeReceiver\",\n inputs: [\n { name: \"_feeReceiver\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"swap\",\n inputs: [\n {\n name: \"inputData\",\n type: \"tuple\",\n internalType: \"struct SwapInputData\",\n components: [\n { name: \"tokenIn\", type: \"address\", internalType: \"address\" },\n { name: \"amountIn\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"isNative\", type: \"bool\", internalType: \"bool\" },\n { name: \"isPermit2Approval\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permit2SpenderAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n },\n {\n name: \"outputData\",\n type: \"tuple\",\n internalType: \"struct SwapOutputData\",\n components: [\n { name: \"tokenOut\", type: \"address\", internalType: \"address\" },\n { name: \"receiver\", type: \"address\", internalType: \"address\" },\n { name: \"minAmountOut\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"isNative\", type: \"bool\", internalType: \"bool\" },\n ],\n },\n {\n name: \"aggregatorData\",\n type: \"tuple\",\n internalType: \"struct AggregatorData\",\n components: [\n { name: \"aggregator\", type: \"address\", internalType: \"address\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n {\n name: \"swapAndStakeData\",\n type: \"tuple\",\n internalType: \"struct SwapAndStakeData\",\n components: [\n { name: \"isSwapAndStake\", type: \"bool\", internalType: \"bool\" },\n { name: \"rewardVault\", type: \"address\", internalType: \"address\" },\n ],\n },\n ],\n outputs: [{ name: \"amountOut\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"unpause\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"wbera\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"contract IWBERA\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"whitelistAggregator\",\n inputs: [\n { name: \"aggregator\", type: \"address\", internalType: \"address\" },\n { name: \"whitelistStatus\", type: \"bool\", internalType: \"bool\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"event\",\n name: \"AggregatorWhitelisted\",\n inputs: [\n {\n name: \"aggregator\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"whitelistStatus\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"FeeReceiverSet\",\n inputs: [\n {\n name: \"newFeeReceiver\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"previousFeeReceiver\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Paused\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"RoleAdminChanged\",\n inputs: [\n {\n name: \"role\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"previousAdminRole\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"newAdminRole\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"RoleGranted\",\n inputs: [\n {\n name: \"role\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sender\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"RoleRevoked\",\n inputs: [\n {\n name: \"role\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sender\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Swap\",\n inputs: [\n {\n name: \"sender\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"tokenIn\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"amountIn\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"aggregator\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"tokenOut\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"amountOut\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"fees\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SwapAndStake\",\n inputs: [\n {\n name: \"sender\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"receiver\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"rewardVault\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"amount\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Unpaused\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n { type: \"error\", name: \"AccessControlBadConfirmation\", inputs: [] },\n {\n type: \"error\",\n name: \"AccessControlUnauthorizedAccount\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"neededRole\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n { type: \"error\", name: \"AggregatorNotWhitelisted\", inputs: [] },\n { type: \"error\", name: \"EnforcedPause\", inputs: [] },\n { type: \"error\", name: \"ExpectedPause\", inputs: [] },\n { type: \"error\", name: \"InvalidInputToken\", inputs: [] },\n { type: \"error\", name: \"InvalidNativeTokenAmount\", inputs: [] },\n { type: \"error\", name: \"InvalidOutputToken\", inputs: [] },\n { type: \"error\", name: \"Reentrancy\", inputs: [] },\n { type: \"error\", name: \"RewardVaultNotWhitelisted\", inputs: [] },\n { type: \"error\", name: \"TokenOutCannotBeSame\", inputs: [] },\n { type: \"error\", name: \"TokenOutIsNotStakeToken\", inputs: [] },\n { type: \"error\", name: \"ZeroAddress\", inputs: [] },\n] as const;\n","export const balancerPoolCreationHelperAbi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n {\n internalType: \"contract WeightedPoolFactory\",\n name: \"_weightedPoolFactory\",\n type: \"address\",\n },\n {\n internalType: \"contract IComposableStablePoolFactoryCreateV6\",\n name: \"_composableStablePoolFactory\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n indexed: false,\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"ComposableStablePoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n indexed: false,\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"WeightedPoolCreated\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"composableStablePoolFactory\",\n outputs: [\n {\n internalType: \"contract IComposableStablePoolFactoryCreateV6\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"createPoolTokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool\",\n name: \"exemptFromYieldProtocolFeeFlag\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n {\n internalType: \"bool\",\n name: \"joinWBERAPoolWithBERA\",\n type: \"bool\",\n },\n ],\n name: \"createAndJoinStablePool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"createPoolTokens\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"joinPoolTokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"createAndJoinWeightedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"wBERA\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"weightedPoolFactory\",\n outputs: [\n {\n internalType: \"contract WeightedPoolFactory\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n","export const governanceTimelockAbi = [\n { type: \"constructor\", inputs: [], stateMutability: \"nonpayable\" },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"CANCELLER_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"DEFAULT_ADMIN_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"EXECUTOR_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"PROPOSER_ROLE\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"UPGRADE_INTERFACE_VERSION\",\n inputs: [],\n outputs: [{ name: \"\", type: \"string\", internalType: \"string\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"cancel\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"payload\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"targets\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"payloads\", type: \"bytes[]\", internalType: \"bytes[]\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"getMinDelay\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationState\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum TimelockControllerUpgradeable.OperationState\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getRoleAdmin\",\n inputs: [{ name: \"role\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getTimestamp\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"grantRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"hasRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"hashOperation\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"pure\",\n },\n {\n type: \"function\",\n name: \"hashOperationBatch\",\n inputs: [\n { name: \"targets\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"payloads\", type: \"bytes[]\", internalType: \"bytes[]\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"pure\",\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n { name: \"minDelay\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"proposers\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"executors\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"admin\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"isOperation\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isOperationDone\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isOperationPending\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isOperationReady\",\n inputs: [{ name: \"id\", type: \"bytes32\", internalType: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"renounceRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"callerConfirmation\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"revokeRole\",\n inputs: [\n { name: \"role\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"schedule\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"delay\", type: \"uint256\", internalType: \"uint256\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"scheduleBatch\",\n inputs: [\n { name: \"targets\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"payloads\", type: \"bytes[]\", internalType: \"bytes[]\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"delay\", type: \"uint256\", internalType: \"uint256\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"updateDelay\",\n inputs: [{ name: \"newDelay\", type: \"uint256\", internalType: \"uint256\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n { name: \"newImplementation\", type: \"address\", internalType: \"address\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"payable\",\n },\n {\n type: \"event\",\n name: \"CallExecuted\",\n inputs: [\n { name: \"id\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n {\n name: \"index\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\",\n },\n {\n name: \"target\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n { name: \"data\", type: \"bytes\", indexed: false, internalType: \"bytes\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"CallSalt\",\n inputs: [\n { name: \"id\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n {\n name: \"salt\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"CallScheduled\",\n inputs: [\n { name: \"id\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n {\n name: \"index\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\",\n },\n {\n name: \"target\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n { name: \"data\", type: \"bytes\", indexed: false, internalType: \"bytes\" },\n {\n name: \"predecessor\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"delay\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Cancelled\",\n inputs: [\n { name: \"id\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"MinDelayChange\",\n inputs: [\n {\n name: \"oldDuration\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"newDuration\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"RoleAdminChanged\",\n inputs: [\n {\n name: \"role\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"previousAdminRole\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"newAdminRole\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"RoleGranted\",\n inputs: [\n {\n name: \"role\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sender\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"RoleRevoked\",\n inputs: [\n {\n name: \"role\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sender\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n { type: \"error\", name: \"AccessControlBadConfirmation\", inputs: [] },\n {\n type: \"error\",\n name: \"AccessControlUnauthorizedAccount\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"neededRole\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"ERC1967InvalidImplementation\",\n inputs: [\n { name: \"implementation\", type: \"address\", internalType: \"address\" },\n ],\n },\n { type: \"error\", name: \"ERC1967NonPayable\", inputs: [] },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n {\n type: \"error\",\n name: \"TimelockInsufficientDelay\",\n inputs: [\n { name: \"delay\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minDelay\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"TimelockInvalidOperationLength\",\n inputs: [\n { name: \"targets\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"payloads\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"values\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"TimelockUnauthorizedCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"TimelockUnexecutedPredecessor\",\n inputs: [\n { name: \"predecessorId\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n {\n type: \"error\",\n name: \"TimelockUnexpectedOperationState\",\n inputs: [\n { name: \"operationId\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"expectedStates\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n { type: \"error\", name: \"UUPSUnauthorizedCallContext\", inputs: [] },\n {\n type: \"error\",\n name: \"UUPSUnsupportedProxiableUUID\",\n inputs: [{ name: \"slot\", type: \"bytes32\", internalType: \"bytes32\" }],\n },\n] as const;\n","export const wberaAbi = [\n {\n inputs: [],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"Deposit\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"Withdrawal\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"deposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n"],"mappings":"AAAO,IAAMA,EAAuB,CAClC,CACE,KAAM,cACN,OAAQ,CACN,CAAE,KAAM,SAAU,KAAM,UAAW,aAAc,SAAU,EAC3D,CAAE,KAAM,eAAgB,KAAM,UAAW,aAAc,SAAU,EACjE,CAAE,KAAM,SAAU,KAAM,UAAW,aAAc,SAAU,CAC7D,EACA,gBAAiB,YACnB,EACA,CAAE,KAAM,UAAW,gBAAiB,SAAU,EAC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,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,cACN,OAAQ,CACN,CACE,KAAM,OACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,UACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,cACN,OAAQ,CACN,CACE,KAAM,OACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,UACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,OACN,OAAQ,CACN,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,UACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,WACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,aACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,WACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,YACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,OACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,eACN,OAAQ,CACN,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,WACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,cACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,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AAS,GACT,aAAc,SACd,KAAM,SACN,KAAM,QACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,8BACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,SACd,KAAM,OACN,KAAM,QACR,EACA,CACE,QAAS,GACT,aAAc,SACd,KAAM,SACN,KAAM,QACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,sBACN,KAAM,OACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,8BACN,QAAS,CACP,CACE,aAAc,gDACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,OACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,SACN,KAAM,QACR,EACA,CACE,aAAc,oBACd,KAAM,mBACN,KAAM,WACR,EACA,CACE,aAAc,UACd,KAAM,yBACN,KAAM,SACR,EACA,CACE,aAAc,2BACd,KAAM,gBACN,KAAM,WACR,EACA,CACE,aAAc,YACd,KAAM,0BACN,KAAM,WACR,EACA,CACE,aAAc,OACd,KAAM,iCACN,KAAM,MACR,EACA,CACE,aAAc,UACd,KAAM,oBACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,YACN,KAAM,WACR,EACA,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,EACA,CACE,aAAc,OACd,KAAM,wBACN,KAAM,MACR,CACF,EACA,KAAM,0BACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,gBAAiB,UACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,OACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,SACN,KAAM,QACR,EACA,CACE,aAAc,oBACd,KAAM,mBACN,KAAM,WACR,EACA,CACE,aAAc,oBACd,KAAM,iBACN,KAAM,WACR,EACA,CACE,aAAc,YACd,KAAM,oBACN,KAAM,WACR,EACA,CACE,aAAc,2BACd,KAAM,gBACN,KAAM,WACR,EACA,CACE,aAAc,UACd,KAAM,oBACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,YACN,KAAM,WACR,EACA,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,4BACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,gBAAiB,UACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,QACN,QAAS,CACP,CACE,aAAc,kBACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,QACN,QAAS,CACP,CACE,aAAc,kBACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,sBACN,QAAS,CACP,CACE,aAAc,+BACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,gBAAiB,UACjB,KAAM,SACR,CACF,EC1QO,IAAMC,EAAwB,CACnC,CAAE,KAAM,cAAe,OAAQ,CAAC,EAAG,gBAAiB,YAAa,EACjE,CAAE,KAAM,UAAW,gBAAiB,SAAU,EAC9C,CACE,KAAM,WACN,KAAM,iBACN,OAAQ,CAAC,EACT,QAAS,CAAC,CAAE,KAAM,GAAI,KAAM,UAAW,aAAc,SAAU,CAAC,EAChE,gBAAiB,MACnB,EACA,CACE,KAAM,WACN,KAAM,qBACN,OAAQ,CAAC,EACT,QAAS,CAAC,CAAE,KAAM,GAAI,KAAM,UAAW,aAAc,SAAU,CAAC,EAChE,gBAAiB,MACnB,EACA,CACE,KA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M,aAAc,SAAU,EACtE,CACE,KAAM,QACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,QACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CAAE,KAAM,OAAQ,KAAM,QAAS,QAAS,GAAO,aAAc,OAAQ,EACrE,CACE,KAAM,cACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,QACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,YACN,OAAQ,CACN,CAAE,KAAM,KAAM,KAAM,UAAW,QAAS,GAAM,aAAc,SAAU,CACxE,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,cACN,OAAQ,CACN,CACE,KAAM,UACN,KAAM,SACN,QAAS,GACT,aAAc,QAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,iBACN,OAAQ,CACN,CACE,KAAM,cACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,cACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,mBACN,OAAQ,CACN,CACE,KAAM,OACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,oBACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,eACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,QACN,KAAM,cACN,OAAQ,CACN,CACE,KAAM,OACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,UACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,EACA,CACE,KAAM,SACN,KAAM,UACN,QAAS,GACT,aAAc,SAChB,CACF,EACA,UAAW,EACb,EACA,CACE,KAAM,Q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A,KAAM,WACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,KACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,aACN,KAAM,OACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,mBACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,UACN,QAAS,CACP,CACE,aAAc,OACd,KAAM,GACN,KAAM,MACR,CACF,EACA,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,WACN,QAAS,CACP,CACE,aAAc,QACd,KAAM,GACN,KAAM,OACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,UACN,QAAS,CAAC,EACV,gBAAiB,UACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,OACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,KAAM,SACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,EACA,CACE,aAAc,QACd,KAAM,IACN,KAAM,OACR,EACA,CACE,aAAc,UACd,KAAM,IACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,IACN,KAAM,SACR,CACF,EACA,KAAM,SACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,SACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,cACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,KACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,WACN,QAAS,CACP,CACE,aAAc,OACd,KAAM,GACN,KAAM,MACR,CACF,EACA,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,KACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CACP,CACE,aAAc,OACd,KAAM,GACN,KAAM,MACR,CACF,EACA,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,WACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,gBAAiB,UACjB,KAAM,SACR,CACF","names":["aggregatorsRouterAbi","balancerPoolCreationHelperAbi","governanceTimelockAbi","wberaAbi"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as y}from"./chunk-C3G5KXCH.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 ee(e,n){return(await C(e,{...n,headers:{Accept:"application/json",...n?.headers}})).json()}import{parseEther as P}from"viem";var re=P("0.005"),oe=1e5,se=1,ue=.1,ie=50,ae=7920027n;var ce=e=>2n*BigInt(e);function le(e){return Math.floor(e/1e3)}function O(e){return e*1e3}function V(e){return e*O(60)}function j(e){return e*60}function J(e){return e*V(60)}function q(e){return e*j(60)}function S(e){return e*J(24)}function w(e){return e*q(24)}function be(e){return e*S(7)}function pe(e){return e*w(7)}function de(e){return e*S(30)}function he(e){return e*w(30)}function ge(e){return e*S(365)}function Ne(e){return e*w(365)}function ye(e){let n=new Date;return n.setDate(n.getDate()-e)*1e3}var G=["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 Me(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}`:`${G[t.getMonth()]} ${r}${u}, ${t.getFullYear()}`}function Ie(...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 g=a>0?`${a}${t?"D":" day"}${!t&&a!==1?"s":""}`:"",N=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[g,N,M,I].filter(Boolean).join(t?" ":", ")}import A from"@berachain/utils/pkg/bignumber.js";var U=["","K","M","B","T","P","E","Z","Y"];function _(e){return e instanceof A?e:new A(e)}function X(e,n){return _(e).shiftedBy(n*-1)}function we(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:g="",suffixText:N="",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 D=10**-o,$=s!==0&&Math.abs(s)<Math.abs(D),R=s<0,L=c?Math.abs(s)>c:!1,p=$?D: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(L)x=s>c?"\u221E":"-\u221E";else if(T){let d=_(p),b=d.abs().toFixed(0).length;i&&Math.abs(s)<=i&&(b=0);let E=Math.min(Math.floor(b?(b-1)/3:0),U.length-1),B=U[E],h=X(d,3*E).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)}${B}`}else{let d=new Intl.NumberFormat("en-US",{maximumFractionDigits:o,minimumFractionDigits:o}).format(Math.abs(p));x=`${R?"-":""}${d}`}let f=[];return g&&f.push(g),$&&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),N&&f.push(N),f.join("")}var De=e=>e?Number(e)>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Number(e)??0:0,$e=(e,n)=>{if(!e)return"0";let[t="0",r="0"]=`${e}`.split(".");return`${t}.${r.substring(0,n)}`};import{createTestClient as Y,http as K}from"viem";import{defaultChainId as z,getRpcUrls as H}from"@berachain/config/internal";function Ue(e=z){let n=H(e);if(!n.isAnvil)throw new Error("No anvil RPC URL found");return Y({mode:"anvil",transport:K(n.jsonRpcUrl)})}function Re({lastBlockTimestamp:e,blockTime:n}){return e?e<Date.now()/1e3-n*10:!0}export{F as a,C as b,ee as c,re as d,oe as e,se as f,ue as g,ie as h,ae as i,ce as j,le as k,O as l,V as m,j as n,J as o,q as p,S as q,w as r,be as s,pe as t,de as u,he as v,ge as w,Ne as x,ye as y,Me as z,Ie as A,we as B,De as C,$e as D,Ue as E,Re as F};
|
|
2
|
+
//# sourceMappingURL=chunk-TJWKS54T.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/getErrorResponse.ts","../src/utils/beraFetch.ts","../src/utils/constants.ts","../src/utils/pythHoneyUtils.ts","../src/utils/time.ts","../src/utils/formatTimestamps.ts","../src/utils/formatNumber.ts","../src/utils/getTestClient.ts","../src/utils/isSubgraphStale.ts"],"sourcesContent":["/**\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","import BigNumber from \"@berachain/utils/pkg/bignumber.js\";\n\nexport type BigNumberValue = string | number | BigNumber;\n\nexport interface FormatNumberOptions {\n /** Number of visible decimal places */\n visibleDecimals?: number;\n /** Whether to use compact notation (K, M, B, etc.) */\n compact?: boolean;\n /** Show as percentage */\n percent?: boolean;\n /** Round down instead of normal rounding */\n roundDown?: boolean;\n /** Round up instead of normal rounding */\n roundUp?: boolean;\n /** Threshold above which compact notation is used */\n compactThreshold?: number;\n /** Maximum value to display (shows ∞ if exceeded) */\n maxValue?: number;\n /** Currency symbol (e.g., \"USD\" for $) */\n symbol?: string;\n /** Prefix text */\n prefixText?: string;\n /** Suffix text */\n suffixText?: string;\n /** Show \"< min\" or \"> min\" indicators for very small values */\n showIsSmallerThanMin?: boolean;\n /** Text to show if value is null/undefined */\n ifNullish?: string;\n}\n\nconst POSTFIXES = [\"\", \"K\", \"M\", \"B\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\n\nfunction valueToBigNumber(amount: BigNumberValue): BigNumber {\n if (amount instanceof BigNumber) return amount;\n return new BigNumber(amount);\n}\n\nfunction normalizeBN(n: BigNumberValue, decimals: number): BigNumber {\n return valueToBigNumber(n).shiftedBy(decimals * -1);\n}\n\nexport function formatNumber(\n value: BigNumberValue | undefined | null,\n options: FormatNumberOptions | number = {},\n): string {\n if (typeof options === \"number\") {\n const decimals = options;\n if (value === undefined || value === null) {\n return \"\";\n }\n\n if (typeof value === \"object\") {\n throw new Error(\"Value must be a number if using deprecated version\");\n }\n\n // Convert to string with up to 8 decimal places\n let formatted = Number(value).toFixed(decimals);\n // Remove trailing zeros and decimal point if not needed\n formatted = formatted.replace(/(\\.\\d*?[1-9])0+$|\\.0*$/, \"$1\");\n return formatted;\n }\n\n const {\n visibleDecimals,\n compact = true,\n percent = false,\n roundDown = false,\n roundUp = false,\n compactThreshold,\n maxValue,\n symbol,\n prefixText = \"\",\n suffixText = \"\",\n showIsSmallerThanMin = true,\n ifNullish = \"\",\n } = options || {};\n\n // Handle null/undefined values\n if (value === undefined || value === null) {\n return ifNullish;\n }\n\n const number = percent ? Number(value) * 100 : Number(value);\n\n // Handle special numeric values\n if (Number.isNaN(number)) {\n return \"NaN\";\n }\n if (number === Number.POSITIVE_INFINITY) {\n return \"Infinity\";\n }\n if (number === Number.NEGATIVE_INFINITY) {\n return \"-Infinity\";\n }\n\n // Determine decimal places\n let decimals: number = visibleDecimals ?? 0;\n if (number === 0) {\n decimals = 0;\n } else if (visibleDecimals === undefined) {\n if (Math.abs(number) > 1 || percent || symbol === \"USD\") {\n decimals = 2;\n } else {\n decimals = 7;\n }\n }\n\n const minValue = 10 ** -(decimals as number);\n const isSmallerThanMin =\n number !== 0 && Math.abs(number) < Math.abs(minValue);\n const isNegative = number < 0;\n const isBiggerThanMax = maxValue ? Math.abs(number) > maxValue : false;\n\n let formattedNumber = isSmallerThanMin ? minValue : number;\n const forceCompact =\n compact && (!compactThreshold || Math.abs(number) > compactThreshold);\n\n // Apply rounding for non-compact numbers\n if (roundDown && !forceCompact) {\n formattedNumber =\n Math.trunc(Number(formattedNumber) * 10 ** decimals) / 10 ** decimals;\n } else if (roundUp && !forceCompact) {\n formattedNumber =\n Math.ceil(Number(formattedNumber) * 10 ** decimals) / 10 ** decimals;\n }\n\n let formattedValue: string;\n\n if (isBiggerThanMax) {\n formattedValue = number > maxValue! ? \"∞\" : \"-∞\";\n } else if (!forceCompact) {\n const absFormatted = new Intl.NumberFormat(\"en-US\", {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals,\n }).format(Math.abs(formattedNumber));\n formattedValue = `${isNegative ? \"-\" : \"\"}${absFormatted}`;\n } else {\n // Compact number formatting\n const bnValue = valueToBigNumber(formattedNumber);\n let integerPlaces = bnValue.abs().toFixed(0).length;\n if (compactThreshold && Math.abs(number) <= compactThreshold) {\n integerPlaces = 0;\n }\n\n const significantDigitsGroup = Math.min(\n Math.floor(integerPlaces ? (integerPlaces - 1) / 3 : 0),\n POSTFIXES.length - 1,\n );\n\n const postfix = POSTFIXES[significantDigitsGroup];\n let compactValue = normalizeBN(\n bnValue,\n 3 * significantDigitsGroup,\n ).toNumber();\n\n if (roundDown) {\n compactValue =\n Math.trunc(Number(compactValue) * 10 ** decimals) / 10 ** decimals;\n } else if (roundUp) {\n compactValue =\n Math.ceil(Number(compactValue) * 10 ** decimals) / 10 ** decimals;\n }\n\n const prefix = new Intl.NumberFormat(\"en-US\", {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals,\n }).format(compactValue);\n\n formattedValue = `${prefix}${postfix}`;\n }\n\n // Build the final formatted string\n const parts: string[] = [];\n\n // Add prefix text\n if (prefixText) {\n parts.push(prefixText);\n }\n\n // Add smaller than indicator\n if (isSmallerThanMin && showIsSmallerThanMin) {\n parts.push(number < 0 ? \">\" : \"<\");\n }\n\n // Add USD symbol\n if (symbol?.toLowerCase() === \"usd\" && !percent) {\n parts.push(\"$\");\n }\n\n // Add the formatted number\n parts.push(formattedValue);\n\n // Add percentage symbol\n if (percent) {\n parts.push(\"%\");\n }\n\n // Add other symbols\n if (symbol?.toLowerCase() !== \"usd\" && typeof symbol !== \"undefined\") {\n parts.push(\" \", symbol);\n }\n\n // Add suffix text\n if (suffixText) {\n parts.push(suffixText);\n }\n\n return parts.join(\"\");\n}\nexport const getSafeNumber = (value: string | undefined): number => {\n if (!value) return 0;\n return Number(value) > Number.MAX_SAFE_INTEGER\n ? Number.MAX_SAFE_INTEGER\n : (Number(value) ?? 0);\n};\n\nexport const truncateDecimal = (\n value: string | number | undefined,\n maxDecimal: number,\n): string => {\n if (!value) return \"0\";\n const [integerPart = \"0\", decimalPart = \"0\"] = `${value}`.split(\".\");\n return `${integerPart}.${decimalPart.substring(0, maxDecimal)}`;\n};\n","import { createTestClient, http } from \"viem\";\n\nimport {\n type ChainId,\n defaultChainId,\n getRpcUrls,\n} from \"@berachain/config/internal\";\n\nexport function getTestClient(chainId: ChainId = defaultChainId) {\n const rpc = getRpcUrls(chainId);\n\n if (!rpc.isAnvil) {\n throw new Error(\"No anvil RPC URL found\");\n }\n return createTestClient({\n mode: \"anvil\",\n transport: http(rpc.jsonRpcUrl),\n });\n}\n","export function isSubgraphStale({\n lastBlockTimestamp,\n blockTime,\n}: {\n lastBlockTimestamp: number | null | undefined;\n blockTime: number;\n}) {\n if (!lastBlockTimestamp) return true;\n return lastBlockTimestamp < Date.now() / 1000 - blockTime * 10;\n}\n"],"mappings":"yCAGA,eAAsBA,EAAiBC,EAAoB,CAGzD,GAFoBA,EAAS,QAAQ,IAAI,cAAc,GAEtC,SAAS,kBAAkB,EAC1C,OAAO,MAAMA,EAAS,KAAK,EACtB,CACL,IAAMC,EAAO,MAAMD,EAAS,KAAK,EACjC,GAAI,CACF,OAAO,KAAK,MAAMC,CAAI,CACxB,MAAQ,CACN,MAAO,CACL,QAAS,iDACT,MAAOA,CACT,CACF,CACF,CACF,CCdA,eAAsBC,EACpBC,EACAC,EACA,CACA,GAAI,CACF,IAAMC,EAAW,MAAM,MACrB,OAAOF,GAAa,UAAYA,aAAoB,IAChDA,EACAA,EAAS,IACb,CACE,GAAGC,CACL,CACF,EACA,GAAI,CAACC,EAAS,GAAI,CAChB,IAAMC,EAAQ,MAAMC,EAAiBF,CAAQ,EAC7C,MAAM,IAAIG,EAAa,CACrB,MAAOF,EAGP,SAAUD,EACV,SAAAF,CACF,CAAC,CACH,CACA,OAAOE,CACT,OAASC,EAAO,CACd,MAAIA,aAAiBE,EACbF,EAGF,IAAIE,EAAa,CACrB,MAAOF,EACP,SAAAH,EACA,SAAU,MACZ,CAAC,CACH,CACF,CAEA,eAAsBM,GACpBN,EACAC,EACA,CAQA,OAPiB,MAAMF,EAAUC,EAAU,CACzC,GAAGC,EACH,QAAS,CACP,OAAQ,mBACR,GAAGA,GAAS,OAC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GhBiB,EAAM,KAAK,EAAE,CACtB,CACO,IAAMC,GAAiB9B,GACvBA,EACE,OAAOA,CAAK,EAAI,OAAO,iBAC1B,OAAO,iBACN,OAAOA,CAAK,GAAK,EAHH,EAMR+B,GAAkB,CAC7B/B,EACAgC,IACW,CACX,GAAI,CAAChC,EAAO,MAAO,IACnB,GAAM,CAACiC,EAAc,IAAKC,EAAc,GAAG,EAAI,GAAGlC,CAAK,GAAG,MAAM,GAAG,EACnE,MAAO,GAAGiC,CAAW,IAAIC,EAAY,UAAU,EAAGF,CAAU,CAAC,EAC/D,EChOA,OAAS,oBAAAG,EAAkB,QAAAC,MAAY,OAEvC,OAEE,kBAAAC,EACA,cAAAC,MACK,6BAEA,SAASC,GAAcC,EAAmBH,EAAgB,CAC/D,IAAMI,EAAMH,EAAWE,CAAO,EAE9B,GAAI,CAACC,EAAI,QACP,MAAM,IAAI,MAAM,wBAAwB,EAE1C,OAAON,EAAiB,CACtB,KAAM,QACN,UAAWC,EAAKK,EAAI,UAAU,CAChC,CAAC,CACH,CClBO,SAASC,GAAgB,CAC9B,mBAAAC,EACA,UAAAC,CACF,EAGG,CACD,OAAKD,EACEA,EAAqB,KAAK,IAAI,EAAI,IAAOC,EAAY,GAD5B,EAElC","names":["getErrorResponse","response","text","beraFetch","endpoint","options","response","error","getErrorResponse","RequestError","beraFetchJson","parseEther","CAP_LIMIT_BUFFER","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","formatTimeLeft","args","timeLeftInSeconds","condensed","showDays","showMinutes","showSeconds","opts","greaterUnit","days","hours","minutes","seconds","daysDisplay","hoursDisplay","minutesDisplay","secondsDisplay","BigNumber","POSTFIXES","valueToBigNumber","amount","normalizeBN","n","decimals","formatNumber","value","options","formatted","visibleDecimals","compact","percent","roundDown","roundUp","compactThreshold","maxValue","symbol","prefixText","suffixText","showIsSmallerThanMin","ifNullish","number","minValue","isSmallerThanMin","isNegative","isBiggerThanMax","formattedNumber","forceCompact","formattedValue","bnValue","integerPlaces","significantDigitsGroup","postfix","compactValue","absFormatted","parts","getSafeNumber","truncateDecimal","maxDecimal","integerPart","decimalPart","createTestClient","http","defaultChainId","getRpcUrls","getTestClient","chainId","rpc","isSubgraphStale","lastBlockTimestamp","blockTime"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk7SC4VD3Ucjs = require('./chunk-7SC4VD3U.cjs');var _viem = require('viem');function k({cause:e,level:t}){if(e instanceof _viem.BaseError){let n=_chunk7SC4VD3Ucjs.d.call(void 0, {error:e,revertIfUnknown:!1});if(n.isRequestError&&n.rootCause instanceof _viem.BaseError&&"url"in n.rootCause&&typeof n.rootCause.url=="string")return new (0, _chunk7SC4VD3Ucjs.f)({cause:n.rootCause,response:void 0,endpoint:{url:n.rootCause.url,type:"rpc"},level:t})}return e instanceof _chunk7SC4VD3Ucjs.e?e:new (0, _chunk7SC4VD3Ucjs.e)({cause:e,level:t})}function c(e){return e!=null}function x({value:e,property:t,fn:r}){let n=r(e);if(!n.isValid)throw new (0, _chunk7SC4VD3Ucjs.g)({property:t,value:e,expected:n.expectedType})}function s({value:e,property:t,fn:r}){x({value:e,property:t,fn:n=>{let l=c(n),{isValid:E,expectedType:v}=r(n);return{expectedType:v,isValid:l&&E}}})}function y(e,t){s({value:e,property:t,fn:r=>({expectedType:"defined",isValid:c(r)})})}function D(e,t="publicClient"){y(e,t)}function K(e,t){s({value:e,property:t,fn:r=>({expectedType:"Address",isValid:typeof r=="string"&&_viem.isAddress.call(void 0, r)})})}function M(e,t){s({value:e,property:t,fn:r=>({expectedType:"number",isValid:(typeof r=="string"||typeof r=="number")&&Number(r)>0})})}function f(){let e={};return{emit(t,...r){for(let n of e[t]||[])n(...r)},events:e,on(t,r){return e[t]||(e[t]=[]),e[t].push(r),()=>{e[t]=_optionalChain([e, 'access', _2 => _2[t], 'optionalAccess', _3 => _3.filter, 'call', _4 => _4(n=>r!==n)])}}}}var d=f(),_= exports.f ={captureException(e){let t={exception:e,timestamp:Date.now()};d.emit("exception",t)},on(...e){return d.on(...e)}};exports.a = k; exports.b = y; exports.c = D; exports.d = K; exports.e = M; exports.f = _;
|
|
2
|
+
//# sourceMappingURL=chunk-UQUWMHVF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/pong/coding/monobera/packages/berajs/dist/chunk-UQUWMHVF.cjs","../src/errors/initBeraError.ts","../src/errors/assert.ts","../src/utils/createEmitter.ts","../src/errors/BeraMonitoring.ts"],"names":["initBeraError","error","level","BaseError","parsed","parseViemError","RequestError","BeraError","_isDefined","value","_assert","property","fn","result","InvalidArgumentError","_assertDefined","isDefined","isValid","expectedType","assertDefined","assertPublicClient","assertAddress","isAddress","assertAmount","createEmitter","events","event","args","callback","cb","i","_emitter","BeraMonitoring","exception"],"mappings":"AAAA,qoBAA6D,4BCAnC,SAyCVA,CAAAA,CAAc,CAC5B,KAAA,CAAOC,CAAAA,CACP,KAAA,CAAAC,CACF,CAAA,CAMc,CAIZ,EAAA,CAAID,EAAAA,WAAiB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BaseError } from \"viem\";\n\nimport { BeraError } from \"./BeraError\";\nimport { parseViemError } from \"./parseViemError\";\nimport { RequestError } from \"./RequestError\";\nimport type { SeverityLevel } from \"./severity\";\n\n/**\n * The preferred way to normalize any unknown error into a BeraError.\n *\n * This function acts as a smart factory that picks the correct BeraError subclass:\n *\n * 1. If `cause` is already a `BeraError`, returns it as-is (no double-wrapping).\n * 2. If `cause` is a viem `BaseError`, runs `parseViemError` to classify it:\n * - If the root cause is an `HttpRequestError` (RPC transport failure), wraps it\n * in a `RequestError` with the endpoint URL extracted from the error.\n * 3. Otherwise, wraps in a new `BeraError` — which triggers the automatic reason\n * detection pipeline in the BeraError constructor (parseViemError → errorMap → displayMessage).\n *\n * **Use this instead of `new BeraError({ cause })` when you don't know the error type.**\n * It ensures RequestErrors are correctly classified (important for Sentry filtering\n * and fingerprinting — RequestErrors are skipped from transaction error grouping).\n *\n * @example\n * ```ts\n * try {\n * await someOperation();\n * } catch (error) {\n * // Normalizes to the right subclass, reason auto-detected\n * throw initBeraError({ cause: error });\n * }\n * ```\n *\n * @example\n * ```ts\n * // Reporting to Sentry without rethrowing\n * catch (error) {\n * captureException(initBeraError({ cause: error }));\n * }\n * ```\n */\nexport function initBeraError({\n cause: error,\n level,\n}: {\n cause: unknown;\n /**\n * The severity level of the error, only used if the error is not a BeraError.\n */\n level?: SeverityLevel;\n}): BeraError {\n // ── Step 1: Check if it's a viem BaseError that wraps an RPC transport failure ──\n // parseViemError with revertIfUnknown=false won't throw — it returns { reason: undefined }\n // if the error chain doesn't match any known type.\n if (error instanceof BaseError) {\n const parsed = parseViemError({\n error,\n revertIfUnknown: false,\n });\n if (\n parsed.isRequestError &&\n parsed.rootCause instanceof BaseError &&\n \"url\" in parsed.rootCause &&\n typeof parsed.rootCause.url === \"string\"\n ) {\n // RPC transport failure (e.g. HTTP 502 from the RPC endpoint).\n // Wrapping in RequestError gives it proper endpoint tagging and level=\"warning\".\n return new RequestError({\n cause: parsed.rootCause,\n response: undefined,\n endpoint: {\n url: parsed.rootCause.url as string,\n type: \"rpc\",\n },\n level,\n });\n }\n }\n\n // ── Step 2: Return as-is if already a BeraError, otherwise wrap ──────────\n // The BeraError constructor will run automatic reason detection on the cause.\n const err =\n error instanceof BeraError\n ? error\n : new BeraError({\n cause: error,\n level,\n });\n\n return err;\n}\n","import type { GetPublicClientReturnType } from \"@wagmi/core\";\nimport { type Address, isAddress, type PublicClient } from \"viem\";\n\nimport { InvalidArgumentError } from \"./InvalidArgumentError\";\n\nfunction _isDefined<T>(value: T): value is NonNullable<T> {\n return value !== undefined && value !== null;\n}\n\ntype _AssertFn<T> = (value: T) => { expectedType: string; isValid: boolean };\n\n/**\n * Internal assertion function.\n * @throws An InvalidArgumentError if the value is not valid.\n */\nfunction _assert<T>({\n value,\n property,\n fn,\n}: {\n value: T;\n property: string;\n fn: _AssertFn<T>;\n}) {\n const result = fn(value);\n if (!result.isValid) {\n throw new InvalidArgumentError({\n property,\n value,\n expected: result.expectedType,\n });\n }\n}\n\nfunction _assertDefined<T>({\n value,\n property,\n fn,\n}: {\n value: T;\n property: string;\n fn: (value: T) => { expectedType: string; isValid: boolean };\n}) {\n _assert({\n value,\n property,\n fn: (value) => {\n const isDefined = _isDefined(value);\n const { isValid, expectedType } = fn(value);\n return {\n expectedType,\n isValid: isDefined && isValid,\n };\n },\n });\n}\n\n/**\n * Asserts that a value is defined.\n * @throws An InvalidArgumentError if the value is undefined or null.\n */\nexport function assertDefined<T>(\n /**\n * The value to assert.\n */\n value: T,\n /**\n * The property name.\n */\n property: string,\n): asserts value is NonNullable<T> {\n _assertDefined({\n value,\n property,\n fn: (value) => ({ expectedType: \"defined\", isValid: _isDefined(value) }),\n });\n}\n\n/**\n * Asserts that a value is a PublicClient.\n * @throws An InvalidArgumentError if the value is undefined or not a PublicClient.\n */\nexport function assertPublicClient(\n /**\n * The value to assert.\n */\n value: // it's important to have both types here because it helps with typescript build performance\n PublicClient | GetPublicClientReturnType | undefined,\n /**\n * The property name.\n */\n property: string = \"publicClient\",\n): asserts value is PublicClient {\n // there's no current way to check if a value is a PublicClient, so we just assert it's defined and `value: PublicClient` will do the rest\n assertDefined(value, property);\n}\n\n/**\n * Asserts that a value is an address (20 bytes).\n * @throws An InvalidArgumentError if the value is undefined, null, not a string, or not an address.\n */\nexport function assertAddress(\n /**\n * The value to assert.\n */\n value: string | undefined | null,\n /**\n * The property name.\n */\n property: string,\n): asserts value is Address {\n _assertDefined({\n value,\n property,\n fn: (value) => ({\n expectedType: \"Address\",\n isValid: typeof value === \"string\" && isAddress(value),\n }),\n });\n}\n\n/**\n * Asserts that a value is a number greater than 0.\n * @throws An InvalidArgumentError if the value is undefined, null, not a string or number, or not a number greater than 0.\n */\nexport function assertAmount(\n /**\n * The value to assert.\n */\n value: unknown,\n /**\n * The property name.\n */\n property: string,\n): asserts value is string | number {\n _assertDefined({\n value,\n property,\n fn: (value) => ({\n expectedType: \"number\",\n isValid:\n (typeof value === \"string\" || typeof value === \"number\") &&\n Number(value) > 0,\n }),\n });\n}\n","interface EventsMap {\n [event: string]: any;\n}\n\ninterface DefaultEvents extends EventsMap {\n [event: string]: (...args: any) => void;\n}\n\nexport type Unsubscribe = () => void;\n\nexport interface Emitter<Events extends EventsMap = DefaultEvents> {\n /**\n * Calls each of the listeners registered for a given event.\n *\n * ```js\n * ee.emit('tick', tickType, tickDuration)\n * ```\n *\n * @param event The event name.\n * @param args The arguments for listeners.\n */\n emit<K extends keyof Events>(event: K, ...args: Parameters<Events[K]>): void;\n\n /**\n * Add a listener for a given event.\n *\n * ```js\n * const unbind = ee.on('tick', (tickType, tickDuration) => {\n * count += 1\n * })\n *\n * disable () {\n * unbind()\n * }\n * ```\n *\n * @param event The event name.\n * @param cb The listener function.\n * @returns Unbind listener from event.\n */\n on<K extends keyof Events>(event: K, cb: Events[K]): Unsubscribe;\n events: Partial<{ [E in keyof Events]: Events[E][] }>;\n}\n\n/**\n * An interface for mixins that expose the `on` function (without the emitter\n * bound to `this`)\n *\n * ```js\n * import { createEmitter } from '~utils/createEmitter'\n *\n * class Ticker implements EmitterMixin<Events> {\n * constructor() {\n * this.emitter = createEmitter()\n * }\n * on(...args) {\n * return this.emitter.on(...args)\n * }\n * tick() {\n * this.emitter.emit('tick')\n * }\n * }\n * ```\n */\nexport interface EmitterMixin<Events extends EventsMap = DefaultEvents> {\n on<K extends keyof Events>(event: K, cb: Events[K]): Unsubscribe;\n}\n\n/**\n * Create event emitter.\n *\n * ```js\n * import { createEmitter } from '~/utils/createEmitter'\n *\n * class Ticker {\n * constructor() {\n * this.emitter = createEmitter()\n * }\n * on(...args) {\n * return this.emitter.on(...args)\n * }\n * tick() {\n * this.emitter.emit('tick')\n * }\n * }\n * ```\n *\n * Inspired by {@link https://github.com/ai/nanoevents}\n */\nexport function createEmitter<\n Events extends EventsMap = DefaultEvents,\n>(): Emitter<Events> {\n /**\n * Event names in keys and arrays with listeners in values.\n *\n * ```js\n * emitter1.events = emitter2.events\n * emitter2.events = { }\n * ```\n */\n const events: Partial<{ [E in keyof Events]: Events[E][] }> = {};\n\n return {\n emit(event, ...args) {\n for (const callback of events[event] || []) {\n callback(...args);\n }\n },\n events,\n on(event, cb) {\n if (!events[event]) {\n events[event] = [];\n }\n\n events[event].push(cb);\n\n return () => {\n events[event] = events[event]?.filter((i) => cb !== i);\n };\n },\n };\n}\n","import { createEmitter, type EmitterMixin } from \"~/utils/createEmitter\";\nimport type { BeraError } from \"./BeraError\";\nimport type { SeverityLevel } from \"./severity\";\n\n/**\n * Context passed alongside captured exceptions.\n * Mirrors the subset of Sentry's CaptureContext that berajs actually uses.\n */\nexport interface CaptureContext {\n level: SeverityLevel;\n extra?: Record<string, unknown>;\n tags?: Record<string, string | number | boolean | null | undefined>;\n fingerprint?: string[];\n data?: Record<string, unknown>;\n}\n\nexport interface ErrorEvent {\n exception: BeraError;\n timestamp: number;\n}\n\nconst _emitter = createEmitter<{ exception: (event: ErrorEvent) => void }>();\n\n/**\n * A generic error reporter for berajs.\n *\n * Instead of calling Sentry.captureException directly, berajs calls\n * `BeraMonitoring.captureException()`. Consumer apps subscribe via `.on()` and\n * forward events to their monitoring provider (Sentry, Datadog, etc.).\n *\n * @example\n * ```ts\n * // In berajs code:\n * import { BeraMonitoring } from \"~/errors/BeraMonitoring\";\n * BeraMonitoring.captureExceptionException(error);\n *\n * // In app instrumentation:\n * import { BeraMonitoring } from \"@berachain/berajs/errors\";\n * BeraMonitoring.on((event) => {\n * if (event.type === \"exception\") {\n * Sentry.captureException(event.exception);\n * }\n * });\n * ```\n */\nexport const BeraMonitoring: {\n captureException: (exception: BeraError) => void;\n} & EmitterMixin<{ exception: (event: ErrorEvent) => void }> = {\n /**\n * Capture an exception. Notifies all subscribers.\n */\n captureException(exception: BeraError): void {\n const event: ErrorEvent = {\n exception,\n timestamp: Date.now(),\n };\n _emitter.emit(\"exception\", event);\n },\n /**\n * Subscribe to error events.\n * @returns An unsubscribe function.\n */\n on(...args) {\n return _emitter.on(...args);\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 _chunkZAKA4TGKcjs = require('./chunk-ZAKA4TGK.cjs');var _chunkUQUWMHVFcjs = require('./chunk-UQUWMHVF.cjs');var _chunkVXL2ZZ4Xcjs = require('./chunk-VXL2ZZ4X.cjs');var _chunkOS5AJMYJcjs = require('./chunk-OS5AJMYJ.cjs');var _chunk7SC4VD3Ucjs = require('./chunk-7SC4VD3U.cjs');var _react = require('react');var _edgeconfig = require('@berachain/config/internal/edge-config');var _jsxruntime = require('react/jsx-runtime');var I=_react.createContext.call(void 0, void 0);function De({children:e,flags:t,aggregators:o,swberaAprWindow:n="DAY"}){return _jsxruntime.jsx.call(void 0, I.Provider,{value:{..._chunkVXL2ZZ4Xcjs.a,...t,aggregators:o?Object.entries(o).filter(([,r])=>_edgeconfig.isFlagEnabled.call(void 0, r)).map(([r])=>r):void 0,swberaAprWindow:n},children:e})}function $(){let e=_react.useContext.call(void 0, I);if(!e)throw new Error("BeraFlagsProvider not found");return e}function Me(e){return $()[e]}var N=_react.createContext.call(void 0, {protocol:{isPaused:!1,factories:{composableStable:"enabled",weighted:"enabled",allPaused:!1}},onPoolChange:()=>{},pool:void 0});function Ye(){let e=_react.useContext.call(void 0, N);if(!e)throw new (0, _chunk7SC4VD3Ucjs.e)({level:"fatal",message:"BexStateContext is not defined"});return e}function _e({children:e,isVaultPaused:t,labels:o,factories:n}){let[r,p]=_react.useState.call(void 0, ),s=_nullishCoalesce((_optionalChain([r, 'optionalAccess', _2 => _2.isPaused])&&!_optionalChain([r, 'optionalAccess', _3 => _3.isInRecoveryMode])), () => (!1)),d=t||_optionalChain([r, 'optionalAccess', _4 => _4.isPaused]);return _jsxruntime.jsx.call(void 0, N.Provider,{value:{protocol:{isPaused:t,factories:{...n,allPaused:n.composableStable==="paused"&&n.weighted==="paused"}},labels:o,onPoolChange:p,pool:r?{...r,disablePoolWithdrawals:!!s,disablePoolDeposits:!!d}:void 0},children:e})}var _mainnet = require('@berachain/config/mainnet');function je(){return _react.useContext.call(void 0, D)}var D=_react.createContext.call(void 0, _mainnet.mainnet.averageBlockTime);function ze({children:e,blockTime:t,...o}){let{config:n}=_chunkOS5AJMYJcjs.a.call(void 0, o);return _jsxruntime.jsx.call(void 0, D.Provider,{value:_nullishCoalesce(t, () => (n.averageBlockTime)),children:e})}var M=_react.createContext.call(void 0, void 0);function et({children:e,...t}){return _jsxruntime.jsx.call(void 0, M.Provider,{value:t,children:e})}function tt(){let e=_react.useContext.call(void 0, M);if(!e)throw new Error("useHoneyConfig must be used within a HoneyConfigProvider");return e}var _swr = require('swr'); var _swr2 = _interopRequireDefault(_swr);var _hooks = require('@berachain/wagmi/hooks');var _core = require('@wagmi/core');var _viem = require('viem');async function O({account:e,wagmiConfig:t,chainId:o,ensoClient:n}){let p=(await n.getBalances({useEoa:!0,chainId:_nullishCoalesce(o, () => ("all")),eoaAddress:e})).map(a=>({name:a.name,symbol:a.symbol,decimals:a.decimals,address:_chunkOS5AJMYJcjs.e.call(void 0, a.token,"ETH")?_chunkOS5AJMYJcjs.b.address:a.token,logoURI:a.logoUri,balance:{raw:a.amount.toString(),formatted:_viem.formatUnits.call(void 0, BigInt(a.amount),a.decimals)},chainId:Number(a.chainId),price:Number(a.price)})),s=Object.groupBy(p,a=>_nullishCoalesce(a.chainId, () => (0))),d=await Promise.allSettled(Object.entries(s).map(async([a,u])=>{if(!u)return;let h=_core.getChains.call(void 0, t).find(c=>c.id===Number(a));if(!h)return;let i=_optionalChain([h, 'access', _5 => _5.contracts, 'optionalAccess', _6 => _6.multicall3, 'optionalAccess', _7 => _7.address]);if(!i)return _chunkUQUWMHVFcjs.f.captureException(new (0, _chunk7SC4VD3Ucjs.g)({property:"multicallAddress",value:i,expected:"Address",chainId:Number(a)})),u;let g=await _core.multicall.call(void 0, t,{chainId:Number(a),contracts:u.map(c=>_chunkZAKA4TGKcjs.b.call(void 0, {token:c,account:e,multicallAddress:i})),allowFailure:!0}),f=[];for(let c=0;c<u.length;c++){let l=u[c];if(g[c].status==="success"){let y=g[c].result;f.push({...l,balance:{raw:_nullishCoalesce(_optionalChain([y, 'optionalAccess', _8 => _8.toString, 'call', _9 => _9()]), () => ("0")),formatted:_viem.formatUnits.call(void 0, _nullishCoalesce(y, () => (0n)),l.decimals)}})}else console.error("error getting balance",g[c].error),_chunkUQUWMHVFcjs.f.captureException(_chunkUQUWMHVFcjs.a.call(void 0, {cause:g[c].error})),f.push(l)}return f})),m=[];for(let a of d)a.status==="fulfilled"?m.push(..._nullishCoalesce(a.value, () => ([]))):_chunkUQUWMHVFcjs.f.captureException(_chunkUQUWMHVFcjs.a.call(void 0, {cause:a.reason}));return m.sort((a,u)=>{let h=Number(a.balance.formatted)*(_nullishCoalesce(a.price, () => (0)));return Number(u.balance.formatted)*(_nullishCoalesce(u.price, () => (0)))-h})}function U({chainId:e}={},t){let{address:o}=_hooks.useBeraWallet.call(void 0, ),n=_hooks.useConfig.call(void 0, ),r=!!o&&(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _10 => _10.opts, 'optionalAccess', _11 => _11.isEnabled]), () => (!0))),s=_swr2.default.call(void 0, r&&n?["useEnsoUserTokensWithBalances",o,e]:null,async([,d,m])=>O({account:d,wagmiConfig:n,chainId:_nullishCoalesce(m, () => ("all")),ensoClient:_chunkZAKA4TGKcjs.a.call(void 0, )}),{refreshInterval:1e5,isEnabled:r,..._optionalChain([t, 'optionalAccess', _12 => _12.opts])});return{...s,refresh:()=>s.mutate()}}function q({defaultTokenList:e=[],externalList:t=[]}){if(e.length===0)return{tokenList:t,customTokenList:t,featuredTokenList:[]};let o=e.map(s=>({...s,default:!0})),n=o.filter(s=>_optionalChain([s, 'access', _13 => _13.tags, 'optionalAccess', _14 => _14.some, 'call', _15 => _15(d=>d==="featured")])),r=[...o,...t];return{tokenList:r.filter((s,d)=>r.findIndex(m=>_chunkOS5AJMYJcjs.e.call(void 0, m,s))===d),customTokenList:t,featuredTokenList:n}}var xe=_react.createContext.call(void 0, void 0);function Ct({children:e,defaultTokens:t,edgeConfigTokenList:o,userTokens:n,onAddToken:r,onRemoveToken:p}){let{data:s,refresh:d}=U(),{tokenList:m=[],featuredTokenList:a=[]}=_react.useMemo.call(void 0, ()=>q({defaultTokenList:[...t,..._optionalChain([o, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17(u=>_edgeconfig.isFlagEnabled.call(void 0, u.enabled))])],externalList:[...n,...(_nullishCoalesce(s, () => ([]))).map(u=>({...u,balance:void 0,price:void 0}))]}),[t,n,o,s]);return _jsxruntime.jsx.call(void 0, xe.Provider,{value:{tokenList:m,userTokens:n,featuredTokens:a,ensoTokens:s,onAddToken(u){r(u,{defaultTokens:t,userTokens:n,tokenList:m})},onRemoveToken:p,refresh:()=>{d()}},children:e})}var J="rk-transactions",K="transactions";function Y(e){try{let t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch (e2){return{}}}function ve(e){return Object.entries(e).reduce((t,[o,n])=>({...t,[o]:Object.entries(n).reduce((r,[p,s])=>{if(!s)return r;let d=s.map(m=>({...m,chainId:Number(p)}));return r.push(...d),r},[])}),{})}var S=(e,t,o)=>o.findIndex(n=>n.hash===e.hash)===t;function Ce(e,t){let o=ve(e);for(let[n,r]of Object.entries(t))o[n]&&r?o[n]=[...r,...o[n]].filter(S):o[n]=_optionalChain([r, 'optionalAccess', _18 => _18.filter, 'call', _19 => _19(S)]);return o}function _(){let e=Y(typeof localStorage<"u"?localStorage.getItem(J):null),t=Y(typeof localStorage<"u"?localStorage.getItem(K):null);return Ce(e,t)}var Pe=/^0x([A-Fa-f0-9]{64})$/;function Se(e){if(!Pe.test(e.hash))throw new (0, _chunk7SC4VD3Ucjs.g)({property:"hash",value:e.hash,expected:"TransactionHash"});if(typeof e.description!="string")throw new (0, _chunk7SC4VD3Ucjs.g)({property:"description",value:e.description,expected:"string"});if(typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1))throw new (0, _chunk7SC4VD3Ucjs.g)({property:"confirmations",value:e.confirmations,expected:"positive integer"})}function V({config:e}){let t=_(),o=new Set,n=new Map;function r(i){return _nullishCoalesce(t[i], () => ([]))}function p(i,g){let f={...g,status:"pending"};try{Se(f),a(i,c=>[f,...c.filter(({hash:l})=>l!==f.hash)])}catch(c){_chunkUQUWMHVFcjs.f.captureException(_chunkUQUWMHVFcjs.a.call(void 0, {cause:c}))}}function s(i){a(i,()=>[])}function d(i,g,f){a(i,c=>c.map(l=>l.hash===g?{...l,status:f}:l))}async function m(i){let g=r(i).filter(f=>f.status==="pending");await Promise.allSettled(g.map(async f=>{let{confirmations:c,hash:l,chainId:y}=f,b=n.get(l);if(b)return await b;let B=_core.getPublicClient.call(void 0, e,{chainId:y});if(!B)return;let w=B.waitForTransactionReceipt({confirmations:c,hash:l}).then(({status:v})=>{v!==void 0&&d(i,l,Number(v)===0?"failed":"confirmed")}).catch(v=>{_chunkUQUWMHVFcjs.f.captureException(_chunkUQUWMHVFcjs.a.call(void 0, {cause:v}))}).finally(()=>{n.delete(l)});return n.set(l,w),await w}))}function a(i,g){t=_(),t[i]=_nullishCoalesce(t[i], () => ([]));let l=g(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _20 => _20[i]]), () => ([]))).sort((y,b)=>b.timestamp-y.timestamp).slice(0,10);t[i]=l.length>0?l.filter(S):void 0,u(),h()}function u(){typeof localStorage>"u"||(localStorage.setItem(K,JSON.stringify(t)),localStorage.removeItem(J))}function h(){for(let i of o)i()}function P(i){return o.add(i),()=>{o.delete(i)}}return{addTransaction:p,clearTransactions:s,getTransactions:r,onChange:P,refreshPendingTransactions:m,setTransactionStatus:d}}var Q,X=_react.createContext.call(void 0, null);function It({children:e}){let{account:t}=_hooks.useBeraWagmi.call(void 0, ),o=_optionalChain([t, 'optionalAccess', _21 => _21.wallet, 'optionalAccess', _22 => _22.address]),n=_hooks.useConfig.call(void 0, ),[r]=_react.useState.call(void 0, ()=>_nullishCoalesce(Q, () => ((Q=V({config:n})))));return _react.useEffect.call(void 0, ()=>{if(!o)return;let p=()=>{r.refreshPendingTransactions(o)};p();let s=setInterval(p,12e4),d=()=>{document.visibilityState==="visible"&&p()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),()=>{clearInterval(s),typeof document<"u"&&document.removeEventListener("visibilitychange",d)}},[r,o]),_jsxruntime.jsx.call(void 0, X.Provider,{value:r,children:e})}function Nt(){let e=_react.useContext.call(void 0, X);if(!e)throw new Error("Transaction hooks must be used within ");return e}exports.a = De; exports.b = $; exports.c = Me; exports.d = N; exports.e = Ye; exports.f = _e; exports.g = je; exports.h = D; exports.i = ze; exports.j = M; exports.k = et; exports.l = tt; exports.m = xe; exports.n = Ct; exports.o = Y; exports.p = ve; exports.q = S; exports.r = Ce; exports.s = V; exports.t = It; exports.u = Nt;
|
|
2
|
+
//# sourceMappingURL=chunk-UXUWSRVV.cjs.map
|