@berachain/berajs 0.2.12 → 0.2.13
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/{RequestError-DBOIV65x.d.ts → RequestError-DkUbo3ro.d.ts} +1 -0
- package/dist/abi/bend/bundler.d.ts +100 -0
- package/dist/abi/bend/bundler.d.ts.map +1 -0
- package/dist/abi/bend/generalAdapter.d.ts +651 -0
- package/dist/abi/bend/generalAdapter.d.ts.map +1 -0
- package/dist/abi/bend/morphoVault.d.ts +1991 -0
- package/dist/abi/bend/morphoVault.d.ts.map +1 -0
- package/dist/abi/bend/publicAllocator.d.ts +448 -0
- package/dist/abi/bend/publicAllocator.d.ts.map +1 -0
- package/dist/abi/enso/ensoRouterAbi.d.ts +215 -0
- package/dist/abi/enso/ensoRouterAbi.d.ts.map +1 -0
- package/dist/abi/enso/ensoWalletV2Factory.d.ts +16 -0
- package/dist/abi/enso/ensoWalletV2Factory.d.ts.map +1 -0
- package/dist/abi/exports.d.ts +13 -6574
- package/dist/abi/exports.d.ts.map +1 -0
- package/dist/abi/exports.mjs +4 -3
- package/dist/abi/exports.mjs.map +1 -0
- package/dist/abi/pyth/pyth.d.ts +434 -0
- package/dist/abi/pyth/pyth.d.ts.map +1 -0
- package/dist/abi/pyth/pythErrors.d.ts +58 -0
- package/dist/abi/pyth/pythErrors.d.ts.map +1 -0
- package/dist/abi/utils/EIP7702StatelessDelegator.d.ts +799 -0
- package/dist/abi/utils/EIP7702StatelessDelegator.d.ts.map +1 -0
- package/dist/abi/utils/bundler3errors.d.ts +18 -0
- package/dist/abi/utils/bundler3errors.d.ts.map +1 -0
- package/dist/abi/utils/commonAbiErrors.d.ts +302 -0
- package/dist/abi/utils/commonAbiErrors.d.ts.map +1 -0
- package/dist/abi/utils/erc20errors.d.ts +167 -0
- package/dist/abi/utils/erc20errors.d.ts.map +1 -0
- package/dist/abi/utils/merkleDistributor.d.ts +655 -0
- package/dist/abi/utils/merkleDistributor.d.ts.map +1 -0
- package/dist/abi/utils/multicall3.d.ts +337 -0
- package/dist/abi/utils/multicall3.d.ts.map +1 -0
- package/dist/abi/utils/openChainErrors.d.ts +126 -0
- package/dist/abi/utils/openChainErrors.d.ts.map +1 -0
- package/dist/abi/utils/thirdwebMinimalAccount.d.ts +869 -0
- package/dist/abi/utils/thirdwebMinimalAccount.d.ts.map +1 -0
- package/dist/abi/utils/upgradableBeacon.d.ts +97 -0
- package/dist/abi/utils/upgradableBeacon.d.ts.map +1 -0
- package/dist/actions/__test/transports.d.ts +18 -0
- package/dist/actions/__test/transports.d.ts.map +1 -0
- package/dist/actions/bend/getConvertToAssets.d.ts +11 -0
- package/dist/actions/bend/getConvertToAssets.d.ts.map +1 -0
- package/dist/actions/bend/getMaxDeposit.d.ts +26 -0
- package/dist/actions/bend/getMaxDeposit.d.ts.map +1 -0
- package/dist/actions/clients/BeraApolloClient.d.ts +28 -0
- package/dist/actions/clients/BeraApolloClient.d.ts.map +1 -0
- package/dist/actions/clients/exports.d.ts +4 -62
- package/dist/actions/clients/exports.d.ts.map +1 -0
- package/dist/actions/clients/exports.mjs +11 -10
- package/dist/actions/clients/exports.mjs.map +1 -0
- package/dist/actions/clients/fetchBeep.d.ts +12 -0
- package/dist/actions/clients/fetchBeep.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.d.ts +48 -0
- package/dist/actions/clients/fetchOpenApi.d.ts.map +1 -0
- package/dist/actions/clients/fetchOpenApi.unit.test.d.ts +2 -0
- package/dist/actions/clients/fetchOpenApi.unit.test.d.ts.map +1 -0
- package/dist/actions/clients/getApolloClient.d.ts +11 -0
- package/dist/actions/clients/getApolloClient.d.ts.map +1 -0
- package/dist/actions/clients/getEnsoClient.d.ts +11 -0
- package/dist/actions/clients/getEnsoClient.d.ts.map +1 -0
- package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts +2 -0
- package/dist/actions/dex/__tests__/aggregators.unit.test.d.ts.map +1 -0
- package/dist/actions/dex/__tests__/allPools.integration.test.d.ts +2 -0
- package/dist/actions/dex/__tests__/allPools.integration.test.d.ts.map +1 -0
- package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts +2 -0
- package/dist/actions/dex/__tests__/getOnChainPool.unit.test.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/base.d.ts +89 -0
- package/dist/actions/dex/aggregators/base.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/bex.d.ts +26 -0
- package/dist/actions/dex/aggregators/bex.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/bgt.d.ts +17 -0
- package/dist/actions/dex/aggregators/bgt.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/enso/enso.d.ts +15 -0
- package/dist/actions/dex/aggregators/enso/enso.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts +14 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts +2 -0
- package/dist/actions/dex/aggregators/enso/ensoErc4626.debug.test.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/erc4626.d.ts +32 -0
- package/dist/actions/dex/aggregators/erc4626.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/fly.d.ts +14 -0
- package/dist/actions/dex/aggregators/fly.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/haiku.d.ts +14 -0
- package/dist/actions/dex/aggregators/haiku.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/haiku.integration.test.d.ts +2 -0
- package/dist/actions/dex/aggregators/haiku.integration.test.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/honey.d.ts +32 -0
- package/dist/actions/dex/aggregators/honey.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/kyberswap.d.ts +14 -0
- package/dist/actions/dex/aggregators/kyberswap.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/oogabooga.d.ts +13 -0
- package/dist/actions/dex/aggregators/oogabooga.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/openOcean.d.ts +15 -0
- package/dist/actions/dex/aggregators/openOcean.d.ts.map +1 -0
- package/dist/actions/dex/aggregators/wbera.d.ts +17 -0
- package/dist/actions/dex/aggregators/wbera.d.ts.map +1 -0
- package/dist/actions/dex/b-sdk.d.ts +3 -0
- package/dist/actions/dex/bSdk.d.ts +3 -0
- package/dist/actions/dex/bSdk.d.ts.map +1 -0
- package/dist/actions/dex/getAllPools.d.ts +58 -0
- package/dist/actions/dex/getAllPools.d.ts.map +1 -0
- package/dist/actions/dex/getApiPool.d.ts +390 -0
- package/dist/actions/dex/getApiPool.d.ts.map +1 -0
- package/dist/actions/dex/getGlobalLiquidityAndSwapVolume.d.ts +3 -0
- package/dist/actions/dex/getGlobalLiquidityAndSwapVolume.d.ts.map +1 -0
- package/dist/actions/dex/getOnChainPool.d.ts +42 -0
- package/dist/actions/dex/getOnChainPool.d.ts.map +1 -0
- package/dist/actions/dex/getPoolEvents.d.ts +7 -0
- package/dist/actions/dex/getPoolEvents.d.ts.map +1 -0
- package/dist/actions/dex/getPoolHistoricalData.d.ts +15 -0
- package/dist/actions/dex/getPoolHistoricalData.d.ts.map +1 -0
- package/dist/actions/dex/getPoolPausedState.d.ts +10 -0
- package/dist/actions/dex/getPoolPausedState.d.ts.map +1 -0
- package/dist/actions/dex/getPoolWithState.d.ts +4 -0
- package/dist/actions/dex/getPoolWithState.d.ts.map +1 -0
- package/dist/actions/dex/getVaultPausedState.d.ts +5 -0
- package/dist/actions/dex/getVaultPausedState.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.action.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendDemultiplyBundle.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.action.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getBendMultiplyBundle.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/helpers.d.ts +24 -0
- package/dist/actions/enso/__tests__/helpers.d.ts.map +1 -0
- package/dist/actions/enso/__tests__/util.unit.test.d.ts +2 -0
- package/dist/actions/enso/__tests__/util.unit.test.d.ts.map +1 -0
- package/dist/actions/enso/flashloan.d.ts +41 -0
- package/dist/actions/enso/flashloan.d.ts.map +1 -0
- package/dist/actions/enso/getBendDemultiplyBundle.d.ts +55 -0
- package/dist/actions/enso/getBendDemultiplyBundle.d.ts.map +1 -0
- package/dist/actions/enso/getBendMultiplyBundle.d.ts +70 -0
- package/dist/actions/enso/getBendMultiplyBundle.d.ts.map +1 -0
- package/dist/actions/enso/getEnsoSwapBundle.d.ts +3 -0
- package/dist/actions/enso/getEnsoSwapBundle.d.ts.map +1 -0
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts +16 -0
- package/dist/actions/enso/getEnsoUserTokensWithBalances.d.ts.map +1 -0
- package/dist/actions/enso/util.d.ts +40 -0
- package/dist/actions/enso/util.d.ts.map +1 -0
- package/dist/actions/exports.d.ts +100 -1682
- package/dist/actions/exports.d.ts.map +1 -0
- package/dist/actions/exports.mjs +45 -26
- package/dist/actions/exports.mjs.map +1 -0
- package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts +2 -0
- package/dist/actions/governance/__tests__/checkProposalField.unit.test.d.ts.map +1 -0
- package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts +2 -0
- package/dist/actions/governance/__tests__/getDecodedFunctionData.integration.test.d.ts.map +1 -0
- package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts +2 -0
- package/dist/actions/governance/__tests__/getQuorum.integration.test.d.ts.map +1 -0
- package/dist/actions/governance/checkProposalField.d.ts +27 -0
- package/dist/actions/governance/checkProposalField.d.ts.map +1 -0
- package/dist/actions/governance/computeActualStatus.d.ts +14 -0
- package/dist/actions/governance/computeActualStatus.d.ts.map +1 -0
- package/dist/actions/governance/constants.d.ts +7 -0
- package/dist/actions/governance/constants.d.ts.map +1 -0
- package/dist/actions/governance/exports.d.ts +10 -132
- package/dist/actions/governance/exports.d.ts.map +1 -0
- package/dist/actions/governance/exports.mjs +5 -4
- package/dist/actions/governance/exports.mjs.map +1 -0
- package/dist/actions/governance/getAllProposals.d.ts +16 -0
- package/dist/actions/governance/getAllProposals.d.ts.map +1 -0
- package/dist/actions/governance/getBodyErrors.d.ts +10 -0
- package/dist/actions/governance/getBodyErrors.d.ts.map +1 -0
- package/dist/actions/governance/getDecodedFunctionData.d.ts +30 -0
- package/dist/actions/governance/getDecodedFunctionData.d.ts.map +1 -0
- package/dist/actions/governance/getProposalDetails.d.ts +10 -0
- package/dist/actions/governance/getProposalDetails.d.ts.map +1 -0
- package/dist/actions/governance/getProposalFromTx.d.ts +18 -0
- package/dist/actions/governance/getProposalFromTx.d.ts.map +1 -0
- package/dist/actions/governance/getProposalParams.d.ts +15 -0
- package/dist/actions/governance/getProposalParams.d.ts.map +1 -0
- package/dist/actions/governance/getProposalVotes.d.ts +10 -0
- package/dist/actions/governance/getProposalVotes.d.ts.map +1 -0
- package/dist/actions/governance/getQuorum.d.ts +13 -0
- package/dist/actions/governance/getQuorum.d.ts.map +1 -0
- package/dist/actions/governance/parseProposalBody.d.ts +13 -0
- package/dist/actions/governance/parseProposalBody.d.ts.map +1 -0
- package/dist/actions/honey/getChartData.d.ts +13 -0
- package/dist/actions/honey/getChartData.d.ts.map +1 -0
- package/dist/actions/honey/getCollateralWeights.d.ts +19 -0
- package/dist/actions/honey/getCollateralWeights.d.ts.map +1 -0
- package/dist/actions/honey/getGlobalCapLimit.d.ts +24 -0
- package/dist/actions/honey/getGlobalCapLimit.d.ts.map +1 -0
- package/dist/actions/honey/getHoney24hVolume.d.ts +9 -0
- package/dist/actions/honey/getHoney24hVolume.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyCollaterals.d.ts +33 -0
- package/dist/actions/honey/getHoneyCollaterals.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyFees.d.ts +24 -0
- package/dist/actions/honey/getHoneyFees.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyPausedState.d.ts +9 -0
- package/dist/actions/honey/getHoneyPausedState.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyPreview.d.ts +52 -0
- package/dist/actions/honey/getHoneyPreview.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyPythPriceOracle.d.ts +10 -0
- package/dist/actions/honey/getHoneyPythPriceOracle.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyRootPriceOracle.d.ts +9 -0
- package/dist/actions/honey/getHoneyRootPriceOracle.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyTxns.d.ts +21 -0
- package/dist/actions/honey/getHoneyTxns.d.ts.map +1 -0
- package/dist/actions/honey/getHoneyVaultsBalance.d.ts +13 -0
- package/dist/actions/honey/getHoneyVaultsBalance.d.ts.map +1 -0
- package/dist/actions/honey/getPythLatestPrices.d.ts +26 -0
- package/dist/actions/honey/getPythLatestPrices.d.ts.map +1 -0
- package/dist/actions/honey/getRelativeCapLimit.d.ts +23 -0
- package/dist/actions/honey/getRelativeCapLimit.d.ts.map +1 -0
- package/dist/actions/honey/getSharesWithoutFees.d.ts +25 -0
- package/dist/actions/honey/getSharesWithoutFees.d.ts.map +1 -0
- package/dist/actions/honey/getSwapPayload.d.ts +24 -0
- package/dist/actions/honey/getSwapPayload.d.ts.map +1 -0
- package/dist/actions/honey/isBadCollateralAsset.d.ts +24 -0
- package/dist/actions/honey/isBadCollateralAsset.d.ts.map +1 -0
- package/dist/actions/honey/isBasketModeEnabled.d.ts +11 -0
- package/dist/actions/honey/isBasketModeEnabled.d.ts.map +1 -0
- package/dist/actions/honey/tests/pyth.integration.test.d.ts +2 -0
- package/dist/actions/honey/tests/pyth.integration.test.d.ts.map +1 -0
- package/dist/actions/misc/getBlockTimestamp.d.ts +14 -0
- package/dist/actions/misc/getBlockTimestamp.d.ts.map +1 -0
- package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts +2 -0
- package/dist/actions/pol/__tests__/getAllValidators.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts +2 -0
- package/dist/actions/pol/__tests__/getValidator.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts +2 -0
- package/dist/actions/pol/__tests__/rewardVaults.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/getAutoclaimedIncentives.d.ts +14 -0
- package/dist/actions/pol/getAutoclaimedIncentives.d.ts.map +1 -0
- package/dist/actions/pol/getAutoclaimedIncentivesTxHash.d.ts +14 -0
- package/dist/actions/pol/getAutoclaimedIncentivesTxHash.d.ts.map +1 -0
- package/dist/actions/pol/getBGTGlobalInfo.d.ts +10 -0
- package/dist/actions/pol/getBGTGlobalInfo.d.ts.map +1 -0
- package/dist/actions/pol/getBeraTokenTotalSupply.d.ts +7 -0
- package/dist/actions/pol/getBeraTokenTotalSupply.d.ts.map +1 -0
- package/dist/actions/pol/getBgtAprSimulation.d.ts +88 -0
- package/dist/actions/pol/getBgtAprSimulation.d.ts.map +1 -0
- package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts +2 -0
- package/dist/actions/pol/getBgtAprSimultaion.unit.test.d.ts.map +1 -0
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts +10 -0
- package/dist/actions/pol/getBgtIncentiveDistributorPaused.d.ts.map +1 -0
- package/dist/actions/pol/getBgtTokenTotalBoosts.d.ts +6 -0
- package/dist/actions/pol/getBgtTokenTotalBoosts.d.ts.map +1 -0
- package/dist/actions/pol/getBgtTokenTotalSupply.d.ts +6 -0
- package/dist/actions/pol/getBgtTokenTotalSupply.d.ts.map +1 -0
- package/dist/actions/pol/getBlockTime.d.ts +7 -0
- package/dist/actions/pol/getBlockTime.d.ts.map +1 -0
- package/dist/actions/pol/getBlockTime.debug.test.d.ts +2 -0
- package/dist/actions/pol/getBlockTime.debug.test.d.ts.map +1 -0
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts +42 -0
- package/dist/actions/pol/getEarnedStakedBeraVault.d.ts.map +1 -0
- package/dist/actions/pol/getGlobalData.d.ts +8 -0
- package/dist/actions/pol/getGlobalData.d.ts.map +1 -0
- package/dist/actions/pol/getHeroEarnVaults.d.ts +35 -0
- package/dist/actions/pol/getHeroEarnVaults.d.ts.map +1 -0
- package/dist/actions/pol/getLSTStakeConfig.d.ts +13 -0
- package/dist/actions/pol/getLSTStakeConfig.d.ts.map +1 -0
- package/dist/actions/pol/getMarkets.d.ts +9 -0
- package/dist/actions/pol/getMarkets.d.ts.map +1 -0
- package/dist/actions/pol/getRewardProofsByValidator.d.ts +9 -0
- package/dist/actions/pol/getRewardProofsByValidator.d.ts.map +1 -0
- package/dist/actions/pol/getRewardTokenToBeraRate.d.ts +12 -0
- package/dist/actions/pol/getRewardTokenToBeraRate.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVault.d.ts +13 -0
- package/dist/actions/pol/getRewardVault.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.d.ts +8 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts +2 -0
- package/dist/actions/pol/getRewardVaultBeaconImplementation.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.d.ts +12 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts +2 -0
- package/dist/actions/pol/getRewardVaultDurationConstants.integration.test.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultEarnedRewards.d.ts +14 -0
- package/dist/actions/pol/getRewardVaultEarnedRewards.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultFromToken.d.ts +7 -0
- package/dist/actions/pol/getRewardVaultFromToken.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultIncentives.d.ts +23 -0
- package/dist/actions/pol/getRewardVaultIncentives.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultRewards.d.ts +38 -0
- package/dist/actions/pol/getRewardVaultRewards.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaultStakingToken.d.ts +6 -0
- package/dist/actions/pol/getRewardVaultStakingToken.d.ts.map +1 -0
- package/dist/actions/pol/getRewardVaults.d.ts +14 -0
- package/dist/actions/pol/getRewardVaults.d.ts.map +1 -0
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts +32 -0
- package/dist/actions/pol/getSWBeraVaultMetadata.d.ts.map +1 -0
- package/dist/actions/pol/getSWBeraWithdrawal.d.ts +30 -0
- package/dist/actions/pol/getSWBeraWithdrawal.d.ts.map +1 -0
- package/dist/actions/pol/getStakeWithdrawalCooldown.d.ts +6 -0
- package/dist/actions/pol/getStakeWithdrawalCooldown.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraAPR.d.ts +12 -0
- package/dist/actions/pol/getStakedBeraAPR.d.ts.map +1 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts +12 -0
- package/dist/actions/pol/getStakedBeraSnapshots.d.ts.map +1 -0
- package/dist/actions/pol/getStakingDailyAssets.d.ts +10 -0
- package/dist/actions/pol/getStakingDailyAssets.d.ts.map +1 -0
- package/dist/actions/pol/getStakingTokenInformation.d.ts +9 -0
- package/dist/actions/pol/getStakingTokenInformation.d.ts.map +1 -0
- package/dist/actions/pol/getTotalStakedAmount.d.ts +13 -0
- package/dist/actions/pol/getTotalStakedAmount.d.ts.map +1 -0
- package/dist/actions/pol/getUserClaimableIncentives.d.ts +9 -0
- package/dist/actions/pol/getUserClaimableIncentives.d.ts.map +1 -0
- package/dist/actions/pol/getUserVaultInfo.d.ts +9 -0
- package/dist/actions/pol/getUserVaultInfo.d.ts.map +1 -0
- package/dist/actions/pol/getUserVaults.d.ts +18 -0
- package/dist/actions/pol/getUserVaults.d.ts.map +1 -0
- package/dist/actions/pol/getUserVaultsBalance.d.ts +11 -0
- package/dist/actions/pol/getUserVaultsBalance.d.ts.map +1 -0
- package/dist/actions/pol/getVaultHistory.d.ts +8 -0
- package/dist/actions/pol/getVaultHistory.d.ts.map +1 -0
- package/dist/actions/pol/getVaultValidators.d.ts +7 -0
- package/dist/actions/pol/getVaultValidators.d.ts.map +1 -0
- package/dist/actions/pol/getVaultsSupply.d.ts +7 -0
- package/dist/actions/pol/getVaultsSupply.d.ts.map +1 -0
- package/dist/actions/prices/__tests__/prices.integration.test.d.ts +2 -0
- package/dist/actions/prices/__tests__/prices.integration.test.d.ts.map +1 -0
- package/dist/actions/prices/getTokenCurrentPrices.d.ts +5 -0
- package/dist/actions/prices/getTokenCurrentPrices.d.ts.map +1 -0
- package/dist/actions/pyth/getHoneyPythFeeds.d.ts +12 -0
- package/dist/actions/pyth/getHoneyPythFeeds.d.ts.map +1 -0
- package/dist/actions/pyth/getUpdateFee.d.ts +6 -0
- package/dist/actions/pyth/getUpdateFee.d.ts.map +1 -0
- package/dist/actions/server/exports.d.ts +2 -13
- package/dist/actions/server/exports.d.ts.map +1 -0
- package/dist/actions/server/exports.mjs +28 -17
- package/dist/actions/server/exports.mjs.map +1 -0
- package/dist/actions/server/getDailyValidatorBlockStats.d.ts +14 -0
- package/dist/actions/server/getDailyValidatorBlockStats.d.ts.map +1 -0
- package/dist/actions/tokens/getAllowances.d.ts +10 -0
- package/dist/actions/tokens/getAllowances.d.ts.map +1 -0
- package/dist/actions/tokens/getTokenInformation.d.ts +11 -0
- package/dist/actions/tokens/getTokenInformation.d.ts.map +1 -0
- package/dist/actions/tokens/getTokens.d.ts +5 -0
- package/dist/actions/tokens/getTokens.d.ts.map +1 -0
- package/dist/actions/tokens/getUnderlyingToken.d.ts +12 -0
- package/dist/actions/tokens/getUnderlyingToken.d.ts.map +1 -0
- package/dist/actions/tokens/getWalletBalances.d.ts +499 -0
- package/dist/actions/tokens/getWalletBalances.d.ts.map +1 -0
- package/dist/actions/tokens/getWalletBalances.integration.test.d.ts +2 -0
- package/dist/actions/tokens/getWalletBalances.integration.test.d.ts.map +1 -0
- package/dist/actions/transactions/beraWriteContract.d.ts +19 -0
- package/dist/actions/transactions/beraWriteContract.d.ts.map +1 -0
- package/dist/actions/transactions/beraWriteContract.integration.test.d.ts +2 -0
- package/dist/actions/transactions/beraWriteContract.integration.test.d.ts.map +1 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts +30 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.d.ts.map +1 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts +2 -0
- package/dist/actions/validators/getActiveBoostAndCommissionChangeDelay.integration.test.d.ts.map +1 -0
- package/dist/actions/validators/getAllValidators.d.ts +5 -0
- package/dist/actions/validators/getAllValidators.d.ts.map +1 -0
- package/dist/actions/validators/getApiEnrichedAllocation.d.ts +6 -0
- package/dist/actions/validators/getApiEnrichedAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getApiValidator.d.ts +9 -0
- package/dist/actions/validators/getApiValidator.d.ts.map +1 -0
- package/dist/actions/validators/getBaselineRewardAllocation.d.ts +5 -0
- package/dist/actions/validators/getBaselineRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getDefaultRewardAllocation.d.ts +7 -0
- package/dist/actions/validators/getDefaultRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getStakingPoolBatch.d.ts +13 -0
- package/dist/actions/validators/getStakingPoolBatch.d.ts.map +1 -0
- package/dist/actions/validators/getUserActiveValidators.d.ts +12 -0
- package/dist/actions/validators/getUserActiveValidators.d.ts.map +1 -0
- package/dist/actions/validators/getUserBoosts.d.ts +7 -0
- package/dist/actions/validators/getUserBoosts.d.ts.map +1 -0
- package/dist/actions/validators/getUserBoostsOnValidator.d.ts +25 -0
- package/dist/actions/validators/getUserBoostsOnValidator.d.ts.map +1 -0
- package/dist/actions/validators/getUserStakingPositions.d.ts +20 -0
- package/dist/actions/validators/getUserStakingPositions.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorAnalytics.d.ts +12 -0
- package/dist/actions/validators/getValidatorAnalytics.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorCommission.d.ts +6 -0
- package/dist/actions/validators/getValidatorCommission.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorEstimatedBgtPerYear.d.ts +3 -0
- package/dist/actions/validators/getValidatorEstimatedBgtPerYear.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorIncentiveDistribution.d.ts +8 -0
- package/dist/actions/validators/getValidatorIncentiveDistribution.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorOperatorAddress.d.ts +6 -0
- package/dist/actions/validators/getValidatorOperatorAddress.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorQueuedCommission.d.ts +10 -0
- package/dist/actions/validators/getValidatorQueuedCommission.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorQueuedOperatorAddress.d.ts +7 -0
- package/dist/actions/validators/getValidatorQueuedOperatorAddress.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorQueuedRewardAllocation.d.ts +7 -0
- package/dist/actions/validators/getValidatorQueuedRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts +52 -0
- package/dist/actions/validators/getValidatorRewardAllocation.d.ts.map +1 -0
- package/dist/actions/validators/getValidatorRewardAllocatorAddress.d.ts +12 -0
- package/dist/actions/validators/getValidatorRewardAllocatorAddress.d.ts.map +1 -0
- package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts +2 -0
- package/dist/actions/validators/utils/__tests__/validatorUtils.integration.test.d.ts.map +1 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.d.ts +6 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.d.ts.map +1 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts +2 -0
- package/dist/actions/validators/utils/aggregateValidatorIncentives.unit.test.d.ts.map +1 -0
- package/dist/actions/validators/utils/getValidatorBoostApy.d.ts +7 -0
- package/dist/actions/validators/utils/getValidatorBoostApy.d.ts.map +1 -0
- package/dist/{chunk-E7YFXBBQ.mjs → chunk-35RACQD4.mjs} +7 -6
- package/dist/chunk-35RACQD4.mjs.map +1 -0
- package/dist/{chunk-BGMRHTBQ.mjs → chunk-7TFV6UKF.mjs} +1 -0
- package/dist/chunk-7TFV6UKF.mjs.map +1 -0
- package/dist/{chunk-QVHEM4BG.mjs → chunk-AEN6IJFU.mjs} +10 -4
- package/dist/chunk-AEN6IJFU.mjs.map +1 -0
- package/dist/{chunk-SZ5C44L5.mjs → chunk-BMNEN4OK.mjs} +1 -0
- package/dist/chunk-BMNEN4OK.mjs.map +1 -0
- package/dist/{chunk-YLTWPFCJ.mjs → chunk-BSOWLS3W.mjs} +3 -2
- package/dist/chunk-BSOWLS3W.mjs.map +1 -0
- package/dist/{chunk-XDG26EG6.mjs → chunk-DOZJB6IJ.mjs} +70 -118
- package/dist/chunk-DOZJB6IJ.mjs.map +1 -0
- package/dist/{chunk-GUURQAME.mjs → chunk-EGAB6NFQ.mjs} +2 -1
- package/dist/chunk-EGAB6NFQ.mjs.map +1 -0
- package/dist/{chunk-AUOPN6NK.mjs → chunk-EJIGERYM.mjs} +2 -1
- package/dist/chunk-EJIGERYM.mjs.map +1 -0
- package/dist/{chunk-SGIJVHZO.mjs → chunk-GLWPRM33.mjs} +1 -0
- package/dist/chunk-GLWPRM33.mjs.map +1 -0
- package/dist/{chunk-CDK4YV3D.mjs → chunk-GWSTVITN.mjs} +1 -0
- package/dist/chunk-GWSTVITN.mjs.map +1 -0
- package/dist/{chunk-O2NQFKJK.mjs → chunk-IFNIPVTZ.mjs} +1 -0
- package/dist/chunk-IFNIPVTZ.mjs.map +1 -0
- package/dist/{chunk-HYDP32P6.mjs → chunk-J3LTASDE.mjs} +6 -6
- package/dist/chunk-J3LTASDE.mjs.map +1 -0
- package/dist/{chunk-NBYLMO2L.mjs → chunk-JA4DHMTG.mjs} +1 -0
- package/dist/chunk-JA4DHMTG.mjs.map +1 -0
- package/dist/{chunk-DKMAIU74.mjs → chunk-KL6YZ5VR.mjs} +1 -0
- package/dist/chunk-KL6YZ5VR.mjs.map +1 -0
- package/dist/{chunk-FGION6F6.mjs → chunk-LE4CYW7S.mjs} +3 -2
- package/dist/chunk-LE4CYW7S.mjs.map +1 -0
- package/dist/{chunk-KHXJDYA4.mjs → chunk-NZAH3SGT.mjs} +26 -0
- package/dist/chunk-NZAH3SGT.mjs.map +1 -0
- package/dist/{chunk-RFJGL4MF.mjs → chunk-P3YZ7F22.mjs} +9 -2
- package/dist/chunk-P3YZ7F22.mjs.map +1 -0
- package/dist/{chunk-MKSFQIKC.mjs → chunk-PHYZRH4I.mjs} +10 -7
- package/dist/chunk-PHYZRH4I.mjs.map +1 -0
- package/dist/{chunk-IXIBY5FP.mjs → chunk-PJRLHTGC.mjs} +3 -2
- package/dist/chunk-PJRLHTGC.mjs.map +1 -0
- package/dist/{chunk-GY6B3PD5.mjs → chunk-QQASX4LJ.mjs} +12 -1
- package/dist/chunk-QQASX4LJ.mjs.map +1 -0
- package/dist/{chunk-4ML4Y6UN.mjs → chunk-RM227WHI.mjs} +1 -0
- package/dist/chunk-RM227WHI.mjs.map +1 -0
- package/dist/{chunk-DQRH5VE3.mjs → chunk-TGN55GKE.mjs} +2 -1
- package/dist/chunk-TGN55GKE.mjs.map +1 -0
- package/dist/{chunk-W2VODV76.mjs → chunk-UA3Z47LT.mjs} +9 -8
- package/dist/chunk-UA3Z47LT.mjs.map +1 -0
- package/dist/{chunk-HQCOU6GY.mjs → chunk-ZCEFC2TK.mjs} +1 -0
- package/dist/chunk-ZCEFC2TK.mjs.map +1 -0
- package/dist/{chunk-T43JPYQS.mjs → chunk-ZWTGVIPJ.mjs} +3 -2
- package/dist/chunk-ZWTGVIPJ.mjs.map +1 -0
- package/dist/contexts/BeraFlags/BeraFlags.d.ts +19 -0
- package/dist/contexts/BeraFlags/BeraFlags.d.ts.map +1 -0
- package/dist/contexts/BeraFlags/defaultFlags.d.ts +9 -0
- package/dist/contexts/BeraFlags/defaultFlags.d.ts.map +1 -0
- package/dist/contexts/BexStatusProvider.d.ts +67 -0
- package/dist/contexts/BexStatusProvider.d.ts.map +1 -0
- package/dist/contexts/BlockTimeProvider.d.ts +10 -0
- package/dist/contexts/BlockTimeProvider.d.ts.map +1 -0
- package/dist/contexts/HoneyConfigProvider.d.ts +50 -0
- package/dist/contexts/HoneyConfigProvider.d.ts.map +1 -0
- package/dist/contexts/SwrFallback.d.ts +6 -0
- package/dist/contexts/SwrFallback.d.ts.map +1 -0
- package/dist/contexts/TokensProvider.d.ts +24 -0
- package/dist/contexts/TokensProvider.d.ts.map +1 -0
- package/dist/contexts/block-time-provider.d.ts +10 -0
- package/dist/contexts/exports.d.ts +7 -66
- package/dist/contexts/exports.d.ts.map +1 -0
- package/dist/contexts/exports.mjs +13 -12
- package/dist/contexts/exports.mjs.map +1 -0
- package/dist/data/contracts.d.ts +345 -0
- package/dist/data/contracts.d.ts.map +1 -0
- package/dist/enum/contracts.d.ts +15 -0
- package/dist/enum/contracts.d.ts.map +1 -0
- package/dist/enum/dex.d.ts +36 -0
- package/dist/enum/dex.d.ts.map +1 -0
- package/dist/enum/exports.d.ts +7 -29
- package/dist/enum/exports.d.ts.map +1 -0
- package/dist/enum/exports.mjs +3 -2
- package/dist/enum/exports.mjs.map +1 -0
- package/dist/enum/governance/exports.d.ts +2 -60
- package/dist/enum/governance/exports.d.ts.map +1 -0
- package/dist/enum/governance/exports.mjs +2 -1
- package/dist/enum/governance/exports.mjs.map +1 -0
- package/dist/enum/governance.d.ts +59 -0
- package/dist/enum/governance.d.ts.map +1 -0
- package/dist/enum/honey.d.ts +13 -0
- package/dist/enum/honey.d.ts.map +1 -0
- package/dist/enum/polling.d.ts +8 -0
- package/dist/enum/polling.d.ts.map +1 -0
- package/dist/enum/slippage.d.ts +17 -0
- package/dist/enum/slippage.d.ts.map +1 -0
- package/dist/enum/txnEnum.d.ts +90 -0
- package/dist/enum/txnEnum.d.ts.map +1 -0
- package/dist/errors/BeraError.d.ts +99 -0
- package/dist/errors/BeraError.d.ts.map +1 -0
- package/dist/errors/BeraError.unit.test.d.ts +2 -0
- package/dist/errors/BeraError.unit.test.d.ts.map +1 -0
- package/dist/errors/BeraMonitoring.d.ts +46 -0
- package/dist/errors/BeraMonitoring.d.ts.map +1 -0
- package/dist/errors/BeraTracing.d.ts +58 -0
- package/dist/errors/BeraTracing.d.ts.map +1 -0
- package/dist/errors/BeraTracing.unit.test.d.ts +2 -0
- package/dist/errors/BeraTracing.unit.test.d.ts.map +1 -0
- package/dist/errors/InvalidArgumentError.d.ts +59 -0
- package/dist/errors/InvalidArgumentError.d.ts.map +1 -0
- package/dist/errors/NotFoundError.d.ts +25 -0
- package/dist/errors/NotFoundError.d.ts.map +1 -0
- package/dist/errors/RequestError.d.ts +56 -0
- package/dist/errors/RequestError.d.ts.map +1 -0
- package/dist/errors/RequestError.unit.test.d.ts +2 -0
- package/dist/errors/RequestError.unit.test.d.ts.map +1 -0
- package/dist/errors/TransactionFailedError.d.ts +49 -0
- package/dist/errors/TransactionFailedError.d.ts.map +1 -0
- package/dist/errors/assert.d.ts +82 -0
- package/dist/errors/assert.d.ts.map +1 -0
- package/dist/errors/assert.unit.test.d.ts +2 -0
- package/dist/errors/assert.unit.test.d.ts.map +1 -0
- package/dist/errors/errorMap.d.ts +1083 -0
- package/dist/errors/errorMap.d.ts.map +1 -0
- package/dist/errors/exports.d.ts +13 -328
- package/dist/errors/exports.d.ts.map +1 -0
- package/dist/errors/exports.mjs +9 -6
- package/dist/errors/exports.mjs.map +1 -0
- package/dist/errors/getErrorMessage.d.ts +46 -0
- package/dist/errors/getErrorMessage.d.ts.map +1 -0
- package/dist/errors/getRevertReason.d.ts +53 -0
- package/dist/errors/getRevertReason.d.ts.map +1 -0
- package/dist/errors/getRevertReason.integration.test.d.ts +2 -0
- package/dist/errors/getRevertReason.integration.test.d.ts.map +1 -0
- package/dist/errors/initBeraError.d.ts +44 -0
- package/dist/errors/initBeraError.d.ts.map +1 -0
- package/dist/errors/parseViemError.d.ts +88 -0
- package/dist/errors/parseViemError.d.ts.map +1 -0
- package/dist/errors/severity.d.ts +7 -0
- package/dist/errors/severity.d.ts.map +1 -0
- package/dist/errors/spanStatus.d.ts +18 -0
- package/dist/errors/spanStatus.d.ts.map +1 -0
- package/dist/errors/spanStatus.unit.test.d.ts +2 -0
- package/dist/errors/spanStatus.unit.test.d.ts.map +1 -0
- package/dist/{getValidatorQueuedOperatorAddress-Cc05dlO3.d.ts → getValidatorQueuedOperatorAddress-N2I7wHd6.d.ts} +1 -1
- package/dist/global.d-CiZJ2eHz.d.ts +231 -0
- package/dist/hooks/bend/useGetConvertToAssets.d.ts +9 -0
- package/dist/hooks/bend/useGetConvertToAssets.d.ts.map +1 -0
- package/dist/hooks/dex/useAggregatorsQuotes.d.ts +29 -0
- package/dist/hooks/dex/useAggregatorsQuotes.d.ts.map +1 -0
- package/dist/hooks/dex/useAggregatorsRouterFeeBps.d.ts +2 -0
- package/dist/hooks/dex/useAggregatorsRouterFeeBps.d.ts.map +1 -0
- package/dist/hooks/dex/useAllUserPools.d.ts +68 -0
- package/dist/hooks/dex/useAllUserPools.d.ts.map +1 -0
- package/dist/hooks/dex/useApiPool.d.ts +11 -0
- package/dist/hooks/dex/useApiPool.d.ts.map +1 -0
- package/dist/hooks/dex/useBexStatus.d.ts +2 -0
- package/dist/hooks/dex/useBexStatus.d.ts.map +1 -0
- package/dist/hooks/dex/useCreatePool.d.ts +32 -0
- package/dist/hooks/dex/useCreatePool.d.ts.map +1 -0
- package/dist/hooks/dex/useGlobalLiquidityAndSwapVolume.d.ts +11 -0
- package/dist/hooks/dex/useGlobalLiquidityAndSwapVolume.d.ts.map +1 -0
- package/dist/hooks/dex/useLiquidityMismatch.d.ts +36 -0
- package/dist/hooks/dex/useLiquidityMismatch.d.ts.map +1 -0
- package/dist/hooks/dex/useLpPosition.d.ts +14 -0
- package/dist/hooks/dex/useLpPosition.d.ts.map +1 -0
- package/dist/hooks/dex/useMultipleTokenApprovalsWithSlippage.d.ts +13 -0
- package/dist/hooks/dex/useMultipleTokenApprovalsWithSlippage.d.ts.map +1 -0
- package/dist/hooks/dex/useOnChainPoolData.d.ts +49 -0
- package/dist/hooks/dex/useOnChainPoolData.d.ts.map +1 -0
- package/dist/hooks/dex/usePollPoolCreationRelayerApproval.d.ts +8 -0
- package/dist/hooks/dex/usePollPoolCreationRelayerApproval.d.ts.map +1 -0
- package/dist/hooks/dex/usePool.d.ts +10 -0
- package/dist/hooks/dex/usePool.d.ts.map +1 -0
- package/dist/hooks/dex/usePoolEvents.d.ts +6 -0
- package/dist/hooks/dex/usePoolEvents.d.ts.map +1 -0
- package/dist/hooks/dex/usePoolHistoricalData.d.ts +8 -0
- package/dist/hooks/dex/usePoolHistoricalData.d.ts.map +1 -0
- package/dist/hooks/dex/usePools.d.ts +129 -0
- package/dist/hooks/dex/usePools.d.ts.map +1 -0
- package/dist/hooks/dex/usePriceImpact.d.ts +11 -0
- package/dist/hooks/dex/usePriceImpact.d.ts.map +1 -0
- package/dist/hooks/dex/useSingleAggregatorQuote.d.ts +53 -0
- package/dist/hooks/dex/useSingleAggregatorQuote.d.ts.map +1 -0
- package/dist/hooks/enso/useBendDemultiply.d.ts +18 -0
- package/dist/hooks/enso/useBendDemultiply.d.ts.map +1 -0
- package/dist/hooks/enso/useBendMultiply.d.ts +19 -0
- package/dist/hooks/enso/useBendMultiply.d.ts.map +1 -0
- package/dist/hooks/enso/useBendZapSupply.d.ts +40 -0
- package/dist/hooks/enso/useBendZapSupply.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts +26 -0
- package/dist/hooks/enso/useEnsoSwapBundle.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts +6 -0
- package/dist/hooks/enso/useEnsoUserTokensWithBalances.d.ts.map +1 -0
- package/dist/hooks/enso/useEnsoWalletV2Address.d.ts +4 -0
- package/dist/hooks/enso/useEnsoWalletV2Address.d.ts.map +1 -0
- package/dist/hooks/enso/useIsBendAuthorized.d.ts +7 -0
- package/dist/hooks/enso/useIsBendAuthorized.d.ts.map +1 -0
- package/dist/hooks/enso/useZapStakeBera.d.ts +23 -0
- package/dist/hooks/enso/useZapStakeBera.d.ts.map +1 -0
- package/dist/hooks/exports.d.ts +109 -1332
- package/dist/hooks/exports.d.ts.map +1 -0
- package/dist/hooks/exports.mjs +357 -421
- package/dist/hooks/exports.mjs.map +1 -0
- package/dist/hooks/governance/exports.d.ts +15 -186
- package/dist/hooks/governance/exports.d.ts.map +1 -0
- package/dist/hooks/governance/exports.mjs +63 -61
- package/dist/hooks/governance/exports.mjs.map +1 -0
- package/dist/hooks/governance/useCreateProposal.d.ts +13 -0
- package/dist/hooks/governance/useCreateProposal.d.ts.map +1 -0
- package/dist/hooks/governance/useGetPastVotes.d.ts +15 -0
- package/dist/hooks/governance/useGetPastVotes.d.ts.map +1 -0
- package/dist/hooks/governance/useHasVoted.d.ts +6 -0
- package/dist/hooks/governance/useHasVoted.d.ts.map +1 -0
- package/dist/hooks/governance/useIsCanceller.d.ts +5 -0
- package/dist/hooks/governance/useIsCanceller.d.ts.map +1 -0
- package/dist/hooks/governance/usePollAllProposals.d.ts +37 -0
- package/dist/hooks/governance/usePollAllProposals.d.ts.map +1 -0
- package/dist/hooks/governance/usePollProposal.d.ts +23 -0
- package/dist/hooks/governance/usePollProposal.d.ts.map +1 -0
- package/dist/hooks/governance/usePollProposalThreshold.d.ts +6 -0
- package/dist/hooks/governance/usePollProposalThreshold.d.ts.map +1 -0
- package/dist/hooks/governance/usePollProposalVotes.d.ts +23 -0
- package/dist/hooks/governance/usePollProposalVotes.d.ts.map +1 -0
- package/dist/hooks/governance/usePollUserDelegates.d.ts +7 -0
- package/dist/hooks/governance/usePollUserDelegates.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalFromTx.d.ts +5 -0
- package/dist/hooks/governance/useProposalFromTx.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalSnapshot.d.ts +12 -0
- package/dist/hooks/governance/useProposalSnapshot.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalState.d.ts +7 -0
- package/dist/hooks/governance/useProposalState.d.ts.map +1 -0
- package/dist/hooks/governance/useProposalTimelockState.d.ts +18 -0
- package/dist/hooks/governance/useProposalTimelockState.d.ts.map +1 -0
- package/dist/hooks/governance/useQuorum.d.ts +17 -0
- package/dist/hooks/governance/useQuorum.d.ts.map +1 -0
- package/dist/hooks/honey/useCappedGlobally.d.ts +11 -0
- package/dist/hooks/honey/useCappedGlobally.d.ts.map +1 -0
- package/dist/hooks/honey/useCappedRelatively.d.ts +11 -0
- package/dist/hooks/honey/useCappedRelatively.d.ts.map +1 -0
- package/dist/hooks/honey/useCollateralWeights.d.ts +9 -0
- package/dist/hooks/honey/useCollateralWeights.d.ts.map +1 -0
- package/dist/hooks/honey/useHoney24hVolume.d.ts +2 -0
- package/dist/hooks/honey/useHoney24hVolume.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyAlerts.d.ts +47 -0
- package/dist/hooks/honey/useHoneyAlerts.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyBalances.d.ts +26 -0
- package/dist/hooks/honey/useHoneyBalances.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyChartData.d.ts +10 -0
- package/dist/hooks/honey/useHoneyChartData.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneySwapState.d.ts +30 -0
- package/dist/hooks/honey/useHoneySwapState.d.ts.map +1 -0
- package/dist/hooks/honey/useHoneyVaultsBalance.d.ts +4 -0
- package/dist/hooks/honey/useHoneyVaultsBalance.d.ts.map +1 -0
- package/dist/hooks/honey/useIsBadCollateralAsset.d.ts +9 -0
- package/dist/hooks/honey/useIsBadCollateralAsset.d.ts.map +1 -0
- package/dist/hooks/honey/useIsBasketModeEnabled.d.ts +6 -0
- package/dist/hooks/honey/useIsBasketModeEnabled.d.ts.map +1 -0
- package/dist/hooks/honey/usePythLatestPrices.d.ts +20 -0
- package/dist/hooks/honey/usePythLatestPrices.d.ts.map +1 -0
- package/dist/hooks/perps/usePythUpdateFee.d.ts +11 -0
- package/dist/hooks/perps/usePythUpdateFee.d.ts.map +1 -0
- package/dist/hooks/pol/useAutoclaimedIncentives.d.ts +8 -0
- package/dist/hooks/pol/useAutoclaimedIncentives.d.ts.map +1 -0
- package/dist/hooks/pol/useAutoclaimedIncentivesTxHash.d.ts +8 -0
- package/dist/hooks/pol/useAutoclaimedIncentivesTxHash.d.ts.map +1 -0
- package/dist/hooks/pol/useBgtAprSimulation.d.ts +7 -0
- package/dist/hooks/pol/useBgtAprSimulation.d.ts.map +1 -0
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts +8 -0
- package/dist/hooks/pol/useBgtIncentiveDistributorPaused.d.ts.map +1 -0
- package/dist/hooks/pol/useBgtUnstakedBalance.d.ts +3 -0
- package/dist/hooks/pol/useBgtUnstakedBalance.d.ts.map +1 -0
- package/dist/hooks/pol/useClaimableFees.d.ts +2 -0
- package/dist/hooks/pol/useClaimableFees.d.ts.map +1 -0
- package/dist/hooks/pol/useHighestVaultsAPR.d.ts +23 -0
- package/dist/hooks/pol/useHighestVaultsAPR.d.ts.map +1 -0
- package/dist/hooks/pol/useOnChainRewardVault.d.ts +7 -0
- package/dist/hooks/pol/useOnChainRewardVault.d.ts.map +1 -0
- package/dist/hooks/pol/usePollGlobalData.d.ts +4 -0
- package/dist/hooks/pol/usePollGlobalData.d.ts.map +1 -0
- package/dist/hooks/pol/usePollMarkets.d.ts +7 -0
- package/dist/hooks/pol/usePollMarkets.d.ts.map +1 -0
- package/dist/hooks/pol/useQueuedBeraUnlock.d.ts +9 -0
- package/dist/hooks/pol/useQueuedBeraUnlock.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts +6 -0
- package/dist/hooks/pol/useRewardTokenToBeraRate.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVault.d.ts +8 -0
- package/dist/hooks/pol/useRewardVault.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts +16 -0
- package/dist/hooks/pol/useRewardVaultBalanceFromStakingToken.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultFromToken.d.ts +7 -0
- package/dist/hooks/pol/useRewardVaultFromToken.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultIncentives.d.ts +6 -0
- package/dist/hooks/pol/useRewardVaultIncentives.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaultRewards.d.ts +4 -0
- package/dist/hooks/pol/useRewardVaultRewards.d.ts.map +1 -0
- package/dist/hooks/pol/useRewardVaults.d.ts +15 -0
- package/dist/hooks/pol/useRewardVaults.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedAPR.d.ts +11 -0
- package/dist/hooks/pol/useStakedAPR.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedData.d.ts +41 -0
- package/dist/hooks/pol/useStakedData.d.ts.map +1 -0
- package/dist/hooks/pol/useStakedSnapshots.d.ts +10 -0
- package/dist/hooks/pol/useStakedSnapshots.d.ts.map +1 -0
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts +7 -0
- package/dist/hooks/pol/useStakingVaultsMetadata.d.ts.map +1 -0
- package/dist/hooks/pol/useTotalStakedAmount.d.ts +6 -0
- package/dist/hooks/pol/useTotalStakedAmount.d.ts.map +1 -0
- package/dist/hooks/pol/useUserVaultInfo.d.ts +7 -0
- package/dist/hooks/pol/useUserVaultInfo.d.ts.map +1 -0
- package/dist/hooks/pol/useUserVaults.d.ts +4 -0
- package/dist/hooks/pol/useUserVaults.d.ts.map +1 -0
- package/dist/hooks/pol/useVaultAddress.d.ts +10 -0
- package/dist/hooks/pol/useVaultAddress.d.ts.map +1 -0
- package/dist/hooks/pol/useVaultHistory.d.ts +5 -0
- package/dist/hooks/pol/useVaultHistory.d.ts.map +1 -0
- package/dist/hooks/pol/useVaultValidators.d.ts +7 -0
- package/dist/hooks/pol/useVaultValidators.d.ts.map +1 -0
- package/dist/hooks/tokens/useBeraCurrentPrice.d.ts +11 -0
- package/dist/hooks/tokens/useBeraCurrentPrice.d.ts.map +1 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts +9 -0
- package/dist/hooks/tokens/useMultipleTokenInformation.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollAllowances.d.ts +17 -0
- package/dist/hooks/tokens/usePollAllowances.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollBalance.d.ts +12 -0
- package/dist/hooks/tokens/usePollBalance.d.ts.map +1 -0
- package/dist/hooks/tokens/usePollWalletBalances.d.ts +14 -0
- package/dist/hooks/tokens/usePollWalletBalances.d.ts.map +1 -0
- package/dist/hooks/tokens/useStakingTokenInformation.d.ts +8 -0
- package/dist/hooks/tokens/useStakingTokenInformation.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenCurrentPrices.d.ts +16 -0
- package/dist/hooks/tokens/useTokenCurrentPrices.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenInformation.d.ts +9 -0
- package/dist/hooks/tokens/useTokenInformation.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenPrice.d.ts +10 -0
- package/dist/hooks/tokens/useTokenPrice.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokenPrices.d.ts +18 -0
- package/dist/hooks/tokens/useTokenPrices.d.ts.map +1 -0
- package/dist/hooks/tokens/useTokens.d.ts +18 -0
- package/dist/hooks/tokens/useTokens.d.ts.map +1 -0
- package/dist/hooks/tokens/useTotalSupply.d.ts +5 -0
- package/dist/hooks/tokens/useTotalSupply.d.ts.map +1 -0
- package/dist/hooks/tokens/useUnderlyingAsset.d.ts +10 -0
- package/dist/hooks/tokens/useUnderlyingAsset.d.ts.map +1 -0
- package/dist/hooks/useBlockToTimestamp.d.ts +6 -0
- package/dist/hooks/useBlockToTimestamp.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/index.d.ts +3 -0
- package/dist/hooks/useContractWrite/index.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/stateReducer.d.ts +28 -0
- package/dist/hooks/useContractWrite/stateReducer.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/types.d.ts +54 -0
- package/dist/hooks/useContractWrite/types.d.ts.map +1 -0
- package/dist/hooks/useContractWrite/useBeraContractWrite.d.ts +10 -0
- package/dist/hooks/useContractWrite/useBeraContractWrite.d.ts.map +1 -0
- package/dist/hooks/useGetVerifiedAbi.d.ts +2 -0
- package/dist/hooks/useGetVerifiedAbi.d.ts.map +1 -0
- package/dist/hooks/useHistoryState.d.ts +17 -0
- package/dist/hooks/useHistoryState.d.ts.map +1 -0
- package/dist/hooks/usePrevious.d.ts +6 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/validators/useAllValidators.d.ts +7 -0
- package/dist/hooks/validators/useAllValidators.d.ts.map +1 -0
- package/dist/hooks/validators/useApiEnrichedAllocation.d.ts +5 -0
- package/dist/hooks/validators/useApiEnrichedAllocation.d.ts.map +1 -0
- package/dist/hooks/validators/useApiValidator.d.ts +8 -0
- package/dist/hooks/validators/useApiValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useBaselineRewardAllocation.d.ts +2 -0
- package/dist/hooks/validators/useBaselineRewardAllocation.d.ts.map +1 -0
- package/dist/hooks/validators/useManagedValidatorRole.d.ts +13 -0
- package/dist/hooks/validators/useManagedValidatorRole.d.ts.map +1 -0
- package/dist/hooks/validators/useOnChainValidator.d.ts +7 -0
- package/dist/hooks/validators/useOnChainValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useStakingPoolBatch.d.ts +7 -0
- package/dist/hooks/validators/useStakingPoolBatch.d.ts.map +1 -0
- package/dist/hooks/validators/useUserActiveValidators.d.ts +7 -0
- package/dist/hooks/validators/useUserActiveValidators.d.ts.map +1 -0
- package/dist/hooks/validators/useUserBoostsOnValidator.d.ts +8 -0
- package/dist/hooks/validators/useUserBoostsOnValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts +8 -0
- package/dist/hooks/validators/useUserClaimableIncentives.d.ts.map +1 -0
- package/dist/hooks/validators/useUserStakingPositions.d.ts +31 -0
- package/dist/hooks/validators/useUserStakingPositions.d.ts.map +1 -0
- package/dist/hooks/validators/useValidator.d.ts +112 -0
- package/dist/hooks/validators/useValidator.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorAnalytics.d.ts +11 -0
- package/dist/hooks/validators/useValidatorAnalytics.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorCommission.d.ts +4 -0
- package/dist/hooks/validators/useValidatorCommission.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorEstimatedBgtPerYear.d.ts +6 -0
- package/dist/hooks/validators/useValidatorEstimatedBgtPerYear.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts +14 -0
- package/dist/hooks/validators/useValidatorIncentiveDistribution.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorQueuedCommission.d.ts +5 -0
- package/dist/hooks/validators/useValidatorQueuedCommission.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorQueuedOperatorAddress.d.ts +5 -0
- package/dist/hooks/validators/useValidatorQueuedOperatorAddress.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorQueuedRewardAllocation.d.ts +5 -0
- package/dist/hooks/validators/useValidatorQueuedRewardAllocation.d.ts.map +1 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts +9 -0
- package/dist/hooks/validators/useValidatorRewardAllocation.d.ts.map +1 -0
- package/dist/types/bribeBoost.d.ts +69 -0
- package/dist/types/dex.d.ts +225 -0
- package/dist/types/enso.d.ts +76 -0
- package/dist/types/exports.d.ts +8 -90
- package/dist/types/exports.d.ts.map +1 -0
- package/dist/types/exports.mjs +1 -0
- package/dist/types/exports.mjs.map +1 -0
- package/dist/types/global.d.ts +198 -0
- package/dist/types/governance/exports.d.ts +2 -109
- package/dist/types/governance/exports.d.ts.map +1 -0
- package/dist/types/governance/exports.mjs +1 -0
- package/dist/types/governance/exports.mjs.map +1 -0
- package/dist/types/governance.d.ts +112 -0
- package/dist/types/honeySwap.d.ts +23 -0
- package/dist/types/pol.d.ts +78 -0
- package/dist/types/staking.d.ts +22 -0
- package/dist/useHoneySwapState-CXVWAThr.d.ts +32 -0
- package/dist/utils/beraFetch.d.ts +15 -0
- package/dist/utils/beraFetch.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +27 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/createEmitter.d.ts +88 -0
- package/dist/utils/createEmitter.d.ts.map +1 -0
- package/dist/utils/createEmitter.unit.test.d.ts +2 -0
- package/dist/utils/createEmitter.unit.test.d.ts.map +1 -0
- package/dist/utils/exports.d.ts +25 -429
- package/dist/utils/exports.d.ts.map +1 -0
- package/dist/utils/exports.mjs +33 -22
- package/dist/utils/exports.mjs.map +1 -0
- package/dist/utils/filter.d.ts +10 -0
- package/dist/utils/filter.d.ts.map +1 -0
- package/dist/utils/formatIncentivesTokenMap.d.ts +3 -0
- package/dist/utils/formatIncentivesTokenMap.d.ts.map +1 -0
- package/dist/utils/formatInputTokenValue.d.ts +2 -0
- package/dist/utils/formatInputTokenValue.d.ts.map +1 -0
- package/dist/utils/formatNumber.d.ts +32 -0
- package/dist/utils/formatNumber.d.ts.map +1 -0
- package/dist/utils/formatNumber.unit.test.d.ts +2 -0
- package/dist/utils/formatNumber.unit.test.d.ts.map +1 -0
- package/dist/utils/formatTimestamps.d.ts +20 -0
- package/dist/utils/formatTimestamps.d.ts.map +1 -0
- package/dist/utils/formatTimestamps.unit.test.d.ts +2 -0
- package/dist/utils/formatTimestamps.unit.test.d.ts.map +1 -0
- package/dist/utils/formatTokenList.d.ts +21 -0
- package/dist/utils/formatTokenList.d.ts.map +1 -0
- package/dist/utils/formatUsd.d.ts +5 -0
- package/dist/utils/formatUsd.d.ts.map +1 -0
- package/dist/utils/getContractName.d.ts +10 -0
- package/dist/utils/getContractName.d.ts.map +1 -0
- package/dist/utils/getContractName.unit.test.d.ts +2 -0
- package/dist/utils/getContractName.unit.test.d.ts.map +1 -0
- package/dist/utils/getErrorResponse.d.ts +5 -0
- package/dist/utils/getErrorResponse.d.ts.map +1 -0
- package/dist/utils/getHoneySwapMessage.d.ts +7 -0
- package/dist/utils/getHoneySwapMessage.d.ts.map +1 -0
- package/dist/utils/getHoneySwapMessage.test.d.ts +2 -0
- package/dist/utils/getHoneySwapMessage.test.d.ts.map +1 -0
- package/dist/utils/getServerSideClient.d.ts +6 -0
- package/dist/utils/getServerSideClient.d.ts.map +1 -0
- package/dist/utils/getTestClient.d.ts +73 -0
- package/dist/utils/getTestClient.d.ts.map +1 -0
- package/dist/utils/hasAnyTruthyValues.d.ts +2 -0
- package/dist/utils/hasAnyTruthyValues.d.ts.map +1 -0
- package/dist/utils/isDifferenceExceedingThreshold.d.ts +6 -0
- package/dist/utils/isDifferenceExceedingThreshold.d.ts.map +1 -0
- package/dist/utils/isSubgraphStale.d.ts +5 -0
- package/dist/utils/isSubgraphStale.d.ts.map +1 -0
- package/dist/utils/layerZeroScan.d.ts +39 -0
- package/dist/utils/layerZeroScan.d.ts.map +1 -0
- package/dist/utils/math.d.ts +15 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/math.unit.test.d.ts +2 -0
- package/dist/utils/math.unit.test.d.ts.map +1 -0
- package/dist/utils/parseBaseArgs.d.ts +6 -0
- package/dist/utils/parseBaseArgs.d.ts.map +1 -0
- package/dist/utils/parseBaseArgs.unit.test.d.ts +2 -0
- package/dist/utils/parseBaseArgs.unit.test.d.ts.map +1 -0
- package/dist/utils/parseWhiskToken.d.ts +21 -0
- package/dist/utils/parseWhiskToken.d.ts.map +1 -0
- package/dist/utils/polyfillAbortSignalAny.d.ts +14 -0
- package/dist/utils/polyfillAbortSignalAny.d.ts.map +1 -0
- package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts +2 -0
- package/dist/utils/polyfillAbortSignalAny.unit.test.d.ts.map +1 -0
- package/dist/utils/poolNamings.d.ts +9 -0
- package/dist/utils/poolNamings.d.ts.map +1 -0
- package/dist/utils/pythHoneyUtils.d.ts +2 -0
- package/dist/utils/pythHoneyUtils.d.ts.map +1 -0
- package/dist/utils/sanitizeRpcUrl.d.ts +10 -0
- package/dist/utils/sanitizeRpcUrl.d.ts.map +1 -0
- package/dist/utils/test-utils.d.ts +2 -0
- package/dist/utils/test-utils.d.ts.map +1 -0
- package/dist/utils/time.d.ts +65 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.unit.test.d.ts +2 -0
- package/dist/utils/time.unit.test.d.ts.map +1 -0
- package/dist/utils/tokenWrapping.d.ts +7 -0
- package/dist/utils/tokenWrapping.d.ts.map +1 -0
- package/dist/utils/tokens.d.ts +37 -0
- package/dist/utils/tokens.d.ts.map +1 -0
- package/dist/utils/tokens.unit.test.d.ts +2 -0
- package/dist/utils/tokens.unit.test.d.ts.map +1 -0
- package/dist/utils/tracedTransport.d.ts +10 -0
- package/dist/utils/tracedTransport.d.ts.map +1 -0
- package/dist/utils/truncateHash.d.ts +5 -0
- package/dist/utils/truncateHash.d.ts.map +1 -0
- package/dist/utils/truncateHash.unit.test.d.ts +2 -0
- package/dist/utils/truncateHash.unit.test.d.ts.map +1 -0
- package/dist/utils/validatorUptimeStatus.d.ts +19 -0
- package/dist/utils/validatorUptimeStatus.d.ts.map +1 -0
- package/package.json +5 -3
- package/src/actions/clients/BeraApolloClient.ts +4 -2
- package/src/actions/clients/fetchOpenApi.unit.test.ts +9 -9
- package/src/actions/dex/aggregators/base.ts +3 -1
- package/src/actions/dex/aggregators/bex.ts +3 -10
- package/src/actions/dex/getPoolWithState.ts +2 -2
- package/src/actions/enso/__tests__/helpers.ts +15 -10
- package/src/actions/enso/getEnsoSwapBundle.ts +3 -8
- package/src/actions/exports.ts +2 -3
- package/src/actions/governance/getDecodedFunctionData.ts +5 -1
- package/src/actions/honey/getSwapPayload.ts +4 -4
- package/src/actions/pol/getAutoclaimedIncentives.ts +1 -1
- package/src/actions/pol/getAutoclaimedIncentivesTxHash.ts +1 -1
- package/src/actions/pol/getRewardProofsByValidator.ts +1 -1
- package/src/actions/pol/{getUserVaultsReward.ts → getRewardVaultEarnedRewards.ts} +6 -4
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaultInfo.ts +2 -2
- package/src/actions/pol/getVaultsSupply.ts +5 -2
- package/src/actions/server/getDailyValidatorBlockStats.ts +28 -17
- package/src/actions/tokens/getWalletBalances.ts +1 -3
- package/src/actions/transactions/beraWriteContract.integration.test.ts +16 -3
- package/src/actions/transactions/beraWriteContract.ts +2 -2
- package/src/actions/validators/getUserBoostsOnValidator.ts +6 -9
- package/src/actions/validators/getValidatorAnalytics.ts +5 -1
- package/src/actions/validators/getValidatorEstimatedBgtPerYear.ts +3 -3
- package/src/contexts/exports.ts +1 -1
- package/src/errors/BeraError.ts +51 -1
- package/src/errors/BeraError.unit.test.ts +71 -0
- package/src/errors/BeraTracing.unit.test.ts +17 -18
- package/src/errors/RequestError.ts +15 -1
- package/src/errors/RequestError.unit.test.ts +47 -0
- package/src/errors/assert.ts +29 -0
- package/src/hooks/bend/useGetConvertToAssets.ts +3 -3
- package/src/hooks/dex/useAggregatorsRouterFeeBps.ts +2 -2
- package/src/hooks/dex/useAllUserPools.ts +6 -6
- package/src/hooks/dex/useApiPool.ts +3 -3
- package/src/hooks/dex/useCreatePool.ts +13 -13
- package/src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts +2 -2
- package/src/hooks/dex/useLiquidityMismatch.ts +3 -3
- package/src/hooks/dex/useLpPosition.ts +3 -3
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +3 -3
- package/src/hooks/dex/usePoolEvents.ts +3 -3
- package/src/hooks/dex/usePoolHistoricalData.ts +3 -3
- package/src/hooks/dex/usePools.ts +6 -6
- package/src/hooks/dex/usePriceImpact.ts +6 -6
- package/src/hooks/exports.ts +0 -4
- package/src/hooks/governance/useCreateProposal.ts +4 -4
- package/src/hooks/governance/useGetPastVotes.ts +11 -7
- package/src/hooks/governance/useHasVoted.ts +3 -3
- package/src/hooks/governance/useIsCanceller.ts +3 -3
- package/src/hooks/governance/usePollAllProposals.ts +3 -3
- package/src/hooks/governance/usePollProposal.ts +3 -3
- package/src/hooks/governance/usePollProposalThreshold.ts +3 -3
- package/src/hooks/governance/usePollProposalVotes.ts +12 -12
- package/src/hooks/governance/usePollUserDelegates.ts +18 -14
- package/src/hooks/governance/useProposalFromTx.ts +3 -3
- package/src/hooks/governance/useProposalSnapshot.ts +3 -3
- package/src/hooks/governance/useProposalState.ts +3 -3
- package/src/hooks/honey/useCappedGlobally.ts +3 -3
- package/src/hooks/honey/useCappedRelatively.ts +3 -3
- package/src/hooks/honey/useCollateralWeights.ts +3 -3
- package/src/hooks/honey/useHoneyAlerts.ts +9 -9
- package/src/hooks/honey/useHoneyBalances.ts +3 -3
- package/src/hooks/honey/useHoneySwapState.ts +2 -2
- package/src/hooks/honey/useHoneyVaultsBalance.ts +3 -3
- package/src/hooks/honey/useIsBadCollateralAsset.ts +3 -3
- package/src/hooks/perps/usePythUpdateFee.ts +3 -3
- package/src/hooks/pol/useAutoclaimedIncentives.ts +1 -1
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +1 -1
- package/src/hooks/pol/useBgtUnstakedBalance.ts +3 -3
- package/src/hooks/pol/useClaimableFees.ts +4 -4
- package/src/hooks/pol/useHighestVaultsAPR.ts +3 -3
- package/src/hooks/pol/useOnChainRewardVault.ts +6 -5
- package/src/hooks/pol/usePollGlobalData.ts +3 -3
- package/src/hooks/pol/usePollMarkets.ts +5 -5
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +6 -14
- package/src/hooks/pol/useRewardVault.ts +6 -5
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +3 -3
- package/src/hooks/pol/useRewardVaultFromToken.ts +3 -3
- package/src/hooks/pol/useRewardVaultRewards.ts +3 -3
- package/src/hooks/pol/useRewardVaults.ts +6 -6
- package/src/hooks/pol/useStakedData.ts +2 -2
- package/src/hooks/pol/useStakingVaultsMetadata.ts +3 -3
- package/src/hooks/pol/useUserVaultInfo.ts +3 -3
- package/src/hooks/pol/useUserVaults.ts +3 -3
- package/src/hooks/pol/useVaultAddress.ts +2 -2
- package/src/hooks/pol/useVaultHistory.ts +3 -3
- package/src/hooks/pol/useVaultValidators.ts +3 -3
- package/src/hooks/tokens/useBeraCurrentPrice.ts +8 -4
- package/src/hooks/tokens/useStakingTokenInformation.ts +3 -3
- package/src/hooks/useBlockToTimestamp.ts +1 -1
- package/src/hooks/useContractWrite/index.ts +1 -1
- package/src/hooks/useContractWrite/stateReducer.ts +2 -2
- package/src/hooks/useContractWrite/useBeraContractWrite.ts +1 -3
- package/src/hooks/useGetVerifiedAbi.ts +2 -2
- package/src/hooks/validators/useAllValidators.ts +6 -6
- package/src/hooks/validators/useApiValidator.ts +6 -5
- package/src/hooks/validators/useOnChainValidator.ts +3 -3
- package/src/hooks/validators/useStakingPoolBatch.ts +3 -3
- package/src/hooks/validators/useUserActiveValidators.ts +3 -3
- package/src/hooks/validators/useUserBoostsOnValidator.ts +3 -3
- package/src/hooks/validators/useUserClaimableIncentives.ts +116 -117
- package/src/hooks/validators/useUserStakingPositions.ts +3 -3
- package/src/hooks/validators/useValidatorAnalytics.ts +3 -0
- package/src/hooks/validators/useValidatorCommission.ts +3 -3
- package/src/hooks/validators/useValidatorEstimatedBgtPerYear.ts +4 -4
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +3 -3
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +3 -3
- package/src/types/bribeBoost.d.ts +69 -0
- package/src/types/exports.ts +1 -1
- package/src/utils/filter.ts +3 -5
- package/src/utils/formatIncentivesTokenMap.ts +8 -8
- package/src/utils/formatInputTokenValue.ts +2 -2
- package/src/utils/formatNumber.ts +5 -5
- package/src/utils/formatTimestamps.unit.test.ts +6 -3
- package/src/utils/formatUsd.ts +6 -4
- package/src/utils/getServerSideClient.ts +3 -3
- package/src/utils/isDifferenceExceedingThreshold.ts +10 -6
- package/src/utils/layerZeroScan.ts +3 -1
- package/src/utils/math.ts +12 -7
- package/src/utils/math.unit.test.ts +114 -15
- package/src/utils/polyfillAbortSignalAny.ts +4 -4
- package/src/utils/polyfillAbortSignalAny.unit.test.ts +3 -1
- package/src/utils/poolNamings.ts +14 -10
- package/src/utils/pythHoneyUtils.ts +2 -2
- package/src/utils/truncateHash.ts +3 -3
- package/src/actions/validators/getDailyValidatorBlockStats.ts +0 -38
- package/src/hooks/tokens/useTokenCurrentPrice.ts +0 -21
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +0 -33
- package/src/hooks/validators/useDefaultRewardAllocation.ts +0 -26
- /package/{src → dist}/types/bribe-boost.d.ts +0 -0
- /package/src/actions/dex/{b-sdk.ts → bSdk.ts} +0 -0
- /package/src/contexts/{block-time-provider.tsx → BlockTimeProvider.tsx} +0 -0
package/dist/hooks/exports.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensoWalletV2FactoryAbi
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-JA4DHMTG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
BalancerApi,
|
|
6
6
|
BaseAggregator,
|
|
@@ -20,8 +20,6 @@ import {
|
|
|
20
20
|
getChartData,
|
|
21
21
|
getCollateralWeights,
|
|
22
22
|
getConvertToAssets,
|
|
23
|
-
getDailyValidatorBlockStats,
|
|
24
|
-
getDefaultRewardAllocation,
|
|
25
23
|
getEarnedStakedBeraVault,
|
|
26
24
|
getGlobalCapLimit,
|
|
27
25
|
getGlobalData,
|
|
@@ -39,6 +37,7 @@ import {
|
|
|
39
37
|
getRewardProofsByValidator,
|
|
40
38
|
getRewardTokenToBeraRate,
|
|
41
39
|
getRewardVault,
|
|
40
|
+
getRewardVaultEarnedRewards,
|
|
42
41
|
getRewardVaultIncentives,
|
|
43
42
|
getRewardVaultRewards,
|
|
44
43
|
getRewardVaultStakingToken,
|
|
@@ -58,7 +57,6 @@ import {
|
|
|
58
57
|
getUserStakingPositions,
|
|
59
58
|
getUserVaultInfo,
|
|
60
59
|
getUserVaults,
|
|
61
|
-
getUserVaultsReward,
|
|
62
60
|
getValidatorAnalytics,
|
|
63
61
|
getValidatorCommission,
|
|
64
62
|
getValidatorEstimatedBgtPerYear,
|
|
@@ -71,12 +69,12 @@ import {
|
|
|
71
69
|
getVaultValidators,
|
|
72
70
|
isBadCollateralAsset,
|
|
73
71
|
isBasketModeEnabled
|
|
74
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-DOZJB6IJ.mjs";
|
|
73
|
+
import "../chunk-PHYZRH4I.mjs";
|
|
75
74
|
import {
|
|
76
75
|
fetchBeep
|
|
77
|
-
} from "../chunk-
|
|
78
|
-
import "../chunk-
|
|
79
|
-
import "../chunk-CDK4YV3D.mjs";
|
|
76
|
+
} from "../chunk-BSOWLS3W.mjs";
|
|
77
|
+
import "../chunk-GWSTVITN.mjs";
|
|
80
78
|
import {
|
|
81
79
|
TokenContext,
|
|
82
80
|
useBeraFlag,
|
|
@@ -84,37 +82,37 @@ import {
|
|
|
84
82
|
useBlockTime,
|
|
85
83
|
useEnsoUserTokensWithBalances,
|
|
86
84
|
useHoneyConfig
|
|
87
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-UA3Z47LT.mjs";
|
|
88
86
|
import {
|
|
89
87
|
swr_default,
|
|
90
88
|
useSWR,
|
|
91
89
|
useSWRImmutable
|
|
92
|
-
} from "../chunk-
|
|
90
|
+
} from "../chunk-RM227WHI.mjs";
|
|
93
91
|
import {
|
|
94
92
|
getEnsoClient,
|
|
95
93
|
getWalletBalances
|
|
96
|
-
} from "../chunk-
|
|
97
|
-
import "../chunk-
|
|
98
|
-
import "../chunk-
|
|
99
|
-
import "../chunk-
|
|
94
|
+
} from "../chunk-J3LTASDE.mjs";
|
|
95
|
+
import "../chunk-ZCEFC2TK.mjs";
|
|
96
|
+
import "../chunk-IFNIPVTZ.mjs";
|
|
97
|
+
import "../chunk-GLWPRM33.mjs";
|
|
100
98
|
import {
|
|
101
99
|
TransactionFailedError
|
|
102
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-EJIGERYM.mjs";
|
|
103
101
|
import {
|
|
104
102
|
BeraMonitoring,
|
|
105
103
|
initBeraError
|
|
106
|
-
} from "../chunk-
|
|
104
|
+
} from "../chunk-LE4CYW7S.mjs";
|
|
107
105
|
import {
|
|
108
106
|
assertAddress,
|
|
109
107
|
assertAmount,
|
|
110
108
|
assertDefined,
|
|
111
109
|
assertPositive,
|
|
112
110
|
assertPublicClient
|
|
113
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-QQASX4LJ.mjs";
|
|
114
112
|
import {
|
|
115
113
|
computePriceImpact,
|
|
116
114
|
wrapNativeTokens
|
|
117
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-AEN6IJFU.mjs";
|
|
118
116
|
import {
|
|
119
117
|
DEFAULT_METAMASK_GAS_LIMIT,
|
|
120
118
|
bignumber_js_default,
|
|
@@ -122,35 +120,35 @@ import {
|
|
|
122
120
|
getPythDefaultUpdateFee,
|
|
123
121
|
msToSeconds,
|
|
124
122
|
seconds
|
|
125
|
-
} from "../chunk-
|
|
123
|
+
} from "../chunk-35RACQD4.mjs";
|
|
126
124
|
import {
|
|
127
125
|
beraFetchJson
|
|
128
|
-
} from "../chunk-
|
|
129
|
-
import "../chunk-
|
|
126
|
+
} from "../chunk-ZWTGVIPJ.mjs";
|
|
127
|
+
import "../chunk-7TFV6UKF.mjs";
|
|
130
128
|
import {
|
|
131
129
|
beraToken,
|
|
132
130
|
getHoneyToken,
|
|
133
131
|
isToken
|
|
134
|
-
} from "../chunk-
|
|
132
|
+
} from "../chunk-PJRLHTGC.mjs";
|
|
135
133
|
import {
|
|
136
134
|
parseBaseArgs
|
|
137
|
-
} from "../chunk-
|
|
138
|
-
import "../chunk-
|
|
135
|
+
} from "../chunk-TGN55GKE.mjs";
|
|
136
|
+
import "../chunk-BMNEN4OK.mjs";
|
|
139
137
|
import {
|
|
140
138
|
RequestError
|
|
141
|
-
} from "../chunk-
|
|
139
|
+
} from "../chunk-P3YZ7F22.mjs";
|
|
142
140
|
import {
|
|
143
141
|
BeraError,
|
|
144
142
|
InvalidArgumentError
|
|
145
|
-
} from "../chunk-
|
|
143
|
+
} from "../chunk-NZAH3SGT.mjs";
|
|
146
144
|
|
|
147
145
|
// src/hooks/bend/useGetConvertToAssets.ts
|
|
148
146
|
import { usePublicClient } from "@berachain/wagmi/hooks";
|
|
149
|
-
|
|
147
|
+
function useGetConvertToAssets({
|
|
150
148
|
sharesAmount,
|
|
151
149
|
vaultAddress,
|
|
152
150
|
vaultChainId
|
|
153
|
-
}, options)
|
|
151
|
+
}, options) {
|
|
154
152
|
const publicClient = usePublicClient({ chainId: vaultChainId });
|
|
155
153
|
return useSWR(
|
|
156
154
|
publicClient && sharesAmount && vaultAddress ? ["useGetConvertToAssets", sharesAmount, vaultAddress, vaultChainId] : null,
|
|
@@ -166,11 +164,11 @@ var useGetConvertToAssets = ({
|
|
|
166
164
|
...options
|
|
167
165
|
}
|
|
168
166
|
);
|
|
169
|
-
}
|
|
167
|
+
}
|
|
170
168
|
|
|
171
169
|
// src/hooks/dex/useAggregatorsQuotes.ts
|
|
172
170
|
import { useMemo } from "react";
|
|
173
|
-
import { zeroAddress as
|
|
171
|
+
import { zeroAddress as zeroAddress9 } from "viem";
|
|
174
172
|
import { defaultChainId } from "@berachain/config/internal";
|
|
175
173
|
import { useBeraWallet as useBeraWallet2, usePublicClient as usePublicClient4 } from "@berachain/wagmi/hooks";
|
|
176
174
|
|
|
@@ -182,7 +180,7 @@ import {
|
|
|
182
180
|
Token,
|
|
183
181
|
TokenAmount
|
|
184
182
|
} from "@berachain-foundation/berancer-sdk";
|
|
185
|
-
import { decodeFunctionData, formatEther
|
|
183
|
+
import { decodeFunctionData, formatEther } from "viem";
|
|
186
184
|
import { getUriFromLink } from "@berachain/config";
|
|
187
185
|
import { ChainId } from "@berachain/config/internal";
|
|
188
186
|
import { vaultAbi as balancerVaultAbi } from "@berachain/abis/bex/vault";
|
|
@@ -249,14 +247,7 @@ var BexAggregator = class extends BaseAggregator {
|
|
|
249
247
|
// @ts-expect-error b-sdk has more chains than berajs
|
|
250
248
|
this.chainId
|
|
251
249
|
);
|
|
252
|
-
const {
|
|
253
|
-
tokenIn,
|
|
254
|
-
tokenOut,
|
|
255
|
-
amount,
|
|
256
|
-
slippage,
|
|
257
|
-
account = zeroAddress,
|
|
258
|
-
publicClient
|
|
259
|
-
} = args;
|
|
250
|
+
const { tokenIn, tokenOut, amount, slippage, publicClient } = args;
|
|
260
251
|
this.assertChainSupport({ tokenIn, tokenOut });
|
|
261
252
|
assertPublicClient(publicClient);
|
|
262
253
|
const wberaIsBera = isToken(tokenIn, "BERA") || isToken(tokenOut, "BERA");
|
|
@@ -332,13 +323,13 @@ var BexAggregator = class extends BaseAggregator {
|
|
|
332
323
|
name: this.name,
|
|
333
324
|
priceImpactPercentage: this.calculatePriceImpact(priceImpact),
|
|
334
325
|
swapFeeBps: 0,
|
|
335
|
-
getCalldata: ({ account
|
|
326
|
+
getCalldata: ({ account }) => {
|
|
336
327
|
const callData = swap.buildCall({
|
|
337
328
|
slippage: Slippage.fromPercentage(slippage.toString()),
|
|
338
329
|
deadline: BigInt(Math.round(Date.now() / 1e3) + DEFAULT_DEADLINE),
|
|
339
330
|
queryOutput,
|
|
340
|
-
sender:
|
|
341
|
-
recipient:
|
|
331
|
+
sender: account,
|
|
332
|
+
recipient: account,
|
|
342
333
|
wethIsEth: wberaIsBera
|
|
343
334
|
});
|
|
344
335
|
const { args: params, functionName } = decodeFunctionData({
|
|
@@ -410,7 +401,7 @@ var RedeemBgtAggregator = class extends BaseAggregator {
|
|
|
410
401
|
var bgtRedeem = new RedeemBgtAggregator();
|
|
411
402
|
|
|
412
403
|
// src/actions/dex/aggregators/enso/enso.ts
|
|
413
|
-
import { zeroAddress
|
|
404
|
+
import { zeroAddress } from "viem";
|
|
414
405
|
import { ChainId as ChainId3 } from "@berachain/config/internal";
|
|
415
406
|
import aggregatorsRouterAbi from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
416
407
|
var EnsoAggregator = class extends BaseAggregator {
|
|
@@ -429,7 +420,7 @@ var EnsoAggregator = class extends BaseAggregator {
|
|
|
429
420
|
tokenOut,
|
|
430
421
|
amount,
|
|
431
422
|
slippage,
|
|
432
|
-
account =
|
|
423
|
+
account = zeroAddress,
|
|
433
424
|
aggregatorsFeeBps,
|
|
434
425
|
proxyAggregatorsThroughVercel = false,
|
|
435
426
|
rewardVault
|
|
@@ -445,7 +436,7 @@ var EnsoAggregator = class extends BaseAggregator {
|
|
|
445
436
|
amount,
|
|
446
437
|
aggregatorsFeeBps
|
|
447
438
|
);
|
|
448
|
-
const refundReceiver = account ===
|
|
439
|
+
const refundReceiver = account === zeroAddress ? this.config.bex.aggregatorsRouterExecutor : account;
|
|
449
440
|
const params = new URLSearchParams({
|
|
450
441
|
fromAddress: this.config.bex.aggregatorsRouterExecutor,
|
|
451
442
|
receiver: this.config.bex.aggregatorsRouterExecutor,
|
|
@@ -491,7 +482,7 @@ var EnsoAggregator = class extends BaseAggregator {
|
|
|
491
482
|
outputData,
|
|
492
483
|
aggregatorData,
|
|
493
484
|
{
|
|
494
|
-
rewardVault: rewardVault ??
|
|
485
|
+
rewardVault: rewardVault ?? zeroAddress,
|
|
495
486
|
isSwapAndStake: !!rewardVault
|
|
496
487
|
}
|
|
497
488
|
],
|
|
@@ -583,7 +574,7 @@ var ERC4626Aggregator = class extends BaseAggregator {
|
|
|
583
574
|
var erc4626Deposit = new ERC4626Aggregator();
|
|
584
575
|
|
|
585
576
|
// src/actions/dex/aggregators/fly.ts
|
|
586
|
-
import { zeroAddress as
|
|
577
|
+
import { zeroAddress as zeroAddress2 } from "viem";
|
|
587
578
|
import { ChainId as ChainId4 } from "@berachain/config/internal";
|
|
588
579
|
import aggregatorsRouterAbi2 from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
589
580
|
var BASE_URL = "https://api.fly.trade/aggregator";
|
|
@@ -676,7 +667,7 @@ var FlyAggregator = class extends BaseAggregator {
|
|
|
676
667
|
outputData,
|
|
677
668
|
aggregatorData,
|
|
678
669
|
{
|
|
679
|
-
rewardVault: rewardVault ??
|
|
670
|
+
rewardVault: rewardVault ?? zeroAddress2,
|
|
680
671
|
isSwapAndStake: !!rewardVault
|
|
681
672
|
}
|
|
682
673
|
],
|
|
@@ -693,7 +684,7 @@ var FlyAggregator = class extends BaseAggregator {
|
|
|
693
684
|
var fly = new FlyAggregator();
|
|
694
685
|
|
|
695
686
|
// src/actions/dex/aggregators/haiku.ts
|
|
696
|
-
import { formatUnits as formatUnits2, parseUnits, zeroAddress as
|
|
687
|
+
import { formatUnits as formatUnits2, parseUnits, zeroAddress as zeroAddress3 } from "viem";
|
|
697
688
|
import { ChainId as ChainId5 } from "@berachain/config/internal";
|
|
698
689
|
import aggregatorsRouterAbi3 from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
699
690
|
var HaikuAggregator = class extends BaseAggregator {
|
|
@@ -819,7 +810,7 @@ var HaikuAggregator = class extends BaseAggregator {
|
|
|
819
810
|
outputData,
|
|
820
811
|
aggregatorData,
|
|
821
812
|
{
|
|
822
|
-
rewardVault: rewardVault ??
|
|
813
|
+
rewardVault: rewardVault ?? zeroAddress3,
|
|
823
814
|
isSwapAndStake: !!rewardVault
|
|
824
815
|
}
|
|
825
816
|
],
|
|
@@ -1001,7 +992,7 @@ var HoneyNativeAggregator = class extends BaseAggregator {
|
|
|
1001
992
|
var honeyNative = new HoneyNativeAggregator();
|
|
1002
993
|
|
|
1003
994
|
// src/actions/dex/aggregators/kyberswap.ts
|
|
1004
|
-
import { zeroAddress as
|
|
995
|
+
import { zeroAddress as zeroAddress4 } from "viem";
|
|
1005
996
|
import { ChainId as ChainId7 } from "@berachain/config/internal";
|
|
1006
997
|
import aggregatorsRouterAbi4 from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
1007
998
|
var KyberSwapAggregator = class extends BaseAggregator {
|
|
@@ -1098,7 +1089,7 @@ var KyberSwapAggregator = class extends BaseAggregator {
|
|
|
1098
1089
|
outputData,
|
|
1099
1090
|
aggregatorData,
|
|
1100
1091
|
{
|
|
1101
|
-
rewardVault: rewardVault ??
|
|
1092
|
+
rewardVault: rewardVault ?? zeroAddress4,
|
|
1102
1093
|
isSwapAndStake: !!rewardVault
|
|
1103
1094
|
}
|
|
1104
1095
|
],
|
|
@@ -1115,7 +1106,7 @@ var KyberSwapAggregator = class extends BaseAggregator {
|
|
|
1115
1106
|
var kyberswap = new KyberSwapAggregator();
|
|
1116
1107
|
|
|
1117
1108
|
// src/actions/dex/aggregators/oogabooga.ts
|
|
1118
|
-
import { zeroAddress as
|
|
1109
|
+
import { zeroAddress as zeroAddress5 } from "viem";
|
|
1119
1110
|
import { ChainId as ChainId8 } from "@berachain/config/internal";
|
|
1120
1111
|
import aggregatorsRouterAbi5 from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
1121
1112
|
var OogaboogaAggregator = class extends BaseAggregator {
|
|
@@ -1192,7 +1183,7 @@ var OogaboogaAggregator = class extends BaseAggregator {
|
|
|
1192
1183
|
outputData,
|
|
1193
1184
|
aggregatorData,
|
|
1194
1185
|
{
|
|
1195
|
-
rewardVault: rewardVault ??
|
|
1186
|
+
rewardVault: rewardVault ?? zeroAddress5,
|
|
1196
1187
|
isSwapAndStake: !!rewardVault
|
|
1197
1188
|
}
|
|
1198
1189
|
],
|
|
@@ -1209,7 +1200,7 @@ var OogaboogaAggregator = class extends BaseAggregator {
|
|
|
1209
1200
|
var oogabooga = new OogaboogaAggregator();
|
|
1210
1201
|
|
|
1211
1202
|
// src/actions/dex/aggregators/openOcean.ts
|
|
1212
|
-
import { zeroAddress as
|
|
1203
|
+
import { zeroAddress as zeroAddress6 } from "viem";
|
|
1213
1204
|
import { ChainId as ChainId9 } from "@berachain/config/internal";
|
|
1214
1205
|
import aggregatorsRouterAbi6 from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
1215
1206
|
var OpenOceanAggregator = class extends BaseAggregator {
|
|
@@ -1223,7 +1214,7 @@ var OpenOceanAggregator = class extends BaseAggregator {
|
|
|
1223
1214
|
tokenOut,
|
|
1224
1215
|
amount,
|
|
1225
1216
|
slippage,
|
|
1226
|
-
account =
|
|
1217
|
+
account = zeroAddress6,
|
|
1227
1218
|
aggregatorsFeeBps,
|
|
1228
1219
|
publicClient,
|
|
1229
1220
|
rewardVault
|
|
@@ -1313,7 +1304,7 @@ var OpenOceanAggregator = class extends BaseAggregator {
|
|
|
1313
1304
|
outputData,
|
|
1314
1305
|
aggregatorData,
|
|
1315
1306
|
{
|
|
1316
|
-
rewardVault: rewardVault ??
|
|
1307
|
+
rewardVault: rewardVault ?? zeroAddress6,
|
|
1317
1308
|
isSwapAndStake: !!rewardVault
|
|
1318
1309
|
}
|
|
1319
1310
|
],
|
|
@@ -1431,16 +1422,16 @@ function useUnderlyingAsset({ token }) {
|
|
|
1431
1422
|
}
|
|
1432
1423
|
|
|
1433
1424
|
// src/hooks/dex/useAggregatorsRouterFeeBps.ts
|
|
1434
|
-
import { zeroAddress as
|
|
1425
|
+
import { zeroAddress as zeroAddress7 } from "viem";
|
|
1435
1426
|
import aggregatorsRouterAbi7 from "@berachain/abis/meta-aggregator/metaAggregatorV2";
|
|
1436
1427
|
import { usePublicClient as usePublicClient2 } from "@berachain/wagmi/hooks";
|
|
1437
|
-
|
|
1428
|
+
function useAggregatorsRouterFeeBps() {
|
|
1438
1429
|
const publicClient = usePublicClient2();
|
|
1439
1430
|
const { config } = parseBaseArgs({
|
|
1440
1431
|
chainId: publicClient.chain?.id
|
|
1441
1432
|
});
|
|
1442
1433
|
return useSWRImmutable(
|
|
1443
|
-
publicClient && config.bex.aggregatorsRouter && config.bex.aggregatorsRouter !==
|
|
1434
|
+
publicClient && config.bex.aggregatorsRouter && config.bex.aggregatorsRouter !== zeroAddress7 ? ["useAggregatorsRouterFeeBps", config.bex.aggregatorsRouter] : null,
|
|
1444
1435
|
async ([, aggregatorsRouter]) => {
|
|
1445
1436
|
const fee = await publicClient.readContract({
|
|
1446
1437
|
address: aggregatorsRouter,
|
|
@@ -1450,10 +1441,10 @@ var useAggregatorsRouterFeeBps = () => {
|
|
|
1450
1441
|
return Number(fee);
|
|
1451
1442
|
}
|
|
1452
1443
|
);
|
|
1453
|
-
}
|
|
1444
|
+
}
|
|
1454
1445
|
|
|
1455
1446
|
// src/hooks/dex/useSingleAggregatorQuote.ts
|
|
1456
|
-
import { parseUnits as parseUnits2, zeroAddress as
|
|
1447
|
+
import { parseUnits as parseUnits2, zeroAddress as zeroAddress8 } from "viem";
|
|
1457
1448
|
import { useBeraWallet, usePublicClient as usePublicClient3 } from "@berachain/wagmi/hooks";
|
|
1458
1449
|
var USE_AGGREGATORS_QUOTES_QUERY_KEY = "useAggregatorsQuotes";
|
|
1459
1450
|
function getQueryKey({
|
|
@@ -1620,7 +1611,7 @@ function useSingleAggregatorQuote(args, options) {
|
|
|
1620
1611
|
}
|
|
1621
1612
|
}
|
|
1622
1613
|
const { config } = parseBaseArgs(args);
|
|
1623
|
-
const isMAEnabled = config.bex.aggregatorsRouter !==
|
|
1614
|
+
const isMAEnabled = config.bex.aggregatorsRouter !== zeroAddress8;
|
|
1624
1615
|
return raw_useSingleAggregatorQuote(
|
|
1625
1616
|
{
|
|
1626
1617
|
...args,
|
|
@@ -1665,7 +1656,7 @@ function useAggregatorsQuotes(args, options) {
|
|
|
1665
1656
|
});
|
|
1666
1657
|
const isNativeSwap = isWrapOrUnwrap || isBgtRedeem;
|
|
1667
1658
|
const { config } = parseBaseArgs(args);
|
|
1668
|
-
const isMAEnabled = config.bex.aggregatorsRouter !==
|
|
1659
|
+
const isMAEnabled = config.bex.aggregatorsRouter !== zeroAddress9;
|
|
1669
1660
|
const swrOptions = getAggregatorsSWROptions(options);
|
|
1670
1661
|
const sharedArgs = {
|
|
1671
1662
|
activeAggregators,
|
|
@@ -1797,12 +1788,12 @@ function useAggregatorsQuotes(args, options) {
|
|
|
1797
1788
|
}
|
|
1798
1789
|
|
|
1799
1790
|
// src/hooks/dex/useAllUserPools.ts
|
|
1800
|
-
|
|
1791
|
+
function useAllUserPoolsQueryKey({
|
|
1801
1792
|
query
|
|
1802
|
-
} = {})
|
|
1793
|
+
} = {}) {
|
|
1803
1794
|
return ["useAllUserPools", query];
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1795
|
+
}
|
|
1796
|
+
function useAllUserPools(query, options) {
|
|
1806
1797
|
return useSWR(
|
|
1807
1798
|
useAllUserPoolsQueryKey({ query }),
|
|
1808
1799
|
async ([_, params]) => {
|
|
@@ -1816,16 +1807,16 @@ var useAllUserPools = (query, options) => {
|
|
|
1816
1807
|
...options
|
|
1817
1808
|
}
|
|
1818
1809
|
);
|
|
1819
|
-
}
|
|
1810
|
+
}
|
|
1820
1811
|
|
|
1821
1812
|
// src/hooks/dex/useApiPool.ts
|
|
1822
1813
|
import { isAddress } from "viem";
|
|
1823
|
-
|
|
1814
|
+
function useApiPoolQueryKey({
|
|
1824
1815
|
poolId,
|
|
1825
1816
|
account
|
|
1826
|
-
})
|
|
1817
|
+
}) {
|
|
1827
1818
|
return poolId ? [`usePool-api`, poolId, account] : null;
|
|
1828
|
-
}
|
|
1819
|
+
}
|
|
1829
1820
|
function useApiPool({
|
|
1830
1821
|
poolId,
|
|
1831
1822
|
account
|
|
@@ -1854,24 +1845,28 @@ function useApiPool({
|
|
|
1854
1845
|
// src/hooks/dex/useCreatePool.ts
|
|
1855
1846
|
import { useMemo as useMemo2 } from "react";
|
|
1856
1847
|
import { PoolType as PoolType2 } from "@berachain-foundation/berancer-sdk";
|
|
1857
|
-
import { keccak256, parseUnits as parseUnits3, zeroAddress as
|
|
1848
|
+
import { keccak256, parseUnits as parseUnits3, zeroAddress as zeroAddress10 } from "viem";
|
|
1858
1849
|
import { poolCreationHelperAbi as balancerPoolCreationHelperAbi } from "@berachain/abis/bex/poolCreationHelper";
|
|
1859
1850
|
|
|
1860
1851
|
// src/utils/poolNamings.ts
|
|
1861
1852
|
import { PoolType } from "@berachain-foundation/berancer-sdk";
|
|
1862
1853
|
import { formatUnits as formatUnits4 } from "viem";
|
|
1863
|
-
|
|
1854
|
+
function sortTokensByAddress(tokens) {
|
|
1864
1855
|
return [...tokens].sort(
|
|
1865
1856
|
(a, b) => a.address.toLowerCase().localeCompare(b.address.toLowerCase())
|
|
1866
1857
|
);
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1858
|
+
}
|
|
1859
|
+
function generatePoolName(tokens) {
|
|
1869
1860
|
if (tokens.length === 0) {
|
|
1870
1861
|
return "";
|
|
1871
1862
|
}
|
|
1872
1863
|
return sortTokensByAddress(tokens).map((token) => token.symbol).join(" | ");
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1864
|
+
}
|
|
1865
|
+
function generatePoolSymbol({
|
|
1866
|
+
tokens,
|
|
1867
|
+
weights,
|
|
1868
|
+
poolType
|
|
1869
|
+
}) {
|
|
1875
1870
|
let poolTypeString;
|
|
1876
1871
|
switch (poolType) {
|
|
1877
1872
|
case PoolType.ComposableStable:
|
|
@@ -1892,7 +1887,7 @@ var generatePoolSymbol = (tokens, weights, poolType) => {
|
|
|
1892
1887
|
}).join("-")}-${poolTypeString}`;
|
|
1893
1888
|
}
|
|
1894
1889
|
return `${sortTokensByAddress(tokens).map((token) => token.symbol).join("-")}-${poolTypeString}`;
|
|
1895
|
-
}
|
|
1890
|
+
}
|
|
1896
1891
|
|
|
1897
1892
|
// src/hooks/dex/useCreatePool.ts
|
|
1898
1893
|
var OracleMode = /* @__PURE__ */ ((OracleMode2) => {
|
|
@@ -1900,7 +1895,7 @@ var OracleMode = /* @__PURE__ */ ((OracleMode2) => {
|
|
|
1900
1895
|
OracleMode2["Custom"] = "Custom";
|
|
1901
1896
|
return OracleMode2;
|
|
1902
1897
|
})(OracleMode || {});
|
|
1903
|
-
|
|
1898
|
+
function createStablePoolArgs({
|
|
1904
1899
|
poolCreationHelper,
|
|
1905
1900
|
poolCreateTokens,
|
|
1906
1901
|
initialLiquidityTokens,
|
|
@@ -1914,7 +1909,7 @@ var createStablePoolArgs = ({
|
|
|
1914
1909
|
message,
|
|
1915
1910
|
actionType,
|
|
1916
1911
|
gasLimit = DEFAULT_METAMASK_GAS_LIMIT
|
|
1917
|
-
})
|
|
1912
|
+
}) {
|
|
1918
1913
|
const sortedPoolCreateAddresses = poolCreateTokens.map((token) => token.address.toLowerCase()).sort((a, b) => a < b ? -1 : 1);
|
|
1919
1914
|
const combinedData = sortedPoolCreateAddresses.map((address) => {
|
|
1920
1915
|
const liquidityToken = initialLiquidityTokens.find(
|
|
@@ -1924,7 +1919,7 @@ var createStablePoolArgs = ({
|
|
|
1924
1919
|
const oracle = oracles.find(
|
|
1925
1920
|
(oracle2) => oracle2.tokenAddress.toLowerCase() === address.toLowerCase()
|
|
1926
1921
|
);
|
|
1927
|
-
const rateProvider = oracle ? oracle.address :
|
|
1922
|
+
const rateProvider = oracle ? oracle.address : zeroAddress10;
|
|
1928
1923
|
const cacheDuration = oracle ? BigInt(oracle.cacheDuration) : BigInt(100);
|
|
1929
1924
|
return { amountIn, rateProvider, cacheDuration };
|
|
1930
1925
|
});
|
|
@@ -1970,8 +1965,8 @@ var createStablePoolArgs = ({
|
|
|
1970
1965
|
}
|
|
1971
1966
|
}
|
|
1972
1967
|
};
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1968
|
+
}
|
|
1969
|
+
function createWeightedPoolArgs({
|
|
1975
1970
|
poolCreationHelper,
|
|
1976
1971
|
poolCreateTokens,
|
|
1977
1972
|
initialLiquidityTokens,
|
|
@@ -1984,7 +1979,7 @@ var createWeightedPoolArgs = ({
|
|
|
1984
1979
|
message,
|
|
1985
1980
|
actionType,
|
|
1986
1981
|
gasLimit = DEFAULT_METAMASK_GAS_LIMIT
|
|
1987
|
-
})
|
|
1982
|
+
}) {
|
|
1988
1983
|
const createPoolTokens = [];
|
|
1989
1984
|
const joinPoolTokens = [];
|
|
1990
1985
|
const sortedWeights = [];
|
|
@@ -2008,7 +2003,7 @@ var createWeightedPoolArgs = ({
|
|
|
2008
2003
|
sortedWeights.push(item.weight);
|
|
2009
2004
|
sortedAmountsIn.push(item.amountIn);
|
|
2010
2005
|
});
|
|
2011
|
-
const nativeTokenIndex = joinPoolTokens.indexOf(
|
|
2006
|
+
const nativeTokenIndex = joinPoolTokens.indexOf(zeroAddress10);
|
|
2012
2007
|
const value = nativeTokenIndex !== -1 ? sortedAmountsIn[nativeTokenIndex] : 0n;
|
|
2013
2008
|
return {
|
|
2014
2009
|
address: poolCreationHelper,
|
|
@@ -2020,7 +2015,7 @@ var createWeightedPoolArgs = ({
|
|
|
2020
2015
|
createPoolTokens,
|
|
2021
2016
|
joinPoolTokens,
|
|
2022
2017
|
sortedWeights,
|
|
2023
|
-
Array(createPoolTokens.length).fill(
|
|
2018
|
+
Array(createPoolTokens.length).fill(zeroAddress10),
|
|
2024
2019
|
swapFeePercentage,
|
|
2025
2020
|
sortedAmountsIn,
|
|
2026
2021
|
owner,
|
|
@@ -2038,8 +2033,8 @@ var createWeightedPoolArgs = ({
|
|
|
2038
2033
|
}
|
|
2039
2034
|
}
|
|
2040
2035
|
};
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2036
|
+
}
|
|
2037
|
+
function useCreatePool({
|
|
2043
2038
|
poolCreateTokens,
|
|
2044
2039
|
initialLiquidityTokens,
|
|
2045
2040
|
normalizedWeights,
|
|
@@ -2051,7 +2046,7 @@ var useCreatePool = ({
|
|
|
2051
2046
|
amplification,
|
|
2052
2047
|
oracles,
|
|
2053
2048
|
...baseArgs
|
|
2054
|
-
})
|
|
2049
|
+
}) {
|
|
2055
2050
|
const { generatedPoolName, generatedPoolSymbol } = useMemo2(() => {
|
|
2056
2051
|
if (!poolCreateTokens) {
|
|
2057
2052
|
return {
|
|
@@ -2060,11 +2055,11 @@ var useCreatePool = ({
|
|
|
2060
2055
|
};
|
|
2061
2056
|
}
|
|
2062
2057
|
const generatedPoolName2 = generatePoolName(poolCreateTokens);
|
|
2063
|
-
const generatedPoolSymbol2 = generatePoolSymbol(
|
|
2064
|
-
poolCreateTokens,
|
|
2065
|
-
normalizedWeights,
|
|
2058
|
+
const generatedPoolSymbol2 = generatePoolSymbol({
|
|
2059
|
+
tokens: poolCreateTokens,
|
|
2060
|
+
weights: normalizedWeights,
|
|
2066
2061
|
poolType
|
|
2067
|
-
);
|
|
2062
|
+
});
|
|
2068
2063
|
return {
|
|
2069
2064
|
generatedPoolName: generatedPoolName2,
|
|
2070
2065
|
generatedPoolSymbol: generatedPoolSymbol2
|
|
@@ -2126,10 +2121,10 @@ var useCreatePool = ({
|
|
|
2126
2121
|
generatedPoolSymbol,
|
|
2127
2122
|
createPoolArgs
|
|
2128
2123
|
};
|
|
2129
|
-
}
|
|
2124
|
+
}
|
|
2130
2125
|
|
|
2131
2126
|
// src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts
|
|
2132
|
-
|
|
2127
|
+
function useGlobalLiquidityAndSwapVolume() {
|
|
2133
2128
|
const response = useSWR(
|
|
2134
2129
|
"useGlobalLiquidityAndSwapVolume",
|
|
2135
2130
|
async () => getGlobalLiquidityAndSwapVolume()
|
|
@@ -2145,13 +2140,13 @@ var useGlobalLiquidityAndSwapVolume = () => {
|
|
|
2145
2140
|
)
|
|
2146
2141
|
}
|
|
2147
2142
|
};
|
|
2148
|
-
}
|
|
2143
|
+
}
|
|
2149
2144
|
|
|
2150
2145
|
// src/hooks/dex/useLiquidityMismatch.ts
|
|
2151
2146
|
import { useEffect, useState } from "react";
|
|
2152
2147
|
import { PoolType as PoolType3 } from "@berachain-foundation/berancer-sdk";
|
|
2153
2148
|
var DEFAULT_LIQUIDITY_MISMATCH_TOLERANCE_PERCENT = 0.05;
|
|
2154
|
-
|
|
2149
|
+
function useLiquidityMismatch({
|
|
2155
2150
|
currentStep,
|
|
2156
2151
|
tokenPrices,
|
|
2157
2152
|
isLoadingTokenPrices,
|
|
@@ -2161,7 +2156,7 @@ var useLiquidityMismatch = ({
|
|
|
2161
2156
|
poolType,
|
|
2162
2157
|
liquidityMismatchTolerancePercent = DEFAULT_LIQUIDITY_MISMATCH_TOLERANCE_PERCENT,
|
|
2163
2158
|
oracles
|
|
2164
|
-
})
|
|
2159
|
+
}) {
|
|
2165
2160
|
const [liquidityMismatchInfo, setLiquidityMismatchInfo] = useState({ title: null, message: null });
|
|
2166
2161
|
useEffect(() => {
|
|
2167
2162
|
if (!tokenPrices || isLoadingTokenPrices || !tokens || !weights || weightsError || tokens.some((token) => !token.address) || oracles.some((oracle) => oracle.mode === "Custom" /* Custom */)) {
|
|
@@ -2251,25 +2246,25 @@ var useLiquidityMismatch = ({
|
|
|
2251
2246
|
oracles
|
|
2252
2247
|
]);
|
|
2253
2248
|
return liquidityMismatchInfo;
|
|
2254
|
-
}
|
|
2249
|
+
}
|
|
2255
2250
|
|
|
2256
2251
|
// src/hooks/dex/useLpPosition.ts
|
|
2257
2252
|
import { formatEther as formatEther3, isAddressEqual } from "viem";
|
|
2258
2253
|
|
|
2259
2254
|
// src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts
|
|
2260
|
-
import { isAddress as isAddress3, zeroAddress as
|
|
2255
|
+
import { isAddress as isAddress3, zeroAddress as zeroAddress12 } from "viem";
|
|
2261
2256
|
import { rewardVaultAbi } from "@berachain/abis/pol/rewards/rewardVault";
|
|
2262
2257
|
import { useBeraWallet as useBeraWallet3, usePublicClient as usePublicClient6 } from "@berachain/wagmi/hooks";
|
|
2263
2258
|
|
|
2264
2259
|
// src/hooks/pol/useRewardVaultFromToken.ts
|
|
2265
|
-
import { isAddress as isAddress2, zeroAddress as
|
|
2260
|
+
import { isAddress as isAddress2, zeroAddress as zeroAddress11 } from "viem";
|
|
2266
2261
|
import { rewardVaultFactoryAbi } from "@berachain/abis/pol/rewards/rewardVaultFactory";
|
|
2267
2262
|
import { usePublicClient as usePublicClient5 } from "@berachain/wagmi/hooks";
|
|
2268
|
-
|
|
2263
|
+
function useRewardVaultFromToken({
|
|
2269
2264
|
tokenAddress
|
|
2270
2265
|
}, {
|
|
2271
2266
|
isEnabled = true
|
|
2272
|
-
} = {})
|
|
2267
|
+
} = {}) {
|
|
2273
2268
|
const publicClient = usePublicClient5();
|
|
2274
2269
|
const QUERY_KEY = publicClient && tokenAddress && isAddress2(tokenAddress) && isEnabled ? ["useRewardVaultFromToken", tokenAddress] : null;
|
|
2275
2270
|
return useSWRImmutable(
|
|
@@ -2288,16 +2283,16 @@ var useRewardVaultFromToken = ({
|
|
|
2288
2283
|
functionName: "getVault",
|
|
2289
2284
|
args: [tokenAddress2]
|
|
2290
2285
|
});
|
|
2291
|
-
return res ===
|
|
2286
|
+
return res === zeroAddress11 ? void 0 : res;
|
|
2292
2287
|
}
|
|
2293
2288
|
);
|
|
2294
|
-
}
|
|
2289
|
+
}
|
|
2295
2290
|
|
|
2296
2291
|
// src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts
|
|
2297
|
-
|
|
2292
|
+
function useRewardVaultBalanceFromStakingToken({
|
|
2298
2293
|
stakingToken,
|
|
2299
2294
|
rewardVaultAddress: _rewardVaultAddress
|
|
2300
|
-
}, options)
|
|
2295
|
+
}, options) {
|
|
2301
2296
|
const { address: account } = useBeraWallet3();
|
|
2302
2297
|
const publicClient = usePublicClient6();
|
|
2303
2298
|
const isEnabled = options?.isEnabled ?? true;
|
|
@@ -2318,7 +2313,7 @@ var useRewardVaultBalanceFromStakingToken = ({
|
|
|
2318
2313
|
rewardVaultAddress && account && publicClient && isAddress3(rewardVaultAddress) && isAddress3(account) ? ["useVaultBalanceFromStakingToken", rewardVaultAddress, account] : null,
|
|
2319
2314
|
async ([, rewardVaultAddress2, account2]) => {
|
|
2320
2315
|
assertPublicClient(publicClient);
|
|
2321
|
-
if (rewardVaultAddress2 ===
|
|
2316
|
+
if (rewardVaultAddress2 === zeroAddress12) {
|
|
2322
2317
|
return {
|
|
2323
2318
|
address: rewardVaultAddress2,
|
|
2324
2319
|
balance: 0n
|
|
@@ -2345,7 +2340,7 @@ var useRewardVaultBalanceFromStakingToken = ({
|
|
|
2345
2340
|
},
|
|
2346
2341
|
isLoading: swrResponse.isLoading || isLoadingRewardVaultAddress
|
|
2347
2342
|
};
|
|
2348
|
-
}
|
|
2343
|
+
}
|
|
2349
2344
|
|
|
2350
2345
|
// src/hooks/tokens/usePollBalance.ts
|
|
2351
2346
|
import {
|
|
@@ -2353,13 +2348,13 @@ import {
|
|
|
2353
2348
|
formatEther as formatEther2,
|
|
2354
2349
|
formatUnits as formatUnits5,
|
|
2355
2350
|
isAddress as isAddress5,
|
|
2356
|
-
zeroAddress as
|
|
2351
|
+
zeroAddress as zeroAddress14
|
|
2357
2352
|
} from "viem";
|
|
2358
2353
|
import { defaultChainId as defaultChainId3 } from "@berachain/config/internal";
|
|
2359
2354
|
import { useBeraWallet as useBeraWallet4, usePublicClient as usePublicClient8 } from "@berachain/wagmi/hooks";
|
|
2360
2355
|
|
|
2361
2356
|
// src/hooks/tokens/useTokenInformation.ts
|
|
2362
|
-
import { isAddress as isAddress4, zeroAddress as
|
|
2357
|
+
import { isAddress as isAddress4, zeroAddress as zeroAddress13 } from "viem";
|
|
2363
2358
|
import { defaultChainId as defaultChainId2 } from "@berachain/config/internal";
|
|
2364
2359
|
import { usePublicClient as usePublicClient7 } from "@berachain/wagmi/hooks";
|
|
2365
2360
|
function useTokenInformation(args, options) {
|
|
@@ -2372,7 +2367,7 @@ function useTokenInformation(args, options) {
|
|
|
2372
2367
|
async ([_, address, chainId2 = defaultChainId2]) => {
|
|
2373
2368
|
if (isToken(address, "BERA")) {
|
|
2374
2369
|
return {
|
|
2375
|
-
address:
|
|
2370
|
+
address: zeroAddress13,
|
|
2376
2371
|
decimals: beraToken.decimals,
|
|
2377
2372
|
name: beraToken.name,
|
|
2378
2373
|
symbol: beraToken.symbol,
|
|
@@ -2398,7 +2393,7 @@ function usePollBalance({
|
|
|
2398
2393
|
}, options) {
|
|
2399
2394
|
let address = addressString;
|
|
2400
2395
|
if (isToken(address, "ETH")) {
|
|
2401
|
-
address =
|
|
2396
|
+
address = zeroAddress14;
|
|
2402
2397
|
}
|
|
2403
2398
|
const publicClient = usePublicClient8({ chainId: chainId2 });
|
|
2404
2399
|
const { address: account } = useBeraWallet4();
|
|
@@ -2448,7 +2443,7 @@ function usePollBalance({
|
|
|
2448
2443
|
}
|
|
2449
2444
|
|
|
2450
2445
|
// src/hooks/dex/useLpPosition.ts
|
|
2451
|
-
|
|
2446
|
+
function useLpPosition({ pool, vaultAddress }, options) {
|
|
2452
2447
|
const { data: userPosition, ...rest } = usePollBalance({
|
|
2453
2448
|
address: pool?.address
|
|
2454
2449
|
});
|
|
@@ -2507,11 +2502,11 @@ var useLpPosition = ({ pool, vaultAddress }, options) => {
|
|
|
2507
2502
|
refreshVaultDeposit();
|
|
2508
2503
|
}
|
|
2509
2504
|
};
|
|
2510
|
-
}
|
|
2505
|
+
}
|
|
2511
2506
|
|
|
2512
2507
|
// src/hooks/dex/useMultipleTokenApprovalsWithSlippage.ts
|
|
2513
2508
|
import { useMemo as useMemo3 } from "react";
|
|
2514
|
-
import { parseUnits as parseUnits4, zeroAddress as
|
|
2509
|
+
import { parseUnits as parseUnits4, zeroAddress as zeroAddress15 } from "viem";
|
|
2515
2510
|
|
|
2516
2511
|
// src/hooks/tokens/usePollAllowances.ts
|
|
2517
2512
|
import { useBeraWallet as useBeraWallet5, useConfig as useConfig2 } from "@berachain/wagmi/hooks";
|
|
@@ -2547,7 +2542,7 @@ function calculateMaxAmountIn({
|
|
|
2547
2542
|
function useMultipleTokenApprovalsWithSlippage(tokenInput, options) {
|
|
2548
2543
|
const { slippage } = options ?? {};
|
|
2549
2544
|
const items = useMemo3(
|
|
2550
|
-
() => tokenInput.filter((token) => token.token.address !==
|
|
2545
|
+
() => tokenInput.filter((token) => token.token.address !== zeroAddress15).filter((token) => bignumber_js_default(token.amount.formatted).gt(0)),
|
|
2551
2546
|
[tokenInput]
|
|
2552
2547
|
);
|
|
2553
2548
|
const {
|
|
@@ -2641,7 +2636,7 @@ function useMultipleTokenInformation(args, options) {
|
|
|
2641
2636
|
|
|
2642
2637
|
// src/hooks/tokens/useTokenCurrentPrices.ts
|
|
2643
2638
|
import { useMemo as useMemo4 } from "react";
|
|
2644
|
-
import { isAddress as isAddress7, zeroAddress as
|
|
2639
|
+
import { isAddress as isAddress7, zeroAddress as zeroAddress16 } from "viem";
|
|
2645
2640
|
import { defaultChainId as defaultChainId5 } from "@berachain/config/internal";
|
|
2646
2641
|
|
|
2647
2642
|
// src/hooks/tokens/useTokens.ts
|
|
@@ -2689,7 +2684,7 @@ function useTokenCurrentPrices({
|
|
|
2689
2684
|
tokenList?.map((token) => token.address.toLowerCase())
|
|
2690
2685
|
);
|
|
2691
2686
|
if (tokenList.some((token) => isToken(token, "WBERA"))) {
|
|
2692
|
-
tokenSet.add(
|
|
2687
|
+
tokenSet.add(zeroAddress16);
|
|
2693
2688
|
}
|
|
2694
2689
|
return beraAddresses?.some((a) => !tokenSet.has(a));
|
|
2695
2690
|
}, [beraAddresses, tokenList]);
|
|
@@ -2839,7 +2834,7 @@ function useOnChainPoolData(poolId) {
|
|
|
2839
2834
|
// src/hooks/dex/usePollPoolCreationRelayerApproval.ts
|
|
2840
2835
|
import { vaultAbi as balancerVaultAbi2 } from "@berachain/abis/bex/vault";
|
|
2841
2836
|
import { useBeraWallet as useBeraWallet6, usePublicClient as usePublicClient11 } from "@berachain/wagmi/hooks";
|
|
2842
|
-
|
|
2837
|
+
function usePollPoolCreationRelayerApproval(options) {
|
|
2843
2838
|
const { address: account } = useBeraWallet6();
|
|
2844
2839
|
const publicClient = usePublicClient11();
|
|
2845
2840
|
const QUERY_KEY = account && publicClient ? [
|
|
@@ -2862,7 +2857,7 @@ var usePollPoolCreationRelayerApproval = (options) => {
|
|
|
2862
2857
|
},
|
|
2863
2858
|
{ ...options }
|
|
2864
2859
|
);
|
|
2865
|
-
}
|
|
2860
|
+
}
|
|
2866
2861
|
|
|
2867
2862
|
// src/hooks/dex/usePool.ts
|
|
2868
2863
|
function usePool({ poolId }) {
|
|
@@ -2885,10 +2880,10 @@ function usePool({ poolId }) {
|
|
|
2885
2880
|
}
|
|
2886
2881
|
|
|
2887
2882
|
// src/hooks/dex/usePoolEvents.ts
|
|
2888
|
-
|
|
2883
|
+
function usePoolEvents({
|
|
2889
2884
|
poolId,
|
|
2890
2885
|
typeInArray
|
|
2891
|
-
})
|
|
2886
|
+
}) {
|
|
2892
2887
|
return useSWRImmutable(
|
|
2893
2888
|
poolId ? ["usePoolEvents", poolId, typeInArray] : null,
|
|
2894
2889
|
async ([, poolId2, typeInArray2]) => getPoolEvents({ poolId: poolId2, typeInArray: typeInArray2 }),
|
|
@@ -2896,10 +2891,10 @@ var usePoolEvents = ({
|
|
|
2896
2891
|
refreshInterval: 18e4 /* SLOW */
|
|
2897
2892
|
}
|
|
2898
2893
|
);
|
|
2899
|
-
}
|
|
2894
|
+
}
|
|
2900
2895
|
|
|
2901
2896
|
// src/hooks/dex/usePoolHistoricalData.ts
|
|
2902
|
-
|
|
2897
|
+
function usePoolHistoricalData({ poolId, ...baseArgs }, options) {
|
|
2903
2898
|
const { config } = parseBaseArgs(baseArgs);
|
|
2904
2899
|
const QUERY_KEY = poolId ? ["usePoolHistoricalData", poolId] : null;
|
|
2905
2900
|
return useSWR(
|
|
@@ -2912,17 +2907,17 @@ var usePoolHistoricalData = ({ poolId, ...baseArgs }, options) => {
|
|
|
2912
2907
|
},
|
|
2913
2908
|
options
|
|
2914
2909
|
);
|
|
2915
|
-
}
|
|
2910
|
+
}
|
|
2916
2911
|
|
|
2917
2912
|
// src/hooks/dex/usePools.ts
|
|
2918
2913
|
import { useMemo as useMemo6 } from "react";
|
|
2919
2914
|
import { useBeraWallet as useBeraWallet7 } from "@berachain/wagmi/hooks";
|
|
2920
|
-
|
|
2915
|
+
function usePoolsQueryKey({
|
|
2921
2916
|
query
|
|
2922
|
-
} = {})
|
|
2917
|
+
} = {}) {
|
|
2923
2918
|
return ["useAllPools", query];
|
|
2924
|
-
}
|
|
2925
|
-
|
|
2919
|
+
}
|
|
2920
|
+
function usePools(query, options) {
|
|
2926
2921
|
const { address: account } = useBeraWallet7();
|
|
2927
2922
|
const {
|
|
2928
2923
|
data: userPools,
|
|
@@ -2975,7 +2970,7 @@ var usePools = (query, options) => {
|
|
|
2975
2970
|
},
|
|
2976
2971
|
pagination
|
|
2977
2972
|
};
|
|
2978
|
-
}
|
|
2973
|
+
}
|
|
2979
2974
|
|
|
2980
2975
|
// src/hooks/dex/usePriceImpact.ts
|
|
2981
2976
|
import { useMemo as useMemo8 } from "react";
|
|
@@ -3081,12 +3076,12 @@ function usePriceImpact({
|
|
|
3081
3076
|
if (!tokenIn || !tokenOut || !formattedAmountIn || !formattedAmountOut)
|
|
3082
3077
|
return void 0;
|
|
3083
3078
|
if (tokenInPrice == null || tokenOutPrice == null) return null;
|
|
3084
|
-
return computePriceImpact(
|
|
3085
|
-
tokenInPrice.toString(),
|
|
3086
|
-
tokenOutPrice.toString(),
|
|
3087
|
-
formattedAmountIn,
|
|
3088
|
-
formattedAmountOut
|
|
3089
|
-
);
|
|
3079
|
+
return computePriceImpact({
|
|
3080
|
+
tokenInPrice: tokenInPrice.toString(),
|
|
3081
|
+
tokenOutPrice: tokenOutPrice.toString(),
|
|
3082
|
+
inAmount: formattedAmountIn,
|
|
3083
|
+
outAmount: formattedAmountOut
|
|
3084
|
+
});
|
|
3090
3085
|
}, [
|
|
3091
3086
|
tokenIn,
|
|
3092
3087
|
tokenOut,
|
|
@@ -3127,10 +3122,10 @@ import {
|
|
|
3127
3122
|
ethAddress,
|
|
3128
3123
|
formatUnits as formatUnits7,
|
|
3129
3124
|
getAddress,
|
|
3130
|
-
zeroAddress as
|
|
3125
|
+
zeroAddress as zeroAddress17
|
|
3131
3126
|
} from "viem";
|
|
3132
3127
|
function toEnsoAddress(address) {
|
|
3133
|
-
return address ===
|
|
3128
|
+
return address === zeroAddress17 ? ethAddress : address;
|
|
3134
3129
|
}
|
|
3135
3130
|
function toBigIntOrUndefined(value) {
|
|
3136
3131
|
if (value === null || value === void 0) {
|
|
@@ -4044,12 +4039,12 @@ function useBendMultiply({
|
|
|
4044
4039
|
}
|
|
4045
4040
|
|
|
4046
4041
|
// src/hooks/enso/useBendZapSupply.ts
|
|
4047
|
-
import { formatEther as formatEther4, parseUnits as parseUnits7, zeroAddress as
|
|
4042
|
+
import { formatEther as formatEther4, parseUnits as parseUnits7, zeroAddress as zeroAddress19 } from "viem";
|
|
4048
4043
|
import { defaultChainId as berachainChainId } from "@berachain/config/internal";
|
|
4049
4044
|
import { useBeraWallet as useBeraWallet12, usePublicClient as usePublicClient16 } from "@berachain/wagmi/hooks";
|
|
4050
4045
|
|
|
4051
4046
|
// src/actions/dex/aggregators/enso/ensoErc4626.ts
|
|
4052
|
-
import { ethAddress as ethAddress2, zeroAddress as
|
|
4047
|
+
import { ethAddress as ethAddress2, zeroAddress as zeroAddress18 } from "viem";
|
|
4053
4048
|
var EnsoErc4626Aggregator = class extends BaseAggregator {
|
|
4054
4049
|
name = "Enso (Mint)" /* EnsoErc4626 */;
|
|
4055
4050
|
supportedChains = null;
|
|
@@ -4066,7 +4061,7 @@ var EnsoErc4626Aggregator = class extends BaseAggregator {
|
|
|
4066
4061
|
tokenOut,
|
|
4067
4062
|
amount,
|
|
4068
4063
|
slippage,
|
|
4069
|
-
account =
|
|
4064
|
+
account = zeroAddress18,
|
|
4070
4065
|
aggregatorsFeeBps,
|
|
4071
4066
|
proxyAggregatorsThroughVercel = false,
|
|
4072
4067
|
rewardVault,
|
|
@@ -4077,8 +4072,8 @@ var EnsoErc4626Aggregator = class extends BaseAggregator {
|
|
|
4077
4072
|
const ensoClient = getEnsoClient({
|
|
4078
4073
|
baseURL: proxyAggregatorsThroughVercel ? "/api/enso" : void 0
|
|
4079
4074
|
});
|
|
4080
|
-
if (tokenIn.address ===
|
|
4081
|
-
if (tokenOut.address ===
|
|
4075
|
+
if (tokenIn.address === zeroAddress18) tokenIn.address = ethAddress2;
|
|
4076
|
+
if (tokenOut.address === zeroAddress18) tokenOut.address = ethAddress2;
|
|
4082
4077
|
const zapTokenOut = underlyingToken ?? tokenOut;
|
|
4083
4078
|
const bundleActions = [
|
|
4084
4079
|
// this is the base route action, which will swap the token in to the zap token out
|
|
@@ -4232,12 +4227,12 @@ function useBendZapSupply({
|
|
|
4232
4227
|
const isCrossChain = tokenIn?.chainId && tokenIn.chainId !== berachainChainId;
|
|
4233
4228
|
const { data: nativeBalanceData, isLoading: isNativeBalanceLoading } = usePollBalance(
|
|
4234
4229
|
{
|
|
4235
|
-
address:
|
|
4230
|
+
address: zeroAddress19,
|
|
4236
4231
|
chainId: isCrossChain ? tokenIn?.chainId : void 0
|
|
4237
4232
|
},
|
|
4238
4233
|
{ isEnabled: !!isCrossChain }
|
|
4239
4234
|
);
|
|
4240
|
-
const transactionValue = swrResponse.data?.getCalldata?.({ account:
|
|
4235
|
+
const transactionValue = swrResponse.data?.getCalldata?.({ account: zeroAddress19 })?.value ?? 0n;
|
|
4241
4236
|
const nativeBalance = nativeBalanceData?.balance ?? {
|
|
4242
4237
|
raw: "0",
|
|
4243
4238
|
formatted: "0"
|
|
@@ -4325,7 +4320,7 @@ import { defaultChainId as berachainChainId2 } from "@berachain/config/internal"
|
|
|
4325
4320
|
import { useBeraWallet as useBeraWallet14, useConfig as useConfig4 } from "@berachain/wagmi/hooks";
|
|
4326
4321
|
|
|
4327
4322
|
// src/actions/enso/getEnsoSwapBundle.ts
|
|
4328
|
-
import { ethAddress as ethAddress3, zeroAddress as
|
|
4323
|
+
import { ethAddress as ethAddress3, zeroAddress as zeroAddress20 } from "viem";
|
|
4329
4324
|
async function getEnsoSwapBundle({
|
|
4330
4325
|
fromAddress,
|
|
4331
4326
|
amountIn,
|
|
@@ -4337,14 +4332,8 @@ async function getEnsoSwapBundle({
|
|
|
4337
4332
|
slippage,
|
|
4338
4333
|
publicClient
|
|
4339
4334
|
}) {
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
property: "fromAddress",
|
|
4343
|
-
value: fromAddress,
|
|
4344
|
-
expected: "address"
|
|
4345
|
-
});
|
|
4346
|
-
}
|
|
4347
|
-
if (tokenOut === zeroAddress21) tokenOut = ethAddress3;
|
|
4335
|
+
assertAddress(fromAddress, "fromAddress");
|
|
4336
|
+
if (tokenOut === zeroAddress20) tokenOut = ethAddress3;
|
|
4348
4337
|
const bundleAction = {
|
|
4349
4338
|
protocol: "enso",
|
|
4350
4339
|
action: "route",
|
|
@@ -4589,12 +4578,12 @@ function usePythLatestPrices({
|
|
|
4589
4578
|
}
|
|
4590
4579
|
|
|
4591
4580
|
// src/hooks/honey/useCappedGlobally.ts
|
|
4592
|
-
|
|
4581
|
+
function useCappedGlobally({
|
|
4593
4582
|
asset,
|
|
4594
4583
|
amount,
|
|
4595
4584
|
isMint,
|
|
4596
4585
|
isBasketModeEnabled: isBasketModeEnabled2
|
|
4597
|
-
}, options)
|
|
4586
|
+
}, options) {
|
|
4598
4587
|
const publicClient = usePublicClient18();
|
|
4599
4588
|
const { priceFeedMap, flags } = useHoneyConfig();
|
|
4600
4589
|
const { data: latestPrices } = usePythLatestPrices(
|
|
@@ -4641,16 +4630,16 @@ var useCappedGlobally = ({
|
|
|
4641
4630
|
refreshInterval: 0
|
|
4642
4631
|
}
|
|
4643
4632
|
);
|
|
4644
|
-
}
|
|
4633
|
+
}
|
|
4645
4634
|
|
|
4646
4635
|
// src/hooks/honey/useCappedRelatively.ts
|
|
4647
4636
|
import { usePublicClient as usePublicClient19 } from "@berachain/wagmi/hooks";
|
|
4648
|
-
|
|
4637
|
+
function useCappedRelatively({
|
|
4649
4638
|
asset,
|
|
4650
4639
|
amount,
|
|
4651
4640
|
isMint,
|
|
4652
4641
|
isBasketModeEnabled: isBasketModeEnabled2
|
|
4653
|
-
}, options)
|
|
4642
|
+
}, options) {
|
|
4654
4643
|
const publicClient = usePublicClient19();
|
|
4655
4644
|
const { collateralList, referenceCollateral } = useHoneyConfig();
|
|
4656
4645
|
const QUERY_KEY = asset && amount ? [
|
|
@@ -4698,13 +4687,13 @@ var useCappedRelatively = ({
|
|
|
4698
4687
|
...options
|
|
4699
4688
|
}
|
|
4700
4689
|
);
|
|
4701
|
-
}
|
|
4690
|
+
}
|
|
4702
4691
|
|
|
4703
4692
|
// src/hooks/honey/useCollateralWeights.ts
|
|
4704
4693
|
import { usePublicClient as usePublicClient20 } from "@berachain/wagmi/hooks";
|
|
4705
|
-
|
|
4694
|
+
function useCollateralWeights({
|
|
4706
4695
|
collateralList
|
|
4707
|
-
}, options)
|
|
4696
|
+
}, options) {
|
|
4708
4697
|
const publicClient = usePublicClient20();
|
|
4709
4698
|
const QUERY_KEY = publicClient && collateralList ? ["useCollateralWeights", collateralList] : void 0;
|
|
4710
4699
|
return useSWR(
|
|
@@ -4721,7 +4710,7 @@ var useCollateralWeights = ({
|
|
|
4721
4710
|
refreshInterval: options?.refreshInterval ?? 1e5 /* NORMAL */
|
|
4722
4711
|
}
|
|
4723
4712
|
);
|
|
4724
|
-
}
|
|
4713
|
+
}
|
|
4725
4714
|
|
|
4726
4715
|
// src/hooks/honey/useHoney24hVolume.ts
|
|
4727
4716
|
function useHoney24hVolume() {
|
|
@@ -4740,7 +4729,7 @@ import {
|
|
|
4740
4729
|
useConfig as useConfig5,
|
|
4741
4730
|
usePublicClient as usePublicClient21
|
|
4742
4731
|
} from "@berachain/wagmi/hooks";
|
|
4743
|
-
|
|
4732
|
+
function useHoneyBalances() {
|
|
4744
4733
|
const publicClient = usePublicClient21();
|
|
4745
4734
|
const { address: account } = useBeraWallet16();
|
|
4746
4735
|
const { collateralList } = useHoneyConfig();
|
|
@@ -4769,11 +4758,11 @@ var useHoneyBalances = () => {
|
|
|
4769
4758
|
refreshInterval: 1e4 /* FAST */
|
|
4770
4759
|
}
|
|
4771
4760
|
);
|
|
4772
|
-
}
|
|
4761
|
+
}
|
|
4773
4762
|
|
|
4774
4763
|
// src/hooks/honey/useHoneyVaultsBalance.ts
|
|
4775
4764
|
import { usePublicClient as usePublicClient22 } from "@berachain/wagmi/hooks";
|
|
4776
|
-
|
|
4765
|
+
function useHoneyVaultsBalance(options) {
|
|
4777
4766
|
const publicClient = usePublicClient22();
|
|
4778
4767
|
const { collateralList } = useHoneyConfig();
|
|
4779
4768
|
const QUERY_KEY = collateralList && publicClient ? ["useHoneyVaultsBalance", collateralList] : null;
|
|
@@ -4788,11 +4777,11 @@ var useHoneyVaultsBalance = (options) => {
|
|
|
4788
4777
|
},
|
|
4789
4778
|
{ ...options, refreshInterval: 1e5 /* NORMAL */ }
|
|
4790
4779
|
);
|
|
4791
|
-
}
|
|
4780
|
+
}
|
|
4792
4781
|
|
|
4793
4782
|
// src/hooks/honey/useIsBadCollateralAsset.ts
|
|
4794
4783
|
import { usePublicClient as usePublicClient23 } from "@berachain/wagmi/hooks";
|
|
4795
|
-
|
|
4784
|
+
function useIsBadCollateralAsset({ collateral }, options) {
|
|
4796
4785
|
const publicClient = usePublicClient23();
|
|
4797
4786
|
const { priceFeedMap, flags } = useHoneyConfig();
|
|
4798
4787
|
const { data: latestPrices } = usePythLatestPrices(
|
|
@@ -4827,15 +4816,15 @@ var useIsBadCollateralAsset = ({ collateral }, options) => {
|
|
|
4827
4816
|
refreshInterval: options?.refreshInterval ?? 1e5 /* NORMAL */
|
|
4828
4817
|
}
|
|
4829
4818
|
);
|
|
4830
|
-
}
|
|
4819
|
+
}
|
|
4831
4820
|
|
|
4832
4821
|
// src/hooks/honey/useHoneyAlerts.ts
|
|
4833
|
-
|
|
4822
|
+
function getIsLiquidityLowerThan({
|
|
4834
4823
|
lowerThan,
|
|
4835
4824
|
vaultsBalances,
|
|
4836
4825
|
state,
|
|
4837
4826
|
collateralList
|
|
4838
|
-
})
|
|
4827
|
+
}) {
|
|
4839
4828
|
const isMint = state.actionType === "mint";
|
|
4840
4829
|
if (!isMint && !state.isBasketModeEnabled) {
|
|
4841
4830
|
const redeemedVaultBalance = vaultsBalances?.find(
|
|
@@ -4861,13 +4850,13 @@ var getIsLiquidityLowerThan = ({
|
|
|
4861
4850
|
isLow: false,
|
|
4862
4851
|
isLiquidityLowCollaterals: []
|
|
4863
4852
|
};
|
|
4864
|
-
}
|
|
4865
|
-
|
|
4853
|
+
}
|
|
4854
|
+
function getRedeemMoreThanLiquidity({
|
|
4866
4855
|
vaultsBalances,
|
|
4867
4856
|
redeemedVaultBalance,
|
|
4868
4857
|
state,
|
|
4869
4858
|
collateralList
|
|
4870
|
-
})
|
|
4859
|
+
}) {
|
|
4871
4860
|
const isMint = state.actionType === "mint";
|
|
4872
4861
|
if (!isMint && vaultsBalances && redeemedVaultBalance) {
|
|
4873
4862
|
const isRedeemMoreThanLiquidityCollaterals = collateralList.filter(
|
|
@@ -4889,7 +4878,7 @@ var getRedeemMoreThanLiquidity = ({
|
|
|
4889
4878
|
};
|
|
4890
4879
|
}
|
|
4891
4880
|
return { isMore: false, isRedeemMoreThanLiquidityCollaterals: void 0 };
|
|
4892
|
-
}
|
|
4881
|
+
}
|
|
4893
4882
|
function getExceedingBalance({
|
|
4894
4883
|
state,
|
|
4895
4884
|
honeyBalances,
|
|
@@ -4917,13 +4906,13 @@ function getExceedingBalance({
|
|
|
4917
4906
|
}
|
|
4918
4907
|
return false;
|
|
4919
4908
|
}
|
|
4920
|
-
|
|
4909
|
+
function useHoneyAlerts({
|
|
4921
4910
|
actionType,
|
|
4922
4911
|
collaterals,
|
|
4923
4912
|
fromAmount,
|
|
4924
4913
|
toAmount,
|
|
4925
4914
|
isBasketModeEnabled: isBasketModeEnabled2
|
|
4926
|
-
})
|
|
4915
|
+
}) {
|
|
4927
4916
|
const state = {
|
|
4928
4917
|
actionType,
|
|
4929
4918
|
collaterals,
|
|
@@ -5004,7 +4993,7 @@ var useHoneyAlerts = ({
|
|
|
5004
4993
|
isCappedRelatively,
|
|
5005
4994
|
isExceedingBalance
|
|
5006
4995
|
};
|
|
5007
|
-
}
|
|
4996
|
+
}
|
|
5008
4997
|
|
|
5009
4998
|
// src/hooks/honey/useHoneyChartData.ts
|
|
5010
4999
|
function useHoneyChartData({ days }) {
|
|
@@ -5159,7 +5148,7 @@ function reducer(state, action) {
|
|
|
5159
5148
|
throw new Error(`Unknown action type: ${action}`);
|
|
5160
5149
|
}
|
|
5161
5150
|
}
|
|
5162
|
-
|
|
5151
|
+
function useHoneySwapState() {
|
|
5163
5152
|
const { collateralList } = useHoneyConfig();
|
|
5164
5153
|
const [state, dispatch] = useReducer(
|
|
5165
5154
|
reducer,
|
|
@@ -5192,14 +5181,14 @@ var useHoneySwapState = () => {
|
|
|
5192
5181
|
}
|
|
5193
5182
|
}, [isBasketModeEnabled2]);
|
|
5194
5183
|
return { state, dispatch };
|
|
5195
|
-
}
|
|
5184
|
+
}
|
|
5196
5185
|
|
|
5197
5186
|
// src/hooks/perps/usePythUpdateFee.ts
|
|
5198
5187
|
import { usePublicClient as usePublicClient25 } from "@berachain/wagmi/hooks";
|
|
5199
|
-
|
|
5188
|
+
function usePythUpdateFee({
|
|
5200
5189
|
pythPriceFeedCalldata,
|
|
5201
5190
|
tokenListLength
|
|
5202
|
-
}, options)
|
|
5191
|
+
}, options) {
|
|
5203
5192
|
const publicClient = usePublicClient25();
|
|
5204
5193
|
const QUERY_KEY = pythPriceFeedCalldata && pythPriceFeedCalldata.length > 0 ? ["usePythUpdateFee", pythPriceFeedCalldata] : null;
|
|
5205
5194
|
const { data = getPythDefaultUpdateFee(tokenListLength), isLoading } = useSWRImmutable(
|
|
@@ -5218,7 +5207,7 @@ var usePythUpdateFee = ({
|
|
|
5218
5207
|
data,
|
|
5219
5208
|
isLoading
|
|
5220
5209
|
};
|
|
5221
|
-
}
|
|
5210
|
+
}
|
|
5222
5211
|
|
|
5223
5212
|
// src/hooks/pol/useAutoclaimedIncentives.ts
|
|
5224
5213
|
import { useBeraWallet as useBeraWallet17 } from "@berachain/wagmi/hooks";
|
|
@@ -5292,7 +5281,7 @@ function useBgtIncentiveDistributorPaused(options) {
|
|
|
5292
5281
|
import { formatEther as formatEther5 } from "viem";
|
|
5293
5282
|
import { bgtAbi } from "@berachain/abis/pol/bgt";
|
|
5294
5283
|
import { useBeraWallet as useBeraWallet19, usePublicClient as usePublicClient27 } from "@berachain/wagmi/hooks";
|
|
5295
|
-
|
|
5284
|
+
function useBgtUnstakedBalance(options) {
|
|
5296
5285
|
const { address: account } = useBeraWallet19();
|
|
5297
5286
|
const publicClient = usePublicClient27();
|
|
5298
5287
|
const QUERY_KEY = account && publicClient ? ["useBgtUnstakedBalance", account] : null;
|
|
@@ -5316,12 +5305,12 @@ var useBgtUnstakedBalance = (options) => {
|
|
|
5316
5305
|
refreshInterval: options?.refreshInterval ?? 1e5 /* NORMAL */
|
|
5317
5306
|
}
|
|
5318
5307
|
);
|
|
5319
|
-
}
|
|
5308
|
+
}
|
|
5320
5309
|
|
|
5321
5310
|
// src/hooks/pol/useClaimableFees.ts
|
|
5322
5311
|
import { formatUnits as formatUnits11 } from "viem";
|
|
5323
5312
|
import { useBeraWallet as useBeraWallet20, usePublicClient as usePublicClient28 } from "@berachain/wagmi/hooks";
|
|
5324
|
-
|
|
5313
|
+
function useClaimableFees() {
|
|
5325
5314
|
const { address: account } = useBeraWallet20();
|
|
5326
5315
|
const publicClient = usePublicClient28();
|
|
5327
5316
|
const QUERY_KEY = account && publicClient ? ["useClaimableFees", account] : null;
|
|
@@ -5332,7 +5321,7 @@ var useClaimableFees = () => {
|
|
|
5332
5321
|
const { config } = parseBaseArgs({
|
|
5333
5322
|
chainId: publicClient.chain.id
|
|
5334
5323
|
});
|
|
5335
|
-
const vaultReward = await
|
|
5324
|
+
const vaultReward = await getRewardVaultEarnedRewards({
|
|
5336
5325
|
account: account2,
|
|
5337
5326
|
vaultAddress: config.pol.staker,
|
|
5338
5327
|
publicClient
|
|
@@ -5343,7 +5332,7 @@ var useClaimableFees = () => {
|
|
|
5343
5332
|
refreshInterval: 18e4 /* SLOW */ * 2
|
|
5344
5333
|
}
|
|
5345
5334
|
);
|
|
5346
|
-
}
|
|
5335
|
+
}
|
|
5347
5336
|
|
|
5348
5337
|
// src/hooks/pol/useHighestVaultsAPR.ts
|
|
5349
5338
|
import {
|
|
@@ -5353,10 +5342,10 @@ import {
|
|
|
5353
5342
|
|
|
5354
5343
|
// src/hooks/pol/useRewardVaults.ts
|
|
5355
5344
|
import { usePublicClient as usePublicClient29 } from "@berachain/wagmi/hooks";
|
|
5356
|
-
|
|
5345
|
+
function useRewardVaultsQueryKey(filter, onChainIncentives = false) {
|
|
5357
5346
|
return ["useRewardVaults", filter, onChainIncentives];
|
|
5358
|
-
}
|
|
5359
|
-
|
|
5347
|
+
}
|
|
5348
|
+
function useRewardVaults(args, options) {
|
|
5360
5349
|
const QUERY_KEY = useRewardVaultsQueryKey(
|
|
5361
5350
|
args.filter,
|
|
5362
5351
|
args.onChainIncentives
|
|
@@ -5372,10 +5361,10 @@ var useRewardVaults = (args, options) => {
|
|
|
5372
5361
|
},
|
|
5373
5362
|
options
|
|
5374
5363
|
);
|
|
5375
|
-
}
|
|
5364
|
+
}
|
|
5376
5365
|
|
|
5377
5366
|
// src/hooks/pol/useHighestVaultsAPR.ts
|
|
5378
|
-
|
|
5367
|
+
function useHighestVaultsAPR(where = {}, { isEnabled = true } = {}) {
|
|
5379
5368
|
const swrResponse = useRewardVaults(
|
|
5380
5369
|
{
|
|
5381
5370
|
filter: {
|
|
@@ -5396,11 +5385,11 @@ var useHighestVaultsAPR = (where = {}, { isEnabled = true } = {}) => {
|
|
|
5396
5385
|
isLoading: swrResponse.isLoading,
|
|
5397
5386
|
highestApr: swrResponse.data?.rewardVaultList[0].dynamicData?.apr
|
|
5398
5387
|
};
|
|
5399
|
-
}
|
|
5388
|
+
}
|
|
5400
5389
|
|
|
5401
5390
|
// src/hooks/pol/usePollGlobalData.ts
|
|
5402
5391
|
import { usePublicClient as usePublicClient30 } from "@berachain/wagmi/hooks";
|
|
5403
|
-
|
|
5392
|
+
function usePollGlobalData(options) {
|
|
5404
5393
|
const publicClient = usePublicClient30();
|
|
5405
5394
|
return useSWR(
|
|
5406
5395
|
publicClient ? "usePollGlobalData" : null,
|
|
@@ -5413,13 +5402,13 @@ var usePollGlobalData = (options) => {
|
|
|
5413
5402
|
...options
|
|
5414
5403
|
}
|
|
5415
5404
|
);
|
|
5416
|
-
}
|
|
5405
|
+
}
|
|
5417
5406
|
|
|
5418
5407
|
// src/hooks/pol/usePollMarkets.ts
|
|
5419
|
-
|
|
5408
|
+
function usePollMarketsQueryKey() {
|
|
5420
5409
|
return "usePollMarkets";
|
|
5421
|
-
}
|
|
5422
|
-
|
|
5410
|
+
}
|
|
5411
|
+
function usePollMarkets(options) {
|
|
5423
5412
|
const QUERY_KEY = usePollMarketsQueryKey();
|
|
5424
5413
|
return useSWRImmutable(
|
|
5425
5414
|
QUERY_KEY,
|
|
@@ -5431,7 +5420,7 @@ var usePollMarkets = (options) => {
|
|
|
5431
5420
|
...options
|
|
5432
5421
|
}
|
|
5433
5422
|
);
|
|
5434
|
-
}
|
|
5423
|
+
}
|
|
5435
5424
|
|
|
5436
5425
|
// src/hooks/pol/useQueuedBeraUnlock.ts
|
|
5437
5426
|
import { isAddress as isAddress9 } from "viem";
|
|
@@ -5471,24 +5460,17 @@ function useQueuedBeraUnlock({
|
|
|
5471
5460
|
}
|
|
5472
5461
|
|
|
5473
5462
|
// src/hooks/pol/useRewardTokenToBeraRate.ts
|
|
5474
|
-
import { isAddress as isAddress10 } from "viem";
|
|
5475
5463
|
import { defaultChainId as defaultChainId11 } from "@berachain/config/internal";
|
|
5476
5464
|
import { usePublicClient as usePublicClient32 } from "@berachain/wagmi/hooks";
|
|
5477
|
-
|
|
5465
|
+
function useRewardTokenToBeraRate({
|
|
5478
5466
|
address
|
|
5479
|
-
}, opt)
|
|
5467
|
+
}, opt) {
|
|
5480
5468
|
const QUERY_KEY = address ? ["useRewardTokenToBeraRate", address] : null;
|
|
5481
5469
|
const publicClient = usePublicClient32({ chainId: defaultChainId11 });
|
|
5482
5470
|
return useSWR(
|
|
5483
5471
|
QUERY_KEY,
|
|
5484
5472
|
async ([_, address2]) => {
|
|
5485
|
-
|
|
5486
|
-
throw new InvalidArgumentError({
|
|
5487
|
-
property: "address",
|
|
5488
|
-
value: address2,
|
|
5489
|
-
expected: "Address"
|
|
5490
|
-
});
|
|
5491
|
-
}
|
|
5473
|
+
assertAddress(address2, "address");
|
|
5492
5474
|
assertPublicClient(publicClient);
|
|
5493
5475
|
return getRewardTokenToBeraRate({
|
|
5494
5476
|
address: address2,
|
|
@@ -5499,10 +5481,10 @@ var useRewardTokenToBeraRate = ({
|
|
|
5499
5481
|
...opt
|
|
5500
5482
|
}
|
|
5501
5483
|
);
|
|
5502
|
-
}
|
|
5484
|
+
}
|
|
5503
5485
|
|
|
5504
5486
|
// src/hooks/pol/useOnChainRewardVault.ts
|
|
5505
|
-
import { erc20Abi as erc20Abi4, formatUnits as formatUnits13, isAddress as
|
|
5487
|
+
import { erc20Abi as erc20Abi4, formatUnits as formatUnits13, isAddress as isAddress10 } from "viem";
|
|
5506
5488
|
import { beraChefAbi } from "@berachain/abis/pol/rewards/beraChef";
|
|
5507
5489
|
import { usePublicClient as usePublicClient33 } from "@berachain/wagmi/hooks";
|
|
5508
5490
|
|
|
@@ -5549,10 +5531,12 @@ async function getStakingTokenInformation({
|
|
|
5549
5531
|
}
|
|
5550
5532
|
|
|
5551
5533
|
// src/hooks/pol/useOnChainRewardVault.ts
|
|
5552
|
-
|
|
5553
|
-
|
|
5534
|
+
function useOnChainRewardVaultQueryKey(address) {
|
|
5535
|
+
return address && isAddress10(address) ? ["onChainRewardVault", address.toLowerCase()] : null;
|
|
5536
|
+
}
|
|
5537
|
+
function useOnChainRewardVault({
|
|
5554
5538
|
address
|
|
5555
|
-
}, opt)
|
|
5539
|
+
}, opt) {
|
|
5556
5540
|
const publicClient = usePublicClient33();
|
|
5557
5541
|
const QUERY_KEY = useOnChainRewardVaultQueryKey(address);
|
|
5558
5542
|
return useSWR(
|
|
@@ -5633,11 +5617,13 @@ var useOnChainRewardVault = ({
|
|
|
5633
5617
|
},
|
|
5634
5618
|
opt
|
|
5635
5619
|
);
|
|
5636
|
-
}
|
|
5620
|
+
}
|
|
5637
5621
|
|
|
5638
5622
|
// src/hooks/pol/useRewardVault.ts
|
|
5639
|
-
|
|
5640
|
-
|
|
5623
|
+
function useRewardVaultQueryKey(address) {
|
|
5624
|
+
return address ? ["useRewardVault", address.toLowerCase()] : null;
|
|
5625
|
+
}
|
|
5626
|
+
function useRewardVault(id, options) {
|
|
5641
5627
|
const QUERY_KEY = useRewardVaultQueryKey(id);
|
|
5642
5628
|
const { isEnabled: _isEnabled, ...swrOptions } = options ?? {};
|
|
5643
5629
|
const swrResponse = useSWR(
|
|
@@ -5660,7 +5646,7 @@ var useRewardVault = (id, options) => {
|
|
|
5660
5646
|
onChainRewardVault.refresh();
|
|
5661
5647
|
}
|
|
5662
5648
|
};
|
|
5663
|
-
}
|
|
5649
|
+
}
|
|
5664
5650
|
|
|
5665
5651
|
// src/hooks/pol/useRewardVaultIncentives.ts
|
|
5666
5652
|
import { usePublicClient as usePublicClient34 } from "@berachain/wagmi/hooks";
|
|
@@ -5682,7 +5668,7 @@ function useRewardVaultIncentives({
|
|
|
5682
5668
|
|
|
5683
5669
|
// src/hooks/pol/useRewardVaultRewards.ts
|
|
5684
5670
|
import { usePublicClient as usePublicClient35 } from "@berachain/wagmi/hooks";
|
|
5685
|
-
|
|
5671
|
+
function useRewardVaultRewards(address, options) {
|
|
5686
5672
|
const publicClient = usePublicClient35();
|
|
5687
5673
|
const QUERY_KEY = publicClient && address ? ["useRewardVaultRewards", address] : null;
|
|
5688
5674
|
return useSWR(
|
|
@@ -5695,10 +5681,10 @@ var useRewardVaultRewards = (address, options) => {
|
|
|
5695
5681
|
...options
|
|
5696
5682
|
}
|
|
5697
5683
|
);
|
|
5698
|
-
}
|
|
5684
|
+
}
|
|
5699
5685
|
|
|
5700
5686
|
// src/utils/filter.ts
|
|
5701
|
-
|
|
5687
|
+
function dailyResolution(data) {
|
|
5702
5688
|
const dailyData = [];
|
|
5703
5689
|
let lastDay = "";
|
|
5704
5690
|
for (const item of data) {
|
|
@@ -5717,7 +5703,7 @@ var dailyResolution = (data) => {
|
|
|
5717
5703
|
}
|
|
5718
5704
|
}
|
|
5719
5705
|
return dailyData;
|
|
5720
|
-
}
|
|
5706
|
+
}
|
|
5721
5707
|
|
|
5722
5708
|
// src/hooks/pol/useStakedAPR.ts
|
|
5723
5709
|
function useStakedAPR({
|
|
@@ -5741,7 +5727,7 @@ function useStakedAPR({
|
|
|
5741
5727
|
// src/hooks/pol/useStakedData.ts
|
|
5742
5728
|
import { useMemo as useMemo12 } from "react";
|
|
5743
5729
|
import { useBeraWallet as useBeraWallet21, usePublicClient as usePublicClient36 } from "@berachain/wagmi/hooks";
|
|
5744
|
-
|
|
5730
|
+
function useStakedData(stakingConfigs) {
|
|
5745
5731
|
const window2 = useBeraFlag("swberaAprWindow");
|
|
5746
5732
|
const publicClient = usePublicClient36();
|
|
5747
5733
|
const { address: account } = useBeraWallet21();
|
|
@@ -5895,7 +5881,7 @@ var useStakedData = (stakingConfigs) => {
|
|
|
5895
5881
|
*/
|
|
5896
5882
|
earningsSettled
|
|
5897
5883
|
};
|
|
5898
|
-
}
|
|
5884
|
+
}
|
|
5899
5885
|
|
|
5900
5886
|
// src/actions/pol/getStakingDailyAssets.ts
|
|
5901
5887
|
async function getStakingDailyAssets({
|
|
@@ -5938,7 +5924,7 @@ function useStakedSnapshots({
|
|
|
5938
5924
|
|
|
5939
5925
|
// src/hooks/pol/useStakingVaultsMetadata.ts
|
|
5940
5926
|
import { usePublicClient as usePublicClient37 } from "@berachain/wagmi/hooks";
|
|
5941
|
-
|
|
5927
|
+
function useStakingVaultsMetadata(vaults = []) {
|
|
5942
5928
|
const publicClient = usePublicClient37();
|
|
5943
5929
|
const blockTime = useBlockTime();
|
|
5944
5930
|
const QUERY_KEY = vaults.length > 0 && publicClient && blockTime ? ["useStakingVaultMetadata", vaults, publicClient, blockTime] : null;
|
|
@@ -5959,7 +5945,7 @@ var useStakingVaultsMetadata = (vaults = []) => {
|
|
|
5959
5945
|
},
|
|
5960
5946
|
{ refreshInterval: 1e4 /* FAST */ }
|
|
5961
5947
|
);
|
|
5962
|
-
}
|
|
5948
|
+
}
|
|
5963
5949
|
|
|
5964
5950
|
// src/hooks/pol/useTotalStakedAmount.ts
|
|
5965
5951
|
import { usePublicClient as usePublicClient38 } from "@berachain/wagmi/hooks";
|
|
@@ -5977,7 +5963,7 @@ function useTotalStakedAmount({
|
|
|
5977
5963
|
|
|
5978
5964
|
// src/hooks/pol/useUserVaultInfo.ts
|
|
5979
5965
|
import { useBeraWallet as useBeraWallet22, usePublicClient as usePublicClient39 } from "@berachain/wagmi/hooks";
|
|
5980
|
-
|
|
5966
|
+
function useUserVaultInfo(args, options) {
|
|
5981
5967
|
const { address: account } = useBeraWallet22();
|
|
5982
5968
|
const publicClient = usePublicClient39();
|
|
5983
5969
|
const QUERY_KEY = account && publicClient && args.vaultAddress ? ["useUserVaultInfo", account, args.vaultAddress] : null;
|
|
@@ -5996,11 +5982,11 @@ var useUserVaultInfo = (args, options) => {
|
|
|
5996
5982
|
refreshInterval: options?.refreshInterval ?? 1e5 /* NORMAL */
|
|
5997
5983
|
}
|
|
5998
5984
|
);
|
|
5999
|
-
}
|
|
5985
|
+
}
|
|
6000
5986
|
|
|
6001
5987
|
// src/hooks/pol/useUserVaults.ts
|
|
6002
5988
|
import { useBeraWallet as useBeraWallet23, usePublicClient as usePublicClient40 } from "@berachain/wagmi/hooks";
|
|
6003
|
-
|
|
5989
|
+
function useUserVaults(options) {
|
|
6004
5990
|
const { address: account } = useBeraWallet23();
|
|
6005
5991
|
const publicClient = usePublicClient40();
|
|
6006
5992
|
const QUERY_KEY = account && publicClient ? ["useUserVaults", account] : null;
|
|
@@ -6019,11 +6005,11 @@ var useUserVaults = (options) => {
|
|
|
6019
6005
|
keepPreviousData: true
|
|
6020
6006
|
}
|
|
6021
6007
|
);
|
|
6022
|
-
}
|
|
6008
|
+
}
|
|
6023
6009
|
|
|
6024
6010
|
// src/hooks/pol/useVaultAddress.ts
|
|
6025
6011
|
import { usePublicClient as usePublicClient41 } from "@berachain/wagmi/hooks";
|
|
6026
|
-
|
|
6012
|
+
function useVaultAddress(vaultAddress) {
|
|
6027
6013
|
const publicClient = usePublicClient41();
|
|
6028
6014
|
const QUERY_KEY = vaultAddress && publicClient ? ["useVaultAddress", vaultAddress] : null;
|
|
6029
6015
|
return useSWR(QUERY_KEY, async ([, vaultAddress2]) => {
|
|
@@ -6036,23 +6022,23 @@ var useVaultAddress = (vaultAddress) => {
|
|
|
6036
6022
|
]);
|
|
6037
6023
|
return { stakeToken, address: vaultAddress2 };
|
|
6038
6024
|
});
|
|
6039
|
-
}
|
|
6025
|
+
}
|
|
6040
6026
|
|
|
6041
6027
|
// src/hooks/pol/useVaultHistory.ts
|
|
6042
|
-
|
|
6028
|
+
function useVaultHistory({
|
|
6043
6029
|
vault,
|
|
6044
6030
|
range,
|
|
6045
6031
|
resolution
|
|
6046
|
-
})
|
|
6032
|
+
}) {
|
|
6047
6033
|
const QUERY_KEY = vault ? ["useVaultHistory", vault, range, resolution] : null;
|
|
6048
6034
|
return useSWR(
|
|
6049
6035
|
QUERY_KEY,
|
|
6050
6036
|
([, vault2, range2, resolution2]) => getVaultHistory({ vault: vault2, range: range2, resolution: resolution2 })
|
|
6051
6037
|
);
|
|
6052
|
-
}
|
|
6038
|
+
}
|
|
6053
6039
|
|
|
6054
6040
|
// src/hooks/pol/useVaultValidators.ts
|
|
6055
|
-
|
|
6041
|
+
function useVaultValidators(id, options) {
|
|
6056
6042
|
const QUERY_KEY = id ? ["useVaultValidators", id] : null;
|
|
6057
6043
|
return useSWR(
|
|
6058
6044
|
QUERY_KEY,
|
|
@@ -6065,42 +6051,44 @@ var useVaultValidators = (id, options) => {
|
|
|
6065
6051
|
...options
|
|
6066
6052
|
}
|
|
6067
6053
|
);
|
|
6068
|
-
}
|
|
6054
|
+
}
|
|
6069
6055
|
|
|
6070
6056
|
// src/hooks/tokens/useBeraCurrentPrice.ts
|
|
6071
|
-
import {
|
|
6057
|
+
import { defaultChainId as defaultChainId12 } from "@berachain/config/internal";
|
|
6072
6058
|
|
|
6073
|
-
// src/hooks/tokens/
|
|
6074
|
-
function
|
|
6075
|
-
const
|
|
6076
|
-
{
|
|
6077
|
-
addressIn: address ? [address] : void 0
|
|
6078
|
-
},
|
|
6059
|
+
// src/hooks/tokens/useTokenPrice.ts
|
|
6060
|
+
function useTokenPrice({ token }, options) {
|
|
6061
|
+
const { isLoading, error, priceMap } = useTokenPrices(
|
|
6062
|
+
{ tokens: token ? [token] : void 0 },
|
|
6079
6063
|
options
|
|
6080
6064
|
);
|
|
6081
6065
|
return {
|
|
6082
|
-
|
|
6083
|
-
|
|
6066
|
+
data: token ? priceMap[token.chainId]?.[token.address.toLowerCase()] : void 0,
|
|
6067
|
+
isLoading,
|
|
6068
|
+
error
|
|
6084
6069
|
};
|
|
6085
6070
|
}
|
|
6086
6071
|
|
|
6087
6072
|
// src/hooks/tokens/useBeraCurrentPrice.ts
|
|
6088
6073
|
function useBeraCurrentPrice(opts) {
|
|
6089
|
-
return
|
|
6074
|
+
return useTokenPrice(
|
|
6075
|
+
{ token: { ...beraToken, chainId: defaultChainId12 } },
|
|
6076
|
+
opts
|
|
6077
|
+
);
|
|
6090
6078
|
}
|
|
6091
6079
|
|
|
6092
6080
|
// src/hooks/tokens/useStakingTokenInformation.ts
|
|
6093
|
-
import { isAddress as
|
|
6081
|
+
import { isAddress as isAddress11, zeroAddress as zeroAddress21 } from "viem";
|
|
6094
6082
|
import { usePublicClient as usePublicClient42 } from "@berachain/wagmi/hooks";
|
|
6095
|
-
|
|
6083
|
+
function useStakingTokenInformation(args, options) {
|
|
6096
6084
|
const publicClient = usePublicClient42();
|
|
6097
|
-
const QUERY_KEY = args?.address && publicClient &&
|
|
6085
|
+
const QUERY_KEY = args?.address && publicClient && isAddress11(args.address) ? ["useStakingTokenInformation", args.address] : null;
|
|
6098
6086
|
return useSWRImmutable(
|
|
6099
6087
|
QUERY_KEY,
|
|
6100
6088
|
async ([_, address]) => {
|
|
6101
6089
|
if (isToken(address, "BERA")) {
|
|
6102
6090
|
return {
|
|
6103
|
-
address:
|
|
6091
|
+
address: zeroAddress21,
|
|
6104
6092
|
decimals: beraToken.decimals,
|
|
6105
6093
|
name: beraToken.name,
|
|
6106
6094
|
symbol: beraToken.symbol
|
|
@@ -6113,19 +6101,6 @@ var useStakingTokenInformation = (args, options) => {
|
|
|
6113
6101
|
},
|
|
6114
6102
|
{ ...options }
|
|
6115
6103
|
);
|
|
6116
|
-
};
|
|
6117
|
-
|
|
6118
|
-
// src/hooks/tokens/useTokenPrice.ts
|
|
6119
|
-
function useTokenPrice({ token }, options) {
|
|
6120
|
-
const { isLoading, error, priceMap } = useTokenPrices(
|
|
6121
|
-
{ tokens: token ? [token] : void 0 },
|
|
6122
|
-
options
|
|
6123
|
-
);
|
|
6124
|
-
return {
|
|
6125
|
-
data: token ? priceMap[token.chainId]?.[token.address.toLowerCase()] : void 0,
|
|
6126
|
-
isLoading,
|
|
6127
|
-
error
|
|
6128
|
-
};
|
|
6129
6104
|
}
|
|
6130
6105
|
|
|
6131
6106
|
// src/hooks/tokens/useTotalSupply.ts
|
|
@@ -6187,7 +6162,7 @@ var initialState = {
|
|
|
6187
6162
|
txnHash: "",
|
|
6188
6163
|
message: ""
|
|
6189
6164
|
};
|
|
6190
|
-
|
|
6165
|
+
function reducer2(state, actions) {
|
|
6191
6166
|
switch (actions.type) {
|
|
6192
6167
|
case "confirm_sending" /* LOADING */:
|
|
6193
6168
|
return {
|
|
@@ -6217,7 +6192,7 @@ var reducer2 = (state, actions) => {
|
|
|
6217
6192
|
default:
|
|
6218
6193
|
return state;
|
|
6219
6194
|
}
|
|
6220
|
-
}
|
|
6195
|
+
}
|
|
6221
6196
|
|
|
6222
6197
|
// src/hooks/useContractWrite/useBeraContractWrite.ts
|
|
6223
6198
|
function useBeraContractWrite({
|
|
@@ -6303,10 +6278,9 @@ function useBeraContractWrite({
|
|
|
6303
6278
|
reset
|
|
6304
6279
|
};
|
|
6305
6280
|
}
|
|
6306
|
-
var useBeraContractWrite_default = useBeraContractWrite;
|
|
6307
6281
|
|
|
6308
6282
|
// src/hooks/useGetVerifiedAbi.ts
|
|
6309
|
-
import { isAddress as
|
|
6283
|
+
import { isAddress as isAddress12, zeroAddress as zeroAddress22 } from "viem";
|
|
6310
6284
|
import { chainId } from "@berachain/config/internal";
|
|
6311
6285
|
async function fetchVerifiedAbi(address) {
|
|
6312
6286
|
const data = await beraFetchJson({
|
|
@@ -6319,14 +6293,14 @@ async function fetchVerifiedAbi(address) {
|
|
|
6319
6293
|
}
|
|
6320
6294
|
return data.result;
|
|
6321
6295
|
}
|
|
6322
|
-
|
|
6296
|
+
function useGetVerifiedAbi(address) {
|
|
6323
6297
|
return useSWRImmutable(
|
|
6324
|
-
address &&
|
|
6325
|
-
address !==
|
|
6298
|
+
address && isAddress12(address) && // Address zero can't be a contract for sure
|
|
6299
|
+
address !== zeroAddress22 ? ["useGetVerifiedAbi", address] : null,
|
|
6326
6300
|
() => address ? fetchVerifiedAbi(address) : Promise.resolve(""),
|
|
6327
6301
|
{}
|
|
6328
6302
|
);
|
|
6329
|
-
}
|
|
6303
|
+
}
|
|
6330
6304
|
|
|
6331
6305
|
// src/hooks/useHistoryState.ts
|
|
6332
6306
|
import { useCallback as useCallback3, useEffect as useEffect3, useState as useState2 } from "react";
|
|
@@ -6376,12 +6350,12 @@ function usePrevious(value) {
|
|
|
6376
6350
|
}
|
|
6377
6351
|
|
|
6378
6352
|
// src/hooks/validators/useAllValidators.ts
|
|
6379
|
-
|
|
6353
|
+
function useAllValidatorsQueryKey({
|
|
6380
6354
|
variables
|
|
6381
|
-
} = {})
|
|
6355
|
+
} = {}) {
|
|
6382
6356
|
return ["useAllValidators", variables];
|
|
6383
|
-
}
|
|
6384
|
-
|
|
6357
|
+
}
|
|
6358
|
+
function useAllValidators(variables, options) {
|
|
6385
6359
|
const { config } = parseBaseArgs(variables);
|
|
6386
6360
|
return useSWR(
|
|
6387
6361
|
useAllValidatorsQueryKey({ variables }),
|
|
@@ -6399,7 +6373,7 @@ var useAllValidators = (variables, options) => {
|
|
|
6399
6373
|
...options
|
|
6400
6374
|
}
|
|
6401
6375
|
);
|
|
6402
|
-
}
|
|
6376
|
+
}
|
|
6403
6377
|
|
|
6404
6378
|
// src/hooks/validators/useApiEnrichedAllocation.ts
|
|
6405
6379
|
function useApiEnrichedAllocation({
|
|
@@ -6415,8 +6389,10 @@ function useApiEnrichedAllocation({
|
|
|
6415
6389
|
|
|
6416
6390
|
// src/hooks/validators/useApiValidator.ts
|
|
6417
6391
|
import { isHex } from "viem";
|
|
6418
|
-
|
|
6419
|
-
|
|
6392
|
+
function useApiValidatorQueryKey(id) {
|
|
6393
|
+
return id ? ["useApiValidator", id] : null;
|
|
6394
|
+
}
|
|
6395
|
+
function useApiValidator(id, options) {
|
|
6420
6396
|
const QUERY_KEY = useApiValidatorQueryKey(id);
|
|
6421
6397
|
return useSWR(
|
|
6422
6398
|
id ? QUERY_KEY : null,
|
|
@@ -6426,7 +6402,7 @@ var useApiValidator = (id, options) => {
|
|
|
6426
6402
|
},
|
|
6427
6403
|
options
|
|
6428
6404
|
);
|
|
6429
|
-
}
|
|
6405
|
+
}
|
|
6430
6406
|
|
|
6431
6407
|
// src/hooks/validators/useBaselineRewardAllocation.ts
|
|
6432
6408
|
import { usePublicClient as usePublicClient45 } from "@berachain/wagmi/hooks";
|
|
@@ -6460,51 +6436,12 @@ function useBaselineRewardAllocation() {
|
|
|
6460
6436
|
});
|
|
6461
6437
|
}
|
|
6462
6438
|
|
|
6463
|
-
// src/hooks/validators/useDailyValidatorBlockStats.ts
|
|
6464
|
-
var useDailyValidatorBlockStats = ({
|
|
6465
|
-
pubKey,
|
|
6466
|
-
first = 1
|
|
6467
|
-
}) => {
|
|
6468
|
-
const QUERY_KEY = pubKey ? ["useDailyValidatorBlockStats", pubKey, first] : null;
|
|
6469
|
-
return useSWR(
|
|
6470
|
-
QUERY_KEY,
|
|
6471
|
-
async ([, pubKey2, first2]) => {
|
|
6472
|
-
return await getDailyValidatorBlockStats({
|
|
6473
|
-
pubKey: pubKey2,
|
|
6474
|
-
first: first2
|
|
6475
|
-
});
|
|
6476
|
-
},
|
|
6477
|
-
{
|
|
6478
|
-
refreshInterval: 18e4 /* SLOW */
|
|
6479
|
-
}
|
|
6480
|
-
);
|
|
6481
|
-
};
|
|
6482
|
-
|
|
6483
|
-
// src/hooks/validators/useDefaultRewardAllocation.ts
|
|
6484
|
-
import { usePublicClient as usePublicClient46 } from "@berachain/wagmi/hooks";
|
|
6485
|
-
function useDefaultRewardAllocation(options) {
|
|
6486
|
-
const publicClient = usePublicClient46();
|
|
6487
|
-
const QUERY_KEY = publicClient ? ["useDefaultRewardAllocation"] : null;
|
|
6488
|
-
return useSWR(
|
|
6489
|
-
QUERY_KEY,
|
|
6490
|
-
async () => {
|
|
6491
|
-
assertPublicClient(publicClient);
|
|
6492
|
-
return await getDefaultRewardAllocation({
|
|
6493
|
-
client: publicClient
|
|
6494
|
-
});
|
|
6495
|
-
},
|
|
6496
|
-
{
|
|
6497
|
-
...options
|
|
6498
|
-
}
|
|
6499
|
-
);
|
|
6500
|
-
}
|
|
6501
|
-
|
|
6502
6439
|
// src/hooks/validators/useManagedValidatorRole.ts
|
|
6503
6440
|
import { useMemo as useMemo13 } from "react";
|
|
6504
|
-
import { useBeraWallet as useBeraWallet24, usePublicClient as
|
|
6441
|
+
import { useBeraWallet as useBeraWallet24, usePublicClient as usePublicClient46 } from "@berachain/wagmi/hooks";
|
|
6505
6442
|
|
|
6506
6443
|
// src/actions/validators/getValidatorRewardAllocatorAddress.ts
|
|
6507
|
-
import { zeroAddress as
|
|
6444
|
+
import { zeroAddress as zeroAddress23 } from "viem";
|
|
6508
6445
|
import { beraChefAbi as beraChefAbi2 } from "@berachain/abis/pol/rewards/beraChef";
|
|
6509
6446
|
async function getValidatorRewardAllocatorAddress({
|
|
6510
6447
|
client,
|
|
@@ -6519,7 +6456,7 @@ async function getValidatorRewardAllocatorAddress({
|
|
|
6519
6456
|
functionName: "valRewardAllocator",
|
|
6520
6457
|
args: [pubKey]
|
|
6521
6458
|
});
|
|
6522
|
-
if (result ===
|
|
6459
|
+
if (result === zeroAddress23) {
|
|
6523
6460
|
return null;
|
|
6524
6461
|
}
|
|
6525
6462
|
return result;
|
|
@@ -6548,7 +6485,7 @@ function useManagedValidatorRole({
|
|
|
6548
6485
|
pubKey,
|
|
6549
6486
|
account: accountAddress
|
|
6550
6487
|
}, options) {
|
|
6551
|
-
const publicClient =
|
|
6488
|
+
const publicClient = usePublicClient46();
|
|
6552
6489
|
const mockValidatorOperator = useBeraFlag("mockValidatorOperator");
|
|
6553
6490
|
const mockValidatorRewardAllocator = useBeraFlag(
|
|
6554
6491
|
"mockValidatorRewardAllocator"
|
|
@@ -6595,60 +6532,13 @@ function useManagedValidatorRole({
|
|
|
6595
6532
|
};
|
|
6596
6533
|
}
|
|
6597
6534
|
|
|
6598
|
-
// src/hooks/validators/useOnChainValidator.ts
|
|
6599
|
-
import { keccak256 as keccak2562 } from "viem";
|
|
6600
|
-
import { beaconDepositAbi } from "@berachain/abis/pol/beaconDeposit";
|
|
6601
|
-
import { bgtAbi as bgtAbi2 } from "@berachain/abis/pol/bgt";
|
|
6602
|
-
import { beraChefAbi as beraChefAbi3 } from "@berachain/abis/pol/rewards/beraChef";
|
|
6603
|
-
import { usePublicClient as usePublicClient48 } from "@berachain/wagmi/hooks";
|
|
6604
|
-
var useOnChainValidator = ({ pubkey }, options) => {
|
|
6605
|
-
const publicClient = usePublicClient48();
|
|
6606
|
-
const QUERY_KEY = pubkey ? ["useOnChainValidator", pubkey] : null;
|
|
6607
|
-
return useSWR(
|
|
6608
|
-
publicClient ? QUERY_KEY : null,
|
|
6609
|
-
async ([, pubkey2]) => {
|
|
6610
|
-
assertPublicClient(publicClient);
|
|
6611
|
-
const { config } = parseBaseArgs({
|
|
6612
|
-
chainId: publicClient.chain.id
|
|
6613
|
-
});
|
|
6614
|
-
const [operator, boostees, _rewardAllocation] = await Promise.all([
|
|
6615
|
-
publicClient.readContract({
|
|
6616
|
-
address: config.depositContract,
|
|
6617
|
-
abi: beaconDepositAbi,
|
|
6618
|
-
functionName: "getOperator",
|
|
6619
|
-
args: [pubkey2]
|
|
6620
|
-
}),
|
|
6621
|
-
publicClient?.readContract({
|
|
6622
|
-
address: config.tokens.bgt,
|
|
6623
|
-
abi: bgtAbi2,
|
|
6624
|
-
functionName: "boostees",
|
|
6625
|
-
args: [pubkey2]
|
|
6626
|
-
}),
|
|
6627
|
-
publicClient.readContract({
|
|
6628
|
-
address: config.pol.beraChef,
|
|
6629
|
-
abi: beraChefAbi3,
|
|
6630
|
-
functionName: "getActiveRewardAllocation",
|
|
6631
|
-
args: [pubkey2]
|
|
6632
|
-
})
|
|
6633
|
-
]);
|
|
6634
|
-
return {
|
|
6635
|
-
id: keccak2562(pubkey2),
|
|
6636
|
-
pubkey: pubkey2,
|
|
6637
|
-
operator,
|
|
6638
|
-
votingPower: Number(boostees)
|
|
6639
|
-
};
|
|
6640
|
-
},
|
|
6641
|
-
options
|
|
6642
|
-
);
|
|
6643
|
-
};
|
|
6644
|
-
|
|
6645
6535
|
// src/hooks/validators/useStakingPoolBatch.ts
|
|
6646
|
-
import { usePublicClient as
|
|
6647
|
-
|
|
6536
|
+
import { usePublicClient as usePublicClient47 } from "@berachain/wagmi/hooks";
|
|
6537
|
+
function useStakingPoolBatch({
|
|
6648
6538
|
valPubKey,
|
|
6649
6539
|
options
|
|
6650
|
-
})
|
|
6651
|
-
const publicClient =
|
|
6540
|
+
}) {
|
|
6541
|
+
const publicClient = usePublicClient47();
|
|
6652
6542
|
const QUERY_KEY = publicClient && valPubKey ? ["useStakingPoolBatch", valPubKey] : null;
|
|
6653
6543
|
return useSWR(
|
|
6654
6544
|
QUERY_KEY,
|
|
@@ -6664,13 +6554,13 @@ var useStakingPoolBatch = ({
|
|
|
6664
6554
|
...options
|
|
6665
6555
|
}
|
|
6666
6556
|
);
|
|
6667
|
-
}
|
|
6557
|
+
}
|
|
6668
6558
|
|
|
6669
6559
|
// src/hooks/validators/useUserActiveValidators.ts
|
|
6670
|
-
import { useBeraWallet as useBeraWallet25, usePublicClient as
|
|
6671
|
-
|
|
6560
|
+
import { useBeraWallet as useBeraWallet25, usePublicClient as usePublicClient48 } from "@berachain/wagmi/hooks";
|
|
6561
|
+
function useUserActiveValidators(options) {
|
|
6672
6562
|
const { address: account } = useBeraWallet25();
|
|
6673
|
-
const publicClient =
|
|
6563
|
+
const publicClient = usePublicClient48();
|
|
6674
6564
|
const QUERY_KEY = publicClient && account ? ["useUserActiveValidators", account] : null;
|
|
6675
6565
|
return useSWR(
|
|
6676
6566
|
QUERY_KEY,
|
|
@@ -6686,16 +6576,16 @@ var useUserActiveValidators = (options) => {
|
|
|
6686
6576
|
keepPreviousData: true
|
|
6687
6577
|
}
|
|
6688
6578
|
);
|
|
6689
|
-
}
|
|
6579
|
+
}
|
|
6690
6580
|
|
|
6691
6581
|
// src/hooks/validators/useUserBoostsOnValidator.ts
|
|
6692
|
-
import { useBeraWallet as useBeraWallet26, usePublicClient as
|
|
6693
|
-
|
|
6582
|
+
import { useBeraWallet as useBeraWallet26, usePublicClient as usePublicClient49 } from "@berachain/wagmi/hooks";
|
|
6583
|
+
function useUserBoostsOnValidator({
|
|
6694
6584
|
pubkey,
|
|
6695
6585
|
...args
|
|
6696
|
-
})
|
|
6586
|
+
}) {
|
|
6697
6587
|
const { address: connectedAccount } = useBeraWallet26();
|
|
6698
|
-
const publicClient =
|
|
6588
|
+
const publicClient = usePublicClient49();
|
|
6699
6589
|
const account = args.account ?? connectedAccount;
|
|
6700
6590
|
const QUERY_KEY = account && pubkey ? ["useUserBoostsOnValidator", pubkey, account] : null;
|
|
6701
6591
|
return useSWR(
|
|
@@ -6711,29 +6601,29 @@ var useUserBoostsOnValidator = ({
|
|
|
6711
6601
|
refreshInterval: 1e5 /* NORMAL */
|
|
6712
6602
|
}
|
|
6713
6603
|
);
|
|
6714
|
-
}
|
|
6604
|
+
}
|
|
6715
6605
|
|
|
6716
6606
|
// src/hooks/validators/useUserClaimableIncentives.ts
|
|
6717
6607
|
import { useCallback as useCallback4, useMemo as useMemo14 } from "react";
|
|
6718
6608
|
import { useBeraWallet as useBeraWallet27 } from "@berachain/wagmi/hooks";
|
|
6719
6609
|
|
|
6720
6610
|
// src/utils/formatIncentivesTokenMap.ts
|
|
6721
|
-
|
|
6611
|
+
function formatIncentivesTokenMap(allRewards) {
|
|
6722
6612
|
const tokenMap = /* @__PURE__ */ new Set();
|
|
6723
|
-
|
|
6613
|
+
for (const item of allRewards) {
|
|
6724
6614
|
if (Array.isArray(item.rewards)) {
|
|
6725
|
-
item.rewards
|
|
6615
|
+
for (const reward of item.rewards) {
|
|
6726
6616
|
if (reward.token) {
|
|
6727
6617
|
tokenMap.add(reward.token);
|
|
6728
6618
|
}
|
|
6729
|
-
}
|
|
6619
|
+
}
|
|
6730
6620
|
}
|
|
6731
|
-
}
|
|
6621
|
+
}
|
|
6732
6622
|
return tokenMap;
|
|
6733
|
-
}
|
|
6623
|
+
}
|
|
6734
6624
|
|
|
6735
6625
|
// src/hooks/validators/useUserClaimableIncentives.ts
|
|
6736
|
-
|
|
6626
|
+
function useUserClaimableIncentives() {
|
|
6737
6627
|
const { address: account } = useBeraWallet27();
|
|
6738
6628
|
const REWARDS_QUERY_KEY = account ? ["useUserClaimableIncentives", account] : null;
|
|
6739
6629
|
const allRewardsResponse = useSWR(
|
|
@@ -6833,13 +6723,13 @@ var useUserClaimableIncentives = () => {
|
|
|
6833
6723
|
tokenMap,
|
|
6834
6724
|
refresh
|
|
6835
6725
|
};
|
|
6836
|
-
}
|
|
6726
|
+
}
|
|
6837
6727
|
|
|
6838
6728
|
// src/hooks/validators/useUserStakingPositions.ts
|
|
6839
|
-
|
|
6729
|
+
function useUserStakingPositions({
|
|
6840
6730
|
account,
|
|
6841
6731
|
validatorAddress
|
|
6842
|
-
})
|
|
6732
|
+
}) {
|
|
6843
6733
|
const queryClient = account ? ["useUserStakingPositions", account, validatorAddress] : null;
|
|
6844
6734
|
return useSWRImmutable(
|
|
6845
6735
|
queryClient,
|
|
@@ -6853,10 +6743,59 @@ var useUserStakingPositions = ({
|
|
|
6853
6743
|
return userStakingPolls;
|
|
6854
6744
|
}
|
|
6855
6745
|
);
|
|
6856
|
-
}
|
|
6746
|
+
}
|
|
6857
6747
|
|
|
6858
6748
|
// src/hooks/validators/useValidator.ts
|
|
6859
6749
|
import { keccak256 as keccak2563 } from "viem";
|
|
6750
|
+
|
|
6751
|
+
// src/hooks/validators/useOnChainValidator.ts
|
|
6752
|
+
import { keccak256 as keccak2562 } from "viem";
|
|
6753
|
+
import { beaconDepositAbi } from "@berachain/abis/pol/beaconDeposit";
|
|
6754
|
+
import { bgtAbi as bgtAbi2 } from "@berachain/abis/pol/bgt";
|
|
6755
|
+
import { beraChefAbi as beraChefAbi3 } from "@berachain/abis/pol/rewards/beraChef";
|
|
6756
|
+
import { usePublicClient as usePublicClient50 } from "@berachain/wagmi/hooks";
|
|
6757
|
+
function useOnChainValidator({ pubkey }, options) {
|
|
6758
|
+
const publicClient = usePublicClient50();
|
|
6759
|
+
const QUERY_KEY = pubkey ? ["useOnChainValidator", pubkey] : null;
|
|
6760
|
+
return useSWR(
|
|
6761
|
+
publicClient ? QUERY_KEY : null,
|
|
6762
|
+
async ([, pubkey2]) => {
|
|
6763
|
+
assertPublicClient(publicClient);
|
|
6764
|
+
const { config } = parseBaseArgs({
|
|
6765
|
+
chainId: publicClient.chain.id
|
|
6766
|
+
});
|
|
6767
|
+
const [operator, boostees, _rewardAllocation] = await Promise.all([
|
|
6768
|
+
publicClient.readContract({
|
|
6769
|
+
address: config.depositContract,
|
|
6770
|
+
abi: beaconDepositAbi,
|
|
6771
|
+
functionName: "getOperator",
|
|
6772
|
+
args: [pubkey2]
|
|
6773
|
+
}),
|
|
6774
|
+
publicClient?.readContract({
|
|
6775
|
+
address: config.tokens.bgt,
|
|
6776
|
+
abi: bgtAbi2,
|
|
6777
|
+
functionName: "boostees",
|
|
6778
|
+
args: [pubkey2]
|
|
6779
|
+
}),
|
|
6780
|
+
publicClient.readContract({
|
|
6781
|
+
address: config.pol.beraChef,
|
|
6782
|
+
abi: beraChefAbi3,
|
|
6783
|
+
functionName: "getActiveRewardAllocation",
|
|
6784
|
+
args: [pubkey2]
|
|
6785
|
+
})
|
|
6786
|
+
]);
|
|
6787
|
+
return {
|
|
6788
|
+
id: keccak2562(pubkey2),
|
|
6789
|
+
pubkey: pubkey2,
|
|
6790
|
+
operator,
|
|
6791
|
+
votingPower: Number(boostees)
|
|
6792
|
+
};
|
|
6793
|
+
},
|
|
6794
|
+
options
|
|
6795
|
+
);
|
|
6796
|
+
}
|
|
6797
|
+
|
|
6798
|
+
// src/hooks/validators/useValidator.ts
|
|
6860
6799
|
function useValidator({ pubkey }, options) {
|
|
6861
6800
|
const {
|
|
6862
6801
|
data: { validator: indexerValidator, uptime } = {},
|
|
@@ -6920,9 +6859,9 @@ function useValidatorAnalytics({
|
|
|
6920
6859
|
}
|
|
6921
6860
|
|
|
6922
6861
|
// src/hooks/validators/useValidatorCommission.ts
|
|
6923
|
-
import { usePublicClient as
|
|
6924
|
-
|
|
6925
|
-
const publicClient =
|
|
6862
|
+
import { usePublicClient as usePublicClient51 } from "@berachain/wagmi/hooks";
|
|
6863
|
+
function useValidatorCommission(pubKey, options) {
|
|
6864
|
+
const publicClient = usePublicClient51();
|
|
6926
6865
|
const QUERY_KEY = publicClient && pubKey ? ["useValidatorCommission", pubKey] : null;
|
|
6927
6866
|
return swr_default(
|
|
6928
6867
|
QUERY_KEY,
|
|
@@ -6936,10 +6875,10 @@ var useValidatorCommission = (pubKey, options) => {
|
|
|
6936
6875
|
...options
|
|
6937
6876
|
}
|
|
6938
6877
|
);
|
|
6939
|
-
}
|
|
6878
|
+
}
|
|
6940
6879
|
|
|
6941
6880
|
// src/hooks/validators/useValidatorEstimatedBgtPerYear.ts
|
|
6942
|
-
|
|
6881
|
+
function useValidatorEstimatedBgtPerYear(validator) {
|
|
6943
6882
|
const { data: globalData, isLoading } = usePollGlobalData();
|
|
6944
6883
|
const blockTime = useBlockTime();
|
|
6945
6884
|
return {
|
|
@@ -6950,7 +6889,7 @@ var useValidatorEstimatedBgtPerYear = (validator) => {
|
|
|
6950
6889
|
) : void 0,
|
|
6951
6890
|
isLoading
|
|
6952
6891
|
};
|
|
6953
|
-
}
|
|
6892
|
+
}
|
|
6954
6893
|
|
|
6955
6894
|
// src/actions/validators/getValidatorIncentiveDistribution.ts
|
|
6956
6895
|
async function getValidatorIncentiveDistribution({
|
|
@@ -7007,9 +6946,9 @@ function useValidatorIncentiveDistribution({
|
|
|
7007
6946
|
}
|
|
7008
6947
|
|
|
7009
6948
|
// src/hooks/validators/useValidatorQueuedCommission.ts
|
|
7010
|
-
import { usePublicClient as
|
|
6949
|
+
import { usePublicClient as usePublicClient52 } from "@berachain/wagmi/hooks";
|
|
7011
6950
|
function useValidatorQueuedCommission(pubKey, options) {
|
|
7012
|
-
const publicClient =
|
|
6951
|
+
const publicClient = usePublicClient52();
|
|
7013
6952
|
const QUERY_KEY = publicClient && pubKey ? ["useValidatorQueuedCommission", pubKey] : null;
|
|
7014
6953
|
return useSWR(
|
|
7015
6954
|
QUERY_KEY,
|
|
@@ -7027,9 +6966,9 @@ function useValidatorQueuedCommission(pubKey, options) {
|
|
|
7027
6966
|
}
|
|
7028
6967
|
|
|
7029
6968
|
// src/hooks/validators/useValidatorQueuedOperatorAddress.ts
|
|
7030
|
-
import { usePublicClient as
|
|
7031
|
-
|
|
7032
|
-
const publicClient =
|
|
6969
|
+
import { usePublicClient as usePublicClient53 } from "@berachain/wagmi/hooks";
|
|
6970
|
+
function useValidatorQueuedOperatorAddress(pubKey, options) {
|
|
6971
|
+
const publicClient = usePublicClient53();
|
|
7033
6972
|
const QUERY_KEY = publicClient && pubKey ? ["useValidatorQueuedOperatorAddress", pubKey] : null;
|
|
7034
6973
|
return useSWR(
|
|
7035
6974
|
QUERY_KEY,
|
|
@@ -7043,12 +6982,12 @@ var useValidatorQueuedOperatorAddress = (pubKey, options) => {
|
|
|
7043
6982
|
...options
|
|
7044
6983
|
}
|
|
7045
6984
|
);
|
|
7046
|
-
}
|
|
6985
|
+
}
|
|
7047
6986
|
|
|
7048
6987
|
// src/hooks/validators/useValidatorQueuedRewardAllocation.ts
|
|
7049
|
-
import { usePublicClient as
|
|
7050
|
-
|
|
7051
|
-
const publicClient =
|
|
6988
|
+
import { usePublicClient as usePublicClient54 } from "@berachain/wagmi/hooks";
|
|
6989
|
+
function useValidatorQueuedRewardAllocation(pubKey, options) {
|
|
6990
|
+
const publicClient = usePublicClient54();
|
|
7052
6991
|
const QUERY_KEY = publicClient && pubKey ? ["useValidatorQueuedRewardAllocation", pubKey] : null;
|
|
7053
6992
|
return useSWR(
|
|
7054
6993
|
QUERY_KEY,
|
|
@@ -7062,12 +7001,12 @@ var useValidatorQueuedRewardAllocation = (pubKey, options) => {
|
|
|
7062
7001
|
...options
|
|
7063
7002
|
}
|
|
7064
7003
|
);
|
|
7065
|
-
}
|
|
7004
|
+
}
|
|
7066
7005
|
|
|
7067
7006
|
// src/hooks/validators/useValidatorRewardAllocation.ts
|
|
7068
|
-
import { usePublicClient as
|
|
7007
|
+
import { usePublicClient as usePublicClient55 } from "@berachain/wagmi/hooks";
|
|
7069
7008
|
function useValidatorRewardAllocation(pubKey, options) {
|
|
7070
|
-
const publicClient =
|
|
7009
|
+
const publicClient = usePublicClient55();
|
|
7071
7010
|
const QUERY_KEY = publicClient && pubKey ? ["useValidatorRewardAllocation", pubKey] : null;
|
|
7072
7011
|
return useSWR(
|
|
7073
7012
|
QUERY_KEY,
|
|
@@ -7104,7 +7043,7 @@ export {
|
|
|
7104
7043
|
useBendMultiply,
|
|
7105
7044
|
useBendZapSupply,
|
|
7106
7045
|
useBendZapSupplyHelper,
|
|
7107
|
-
|
|
7046
|
+
useBeraContractWrite,
|
|
7108
7047
|
useBeraCurrentPrice,
|
|
7109
7048
|
useBexStatus,
|
|
7110
7049
|
useBgtAprSimulation,
|
|
@@ -7116,8 +7055,6 @@ export {
|
|
|
7116
7055
|
useClaimableFees,
|
|
7117
7056
|
useCollateralWeights,
|
|
7118
7057
|
useCreatePool,
|
|
7119
|
-
useDailyValidatorBlockStats,
|
|
7120
|
-
useDefaultRewardAllocation,
|
|
7121
7058
|
useEnsoSwapBundle,
|
|
7122
7059
|
useEnsoUserTokensWithBalances,
|
|
7123
7060
|
useGetConvertToAssets,
|
|
@@ -7140,7 +7077,6 @@ export {
|
|
|
7140
7077
|
useMultipleTokenInformation,
|
|
7141
7078
|
useOnChainPoolData,
|
|
7142
7079
|
useOnChainPoolDataQueryKey,
|
|
7143
|
-
useOnChainValidator,
|
|
7144
7080
|
usePollAllowances,
|
|
7145
7081
|
usePollBalance,
|
|
7146
7082
|
usePollGlobalData,
|
|
@@ -7174,7 +7110,6 @@ export {
|
|
|
7174
7110
|
useStakingPoolBatch,
|
|
7175
7111
|
useStakingTokenInformation,
|
|
7176
7112
|
useStakingVaultsMetadata,
|
|
7177
|
-
useTokenCurrentPrice,
|
|
7178
7113
|
useTokenCurrentPrices,
|
|
7179
7114
|
useTokenInformation,
|
|
7180
7115
|
useTokenPrice,
|
|
@@ -7202,3 +7137,4 @@ export {
|
|
|
7202
7137
|
useVaultValidators,
|
|
7203
7138
|
useZapStakeBera
|
|
7204
7139
|
};
|
|
7140
|
+
//# sourceMappingURL=exports.mjs.map
|