@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
|
@@ -1,593 +0,0 @@
|
|
|
1
|
-
declare const aggregatorsRouterAbi: readonly [{
|
|
2
|
-
readonly type: "constructor";
|
|
3
|
-
readonly inputs: readonly [{
|
|
4
|
-
readonly name: "_wbera";
|
|
5
|
-
readonly type: "address";
|
|
6
|
-
readonly internalType: "address";
|
|
7
|
-
}, {
|
|
8
|
-
readonly name: "_feeReceiver";
|
|
9
|
-
readonly type: "address";
|
|
10
|
-
readonly internalType: "address";
|
|
11
|
-
}, {
|
|
12
|
-
readonly name: "_owner";
|
|
13
|
-
readonly type: "address";
|
|
14
|
-
readonly internalType: "address";
|
|
15
|
-
}];
|
|
16
|
-
readonly stateMutability: "nonpayable";
|
|
17
|
-
}, {
|
|
18
|
-
readonly type: "receive";
|
|
19
|
-
readonly stateMutability: "payable";
|
|
20
|
-
}, {
|
|
21
|
-
readonly type: "function";
|
|
22
|
-
readonly name: "BERACHEF_ADDRESS";
|
|
23
|
-
readonly inputs: readonly [];
|
|
24
|
-
readonly outputs: readonly [{
|
|
25
|
-
readonly name: "";
|
|
26
|
-
readonly type: "address";
|
|
27
|
-
readonly internalType: "address";
|
|
28
|
-
}];
|
|
29
|
-
readonly stateMutability: "view";
|
|
30
|
-
}, {
|
|
31
|
-
readonly type: "function";
|
|
32
|
-
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
33
|
-
readonly inputs: readonly [];
|
|
34
|
-
readonly outputs: readonly [{
|
|
35
|
-
readonly name: "";
|
|
36
|
-
readonly type: "bytes32";
|
|
37
|
-
readonly internalType: "bytes32";
|
|
38
|
-
}];
|
|
39
|
-
readonly stateMutability: "view";
|
|
40
|
-
}, {
|
|
41
|
-
readonly type: "function";
|
|
42
|
-
readonly name: "MANAGER_ROLE";
|
|
43
|
-
readonly inputs: readonly [];
|
|
44
|
-
readonly outputs: readonly [{
|
|
45
|
-
readonly name: "";
|
|
46
|
-
readonly type: "bytes32";
|
|
47
|
-
readonly internalType: "bytes32";
|
|
48
|
-
}];
|
|
49
|
-
readonly stateMutability: "view";
|
|
50
|
-
}, {
|
|
51
|
-
readonly type: "function";
|
|
52
|
-
readonly name: "ONE_HUNDRED_PERCENT";
|
|
53
|
-
readonly inputs: readonly [];
|
|
54
|
-
readonly outputs: readonly [{
|
|
55
|
-
readonly name: "";
|
|
56
|
-
readonly type: "uint256";
|
|
57
|
-
readonly internalType: "uint256";
|
|
58
|
-
}];
|
|
59
|
-
readonly stateMutability: "view";
|
|
60
|
-
}, {
|
|
61
|
-
readonly type: "function";
|
|
62
|
-
readonly name: "PAUSER_ROLE";
|
|
63
|
-
readonly inputs: readonly [];
|
|
64
|
-
readonly outputs: readonly [{
|
|
65
|
-
readonly name: "";
|
|
66
|
-
readonly type: "bytes32";
|
|
67
|
-
readonly internalType: "bytes32";
|
|
68
|
-
}];
|
|
69
|
-
readonly stateMutability: "view";
|
|
70
|
-
}, {
|
|
71
|
-
readonly type: "function";
|
|
72
|
-
readonly name: "SWAP_FEE_RATE";
|
|
73
|
-
readonly inputs: readonly [];
|
|
74
|
-
readonly outputs: readonly [{
|
|
75
|
-
readonly name: "";
|
|
76
|
-
readonly type: "uint256";
|
|
77
|
-
readonly internalType: "uint256";
|
|
78
|
-
}];
|
|
79
|
-
readonly stateMutability: "view";
|
|
80
|
-
}, {
|
|
81
|
-
readonly type: "function";
|
|
82
|
-
readonly name: "aggregators";
|
|
83
|
-
readonly inputs: readonly [{
|
|
84
|
-
readonly name: "";
|
|
85
|
-
readonly type: "address";
|
|
86
|
-
readonly internalType: "address";
|
|
87
|
-
}];
|
|
88
|
-
readonly outputs: readonly [{
|
|
89
|
-
readonly name: "";
|
|
90
|
-
readonly type: "bool";
|
|
91
|
-
readonly internalType: "bool";
|
|
92
|
-
}];
|
|
93
|
-
readonly stateMutability: "view";
|
|
94
|
-
}, {
|
|
95
|
-
readonly type: "function";
|
|
96
|
-
readonly name: "executor";
|
|
97
|
-
readonly inputs: readonly [];
|
|
98
|
-
readonly outputs: readonly [{
|
|
99
|
-
readonly name: "";
|
|
100
|
-
readonly type: "address";
|
|
101
|
-
readonly internalType: "contract MetaAggregatorExecutor";
|
|
102
|
-
}];
|
|
103
|
-
readonly stateMutability: "view";
|
|
104
|
-
}, {
|
|
105
|
-
readonly type: "function";
|
|
106
|
-
readonly name: "feeReceiver";
|
|
107
|
-
readonly inputs: readonly [];
|
|
108
|
-
readonly outputs: readonly [{
|
|
109
|
-
readonly name: "";
|
|
110
|
-
readonly type: "address";
|
|
111
|
-
readonly internalType: "address";
|
|
112
|
-
}];
|
|
113
|
-
readonly stateMutability: "view";
|
|
114
|
-
}, {
|
|
115
|
-
readonly type: "function";
|
|
116
|
-
readonly name: "getRoleAdmin";
|
|
117
|
-
readonly inputs: readonly [{
|
|
118
|
-
readonly name: "role";
|
|
119
|
-
readonly type: "bytes32";
|
|
120
|
-
readonly internalType: "bytes32";
|
|
121
|
-
}];
|
|
122
|
-
readonly outputs: readonly [{
|
|
123
|
-
readonly name: "";
|
|
124
|
-
readonly type: "bytes32";
|
|
125
|
-
readonly internalType: "bytes32";
|
|
126
|
-
}];
|
|
127
|
-
readonly stateMutability: "view";
|
|
128
|
-
}, {
|
|
129
|
-
readonly type: "function";
|
|
130
|
-
readonly name: "grantRole";
|
|
131
|
-
readonly inputs: readonly [{
|
|
132
|
-
readonly name: "role";
|
|
133
|
-
readonly type: "bytes32";
|
|
134
|
-
readonly internalType: "bytes32";
|
|
135
|
-
}, {
|
|
136
|
-
readonly name: "account";
|
|
137
|
-
readonly type: "address";
|
|
138
|
-
readonly internalType: "address";
|
|
139
|
-
}];
|
|
140
|
-
readonly outputs: readonly [];
|
|
141
|
-
readonly stateMutability: "nonpayable";
|
|
142
|
-
}, {
|
|
143
|
-
readonly type: "function";
|
|
144
|
-
readonly name: "hasRole";
|
|
145
|
-
readonly inputs: readonly [{
|
|
146
|
-
readonly name: "role";
|
|
147
|
-
readonly type: "bytes32";
|
|
148
|
-
readonly internalType: "bytes32";
|
|
149
|
-
}, {
|
|
150
|
-
readonly name: "account";
|
|
151
|
-
readonly type: "address";
|
|
152
|
-
readonly internalType: "address";
|
|
153
|
-
}];
|
|
154
|
-
readonly outputs: readonly [{
|
|
155
|
-
readonly name: "";
|
|
156
|
-
readonly type: "bool";
|
|
157
|
-
readonly internalType: "bool";
|
|
158
|
-
}];
|
|
159
|
-
readonly stateMutability: "view";
|
|
160
|
-
}, {
|
|
161
|
-
readonly type: "function";
|
|
162
|
-
readonly name: "pause";
|
|
163
|
-
readonly inputs: readonly [];
|
|
164
|
-
readonly outputs: readonly [];
|
|
165
|
-
readonly stateMutability: "nonpayable";
|
|
166
|
-
}, {
|
|
167
|
-
readonly type: "function";
|
|
168
|
-
readonly name: "paused";
|
|
169
|
-
readonly inputs: readonly [];
|
|
170
|
-
readonly outputs: readonly [{
|
|
171
|
-
readonly name: "";
|
|
172
|
-
readonly type: "bool";
|
|
173
|
-
readonly internalType: "bool";
|
|
174
|
-
}];
|
|
175
|
-
readonly stateMutability: "view";
|
|
176
|
-
}, {
|
|
177
|
-
readonly type: "function";
|
|
178
|
-
readonly name: "renounceRole";
|
|
179
|
-
readonly inputs: readonly [{
|
|
180
|
-
readonly name: "role";
|
|
181
|
-
readonly type: "bytes32";
|
|
182
|
-
readonly internalType: "bytes32";
|
|
183
|
-
}, {
|
|
184
|
-
readonly name: "callerConfirmation";
|
|
185
|
-
readonly type: "address";
|
|
186
|
-
readonly internalType: "address";
|
|
187
|
-
}];
|
|
188
|
-
readonly outputs: readonly [];
|
|
189
|
-
readonly stateMutability: "nonpayable";
|
|
190
|
-
}, {
|
|
191
|
-
readonly type: "function";
|
|
192
|
-
readonly name: "rescueBERA";
|
|
193
|
-
readonly inputs: readonly [];
|
|
194
|
-
readonly outputs: readonly [];
|
|
195
|
-
readonly stateMutability: "nonpayable";
|
|
196
|
-
}, {
|
|
197
|
-
readonly type: "function";
|
|
198
|
-
readonly name: "rescueTokens";
|
|
199
|
-
readonly inputs: readonly [{
|
|
200
|
-
readonly name: "token";
|
|
201
|
-
readonly type: "address";
|
|
202
|
-
readonly internalType: "address";
|
|
203
|
-
}];
|
|
204
|
-
readonly outputs: readonly [];
|
|
205
|
-
readonly stateMutability: "nonpayable";
|
|
206
|
-
}, {
|
|
207
|
-
readonly type: "function";
|
|
208
|
-
readonly name: "revokeRole";
|
|
209
|
-
readonly inputs: readonly [{
|
|
210
|
-
readonly name: "role";
|
|
211
|
-
readonly type: "bytes32";
|
|
212
|
-
readonly internalType: "bytes32";
|
|
213
|
-
}, {
|
|
214
|
-
readonly name: "account";
|
|
215
|
-
readonly type: "address";
|
|
216
|
-
readonly internalType: "address";
|
|
217
|
-
}];
|
|
218
|
-
readonly outputs: readonly [];
|
|
219
|
-
readonly stateMutability: "nonpayable";
|
|
220
|
-
}, {
|
|
221
|
-
readonly type: "function";
|
|
222
|
-
readonly name: "setFeeReceiver";
|
|
223
|
-
readonly inputs: readonly [{
|
|
224
|
-
readonly name: "_feeReceiver";
|
|
225
|
-
readonly type: "address";
|
|
226
|
-
readonly internalType: "address";
|
|
227
|
-
}];
|
|
228
|
-
readonly outputs: readonly [];
|
|
229
|
-
readonly stateMutability: "nonpayable";
|
|
230
|
-
}, {
|
|
231
|
-
readonly type: "function";
|
|
232
|
-
readonly name: "supportsInterface";
|
|
233
|
-
readonly inputs: readonly [{
|
|
234
|
-
readonly name: "interfaceId";
|
|
235
|
-
readonly type: "bytes4";
|
|
236
|
-
readonly internalType: "bytes4";
|
|
237
|
-
}];
|
|
238
|
-
readonly outputs: readonly [{
|
|
239
|
-
readonly name: "";
|
|
240
|
-
readonly type: "bool";
|
|
241
|
-
readonly internalType: "bool";
|
|
242
|
-
}];
|
|
243
|
-
readonly stateMutability: "view";
|
|
244
|
-
}, {
|
|
245
|
-
readonly type: "function";
|
|
246
|
-
readonly name: "swap";
|
|
247
|
-
readonly inputs: readonly [{
|
|
248
|
-
readonly name: "inputData";
|
|
249
|
-
readonly type: "tuple";
|
|
250
|
-
readonly internalType: "struct SwapInputData";
|
|
251
|
-
readonly components: readonly [{
|
|
252
|
-
readonly name: "tokenIn";
|
|
253
|
-
readonly type: "address";
|
|
254
|
-
readonly internalType: "address";
|
|
255
|
-
}, {
|
|
256
|
-
readonly name: "amountIn";
|
|
257
|
-
readonly type: "uint256";
|
|
258
|
-
readonly internalType: "uint256";
|
|
259
|
-
}, {
|
|
260
|
-
readonly name: "isNative";
|
|
261
|
-
readonly type: "bool";
|
|
262
|
-
readonly internalType: "bool";
|
|
263
|
-
}, {
|
|
264
|
-
readonly name: "isPermit2Approval";
|
|
265
|
-
readonly type: "bool";
|
|
266
|
-
readonly internalType: "bool";
|
|
267
|
-
}, {
|
|
268
|
-
readonly name: "permit2SpenderAddress";
|
|
269
|
-
readonly type: "address";
|
|
270
|
-
readonly internalType: "address";
|
|
271
|
-
}];
|
|
272
|
-
}, {
|
|
273
|
-
readonly name: "outputData";
|
|
274
|
-
readonly type: "tuple";
|
|
275
|
-
readonly internalType: "struct SwapOutputData";
|
|
276
|
-
readonly components: readonly [{
|
|
277
|
-
readonly name: "tokenOut";
|
|
278
|
-
readonly type: "address";
|
|
279
|
-
readonly internalType: "address";
|
|
280
|
-
}, {
|
|
281
|
-
readonly name: "receiver";
|
|
282
|
-
readonly type: "address";
|
|
283
|
-
readonly internalType: "address";
|
|
284
|
-
}, {
|
|
285
|
-
readonly name: "minAmountOut";
|
|
286
|
-
readonly type: "uint256";
|
|
287
|
-
readonly internalType: "uint256";
|
|
288
|
-
}, {
|
|
289
|
-
readonly name: "isNative";
|
|
290
|
-
readonly type: "bool";
|
|
291
|
-
readonly internalType: "bool";
|
|
292
|
-
}];
|
|
293
|
-
}, {
|
|
294
|
-
readonly name: "aggregatorData";
|
|
295
|
-
readonly type: "tuple";
|
|
296
|
-
readonly internalType: "struct AggregatorData";
|
|
297
|
-
readonly components: readonly [{
|
|
298
|
-
readonly name: "aggregator";
|
|
299
|
-
readonly type: "address";
|
|
300
|
-
readonly internalType: "address";
|
|
301
|
-
}, {
|
|
302
|
-
readonly name: "data";
|
|
303
|
-
readonly type: "bytes";
|
|
304
|
-
readonly internalType: "bytes";
|
|
305
|
-
}];
|
|
306
|
-
}, {
|
|
307
|
-
readonly name: "swapAndStakeData";
|
|
308
|
-
readonly type: "tuple";
|
|
309
|
-
readonly internalType: "struct SwapAndStakeData";
|
|
310
|
-
readonly components: readonly [{
|
|
311
|
-
readonly name: "isSwapAndStake";
|
|
312
|
-
readonly type: "bool";
|
|
313
|
-
readonly internalType: "bool";
|
|
314
|
-
}, {
|
|
315
|
-
readonly name: "rewardVault";
|
|
316
|
-
readonly type: "address";
|
|
317
|
-
readonly internalType: "address";
|
|
318
|
-
}];
|
|
319
|
-
}];
|
|
320
|
-
readonly outputs: readonly [{
|
|
321
|
-
readonly name: "amountOut";
|
|
322
|
-
readonly type: "uint256";
|
|
323
|
-
readonly internalType: "uint256";
|
|
324
|
-
}];
|
|
325
|
-
readonly stateMutability: "payable";
|
|
326
|
-
}, {
|
|
327
|
-
readonly type: "function";
|
|
328
|
-
readonly name: "unpause";
|
|
329
|
-
readonly inputs: readonly [];
|
|
330
|
-
readonly outputs: readonly [];
|
|
331
|
-
readonly stateMutability: "nonpayable";
|
|
332
|
-
}, {
|
|
333
|
-
readonly type: "function";
|
|
334
|
-
readonly name: "wbera";
|
|
335
|
-
readonly inputs: readonly [];
|
|
336
|
-
readonly outputs: readonly [{
|
|
337
|
-
readonly name: "";
|
|
338
|
-
readonly type: "address";
|
|
339
|
-
readonly internalType: "contract IWBERA";
|
|
340
|
-
}];
|
|
341
|
-
readonly stateMutability: "view";
|
|
342
|
-
}, {
|
|
343
|
-
readonly type: "function";
|
|
344
|
-
readonly name: "whitelistAggregator";
|
|
345
|
-
readonly inputs: readonly [{
|
|
346
|
-
readonly name: "aggregator";
|
|
347
|
-
readonly type: "address";
|
|
348
|
-
readonly internalType: "address";
|
|
349
|
-
}, {
|
|
350
|
-
readonly name: "whitelistStatus";
|
|
351
|
-
readonly type: "bool";
|
|
352
|
-
readonly internalType: "bool";
|
|
353
|
-
}];
|
|
354
|
-
readonly outputs: readonly [];
|
|
355
|
-
readonly stateMutability: "nonpayable";
|
|
356
|
-
}, {
|
|
357
|
-
readonly type: "event";
|
|
358
|
-
readonly name: "AggregatorWhitelisted";
|
|
359
|
-
readonly inputs: readonly [{
|
|
360
|
-
readonly name: "aggregator";
|
|
361
|
-
readonly type: "address";
|
|
362
|
-
readonly indexed: true;
|
|
363
|
-
readonly internalType: "address";
|
|
364
|
-
}, {
|
|
365
|
-
readonly name: "whitelistStatus";
|
|
366
|
-
readonly type: "bool";
|
|
367
|
-
readonly indexed: false;
|
|
368
|
-
readonly internalType: "bool";
|
|
369
|
-
}];
|
|
370
|
-
readonly anonymous: false;
|
|
371
|
-
}, {
|
|
372
|
-
readonly type: "event";
|
|
373
|
-
readonly name: "FeeReceiverSet";
|
|
374
|
-
readonly inputs: readonly [{
|
|
375
|
-
readonly name: "newFeeReceiver";
|
|
376
|
-
readonly type: "address";
|
|
377
|
-
readonly indexed: true;
|
|
378
|
-
readonly internalType: "address";
|
|
379
|
-
}, {
|
|
380
|
-
readonly name: "previousFeeReceiver";
|
|
381
|
-
readonly type: "address";
|
|
382
|
-
readonly indexed: true;
|
|
383
|
-
readonly internalType: "address";
|
|
384
|
-
}];
|
|
385
|
-
readonly anonymous: false;
|
|
386
|
-
}, {
|
|
387
|
-
readonly type: "event";
|
|
388
|
-
readonly name: "Paused";
|
|
389
|
-
readonly inputs: readonly [{
|
|
390
|
-
readonly name: "account";
|
|
391
|
-
readonly type: "address";
|
|
392
|
-
readonly indexed: false;
|
|
393
|
-
readonly internalType: "address";
|
|
394
|
-
}];
|
|
395
|
-
readonly anonymous: false;
|
|
396
|
-
}, {
|
|
397
|
-
readonly type: "event";
|
|
398
|
-
readonly name: "RoleAdminChanged";
|
|
399
|
-
readonly inputs: readonly [{
|
|
400
|
-
readonly name: "role";
|
|
401
|
-
readonly type: "bytes32";
|
|
402
|
-
readonly indexed: true;
|
|
403
|
-
readonly internalType: "bytes32";
|
|
404
|
-
}, {
|
|
405
|
-
readonly name: "previousAdminRole";
|
|
406
|
-
readonly type: "bytes32";
|
|
407
|
-
readonly indexed: true;
|
|
408
|
-
readonly internalType: "bytes32";
|
|
409
|
-
}, {
|
|
410
|
-
readonly name: "newAdminRole";
|
|
411
|
-
readonly type: "bytes32";
|
|
412
|
-
readonly indexed: true;
|
|
413
|
-
readonly internalType: "bytes32";
|
|
414
|
-
}];
|
|
415
|
-
readonly anonymous: false;
|
|
416
|
-
}, {
|
|
417
|
-
readonly type: "event";
|
|
418
|
-
readonly name: "RoleGranted";
|
|
419
|
-
readonly inputs: readonly [{
|
|
420
|
-
readonly name: "role";
|
|
421
|
-
readonly type: "bytes32";
|
|
422
|
-
readonly indexed: true;
|
|
423
|
-
readonly internalType: "bytes32";
|
|
424
|
-
}, {
|
|
425
|
-
readonly name: "account";
|
|
426
|
-
readonly type: "address";
|
|
427
|
-
readonly indexed: true;
|
|
428
|
-
readonly internalType: "address";
|
|
429
|
-
}, {
|
|
430
|
-
readonly name: "sender";
|
|
431
|
-
readonly type: "address";
|
|
432
|
-
readonly indexed: true;
|
|
433
|
-
readonly internalType: "address";
|
|
434
|
-
}];
|
|
435
|
-
readonly anonymous: false;
|
|
436
|
-
}, {
|
|
437
|
-
readonly type: "event";
|
|
438
|
-
readonly name: "RoleRevoked";
|
|
439
|
-
readonly inputs: readonly [{
|
|
440
|
-
readonly name: "role";
|
|
441
|
-
readonly type: "bytes32";
|
|
442
|
-
readonly indexed: true;
|
|
443
|
-
readonly internalType: "bytes32";
|
|
444
|
-
}, {
|
|
445
|
-
readonly name: "account";
|
|
446
|
-
readonly type: "address";
|
|
447
|
-
readonly indexed: true;
|
|
448
|
-
readonly internalType: "address";
|
|
449
|
-
}, {
|
|
450
|
-
readonly name: "sender";
|
|
451
|
-
readonly type: "address";
|
|
452
|
-
readonly indexed: true;
|
|
453
|
-
readonly internalType: "address";
|
|
454
|
-
}];
|
|
455
|
-
readonly anonymous: false;
|
|
456
|
-
}, {
|
|
457
|
-
readonly type: "event";
|
|
458
|
-
readonly name: "Swap";
|
|
459
|
-
readonly inputs: readonly [{
|
|
460
|
-
readonly name: "sender";
|
|
461
|
-
readonly type: "address";
|
|
462
|
-
readonly indexed: true;
|
|
463
|
-
readonly internalType: "address";
|
|
464
|
-
}, {
|
|
465
|
-
readonly name: "tokenIn";
|
|
466
|
-
readonly type: "address";
|
|
467
|
-
readonly indexed: false;
|
|
468
|
-
readonly internalType: "address";
|
|
469
|
-
}, {
|
|
470
|
-
readonly name: "amountIn";
|
|
471
|
-
readonly type: "uint256";
|
|
472
|
-
readonly indexed: false;
|
|
473
|
-
readonly internalType: "uint256";
|
|
474
|
-
}, {
|
|
475
|
-
readonly name: "aggregator";
|
|
476
|
-
readonly type: "address";
|
|
477
|
-
readonly indexed: true;
|
|
478
|
-
readonly internalType: "address";
|
|
479
|
-
}, {
|
|
480
|
-
readonly name: "tokenOut";
|
|
481
|
-
readonly type: "address";
|
|
482
|
-
readonly indexed: true;
|
|
483
|
-
readonly internalType: "address";
|
|
484
|
-
}, {
|
|
485
|
-
readonly name: "amountOut";
|
|
486
|
-
readonly type: "uint256";
|
|
487
|
-
readonly indexed: false;
|
|
488
|
-
readonly internalType: "uint256";
|
|
489
|
-
}, {
|
|
490
|
-
readonly name: "fees";
|
|
491
|
-
readonly type: "uint256";
|
|
492
|
-
readonly indexed: false;
|
|
493
|
-
readonly internalType: "uint256";
|
|
494
|
-
}];
|
|
495
|
-
readonly anonymous: false;
|
|
496
|
-
}, {
|
|
497
|
-
readonly type: "event";
|
|
498
|
-
readonly name: "SwapAndStake";
|
|
499
|
-
readonly inputs: readonly [{
|
|
500
|
-
readonly name: "sender";
|
|
501
|
-
readonly type: "address";
|
|
502
|
-
readonly indexed: true;
|
|
503
|
-
readonly internalType: "address";
|
|
504
|
-
}, {
|
|
505
|
-
readonly name: "receiver";
|
|
506
|
-
readonly type: "address";
|
|
507
|
-
readonly indexed: true;
|
|
508
|
-
readonly internalType: "address";
|
|
509
|
-
}, {
|
|
510
|
-
readonly name: "rewardVault";
|
|
511
|
-
readonly type: "address";
|
|
512
|
-
readonly indexed: true;
|
|
513
|
-
readonly internalType: "address";
|
|
514
|
-
}, {
|
|
515
|
-
readonly name: "amount";
|
|
516
|
-
readonly type: "uint256";
|
|
517
|
-
readonly indexed: false;
|
|
518
|
-
readonly internalType: "uint256";
|
|
519
|
-
}];
|
|
520
|
-
readonly anonymous: false;
|
|
521
|
-
}, {
|
|
522
|
-
readonly type: "event";
|
|
523
|
-
readonly name: "Unpaused";
|
|
524
|
-
readonly inputs: readonly [{
|
|
525
|
-
readonly name: "account";
|
|
526
|
-
readonly type: "address";
|
|
527
|
-
readonly indexed: false;
|
|
528
|
-
readonly internalType: "address";
|
|
529
|
-
}];
|
|
530
|
-
readonly anonymous: false;
|
|
531
|
-
}, {
|
|
532
|
-
readonly type: "error";
|
|
533
|
-
readonly name: "AccessControlBadConfirmation";
|
|
534
|
-
readonly inputs: readonly [];
|
|
535
|
-
}, {
|
|
536
|
-
readonly type: "error";
|
|
537
|
-
readonly name: "AccessControlUnauthorizedAccount";
|
|
538
|
-
readonly inputs: readonly [{
|
|
539
|
-
readonly name: "account";
|
|
540
|
-
readonly type: "address";
|
|
541
|
-
readonly internalType: "address";
|
|
542
|
-
}, {
|
|
543
|
-
readonly name: "neededRole";
|
|
544
|
-
readonly type: "bytes32";
|
|
545
|
-
readonly internalType: "bytes32";
|
|
546
|
-
}];
|
|
547
|
-
}, {
|
|
548
|
-
readonly type: "error";
|
|
549
|
-
readonly name: "AggregatorNotWhitelisted";
|
|
550
|
-
readonly inputs: readonly [];
|
|
551
|
-
}, {
|
|
552
|
-
readonly type: "error";
|
|
553
|
-
readonly name: "EnforcedPause";
|
|
554
|
-
readonly inputs: readonly [];
|
|
555
|
-
}, {
|
|
556
|
-
readonly type: "error";
|
|
557
|
-
readonly name: "ExpectedPause";
|
|
558
|
-
readonly inputs: readonly [];
|
|
559
|
-
}, {
|
|
560
|
-
readonly type: "error";
|
|
561
|
-
readonly name: "InvalidInputToken";
|
|
562
|
-
readonly inputs: readonly [];
|
|
563
|
-
}, {
|
|
564
|
-
readonly type: "error";
|
|
565
|
-
readonly name: "InvalidNativeTokenAmount";
|
|
566
|
-
readonly inputs: readonly [];
|
|
567
|
-
}, {
|
|
568
|
-
readonly type: "error";
|
|
569
|
-
readonly name: "InvalidOutputToken";
|
|
570
|
-
readonly inputs: readonly [];
|
|
571
|
-
}, {
|
|
572
|
-
readonly type: "error";
|
|
573
|
-
readonly name: "Reentrancy";
|
|
574
|
-
readonly inputs: readonly [];
|
|
575
|
-
}, {
|
|
576
|
-
readonly type: "error";
|
|
577
|
-
readonly name: "RewardVaultNotWhitelisted";
|
|
578
|
-
readonly inputs: readonly [];
|
|
579
|
-
}, {
|
|
580
|
-
readonly type: "error";
|
|
581
|
-
readonly name: "TokenOutCannotBeSame";
|
|
582
|
-
readonly inputs: readonly [];
|
|
583
|
-
}, {
|
|
584
|
-
readonly type: "error";
|
|
585
|
-
readonly name: "TokenOutIsNotStakeToken";
|
|
586
|
-
readonly inputs: readonly [];
|
|
587
|
-
}, {
|
|
588
|
-
readonly type: "error";
|
|
589
|
-
readonly name: "ZeroAddress";
|
|
590
|
-
readonly inputs: readonly [];
|
|
591
|
-
}];
|
|
592
|
-
|
|
593
|
-
export { aggregatorsRouterAbi as a };
|
package/dist/chunk-22MQVFHP.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkJMKLDDKYcjs = require('./chunk-JMKLDDKY.cjs');var k={isGovernanceEnabled:!0,enableEip5792:!1,proxyAggregatorsThroughVercel:!1,isEmbeddedWalletsEnabled:!0,enableSimulateCalls:!1,isBendVaultDataHourly:!0,isMultiChainZapBendEnabled:!1,mockValidatorOperator:!1,mockValidatorRewardAllocator:!1,mockRewardDurationManager:!1,mockIncentiveManager:!1,isHoneyPythWrapperEnabled:!0};var _internal = require('@berachain/config/internal');function i(o){let a=_nullishCoalesce(o.chainId, () => (_internal.defaultChainId)),e=_nullishCoalesce(o.config, () => (_internal.chainConfigs[a]));if(o.chainId&&o.chainId!==e.chainId)throw new (0, _chunkJMKLDDKYcjs.g)({property:"chainId",value:a,expected:`config.chainId: ${e.chainId}`});return{config:e,chainId:e.chainId}}var _viem = require('viem');var _mainnet = require('@berachain/config/mainnet'); var _mainnet2 = _interopRequireDefault(_mainnet);var I={address:_viem.zeroAddress,decimals:18,name:"Bera",symbol:"BERA",logoURI:"https://res.cloudinary.com/duv0g402y/image/upload/v1738720154/brand/berachain-chain-logo.png.png"},R= exports.d ={address:_mainnet2.default.tokens.wbera,decimals:18,name:"WBera",symbol:"WBERA"};function C(o){let{config:a}=i(o);return{address:a.honey.token,symbol:"HONEY",name:"Honey",decimals:18}}function W(...o){let[a,e,t]=o;if(a===void 0)return!1;let n=typeof a=="string"?a:a.address;if(typeof e=="string"&&!_viem.isAddress.call(void 0, e)){if(e==="BERA")return n.toLowerCase()===_viem.zeroAddress;if(e==="WBERA")return n.toLowerCase()===_mainnet2.default.tokens.wbera;if(e==="ETH")return n.toLowerCase()===_viem.ethAddress;if(t===void 0)throw new (0, _chunkJMKLDDKYcjs.g)({property:"baseArgs",value:t,expected:"BeraJS.BaseFunctionArgs",message:"baseArgs is required when compared to a known token different than BERA or WBERA"});let{config:s}=i(t),d={BGT:s.tokens.bgt,HONEY:s.honey.token,SWBERA:s.tokens.swbera,ETH:_viem.ethAddress};if(e in d)return n.toLowerCase()===d[e].toLowerCase()}let f=typeof e=="object"?e.address:e;return n.toLowerCase()===f.toLowerCase()}exports.a = k; exports.b = i; exports.c = I; exports.d = R; exports.e = C; exports.f = W;
|
|
2
|
-
//# sourceMappingURL=chunk-22MQVFHP.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/pong/coding/monobera/packages/berajs/dist/chunk-22MQVFHP.cjs","../src/contexts/BeraFlags/defaultFlags.ts","../src/utils/parseBaseArgs.ts"],"names":["defaultFlags","parseBaseArgs","args","chainId","defaultChainId","config","chainConfigs","InvalidArgumentError"],"mappings":"AAAA,qUAAwC,IC4B3BA,CAAAA,CAA0B,CACrC,mBAAA,CAAqB,CAAA,CAAA,CACrB,aAAA,CAAe,CAAA,CAAA,CACf,6BAAA,CAA+B,CAAA,CAAA,CAC/B,wBAAA,CAA0B,CAAA,CAAA,CAC1B,mBAAA,CAAqB,CAAA,CAAA,CACrB,qBAAA,CAAuB,CAAA,CAAA,CACvB,0BAAA,CAA4B,CAAA,CAAA,CAC5B,qBAAA,CAAuB,CAAA,CAAA,CACvB,4BAAA,CAA8B,CAAA,CAAA,CAC9B,yBAAA,CAA2B,CAAA,CAAA,CAC3B,oBAAA,CAAsB,CAAA,CAAA,CACtB,yBAAA,CAA2B,CAAA,CAC7B,CAAA,CCzCA,sDAIO,SAISC,CAAAA,CAAcC,CAAAA,CAA+B,CAC3D,IAAMC,CAAAA,kBAAUD,CAAAA,CAAK,OAAA,SAAWE,0BAAAA,CAC1BC,CAAAA,kBAAqBH,CAAAA,CAAK,MAAA,SAAUI,sBAAAA,CAAaH,CAAO,GAAA,CAE9D,EAAA,CAAID,CAAAA,CAAK,OAAA,EAAWA,CAAAA,CAAK,OAAA,GAAYG,CAAAA,CAAO,OAAA,CAE1C,MAAM,IAAIE,wBAAAA,CAAqB,CAC7B,QAAA,CAAU,SAAA,CACV,KAAA,CAAOJ,CAAAA,CACP,QAAA,CAAU,CAAA,gBAAA,EAAmBE,CAAAA,CAAO,OAAO,CAAA,CAAA","file":"/Users/pong/coding/monobera/packages/berajs/dist/chunk-22MQVFHP.cjs","sourcesContent":[null,"import type { flags } from \"@berachain/config/internal/flags\";\n\ntype ClientSideFlags = keyof typeof flags;\n\nexport type BeraFlags = Record<\n Extract<\n ClientSideFlags,\n // We don't want to have all flags on the context. Just the ones that cannot be used server side only\n // this is because we generally should prefer server side flags, also according to flag-sdk docs\n | \"isGovernanceEnabled\"\n | \"enableEip5792\"\n | \"proxyAggregatorsThroughVercel\"\n | \"isEmbeddedWalletsEnabled\"\n | \"enableSimulateCalls\"\n | \"isBendVaultDataHourly\"\n | \"isMultiChainZapBendEnabled\"\n | \"mockValidatorOperator\"\n | \"mockValidatorRewardAllocator\"\n | \"mockRewardDurationManager\"\n | \"mockIncentiveManager\"\n | \"isHoneyPythWrapperEnabled\"\n >,\n boolean | undefined\n>;\n\n/**\n * @private\n */\nexport const defaultFlags: BeraFlags = {\n isGovernanceEnabled: true,\n enableEip5792: false,\n proxyAggregatorsThroughVercel: false,\n isEmbeddedWalletsEnabled: true,\n enableSimulateCalls: false,\n isBendVaultDataHourly: true,\n isMultiChainZapBendEnabled: false,\n mockValidatorOperator: false,\n mockValidatorRewardAllocator: false,\n mockRewardDurationManager: false,\n mockIncentiveManager: false,\n isHoneyPythWrapperEnabled: true,\n};\n","import {\n type BeraConfig,\n chainConfigs,\n defaultChainId,\n} from \"@berachain/config/internal\";\n\nimport { InvalidArgumentError } from \"~/errors/InvalidArgumentError\";\n\nexport function parseBaseArgs(args: BeraJS.BaseFunctionArgs) {\n const chainId = args.chainId ?? defaultChainId;\n const config: BeraConfig = args.config ?? chainConfigs[chainId];\n\n if (args.chainId && args.chainId !== config.chainId) {\n // this matches unless the config is explicitly provided\n throw new InvalidArgumentError({\n property: \"chainId\",\n value: chainId,\n expected: `config.chainId: ${config.chainId}`,\n });\n }\n\n return { config, chainId: config.chainId };\n}\n"]}
|