@berachain/berajs 0.1.0-alpha.1 → 0.1.0-alpha.10
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/README.md +8 -0
- package/dist/{BeraError-CfcNTfpH.d.cts → BeraError-D1HS_rbb.d.cts} +3 -3
- package/dist/{BeraError-CfcNTfpH.d.ts → BeraError-D1HS_rbb.d.ts} +3 -3
- package/dist/{RequestError-BPxCeq0x.d.cts → RequestError-D8AE6xnI.d.cts} +1 -1
- package/dist/{RequestError-CtJLUaAc.d.ts → RequestError-m4jxyM7D.d.ts} +1 -1
- package/dist/actions/index.cjs +1 -1
- package/dist/actions/index.d.cts +9 -8
- package/dist/actions/index.d.ts +9 -8
- package/dist/actions/index.mjs +1 -1
- package/dist/{chunk-YKNKCICU.mjs → chunk-2422CKAT.mjs} +1 -1
- package/dist/{chunk-JQDPAEK2.mjs → chunk-3V2MGZRD.mjs} +1 -1
- package/dist/{chunk-SW47CI6T.cjs → chunk-4E5JGLUM.cjs} +1 -1
- package/dist/{chunk-33CW5NUN.cjs → chunk-4GY57XKG.cjs} +1 -1
- package/dist/{chunk-5GPS724E.mjs → chunk-ASRHUDAH.mjs} +1 -1
- package/dist/{chunk-MDA4YT6J.cjs → chunk-B47PDJZM.cjs} +1 -1
- package/dist/{chunk-SMZ3PG6A.mjs → chunk-ELUMRVNE.mjs} +1 -1
- package/dist/{chunk-XX77QPIR.mjs → chunk-JHCSZSJS.mjs} +1 -1
- package/dist/{chunk-6PL44I45.cjs → chunk-K2FCHQHA.cjs} +1 -1
- package/dist/chunk-LZPBQLKP.mjs +3 -0
- package/dist/{chunk-YKKMWJX5.cjs → chunk-M5BKM52U.cjs} +1 -1
- package/dist/{chunk-5UFI7X4U.mjs → chunk-VA37UBED.mjs} +1 -1
- package/dist/{chunk-LHFVY26H.cjs → chunk-WDFIETJS.cjs} +2 -2
- package/dist/chunk-WZLPSG5R.cjs +3 -0
- package/dist/contexts/index.cjs +1 -1
- package/dist/contexts/index.d.cts +3 -3
- package/dist/contexts/index.d.ts +3 -3
- package/dist/contexts/index.mjs +1 -1
- package/dist/{dex-BD7Bq3pJ.d.ts → dex-CxzGqVLe.d.ts} +1 -1
- package/dist/{dex-D9U93Ib-.d.cts → dex-jD95agMv.d.cts} +1 -1
- package/dist/errors/index.cjs +1 -1
- package/dist/errors/index.d.cts +2 -2
- package/dist/errors/index.d.ts +2 -2
- package/dist/errors/index.mjs +1 -1
- package/dist/{getValidatorQueuedOperatorAddress--AXNo9IY.d.ts → getValidatorQueuedOperatorAddress-9jSXlAse.d.ts} +2 -2
- package/dist/{getValidatorQueuedOperatorAddress-BbyH7asf.d.cts → getValidatorQueuedOperatorAddress-BCYlvah3.d.cts} +2 -2
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.d.cts +7 -7
- package/dist/hooks/index.d.ts +7 -7
- package/dist/hooks/index.mjs +2 -2
- package/dist/{staking-DYbVFigB.d.ts → staking-Bw46L2PT.d.ts} +1 -1
- package/dist/{staking-DHCsSRru.d.cts → staking-BxYDlMtj.d.cts} +1 -1
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/{useHoneySwapState-CW49RVci.d.ts → useHoneySwapState-CD8v6y1k.d.ts} +1 -1
- package/dist/{useHoneySwapState-A9cyIoOS.d.cts → useHoneySwapState-YfMSTWY3.d.cts} +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +4 -4
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.mjs +1 -1
- package/package.json +20 -7
- package/dist/chunk-ILYYJYGV.cjs +0 -3
- package/dist/chunk-RNESAHY2.mjs +0 -3
package/README.md
CHANGED
|
@@ -5,6 +5,14 @@ provides a suite of React Hooks using [swr](https://swr.vercel.app/) and a suite
|
|
|
5
5
|
|
|
6
6
|
Berajs is documented [here]("")
|
|
7
7
|
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
pnpm install @berachain/berajs
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
If you want to use hooks, you're also going to need to have `wagmi` installed as well.
|
|
15
|
+
|
|
8
16
|
|
|
9
17
|
## Commands
|
|
10
18
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SentryType from '@sentry/nextjs';
|
|
2
2
|
import { Abi } from 'viem';
|
|
3
3
|
|
|
4
4
|
interface IBeraErrorArgs {
|
|
@@ -10,7 +10,7 @@ interface IBeraErrorArgs {
|
|
|
10
10
|
/**
|
|
11
11
|
* The level of the error to be used for Sentry.
|
|
12
12
|
*/
|
|
13
|
-
level?: SeverityLevel;
|
|
13
|
+
level?: SentryType.SeverityLevel;
|
|
14
14
|
tags?: {
|
|
15
15
|
[key in TagsKey]?: Primitive;
|
|
16
16
|
};
|
|
@@ -61,7 +61,7 @@ declare class BeraError extends Error {
|
|
|
61
61
|
get tags(): {
|
|
62
62
|
[key: string | TagsKey]: Primitive;
|
|
63
63
|
};
|
|
64
|
-
level: SeverityLevel;
|
|
64
|
+
level: SentryType.SeverityLevel;
|
|
65
65
|
extra: Record<string, unknown>;
|
|
66
66
|
constructor({ message: m, displayMessage: dm, cause, reason, level, abi, tags, chainId, }: IBeraErrorArgs);
|
|
67
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as SentryType from '@sentry/nextjs';
|
|
2
2
|
import { Abi } from 'viem';
|
|
3
3
|
|
|
4
4
|
interface IBeraErrorArgs {
|
|
@@ -10,7 +10,7 @@ interface IBeraErrorArgs {
|
|
|
10
10
|
/**
|
|
11
11
|
* The level of the error to be used for Sentry.
|
|
12
12
|
*/
|
|
13
|
-
level?: SeverityLevel;
|
|
13
|
+
level?: SentryType.SeverityLevel;
|
|
14
14
|
tags?: {
|
|
15
15
|
[key in TagsKey]?: Primitive;
|
|
16
16
|
};
|
|
@@ -61,7 +61,7 @@ declare class BeraError extends Error {
|
|
|
61
61
|
get tags(): {
|
|
62
62
|
[key: string | TagsKey]: Primitive;
|
|
63
63
|
};
|
|
64
|
-
level: SeverityLevel;
|
|
64
|
+
level: SentryType.SeverityLevel;
|
|
65
65
|
extra: Record<string, unknown>;
|
|
66
66
|
constructor({ message: m, displayMessage: dm, cause, reason, level, abi, tags, chainId, }: IBeraErrorArgs);
|
|
67
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorLike } from '@apollo/client';
|
|
2
|
-
import { B as BeraError, I as IBeraErrorArgs } from './BeraError-
|
|
2
|
+
import { B as BeraError, I as IBeraErrorArgs } from './BeraError-D1HS_rbb.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This is an error class that should be used to handle errors from fetch requests.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorLike } from '@apollo/client';
|
|
2
|
-
import { B as BeraError, I as IBeraErrorArgs } from './BeraError-
|
|
2
|
+
import { B as BeraError, I as IBeraErrorArgs } from './BeraError-D1HS_rbb.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This is an error class that should be used to handle errors from fetch requests.
|
package/dist/actions/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWZLPSG5Rcjs = require('../chunk-WZLPSG5R.cjs');require('../chunk-KIA6GUIN.cjs');require('../chunk-K2FCHQHA.cjs');require('../chunk-NOV7UCGA.cjs');require('../chunk-4E5JGLUM.cjs');require('../chunk-M5BKM52U.cjs');require('../chunk-B47PDJZM.cjs');require('../chunk-4GY57XKG.cjs');exports.BalancerApi = _chunkWZLPSG5Rcjs.f; exports.BaseAggregator = _chunkWZLPSG5Rcjs.e; exports.HoneyPreviewMethod = _chunkWZLPSG5Rcjs.J; exports.MOCKED_PROPOSAL_STATUSES = _chunkWZLPSG5Rcjs.r; exports.RewardVaultDistributionMode = _chunkWZLPSG5Rcjs.U; exports.beraWriteContract = _chunkWZLPSG5Rcjs.za; exports.checkProposalField = _chunkWZLPSG5Rcjs.q; exports.computeActualStatus = _chunkWZLPSG5Rcjs.s; exports.formatValidatorRewardAllocation = _chunkWZLPSG5Rcjs.Fa; exports.getActiveBoostAndCommissionChangeDelay = _chunkWZLPSG5Rcjs.Aa; exports.getAllPools = _chunkWZLPSG5Rcjs.g; exports.getAllProposals = _chunkWZLPSG5Rcjs.t; exports.getAllValidators = _chunkWZLPSG5Rcjs.Ba; exports.getAllowances = _chunkWZLPSG5Rcjs.ua; exports.getApiEnrichedAllocation = _chunkWZLPSG5Rcjs.Ca; exports.getApiPool = _chunkWZLPSG5Rcjs.h; exports.getApiValidator = _chunkWZLPSG5Rcjs.Da; exports.getApolloClient = _chunkWZLPSG5Rcjs.c; exports.getBalanceCall = _chunkWZLPSG5Rcjs.wa; exports.getBgtAprSimulation = _chunkWZLPSG5Rcjs.W; exports.getBlockTime = _chunkWZLPSG5Rcjs.X; exports.getBlockTimestamp = _chunkWZLPSG5Rcjs.T; exports.getBodyErrors = _chunkWZLPSG5Rcjs.u; exports.getChartData = _chunkWZLPSG5Rcjs.A; exports.getCollateralWeights = _chunkWZLPSG5Rcjs.B; exports.getConvertToAssets = _chunkWZLPSG5Rcjs.a; exports.getDailyValidatorBlockStats = _chunkWZLPSG5Rcjs.Ea; exports.getDecodedFunctionData = _chunkWZLPSG5Rcjs.v; exports.getDefaultRewardAllocation = _chunkWZLPSG5Rcjs.Ja; exports.getGlobalCapLimit = _chunkWZLPSG5Rcjs.F; exports.getGlobalData = _chunkWZLPSG5Rcjs.Z; exports.getGlobalLiquidityAndSwapVolume = _chunkWZLPSG5Rcjs.i; exports.getHoneyCollaterals = _chunkWZLPSG5Rcjs.D; exports.getHoneyFees = _chunkWZLPSG5Rcjs.G; exports.getHoneyGlobalData = _chunkWZLPSG5Rcjs.H; exports.getHoneyPausedState = _chunkWZLPSG5Rcjs.I; exports.getHoneyPreview = _chunkWZLPSG5Rcjs.K; exports.getHoneyPythFeeds = _chunkWZLPSG5Rcjs.ta; exports.getHoneyPythOracle = _chunkWZLPSG5Rcjs.L; exports.getHoneyRootPriceOracle = _chunkWZLPSG5Rcjs.M; exports.getHoneyVaultsBalance = _chunkWZLPSG5Rcjs.N; exports.getIncentiveFeeClaimStats = _chunkWZLPSG5Rcjs._; exports.getManagedValidatorByAccount = _chunkWZLPSG5Rcjs.Ka; exports.getMarkets = _chunkWZLPSG5Rcjs.$; exports.getMaxDeposit = _chunkWZLPSG5Rcjs.b; exports.getOnChainPool = _chunkWZLPSG5Rcjs.k; exports.getPoolEvents = _chunkWZLPSG5Rcjs.l; exports.getPoolHistoricalData = _chunkWZLPSG5Rcjs.m; exports.getPoolPausedState = _chunkWZLPSG5Rcjs.j; exports.getPoolState = _chunkWZLPSG5Rcjs.n; exports.getProposalDetails = _chunkWZLPSG5Rcjs.w; exports.getProposalFromTx = _chunkWZLPSG5Rcjs.y; exports.getProposalVotes = _chunkWZLPSG5Rcjs.z; exports.getPythLatestPrices = _chunkWZLPSG5Rcjs.O; exports.getPythUpdateFee = _chunkWZLPSG5Rcjs.Q; exports.getRelativeCapLimit = _chunkWZLPSG5Rcjs.P; exports.getRewardProofsByValidator = _chunkWZLPSG5Rcjs.aa; exports.getRewardTokenToBeraRate = _chunkWZLPSG5Rcjs.ba; exports.getRewardVault = _chunkWZLPSG5Rcjs.ca; exports.getRewardVaultDurationConstants = _chunkWZLPSG5Rcjs.da; exports.getRewardVaultFromToken = _chunkWZLPSG5Rcjs.ea; exports.getRewardVaultIncentives = _chunkWZLPSG5Rcjs.fa; exports.getRewardVaultRewards = _chunkWZLPSG5Rcjs.V; exports.getRewardVaultStakingToken = _chunkWZLPSG5Rcjs.ga; exports.getRewardVaults = _chunkWZLPSG5Rcjs.Y; exports.getSWBeraVaultMetadata = _chunkWZLPSG5Rcjs.ka; exports.getSWBeraWithdrawal = _chunkWZLPSG5Rcjs.la; exports.getStakeWithdrawalCooldown = _chunkWZLPSG5Rcjs.ja; exports.getStakedBeraAPR = _chunkWZLPSG5Rcjs.ha; exports.getStakedBeraSnapshots = _chunkWZLPSG5Rcjs.ia; exports.getStakingPoolBatch = _chunkWZLPSG5Rcjs.La; exports.getSubgraphPool = _chunkWZLPSG5Rcjs.o; exports.getSwapPayload = _chunkWZLPSG5Rcjs.R; exports.getTokenCurrentPrices = _chunkWZLPSG5Rcjs.sa; exports.getTokenInformation = _chunkWZLPSG5Rcjs.C; exports.getTokens = _chunkWZLPSG5Rcjs.va; exports.getUserActiveValidators = _chunkWZLPSG5Rcjs.Na; exports.getUserBoostsOnValidator = _chunkWZLPSG5Rcjs.Ma; exports.getUserClaimableIncentives = _chunkWZLPSG5Rcjs.ma; exports.getUserStakingPositions = _chunkWZLPSG5Rcjs.Oa; exports.getUserVaultInfo = _chunkWZLPSG5Rcjs.oa; exports.getUserVaults = _chunkWZLPSG5Rcjs.pa; exports.getUserVaultsReward = _chunkWZLPSG5Rcjs.na; exports.getValidatorAnalytics = _chunkWZLPSG5Rcjs.Pa; exports.getValidatorBoostApy = _chunkWZLPSG5Rcjs.Xa; exports.getValidatorCommission = _chunkWZLPSG5Rcjs.Qa; exports.getValidatorEstimatedBgtPerYear = _chunkWZLPSG5Rcjs.Ra; exports.getValidatorOperatorAddress = _chunkWZLPSG5Rcjs.Sa; exports.getValidatorQueuedCommission = _chunkWZLPSG5Rcjs.Ta; exports.getValidatorQueuedOperatorAddress = _chunkWZLPSG5Rcjs.Ua; exports.getValidatorQueuedRewardAllocation = _chunkWZLPSG5Rcjs.Va; exports.getValidatorReturnPerBgt = _chunkWZLPSG5Rcjs.Wa; exports.getValidatorRewardAllocation = _chunkWZLPSG5Rcjs.Ha; exports.getVaultHistory = _chunkWZLPSG5Rcjs.qa; exports.getVaultPausedState = _chunkWZLPSG5Rcjs.p; exports.getVaultValidators = _chunkWZLPSG5Rcjs.ra; exports.getWalletBalances = _chunkWZLPSG5Rcjs.xa; exports.gql = _chunkWZLPSG5Rcjs.d; exports.isBadCollateralAsset = _chunkWZLPSG5Rcjs.E; exports.isBasketModeEnabled = _chunkWZLPSG5Rcjs.S; exports.isDefaultRewardAllocation = _chunkWZLPSG5Rcjs.Ia; exports.isImpersonateAccount = _chunkWZLPSG5Rcjs.ya; exports.isSameRewardAllocation = _chunkWZLPSG5Rcjs.Ga; exports.parseProposalBody = _chunkWZLPSG5Rcjs.x;
|
package/dist/actions/index.d.cts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-
|
|
2
|
-
export { f as GetBgtAprSimulationArgs, h as GetBgtAprSimulationResult, G as GetConvertToAssetsProps, s as GetGaugeData, c as GetHoneyVaultsBalanceResponse, m as GetMarkets, q as GetRewardVaultRewardsReturn, u as GetStakedBeraSnapshotsArgs, x as GetUserVaultsResponse, z as GetVaultHistoryArgs, k as GlobalData, I as IsBadCollateralArgs, e as IsBadCollateralResponse, O as OnChainPool, P as PoolStatus, p as RewardVaultDistributionMode, R as RewardVaultIncentive, S as StakedBeraWithdrawal, D as UserBoostsOnValidator, F as UserStakingPoolPosition, U as UserVault, J as ValidatorQueuedCommission, L as ValidatorQueuedOperatorAddress, N as ValidatorRewardAllocationRaw, Q as ValidatorRewardAllocationUpdate, T as ValidatorRewardAllocationUpdateWithExpiration, B as ValidatorWithUserBoost, W as formatValidatorRewardAllocation, j as getBgtAprSimulation, g as getConvertToAssets, l as getGlobalData, d as getHoneyVaultsBalance, n as getMarkets, a as getOnChainPool, b as getPoolPausedState, o as getRewardVaultIncentives, r as getRewardVaultRewards, t as getRewardVaults, w as getSWBeraWithdrawal, v as getStakedBeraSnapshots, C as getUserActiveValidators, E as getUserBoostsOnValidator, H as getUserStakingPositions, y as getUserVaults, K as getValidatorQueuedCommission, M as getValidatorQueuedOperatorAddress, Y as getValidatorRewardAllocation, A as getVaultHistory, i as isBadCollateralAsset, X as isSameRewardAllocation } from '../getValidatorQueuedOperatorAddress-
|
|
1
|
+
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-BCYlvah3.cjs';
|
|
2
|
+
export { f as GetBgtAprSimulationArgs, h as GetBgtAprSimulationResult, G as GetConvertToAssetsProps, s as GetGaugeData, c as GetHoneyVaultsBalanceResponse, m as GetMarkets, q as GetRewardVaultRewardsReturn, u as GetStakedBeraSnapshotsArgs, x as GetUserVaultsResponse, z as GetVaultHistoryArgs, k as GlobalData, I as IsBadCollateralArgs, e as IsBadCollateralResponse, O as OnChainPool, P as PoolStatus, p as RewardVaultDistributionMode, R as RewardVaultIncentive, S as StakedBeraWithdrawal, D as UserBoostsOnValidator, F as UserStakingPoolPosition, U as UserVault, J as ValidatorQueuedCommission, L as ValidatorQueuedOperatorAddress, N as ValidatorRewardAllocationRaw, Q as ValidatorRewardAllocationUpdate, T as ValidatorRewardAllocationUpdateWithExpiration, B as ValidatorWithUserBoost, W as formatValidatorRewardAllocation, j as getBgtAprSimulation, g as getConvertToAssets, l as getGlobalData, d as getHoneyVaultsBalance, n as getMarkets, a as getOnChainPool, b as getPoolPausedState, o as getRewardVaultIncentives, r as getRewardVaultRewards, t as getRewardVaults, w as getSWBeraWithdrawal, v as getStakedBeraSnapshots, C as getUserActiveValidators, E as getUserBoostsOnValidator, H as getUserStakingPositions, y as getUserVaults, K as getValidatorQueuedCommission, M as getValidatorQueuedOperatorAddress, Y as getValidatorRewardAllocation, A as getVaultHistory, i as isBadCollateralAsset, X as isSameRewardAllocation } from '../getValidatorQueuedOperatorAddress-BCYlvah3.cjs';
|
|
3
3
|
import { Address, PublicClient, AbiParameter, AbiFunction, TransactionReceipt, Abi, ContractFunctionArgs, ContractFunctionName, WalletCallReceipt } from 'viem';
|
|
4
4
|
import { ApolloClient, OperationVariables, FetchPolicy } from '@apollo/client';
|
|
5
5
|
export { gql } from '@apollo/client';
|
|
6
6
|
import { ChainId, BeraConfig } from '@berachain/config/internal';
|
|
7
|
-
import { A as Aggregators, i as IAggregatorArgs, I as IRawAggregatorQuote, a as Token, P as PythLatestUpdates, b as TokenWithMetadata, T as TokenWithOrder, j as PythPriceFeedMap, k as TokenCurrentPriceMap, l as AllowanceToken, M as MinimalERC20, B as BalanceToken, m as IContractWrite } from '../dex-
|
|
8
|
-
export { C as CollateralRates, o as CollateralRatesArgs, n as HoneyFeeMap, r as HoneyPreviewArgs, q as HoneyPreviewMethod, t as HoneyPreviewReadResult, s as HoneyPreviewResult, p as getHoneyFees, v as getHoneyPreview, w as getPythLatestPrices } from '../dex-
|
|
7
|
+
import { A as Aggregators, i as IAggregatorArgs, I as IRawAggregatorQuote, a as Token, P as PythLatestUpdates, b as TokenWithMetadata, T as TokenWithOrder, j as PythPriceFeedMap, k as TokenCurrentPriceMap, l as AllowanceToken, M as MinimalERC20, B as BalanceToken, m as IContractWrite } from '../dex-jD95agMv.cjs';
|
|
8
|
+
export { C as CollateralRates, o as CollateralRatesArgs, n as HoneyFeeMap, r as HoneyPreviewArgs, q as HoneyPreviewMethod, t as HoneyPreviewReadResult, s as HoneyPreviewResult, p as getHoneyFees, v as getHoneyPreview, w as getPythLatestPrices } from '../dex-jD95agMv.cjs';
|
|
9
9
|
import { PoolState } from '@berachain-foundation/berancer-sdk';
|
|
10
10
|
export { BalancerApi } from '@berachain-foundation/berancer-sdk';
|
|
11
11
|
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
12
12
|
import { GetPoolsQueryVariables, GetGlobalLiquidityAndSwapVolumeQuery, GetPoolEventsQuery, GqlChain, PoolHistoricalDataFragment, MinimalPoolFragment } from '@berachain/graphql/dex/api';
|
|
13
13
|
import { GqlPoolEventType, GqlChain as GqlChain$1, ApiVaultFragment, ApiValidatorFragment, GetValidatorsQueryVariables, GetValidatorsQuery, ApiRewardAllocationWeightFragment, GetValidatorQuery, ApiValidatorMinimalFragment } from '@berachain/graphql/pol/api';
|
|
14
|
-
import { a as ProposalErrorCodes, b as ProposalState, C as CustomProposal, G as GovernanceTopic, c as CustomProposalErrors, B as BribeBoostRewardProof, d as BribeBoostRewardItem, U as UserVaultInfo } from '../staking-
|
|
14
|
+
import { a as ProposalErrorCodes, b as ProposalState, C as CustomProposal, G as GovernanceTopic, c as CustomProposalErrors, B as BribeBoostRewardProof, d as BribeBoostRewardItem, U as UserVaultInfo } from '../staking-BxYDlMtj.cjs';
|
|
15
15
|
import { ProposalStatus, ProposalSelectionFragment, Proposal_Filter, Proposal_OrderBy, OrderDirection, ProposalWithVotesFragment, GetProposalVotesQueryVariables, GetProposalVotesQuery } from '@berachain/graphql/governance';
|
|
16
16
|
import { GetPublicClientReturnType } from '@wagmi/core';
|
|
17
17
|
import graymatter from 'gray-matter';
|
|
18
18
|
import { GetChartDataQuery, GetGlobalDataQuery } from '@berachain/graphql/honey';
|
|
19
19
|
import { EdgeConfigSchema } from '@berachain/config/internal/edge-config';
|
|
20
20
|
import { p as pythWrapperAbi, h as honeyFactoryAbi } from '../pythWrapper-CBjsmmsK.cjs';
|
|
21
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-
|
|
21
|
+
import { I as IHoneySwapState } from '../useHoneySwapState-YfMSTWY3.cjs';
|
|
22
22
|
import { Address as Address$1 } from '@berachain/config';
|
|
23
23
|
import { GetValidatorBlockStatsQuery, GetValidatorByAccountQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
24
24
|
import '../aggregatorsRouter-Cny4B_MB.cjs';
|
|
@@ -26,7 +26,7 @@ import 'react/jsx-runtime';
|
|
|
26
26
|
import 'react';
|
|
27
27
|
import 'swr';
|
|
28
28
|
import '../txnEnum-Diichv9Z.cjs';
|
|
29
|
-
import '../BeraError-
|
|
29
|
+
import '../BeraError-D1HS_rbb.cjs';
|
|
30
30
|
import '@sentry/nextjs';
|
|
31
31
|
|
|
32
32
|
interface GetMaxDepositProps {
|
|
@@ -669,10 +669,11 @@ declare const getBodyErrors: (proposal: CustomProposal, currentTopic: Governance
|
|
|
669
669
|
* @param callData - The calldata to decode, in hexadecimal format.
|
|
670
670
|
* @returns An object containing the decoded ABI item, function signature, function name, and arguments.
|
|
671
671
|
*/
|
|
672
|
-
declare function getDecodedFunctionData({ address, callData, chainId, }: {
|
|
672
|
+
declare function getDecodedFunctionData({ address, callData, chainId, publicClient, }: {
|
|
673
673
|
address: Address;
|
|
674
674
|
callData: `0x${string}`;
|
|
675
675
|
chainId?: number;
|
|
676
|
+
publicClient: PublicClient;
|
|
676
677
|
}): Promise<{
|
|
677
678
|
args: never[];
|
|
678
679
|
abiItem?: undefined;
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress
|
|
2
|
-
export { f as GetBgtAprSimulationArgs, h as GetBgtAprSimulationResult, G as GetConvertToAssetsProps, s as GetGaugeData, c as GetHoneyVaultsBalanceResponse, m as GetMarkets, q as GetRewardVaultRewardsReturn, u as GetStakedBeraSnapshotsArgs, x as GetUserVaultsResponse, z as GetVaultHistoryArgs, k as GlobalData, I as IsBadCollateralArgs, e as IsBadCollateralResponse, O as OnChainPool, P as PoolStatus, p as RewardVaultDistributionMode, R as RewardVaultIncentive, S as StakedBeraWithdrawal, D as UserBoostsOnValidator, F as UserStakingPoolPosition, U as UserVault, J as ValidatorQueuedCommission, L as ValidatorQueuedOperatorAddress, N as ValidatorRewardAllocationRaw, Q as ValidatorRewardAllocationUpdate, T as ValidatorRewardAllocationUpdateWithExpiration, B as ValidatorWithUserBoost, W as formatValidatorRewardAllocation, j as getBgtAprSimulation, g as getConvertToAssets, l as getGlobalData, d as getHoneyVaultsBalance, n as getMarkets, a as getOnChainPool, b as getPoolPausedState, o as getRewardVaultIncentives, r as getRewardVaultRewards, t as getRewardVaults, w as getSWBeraWithdrawal, v as getStakedBeraSnapshots, C as getUserActiveValidators, E as getUserBoostsOnValidator, H as getUserStakingPositions, y as getUserVaults, K as getValidatorQueuedCommission, M as getValidatorQueuedOperatorAddress, Y as getValidatorRewardAllocation, A as getVaultHistory, i as isBadCollateralAsset, X as isSameRewardAllocation } from '../getValidatorQueuedOperatorAddress
|
|
1
|
+
import { V as ValidatorRewardAllocation } from '../getValidatorQueuedOperatorAddress-9jSXlAse.js';
|
|
2
|
+
export { f as GetBgtAprSimulationArgs, h as GetBgtAprSimulationResult, G as GetConvertToAssetsProps, s as GetGaugeData, c as GetHoneyVaultsBalanceResponse, m as GetMarkets, q as GetRewardVaultRewardsReturn, u as GetStakedBeraSnapshotsArgs, x as GetUserVaultsResponse, z as GetVaultHistoryArgs, k as GlobalData, I as IsBadCollateralArgs, e as IsBadCollateralResponse, O as OnChainPool, P as PoolStatus, p as RewardVaultDistributionMode, R as RewardVaultIncentive, S as StakedBeraWithdrawal, D as UserBoostsOnValidator, F as UserStakingPoolPosition, U as UserVault, J as ValidatorQueuedCommission, L as ValidatorQueuedOperatorAddress, N as ValidatorRewardAllocationRaw, Q as ValidatorRewardAllocationUpdate, T as ValidatorRewardAllocationUpdateWithExpiration, B as ValidatorWithUserBoost, W as formatValidatorRewardAllocation, j as getBgtAprSimulation, g as getConvertToAssets, l as getGlobalData, d as getHoneyVaultsBalance, n as getMarkets, a as getOnChainPool, b as getPoolPausedState, o as getRewardVaultIncentives, r as getRewardVaultRewards, t as getRewardVaults, w as getSWBeraWithdrawal, v as getStakedBeraSnapshots, C as getUserActiveValidators, E as getUserBoostsOnValidator, H as getUserStakingPositions, y as getUserVaults, K as getValidatorQueuedCommission, M as getValidatorQueuedOperatorAddress, Y as getValidatorRewardAllocation, A as getVaultHistory, i as isBadCollateralAsset, X as isSameRewardAllocation } from '../getValidatorQueuedOperatorAddress-9jSXlAse.js';
|
|
3
3
|
import { Address, PublicClient, AbiParameter, AbiFunction, TransactionReceipt, Abi, ContractFunctionArgs, ContractFunctionName, WalletCallReceipt } from 'viem';
|
|
4
4
|
import { ApolloClient, OperationVariables, FetchPolicy } from '@apollo/client';
|
|
5
5
|
export { gql } from '@apollo/client';
|
|
6
6
|
import { ChainId, BeraConfig } from '@berachain/config/internal';
|
|
7
|
-
import { A as Aggregators, i as IAggregatorArgs, I as IRawAggregatorQuote, a as Token, P as PythLatestUpdates, b as TokenWithMetadata, T as TokenWithOrder, j as PythPriceFeedMap, k as TokenCurrentPriceMap, l as AllowanceToken, M as MinimalERC20, B as BalanceToken, m as IContractWrite } from '../dex-
|
|
8
|
-
export { C as CollateralRates, o as CollateralRatesArgs, n as HoneyFeeMap, r as HoneyPreviewArgs, q as HoneyPreviewMethod, t as HoneyPreviewReadResult, s as HoneyPreviewResult, p as getHoneyFees, v as getHoneyPreview, w as getPythLatestPrices } from '../dex-
|
|
7
|
+
import { A as Aggregators, i as IAggregatorArgs, I as IRawAggregatorQuote, a as Token, P as PythLatestUpdates, b as TokenWithMetadata, T as TokenWithOrder, j as PythPriceFeedMap, k as TokenCurrentPriceMap, l as AllowanceToken, M as MinimalERC20, B as BalanceToken, m as IContractWrite } from '../dex-CxzGqVLe.js';
|
|
8
|
+
export { C as CollateralRates, o as CollateralRatesArgs, n as HoneyFeeMap, r as HoneyPreviewArgs, q as HoneyPreviewMethod, t as HoneyPreviewReadResult, s as HoneyPreviewResult, p as getHoneyFees, v as getHoneyPreview, w as getPythLatestPrices } from '../dex-CxzGqVLe.js';
|
|
9
9
|
import { PoolState } from '@berachain-foundation/berancer-sdk';
|
|
10
10
|
export { BalancerApi } from '@berachain-foundation/berancer-sdk';
|
|
11
11
|
import * as _berachain_graphql_dex_api from '@berachain/graphql/dex/api';
|
|
12
12
|
import { GetPoolsQueryVariables, GetGlobalLiquidityAndSwapVolumeQuery, GetPoolEventsQuery, GqlChain, PoolHistoricalDataFragment, MinimalPoolFragment } from '@berachain/graphql/dex/api';
|
|
13
13
|
import { GqlPoolEventType, GqlChain as GqlChain$1, ApiVaultFragment, ApiValidatorFragment, GetValidatorsQueryVariables, GetValidatorsQuery, ApiRewardAllocationWeightFragment, GetValidatorQuery, ApiValidatorMinimalFragment } from '@berachain/graphql/pol/api';
|
|
14
|
-
import { a as ProposalErrorCodes, b as ProposalState, C as CustomProposal, G as GovernanceTopic, c as CustomProposalErrors, B as BribeBoostRewardProof, d as BribeBoostRewardItem, U as UserVaultInfo } from '../staking-
|
|
14
|
+
import { a as ProposalErrorCodes, b as ProposalState, C as CustomProposal, G as GovernanceTopic, c as CustomProposalErrors, B as BribeBoostRewardProof, d as BribeBoostRewardItem, U as UserVaultInfo } from '../staking-Bw46L2PT.js';
|
|
15
15
|
import { ProposalStatus, ProposalSelectionFragment, Proposal_Filter, Proposal_OrderBy, OrderDirection, ProposalWithVotesFragment, GetProposalVotesQueryVariables, GetProposalVotesQuery } from '@berachain/graphql/governance';
|
|
16
16
|
import { GetPublicClientReturnType } from '@wagmi/core';
|
|
17
17
|
import graymatter from 'gray-matter';
|
|
18
18
|
import { GetChartDataQuery, GetGlobalDataQuery } from '@berachain/graphql/honey';
|
|
19
19
|
import { EdgeConfigSchema } from '@berachain/config/internal/edge-config';
|
|
20
20
|
import { p as pythWrapperAbi, h as honeyFactoryAbi } from '../pythWrapper-CBjsmmsK.js';
|
|
21
|
-
import { I as IHoneySwapState } from '../useHoneySwapState-
|
|
21
|
+
import { I as IHoneySwapState } from '../useHoneySwapState-CD8v6y1k.js';
|
|
22
22
|
import { Address as Address$1 } from '@berachain/config';
|
|
23
23
|
import { GetValidatorBlockStatsQuery, GetValidatorByAccountQuery, GetValidatorAnalyticsQuery } from '@berachain/graphql/pol/subgraph';
|
|
24
24
|
import '../aggregatorsRouter-Cny4B_MB.js';
|
|
@@ -26,7 +26,7 @@ import 'react/jsx-runtime';
|
|
|
26
26
|
import 'react';
|
|
27
27
|
import 'swr';
|
|
28
28
|
import '../txnEnum-Diichv9Z.js';
|
|
29
|
-
import '../BeraError-
|
|
29
|
+
import '../BeraError-D1HS_rbb.js';
|
|
30
30
|
import '@sentry/nextjs';
|
|
31
31
|
|
|
32
32
|
interface GetMaxDepositProps {
|
|
@@ -669,10 +669,11 @@ declare const getBodyErrors: (proposal: CustomProposal, currentTopic: Governance
|
|
|
669
669
|
* @param callData - The calldata to decode, in hexadecimal format.
|
|
670
670
|
* @returns An object containing the decoded ABI item, function signature, function name, and arguments.
|
|
671
671
|
*/
|
|
672
|
-
declare function getDecodedFunctionData({ address, callData, chainId, }: {
|
|
672
|
+
declare function getDecodedFunctionData({ address, callData, chainId, publicClient, }: {
|
|
673
673
|
address: Address;
|
|
674
674
|
callData: `0x${string}`;
|
|
675
675
|
chainId?: number;
|
|
676
|
+
publicClient: PublicClient;
|
|
676
677
|
}): Promise<{
|
|
677
678
|
args: never[];
|
|
678
679
|
abiItem?: undefined;
|
package/dist/actions/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,Ha,I,Ia,J,Ja,K,Ka,L,La,M,Ma,N,Na,O,Oa,P,Pa,Q,Qa,R,Ra,S,Sa,T,Ta,U,Ua,V,Va,W,Wa,X,Xa,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunk-
|
|
1
|
+
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,Ha,I,Ia,J,Ja,K,Ka,L,La,M,Ma,N,Na,O,Oa,P,Pa,Q,Qa,R,Ra,S,Sa,T,Ta,U,Ua,V,Va,W,Wa,X,Xa,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunk-LZPBQLKP.mjs";import"../chunk-AHAZC5K3.mjs";import"../chunk-2422CKAT.mjs";import"../chunk-K4NZIO2Z.mjs";import"../chunk-ELUMRVNE.mjs";import"../chunk-JHCSZSJS.mjs";import"../chunk-VA37UBED.mjs";import"../chunk-ASRHUDAH.mjs";export{f as BalancerApi,e as BaseAggregator,J as HoneyPreviewMethod,r as MOCKED_PROPOSAL_STATUSES,U as RewardVaultDistributionMode,za as beraWriteContract,q as checkProposalField,s as computeActualStatus,Fa as formatValidatorRewardAllocation,Aa as getActiveBoostAndCommissionChangeDelay,g as getAllPools,t as getAllProposals,Ba as getAllValidators,ua as getAllowances,Ca as getApiEnrichedAllocation,h as getApiPool,Da as getApiValidator,c as getApolloClient,wa as getBalanceCall,W as getBgtAprSimulation,X as getBlockTime,T as getBlockTimestamp,u as getBodyErrors,A as getChartData,B as getCollateralWeights,a as getConvertToAssets,Ea as getDailyValidatorBlockStats,v as getDecodedFunctionData,Ja as getDefaultRewardAllocation,F as getGlobalCapLimit,Z as getGlobalData,i as getGlobalLiquidityAndSwapVolume,D as getHoneyCollaterals,G as getHoneyFees,H as getHoneyGlobalData,I as getHoneyPausedState,K as getHoneyPreview,ta as getHoneyPythFeeds,L as getHoneyPythOracle,M as getHoneyRootPriceOracle,N as getHoneyVaultsBalance,_ as getIncentiveFeeClaimStats,Ka as getManagedValidatorByAccount,$ as getMarkets,b as getMaxDeposit,k as getOnChainPool,l as getPoolEvents,m as getPoolHistoricalData,j as getPoolPausedState,n as getPoolState,w as getProposalDetails,y as getProposalFromTx,z as getProposalVotes,O as getPythLatestPrices,Q as getPythUpdateFee,P as getRelativeCapLimit,aa as getRewardProofsByValidator,ba as getRewardTokenToBeraRate,ca as getRewardVault,da as getRewardVaultDurationConstants,ea as getRewardVaultFromToken,fa as getRewardVaultIncentives,V as getRewardVaultRewards,ga as getRewardVaultStakingToken,Y as getRewardVaults,ka as getSWBeraVaultMetadata,la as getSWBeraWithdrawal,ja as getStakeWithdrawalCooldown,ha as getStakedBeraAPR,ia as getStakedBeraSnapshots,La as getStakingPoolBatch,o as getSubgraphPool,R as getSwapPayload,sa as getTokenCurrentPrices,C as getTokenInformation,va as getTokens,Na as getUserActiveValidators,Ma as getUserBoostsOnValidator,ma as getUserClaimableIncentives,Oa as getUserStakingPositions,oa as getUserVaultInfo,pa as getUserVaults,na as getUserVaultsReward,Pa as getValidatorAnalytics,Xa as getValidatorBoostApy,Qa as getValidatorCommission,Ra as getValidatorEstimatedBgtPerYear,Sa as getValidatorOperatorAddress,Ta as getValidatorQueuedCommission,Ua as getValidatorQueuedOperatorAddress,Va as getValidatorQueuedRewardAllocation,Wa as getValidatorReturnPerBgt,Ha as getValidatorRewardAllocation,qa as getVaultHistory,p as getVaultPausedState,ra as getVaultValidators,xa as getWalletBalances,d as gql,E as isBadCollateralAsset,S as isBasketModeEnabled,Ia as isDefaultRewardAllocation,ya as isImpersonateAccount,Ga as isSameRewardAllocation,x as parseProposalBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-VA37UBED.mjs";import{e as o,f as s,g as a}from"./chunk-ASRHUDAH.mjs";import{isAddress as x}from"viem";function c(t){return t!=null}function b({value:t,property:e,fn:r}){let n=r(t);if(!n.isValid)throw new a({property:e,value:t,expected:n.expectedType})}function i({value:t,property:e,fn:r}){b({value:t,property:e,fn:n=>{let l=c(n),{isValid:m,expectedType:h}=r(n);return{expectedType:h,isValid:l&&m}}})}function g(t,e){i({value:t,property:e,fn:r=>({expectedType:"defined",isValid:c(r)})})}function A(t,e="publicClient"){g(t,e)}function N(t,e){i({value:t,property:e,fn:r=>({expectedType:"Address",isValid:typeof r=="string"&&x(r)})})}function E(t,e){i({value:t,property:e,fn:r=>({expectedType:"number",isValid:(typeof r=="string"||typeof r=="number")&&Number(r)>0})})}import{BaseError as p}from"viem";function I({cause:t}){if(t instanceof p){let r=o({error:t,revertIfUnknown:!1});if(r.isRequestError&&r.rootCause instanceof p&&"url"in r.rootCause&&typeof r.rootCause.url=="string")return new u({cause:r.rootCause,response:void 0,endpoint:{url:r.rootCause.url,type:"rpc"}})}return t instanceof s?t:new s({cause:t})}var f=class extends s{resource;id;constructor(e){super(e),this.name="NotFoundError",this.level=e.level??"info",this.message=`Resource ${e.resource} with id ${e.id} not found`,this.resource=e.resource,this.id=e.id}};var d=class extends s{txHash;receipt;to;callData;blockNumber=null;input;functionName;constructor(e){super(e),this.name="TransactionFailedError",this.txHash=e.txHash||null,this.receipt=e.receipt||null,this.to=e.to,this.functionName=e.functionName,this.blockNumber=e.blockNumber??null,this.input=e.input,this.receipt?this.message=`Transaction reverted on chain for reason: ${this.reason}`:this.txHash?this.message=`Transaction reverted after being broadcasted for reason: ${this.reason}`:this.message=`${this.reason}: ${this.message}`,this.tags={...this.tags,"operation.txn.status":e.txHash?"execution":"simulation",...e.tags},this.to&&(this.tags["operation.txn.to"]=this.to),this.functionName&&(this.tags["operation.txn.functionName"]=this.functionName)}};export{I as a,g as b,A as c,N as d,E as e,f,d as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k,e as C,f as v}from"./chunk-
|
|
1
|
+
import{a as k,e as C,f as v}from"./chunk-JHCSZSJS.mjs";import{f as P}from"./chunk-ASRHUDAH.mjs";import{createContext as O,useContext as q}from"react";import{isFlagEnabled as J}from"@berachain/config/internal/edge-config";import{jsx as X}from"react/jsx-runtime";var b=O(void 0);function ke({children:e,flags:t,aggregators:o}){return X(b.Provider,{value:{...v,...t,aggregators:o?Object.entries(o).filter(([,n])=>J(n)).map(([n])=>n):void 0},children:e})}function K(){let e=q(b);if(!e)throw new Error("BeraFlagsProvider not found");return e}function Ce(e){return K()[e]}import{createContext as _,useContext as U,useState as $}from"react";import{jsx as j}from"react/jsx-runtime";var S=_({protocol:{isPaused:!1,factories:{composableStable:"enabled",weighted:"enabled",allPaused:!1}},onPoolChange:()=>{},pool:void 0});function Le(){let e=U(S);if(!e)throw new P({level:"fatal",message:"BexStateContext is not defined"});return e}function we({children:e,isVaultPaused:t,labels:o,factories:n}){let[r,s]=$(),l=(r?.isPaused&&!r?.isInRecoveryMode)??!1,i=t||r?.isPaused;return j(S.Provider,{value:{protocol:{isPaused:t,factories:{...n,allPaused:n.composableStable==="paused"&&n.weighted==="paused"}},labels:o,onPoolChange:s,pool:r?{...r,disablePoolWithdrawals:!!l,disablePoolDeposits:!!i}:void 0},children:e})}import{getPublicClient as z}from"@wagmi/core";var w="rk-transactions",F="transactions";function B(e){try{let t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function G(e){return Object.entries(e).reduce((t,[o,n])=>({...t,[o]:Object.entries(n).reduce((r,[s,l])=>{if(!l)return r;let i=l.map(f=>({...f,chainId:Number(s)}));return r.push(...i),r},[])}),{})}var h=(e,t,o)=>o.findIndex(n=>n.hash===e.hash)===t;function Q(e,t){let o=G(e);for(let[n,r]of Object.entries(t))o[n]&&r?o[n]=[...r,...o[n]].filter(h):o[n]=r?.filter(h);return o}function L(){let e=B(typeof localStorage<"u"?localStorage.getItem(w):null),t=B(typeof localStorage<"u"?localStorage.getItem(F):null);return Q(e,t)}var V=/^0x([A-Fa-f0-9]{64})$/;function Y(e){let t=[];return V.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function R({config:e}){let t=L(),o=new Set,n=new Map;function r(a){return t[a]??[]}function s(a,d){let p=Y(d);if(p.length>0)throw new Error(["Unable to add transaction",...p].join(`
|
|
2
2
|
`));m(a,c=>[{...d,status:"pending"},...c.filter(({hash:u})=>u!==d.hash)])}function l(a){m(a,()=>[])}function i(a,d,p){m(a,c=>c.map(u=>u.hash===d?{...u,status:p}:u))}async function f(a){await Promise.all(r(a).filter(d=>d.status==="pending").map(async d=>{let{confirmations:p,hash:c,chainId:u}=d,g=n.get(c);if(g)return await g;let T=z(e,{chainId:u});if(!T)return;let x=T.waitForTransactionReceipt({confirmations:p,hash:c}).then(({status:y})=>{n.delete(c),y!==void 0&&i(a,c,Number(y)===0?"failed":"confirmed")});return n.set(c,x),await x}))}function m(a,d){t=L(),t[a]=t[a]??[];let u=d(t?.[a]??[]).sort((g,T)=>T.timestamp-g.timestamp).slice(0,10);t[a]=u.length>0?u.filter(h):void 0,A(),H(),f(a)}function A(){localStorage.setItem(F,JSON.stringify(t)),localStorage.removeItem(w)}function H(){for(let a of o)a()}function E(a){return o.add(a),()=>{o.delete(a)}}return{addTransaction:s,clearTransactions:l,getTransactions:r,onChange:E,waitForPendingTransactions:f}}import{createContext as Z,useContext as ee,useEffect as te,useState as oe}from"react";import{useBeraWagmi as ne,useConfig as re}from"@berachain/wagmi/hooks";import{jsx as ae}from"react/jsx-runtime";var D,N=Z(null);function Ae({children:e}){let{account:t}=ne(),o=t?.wallet?.address,n=re(),[r]=oe(()=>D??(D=R({config:n})));return te(()=>{o&&r.waitForPendingTransactions(o)},[r,o]),ae(N.Provider,{value:r,children:e})}function He(){let e=ee(N);if(!e)throw new Error("Transaction hooks must be used within ");return e}import{createContext as ie,useContext as se}from"react";import de from"@berachain/config/mainnet";import{jsx as ce}from"react/jsx-runtime";function Xe(){return se(M)}var M=ie(de.averageBlockTime);function _e({children:e,blockTime:t,...o}){let{config:n}=k(o);return ce(M.Provider,{value:t??n.averageBlockTime,children:e})}import{createContext as ue,useContext as le}from"react";import{jsx as fe}from"react/jsx-runtime";var W=ue(void 0);function ze({children:e,...t}){return fe(W.Provider,{value:t,children:e})}function Ge(){let e=le(W);if(!e)throw new Error("useHoneyConfig must be used within a HoneyConfigProvider");return e}import{createContext as pe,useMemo as me}from"react";import{defaultChainId as ge}from"@berachain/config/internal";function I({defaultTokenList:e=[],externalList:t=[],chainId:o}){if(e.length===0)return{tokenList:t,customTokenList:t,featuredTokenList:[]};let n=e.filter(i=>!i.chainId||Number(i.chainId)===Number(o)).map(i=>({...i,default:!0})),r=n.filter(i=>i.tags?.some(f=>f==="featured")),s=[...n,...t];return{tokenList:s.filter((i,f)=>s.findIndex(m=>C(m,i))===f),customTokenList:t,featuredTokenList:r}}import{jsx as he}from"react/jsx-runtime";var Te=pe(void 0);function nt({children:e,defaultTokens:t,userTokens:o,onAddToken:n,onRemoveToken:r}){let{tokenList:s=[],featuredTokenList:l=[]}=me(()=>I({defaultTokenList:t,externalList:o,chainId:ge}),[t,o]);return he(Te.Provider,{value:{tokenList:s,userTokens:o,featuredTokens:l,onAddToken(i){n(i,{defaultTokens:t,userTokens:o,tokenList:s})},onRemoveToken:r},children:e})}export{ke as a,K as b,Ce as c,S as d,Le as e,we as f,B as g,G as h,h as i,Q as j,R as k,Ae as l,He as m,Xe as n,M as o,_e as p,W as q,ze as r,Ge as s,Te as t,nt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkYKKMWJX5cjs = require('./chunk-YKKMWJX5.cjs');var _chunkMDA4YT6Jcjs = require('./chunk-MDA4YT6J.cjs');var _chunk33CW5NUNcjs = require('./chunk-33CW5NUN.cjs');async function O(e){if(_optionalChain([e, 'access', _2 => _2.headers, 'access', _3 => _3.get, 'call', _4 => _4("content-type"), 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("application/json")]))return await e.json();{let t=await e.text();try{return JSON.parse(t)}catch (e2){return{message:"Unknown error, can't decode response into JSON",cause:t}}}}async function Y(e,n){try{let t=await fetch(typeof e=="string"||e instanceof URL?e:e.url,{...n});if(!t.ok){let a=await O(t);throw new (0, _chunkMDA4YT6Jcjs.a)({cause:a,response:t,endpoint:e})}return t}catch(t){throw t instanceof _chunkMDA4YT6Jcjs.a?t:new (0, _chunkMDA4YT6Jcjs.a)({cause:t,endpoint:e,response:void 0})}}async function Ae(e,n){return(await Y(e,{...n,headers:{Accept:"application/json",..._optionalChain([n, 'optionalAccess', _7 => _7.headers])}})).json()}var _viem = require('viem');var ye=_viem.parseEther.call(void 0, "0.005"),Ne= exports.e =1e5,Te= exports.f =1,we= exports.g =.1,Ie= exports.h =50,Se= exports.i =7920027n;var _bignumberjs = require('bignumber.js'); var _bignumberjs2 = _interopRequireDefault(_bignumberjs);var I=(e,n,t,a)=>{if(!e||!n||!t||!a)return 0;let s=new (0, _bignumberjs2.default)(e).times(t),o=new (0, _bignumberjs2.default)(n).times(a);if(s.lt(.01)||o.lt(.01)||s.isZero()||o.isZero())return 0;let r=o.div(s);return Number(new (0, _bignumberjs2.default)(1).minus(r).toFixed())};var Oe=(e,n,t,a,s)=>e.map(o=>{let r=_viem.formatUnits.call(void 0, BigInt(o.amountOut),_optionalChain([t, 'optionalAccess', _8 => _8.decimals])||18),c=_viem.formatUnits.call(void 0, BigInt(o.amountIn),_optionalChain([n, 'optionalAccess', _9 => _9.decimals])||18),b=new (0, _bignumberjs2.default)(r).times(s).toFixed(),u=new (0, _bignumberjs2.default)(c).times(a).toFixed(),x=I((a||0).toString(),(s||0).toString(),c,r);return{...o,exchangeRate:new (0, _bignumberjs2.default)(r).div(c).toNumber(),amountIn:c,amountOut:r,amountOutUsd:b,amountInUsd:u,priceImpactPercentage:x}}).sort((o,r)=>new (0, _bignumberjs2.default)(r.amountOut).minus(o.amountOut).toNumber()).map((o,r,c)=>({...o,relativeLossPercentage:I("1","1",c[0].amountOut,o.amountOut)}));var _e=e=>{if(e==="0")return e;let n=e.replace(/^0+/,"").replaceAll(/[^0-9.]/g,"");return n.startsWith(".")&&(n=`0${n}`),n};var L=["","K","M","B","T","P","E","Z","Y"];function v(e){return e instanceof _bignumberjs.BigNumber?e:new (0, _bignumberjs.BigNumber)(e)}function Z(e,n){return v(e).shiftedBy(n*-1)}function d(e,n={}){if(typeof n=="number"){let E=n;if(e==null)return"";if(typeof e=="object")throw new Error("Value must be a number if using deprecated version");let l=Number(e).toFixed(E);return l=l.replace(/(\.\d*?[1-9])0+$|\.0*$/,"$1"),l}let{visibleDecimals:t,compact:a=!0,percent:s=!1,roundDown:o=!1,roundUp:r=!1,compactThreshold:c,maxValue:b,symbol:u,prefixText:x="",suffixText:B="",showIsSmallerThanMin:D=!0,ifNullish:h=""}=n||{};if(e==null)return h;let f=s?Number(e)*100:Number(e);if(Number.isNaN(f))return"NaN";if(f===Number.POSITIVE_INFINITY)return"Infinity";if(f===Number.NEGATIVE_INFINITY)return"-Infinity";let i=_nullishCoalesce(t, () => (0));f===0?i=0:t===void 0&&(Math.abs(f)>1||s||u==="USD"?i=2:i=7);let R=10**-i,$=f!==0&&Math.abs(f)<Math.abs(R),q=f<0,Q=b?Math.abs(f)>b:!1,C=$?R:f,y=a&&(!c||Math.abs(f)>c);o&&!y?C=Math.trunc(Number(C)*10**i)/10**i:r&&!y&&(C=Math.ceil(Number(C)*10**i)/10**i);let g;if(Q)g=f>b?"\u221E":"-\u221E";else if(y){let E=v(C),l=E.abs().toFixed(0).length;c&&Math.abs(f)<=c&&(l=0);let U=Math.min(Math.floor(l?(l-1)/3:0),L.length-1),X=L[U],F=Z(E,3*U).toNumber();o?F=Math.trunc(Number(F)*10**i)/10**i:r&&(F=Math.ceil(Number(F)*10**i)/10**i),g=`${new Intl.NumberFormat("en-US",{maximumFractionDigits:i,minimumFractionDigits:i}).format(F)}${X}`}else{let E=new Intl.NumberFormat("en-US",{maximumFractionDigits:i,minimumFractionDigits:i}).format(Math.abs(C));g=`${q?"-":""}${E}`}let m=[];return x&&m.push(x),$&&D&&m.push(f<0?">":"<"),_optionalChain([u, 'optionalAccess', _10 => _10.toLowerCase, 'call', _11 => _11()])==="usd"&&!s&&m.push("$"),m.push(g),s&&m.push("%"),_optionalChain([u, 'optionalAccess', _12 => _12.toLowerCase, 'call', _13 => _13()])!=="usd"&&typeof u<"u"&&m.push(" ",u),B&&m.push(B),m.join("")}var He=e=>e?Number(e)>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:_nullishCoalesce(Number(e), () => (0)):0,je= exports.o =(e,n)=>{if(!e)return"0";let[t="0",a="0"]=`${e}`.split(".");return`${t}.${a.substring(0,n)}`};function Je(e){let n=new Date;return n.setDate(n.getDate()-e)*1e3}var z=["January","February","March","April","May","June","July","August","September","October","November","December"],K=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qe(e,n){let t=new Date(e*1e3),a=t.getDate(),s="th";return a===1||a===21||a===31?s="st":a===2||a===22?s="nd":(a===3||a===23)&&(s="rd"),n?`${K[t.getMonth()]} ${a}`:`${z[t.getMonth()]} ${a}${s}, ${t.getFullYear()}`}function Qe(...e){let n=e[0],t,a,s,o;if(typeof e[1]!="object")t=_nullishCoalesce(e[1], () => (!1)),a=_nullishCoalesce(e[2], () => (!1)),o=_nullishCoalesce(e[3], () => (!1)),s=!0;else{let f=e[1];t=_nullishCoalesce(f.condensed, () => (!1));let i=_nullishCoalesce(f.greaterUnit, () => ("hours"));i==="days"?(a=!0,s=!0):i==="hours"?(a=!1,s=!0,o=!1):(a=!1,s=!0),o=_nullishCoalesce(f.showSeconds, () => (!1))}let r=Math.floor(n/(3600*24)),c=Math.floor(n%(3600*24)/3600),b=Math.floor(n%3600/60),u=n%60;if(a||(c+=r*24,r=0),r===0&&c===0&&b===0)return t?"< 1 M":"less than a minute";let x=r>0?`${r}${t?"D":" day"}${!t&&r!==1?"s":""}`:"",B=c>0?`${c}${t?"H":" hour"}${!t&&c!==1?"s":""}`:"",D=b>0&&s||!r&&!c?`${b}${t?"M":" minute"}${!t&&b!==1?"s":""}`:"",h=u>0&&o?`${u}${t?"S":" second"}${!t&&u!==1?"s":""}`:"";return[x,B,D,h].filter(Boolean).join(t?" ":", ")}function Ye(e,n){let t=n?{minimumFractionDigits:0,maximumFractionDigits:0}:{},a=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",...t});try{let s=c=>typeof c=="number",o=c=>typeof c=="string";if(!s(e)&&!o(e))return a.format(0);let r;return o(e)?(r=Number.parseFloat(e),Number.isNaN(r)&&(r=0)):(r=e,Number.isNaN(r)&&(r=0)),a.format(r)}catch(s){return console.log(s),a.format(0)}}var _internal = require('@berachain/config/internal');var H=[{80094:"0x141De07E5D4C4759EC9301DA106115D4841f66cD",name:"nfts.bongBears"},{80094:"0xA0CF472E6132F6B822a944f6F31aA7b261c7c375",name:"nfts.bondBears"},{80094:"0xf49ec5db255854C4a567de5AB3826c9AAbaFc7cF",name:"nfts.booBears"},{80094:"0xDDeAf391c4be2d01ca52aBb8C159a06820ef078C",name:"nfts.babyBears"},{80094:"0x7711B2Eb2451259dbF211e30157ceB7CFeb79a19",name:"nfts.bandBears"},{80094:"0x72D876D9cdf4001b836f8E47254d0551EdA2eebB",name:"nfts.bitBears"},{80069:"",80094:"0x24147243f9c08d835C218Cda1e135f8dFD0517D0",name:"bend.morpho"},{80069:"",80094:"0xcf247Df3A2322Dea0D408f011c194906E77a6f62",name:"bend.adaptiveCurveIrm"},{80069:"",80094:"0xF920140A65D0f412f2AB3e76C4fEAB5Eef0657ae",name:"bend.bundler3"},{80069:"",80094:"0xd2B9667F5214115E27937C410cAeE83E3a901Df7",name:"bend.generalAdapter1"},{80069:"",80094:"0x5EDd48C6ACBd565Eeb31702FD9fa9Cbc86fbE616",name:"bend.metaMorphoFactoryV1_1"},{80069:"",80094:"0x80108Ee81A92091Db6B8B2326B1875ce9388f461",name:"bend.metaFeePartitioner"},{80069:"",80094:"0xB62F34Ab315eaDeAc698e8EaEB6Fc2650951BFe7",name:"bend.publicAllocator"},{80069:"",80094:"0xAf2FDC54f7bc9d6e8C2D2760E908f4e1beB04d9E",name:"bend.morphoChainlinkOracleV2Factory"},{80069:"",80094:"0x46fE2bc33b661E01A8946BbC3Bf43F2B8382d802",name:"bend.urdFactory"},{80069:"",80094:"0x30BbA9CD9Eb8c95824aa42Faa1Bb397b07545bc1",name:"bend.vaults.re7HoneyVault"},{80069:"0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3",80094:"0x77DA09bC82652f9A14d1b170a001e759640298e6",name:"pol.bgtIncentiveDistributor"},{80069:"0x1984Baf659607Cc5f206c55BB3B00eb3E180190B",80094:"0x1984Baf659607Cc5f206c55BB3B00eb3E180190B",name:"pol.bgtIncentiveFeeCollector"},{80069:"0x118D2cEeE9785eaf70C15Cd74CD84c9f8c3EeC9a",80094:"0x118D2cEeE9785eaf70C15Cd74CD84c9f8c3EeC9a",name:"pol.wberaStakerVault"},{80069:"0x4242424242424242424242424242424242424242",80094:"0x4242424242424242424242424242424242424242",name:"pol.beaconDeposit"},{80069:"0xdf960E8F3F19C481dDE769edEDD439ea1a63426a",80094:"0xdf960E8F3F19C481dDE769edEDD439ea1a63426a",name:"pol.berachef"},{80069:"0x1AE7dD7AE06F6C58B4524d9c1f816094B1bcCD8e",80094:"0x1AE7dD7AE06F6C58B4524d9c1f816094B1bcCD8e",name:"pol.blockRewardController"},{80069:"0xD2f19a79b026Fb636A7c300bF5947df113940761",80094:"0xD2f19a79b026Fb636A7c300bF5947df113940761",name:"pol.distributor"},{80069:"0x94Ad6Ac84f6C6FbA8b8CCbD71d9f4f101def52a8",80094:"0x94Ad6Ac84f6C6FbA8b8CCbD71d9f4f101def52a8",name:"pol.rewardVaultFactory"},{80069:"0x44F07Ce5AfeCbCC406e6beFD40cc2998eEb8c7C6",80094:"0x44F07Ce5AfeCbCC406e6beFD40cc2998eEb8c7C6",name:"pol.bgtStaker"},{80069:"0x7bb8DdaC7FbE3FFC0f4B3c73C4F158B06CF82650",80094:"0x7Bb8DdaC7FbE3FFC0f4B3c73C4F158B06CF82650",name:"pol.feeCollector"},{80069:"0x4f4A5c2194B8e856b7a05B348F6ba3978FB6f6D5",80094:"0x4f4A5c2194B8e856b7a05B348F6ba3978FB6f6D5",name:"pol.governance"},{80069:"0xb5f2000b5744f207c931526cAE2134cAa8b6862a",80094:"0xb5f2000b5744f207c931526cAE2134cAa8b6862a",name:"pol.timelock"},{80069:"0x656b95E550C07a9ffe548bd4085c72418Ceb1dba",80094:"0x656b95E550C07a9ffe548bd4085c72418Ceb1dba",name:"tokens.bgt"},{80069:"0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce",80094:"0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce",name:"tokens.honey"},{80069:"0xA4aFef880F5cE1f63c9fb48F661E27F8B4216401",80094:"0xA4aFef880F5cE1f63c9fb48F661E27F8B4216401",name:"tokens.honeyFactory"},{80069:"0x285e147060CDc5ba902786d3A471224ee6cE0F91",80094:"0x285e147060CDc5ba902786d3A471224ee6cE0F91",name:"tokens.honeyFactoryReader"},{80069:"0x6969696969696969696969696969696969696969",80094:"0x6969696969696969696969696969696969696969",name:"tokens.wbera"},{80069:"",80094:"0x549943e04f40284185054145c6E4e9568C1D3241",name:"tokens.usdc"},{80069:"",80094:"0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",name:"tokens.wbtc"},{80069:"",80094:"0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",name:"tokens.weth"},{80069:"0x708cA656b68A6b7384a488A36aD33505a77241FE",80094:"0x4Be03f781C497A489E3cB0287833452cA9B9E80B",name:"bex.vault"},{80069:"0x05A607aCf3548E84DD1E44c3706F850c849058Da",80094:"0xB8Cf46Cf1b1476E707619913a70B2085d26f1707",name:"bex.protocolFeesCollector"},{80069:"0xC7c981ADcDC5d48fed0CD52807fb2bAB22676C8f",80094:"0x5083737EC75a728c265BE578C9d0d5333a2c5951",name:"bex.balancerHelpers"},{80069:"0x0dC9964F6CA33d9EF38DEB4925234766127C6B36",80094:"0x55dccE8165C88aAd4403a15A9cE3A8E244657dD2",name:"bex.poolCreationHelper"},{80069:"0x8c2D77f0CfcD4Af9cF41494EfE500FE324012c06",80094:"0x1635F0E1B3e8A6713d03aE155ba79458Ba3240C7",name:"bex.protocolFeesWithdrawer"},{80069:"0xB60DbBaCEaeC23486a64d12089F467ef949f1bb1",80094:"0xDfA30BDa0375d4763711AB0CC8D91B20bfCC87E1",name:"bex.stablePoolFactory"},{80069:"0xfD772657FC8c4Ed3884AfF151b680883814052FA",80094:"0xCB4AE3030bA06F7EEE54A7B96AfcA7457f9525cf",name:"bex.batchRelayerLibrary"},{80069:"0x263a1C5B2c5851beA2177eb8D6caefdfF2A25601",80094:"0x4151083172b2CEFB83A33fD7FC9F6cBabb3Fd08d",name:"bex.batchRelayerQueryLibrary"},{80069:"0x343215E156Ff586711a5B8C49Fe3099BAF22624C",80094:"0x6044f181aB5E9C05A4ed9Ce295f3B178d2492EE7",name:"bex.balancerRelayer"},{80069:"0xf1d23276C7b271B2aC595C78977b2312E9954D57",80094:"0xa966fA8F2d5B087FFFA499C0C1240589371Af409",name:"bex.weightedPoolFactory"},{80069:"0x8119E412E00fe3c857739E95dB147817Bf615dB8",80094:"0x33C88ffdEe710ed3908C791137Bd1D4421AabBBf",name:"bex.protocolFeePercentagesProvider"},{80069:"0xE3723383a0EA73D5c0dE424BAA97F97f86f6cF92",80094:"0x3C612e132624f4Bd500eE1495F54565F0bcc9b59",name:"bex.balancerQueries"},{80069:"0x1453b808C88AAa5e5965f8d86123921E96F045Aa",80094:"0x71047aE39A7aA4f7d923542F459e50B974644Ef2",name:"bex.authorizer"},{80069:"0x41675C099F32341bf84BFc5382aF534df5C7461a",80094:"0x41675C099F32341bf84BFc5382aF534df5C7461a",name:"safe.safe"},{80069:"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",80094:"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",name:"safe.safeProxyFactory"},{80069:"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",80094:"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",name:"safe.multiSend"},{80069:"0x9641d764fc13c8B624c04430C7356C1C7C8102e2",80094:"0x9641d764fc13c8B624c04430C7356C1C7C8102e2",name:"safe.multiSendCallOnly"},{80069:"0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99",80094:"0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99",name:"safe.compatibilityFallbackHandler"},{80069:"0xd53cd0aB83D845Ac265BE939c57F53AD838012c9",80094:"0xd53cd0aB83D845Ac265BE939c57F53AD838012c9",name:"safe.signMessageLib"},{80069:"0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",80094:"0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",name:"safe.simulateTxAccessor"},{80069:"0x9b35Af71d77eaf8d7e40252370304687390A1A52",80094:"0x9b35Af71d77eaf8d7e40252370304687390A1A52",name:"safe.createCall"},{80069:"0x4e59b44847b379578588920cA78FbF26c0B4956C",80094:"0x4e59b44847b379578588920cA78FbF26c0B4956C",name:"other.create2"},{80069:"0xcA11bde05977b3631167028862bE2a173976CA11",80094:"0xcA11bde05977b3631167028862bE2a173976CA11",name:"other.multicall3"},{80069:"0x000000000022D473030F116dDEE9F6B43aC78BA3",80094:"0x000000000022D473030F116dDEE9F6B43aC78BA3",name:"other.permit2"},{80069:"0xEe233a69A36Db7fC10E03e921D90DEC52Cdce6e2",80094:"0xEe233a69A36Db7fC10E03e921D90DEC52Cdce6e2",name:"pol.rewardVaultHelper"},{80069:"0x7f09Cf6958631513aF0400488F65c7B5c0313F52",80094:"0xc8FD9a3fB3Dad4C22c9F8Cfa7cecC318A667A791",name:"pol.rewardAllocationFactory"},{80069:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",80094:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",name:"bex.balancerDelegatedOwnership"},{80069:"0x0000000000000000000000000000000000000000",80094:"0x1BDB1cf792419d2eaB5aBa8076B8f4257744fA58",name:"bex.aggregatorsRouter"},{80069:"0x0000000000000000000000000000000000000000",80094:"0x4AD3c5A427Af60F8Dd982023aE012233A66CA1f8",name:"bex.aggregatorsRouterExecutor"},{80069:null,80094:"0x24aC999FF132B32c5b3956973b6213B0d07eB2C7",name:"bex.haikuRouter"},{80069:null,80094:"0x69495273D6Dc572A830A4D6e00400a1e9d5B8f71",name:"bex.haikuAgentAddress"},{80069:"0x0eFeC4379805fAFA7269Ec599a6921f388C8841a",80094:"0xB5787B8f7b07a00229b617c4B7a616185857C147",name:"bex.recoverFundsContract"},{80069:"0x5CA67e134c52B1d11E038A5a4eD8Ddcdb1238943",80094:"0x5CA67e134c52B1d11E038A5a4eD8Ddcdb1238943",name:"honey.pythOracle"},{80069:"0x4b7cb1c197f8EE4d309866B16C2c12E3B4E7E606",80094:"0x4b7cb1c197f8EE4d309866B16C2c12E3B4E7E606",name:"honey.pythWrapper"},{80069:"0x2880aB155794e7179c9eE2e38200202908C17B43",80094:"0x2880aB155794e7179c9eE2e38200202908C17B43",name:"external.pyth"},{80069:null,80094:"0xC5FabF3a7E98a2ed89f5d5057Ab010634Ca7e71f",name:"bend.staging.morpho"},{80069:null,80094:"0x1d5376e532CcF25b740270624111D665830E5dB9",name:"bend.staging.adaptiveCurveIrm"},{80069:null,80094:"0x524061B659380a5e4576d76F0951303B20B5932f",name:"bend.staging.metaMorphoFactory"},{80069:null,80094:"0xFD6e68bC20be2a01Ec1Df687c83f927087D52811",name:"bend.staging.publicAllocator"},{80069:null,80094:"0x56811e1BFfF951B98c7940d3aCe0e549Ec4fDee8",name:"bend.staging.bundler3"},{80069:null,80094:"0x257a41E20BBfe90D750646C2e00bA700D55958C5",name:"bend.staging.generalAdapter1"},{80094:"0x19DcFf4e8Ff0B554D8a1f22d289A449fd4FbddBa",name:"bend.staging.supportedVaults.0"},{80094:"0xC0808A144CE2ea85bF84EBD1dDF5D59429f59dDE",name:"bend.staging.supportedVaults.1"}];function e0({address:e,chainId:n=_internal.defaultChainId}){return e?_optionalChain([H, 'access', _14 => _14.find, 'call', _15 => _15(a=>_optionalChain([a, 'access', _16 => _16[n], 'optionalAccess', _17 => _17.toLowerCase, 'call', _18 => _18()])===e.toLowerCase()), 'optionalAccess', _19 => _19.name]):void 0}function r0({collaterals:e,actionType:n,toAmount:t,fromAmount:a,isBasketModeEnabled:s}){if(e.length>0){if(n==="mint"){let r=["Minting"];if(r.push(d(Number(t[0]),5)),r.push("Honey from"),s)for(let c in e)r.push(d(Number(a[c]),5)),r.push(`${e[c].symbol}`),+c<e.length-2?r[r.length-1]=r[r.length-1].concat(","):+c===e.length-1?r[r.length-1]=r[r.length-1].concat("."):r.push("and");else r.push(d(Number(a[0]),5)),r.push(`${e[0].symbol}`);return r.join(" ")}let o=["Redeeming"];if(s)for(let r in e)o.push(d(Number(t[r]),5)),o.push(`${e[r].symbol}`),+r<e.length-2?o[o.length-1]=o[o.length-1].concat(","):+r===e.length-1?(o.push("for"),o.push(d(Number(a[0]),5)),o.push("Honey.")):o.push("and");else o.push(d(Number(t[0]),5)),o.push(`${e[0].symbol}`),o.push("for"),o.push(d(Number(a[0]),5)),o.push("Honey.");return o.join(" ")}return""}var _config = require('@berachain/wagmi/config');var S=new Map,i0= exports.v =(e={})=>{let n=_nullishCoalesce(e.chainId, () => (_internal.defaultChainId));if(S.has(n))return S.get(n);let t=_internal.getRpcUrls.call(void 0, n),a=[t.privateRcpUrl,t.jsonRpcUrl,t.alchemyJsonRpcUrl,t.publicJsonRpcUrl].filter(o=>o).map(o=>_viem.http.call(void 0, o));a.length===0&&a.push(_viem.http.call(void 0, ));let s=_viem.createPublicClient.call(void 0, {chain:_config.defaultBeraNetworkConfig.chain,transport:_viem.fallback.call(void 0, a)});return S.set(n,s),s};function ue(e=_internal.defaultChainId){let n=_internal.getRpcUrls.call(void 0, e);if(!n.isAnvil)throw new Error("No anvil RPC URL found");return _viem.createTestClient.call(void 0, {mode:"anvil",transport:_viem.http.call(void 0, n.jsonRpcUrl)})}var l0=(e,n,t)=>{let a=new (0, _bignumberjs2.default)(1+t).times(e),s=new (0, _bignumberjs2.default)(1-t).times(e);return a.isLessThan(n)||s.isGreaterThan(n)};function x0({lastBlockTimestamp:e,blockTime:n}){return e?e<Date.now()/1e3-n*10:!0}var E0=e=>2n*BigInt(e);function be(e,n){let t=n.originalException;return t&&(t instanceof _chunk33CW5NUNcjs.f&&(e.extra={...t,...e.extra},e.tags={...t.tags,...e.tags},e.level=n.captureContext&&"level"in n.captureContext?n.captureContext.level:t.level),t instanceof TypeError&&(e.extra={...t},e.tags={"error.reason":_chunkMDA4YT6Jcjs.a.isCorsError(t)?_chunkMDA4YT6Jcjs.a.REASON_MAP.CORS_ERROR:t.name,level:"warning"})),e}function D0(e){return Math.floor(e/1e3)}function me(e){return e*1e3}function de(e){return e*me(60)}function le(e){return e*60}function pe(e){return e*de(60)}function xe(e){return e*le(60)}function M(e){return e*pe(24)}function k(e){return e*xe(24)}function h0(e){return e*M(7)}function y0(e){return e*k(7)}function N0(e){return e*M(30)}function T0(e){return e*k(30)}function w0(e){return e*M(365)}function I0(e){return e*k(365)}function Ce(e){return{...e,..._chunkYKKMWJX5cjs.e.call(void 0, e,"BERA")&&_chunkYKKMWJX5cjs.c}}function k0(e){return e.map(n=>Ce(n))}var $0=(e,n=4,t=4,a=!1)=>{if(!e)return"";let s=a?e.toUpperCase().replace(/^0X/,"0x"):e;return`${s.substring(0,n)}...${s.substring(s.length-t)}`};var _api = require('@berachain/graphql/pol/api');function O0(e){if(e)return e===_api.GqlValidatorBlockUptimeStatus.Proposed}function V0(e){if(e)return e===_api.GqlValidatorBlockUptimeStatus.Signed}exports.a = O; exports.b = Y; exports.c = Ae; exports.d = ye; exports.e = Ne; exports.f = Te; exports.g = we; exports.h = Ie; exports.i = Se; exports.j = I; exports.k = Oe; exports.l = _e; exports.m = d; exports.n = He; exports.o = je; exports.p = Je; exports.q = qe; exports.r = Qe; exports.s = Ye; exports.t = e0; exports.u = r0; exports.v = i0; exports.w = ue; exports.x = l0; exports.y = x0; exports.z = E0; exports.A = be; exports.B = D0; exports.C = me; exports.D = de; exports.E = le; exports.F = pe; exports.G = xe; exports.H = M; exports.I = k; exports.J = h0; exports.K = y0; exports.L = N0; exports.M = T0; exports.N = w0; exports.O = I0; exports.P = Ce; exports.Q = k0; exports.R = $0; exports.S = O0; exports.T = V0;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkM5BKM52Ucjs = require('./chunk-M5BKM52U.cjs');var _chunkB47PDJZMcjs = require('./chunk-B47PDJZM.cjs');var _chunk4GY57XKGcjs = require('./chunk-4GY57XKG.cjs');async function O(e){if(_optionalChain([e, 'access', _2 => _2.headers, 'access', _3 => _3.get, 'call', _4 => _4("content-type"), 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("application/json")]))return await e.json();{let t=await e.text();try{return JSON.parse(t)}catch (e2){return{message:"Unknown error, can't decode response into JSON",cause:t}}}}async function Y(e,n){try{let t=await fetch(typeof e=="string"||e instanceof URL?e:e.url,{...n});if(!t.ok){let a=await O(t);throw new (0, _chunkB47PDJZMcjs.a)({cause:a,response:t,endpoint:e})}return t}catch(t){throw t instanceof _chunkB47PDJZMcjs.a?t:new (0, _chunkB47PDJZMcjs.a)({cause:t,endpoint:e,response:void 0})}}async function Ae(e,n){return(await Y(e,{...n,headers:{Accept:"application/json",..._optionalChain([n, 'optionalAccess', _7 => _7.headers])}})).json()}var _viem = require('viem');var ye=_viem.parseEther.call(void 0, "0.005"),Ne= exports.s =1e5,Te= exports.t =1,we= exports.u =.1,Ie= exports.v =50,Se= exports.w =7920027n;var _bignumberjs = require('bignumber.js'); var _bignumberjs2 = _interopRequireDefault(_bignumberjs);var I=(e,n,t,a)=>{if(!e||!n||!t||!a)return 0;let s=new (0, _bignumberjs2.default)(e).times(t),o=new (0, _bignumberjs2.default)(n).times(a);if(s.lt(.01)||o.lt(.01)||s.isZero()||o.isZero())return 0;let r=o.div(s);return Number(new (0, _bignumberjs2.default)(1).minus(r).toFixed())};var Oe=(e,n,t,a,s)=>e.map(o=>{let r=_viem.formatUnits.call(void 0, BigInt(o.amountOut),_optionalChain([t, 'optionalAccess', _8 => _8.decimals])||18),c=_viem.formatUnits.call(void 0, BigInt(o.amountIn),_optionalChain([n, 'optionalAccess', _9 => _9.decimals])||18),b=new (0, _bignumberjs2.default)(r).times(s).toFixed(),u=new (0, _bignumberjs2.default)(c).times(a).toFixed(),x=I((a||0).toString(),(s||0).toString(),c,r);return{...o,exchangeRate:new (0, _bignumberjs2.default)(r).div(c).toNumber(),amountIn:c,amountOut:r,amountOutUsd:b,amountInUsd:u,priceImpactPercentage:x}}).sort((o,r)=>new (0, _bignumberjs2.default)(r.amountOut).minus(o.amountOut).toNumber()).map((o,r,c)=>({...o,relativeLossPercentage:I("1","1",c[0].amountOut,o.amountOut)}));var _e=e=>{if(e==="0")return e;let n=e.replace(/^0+/,"").replaceAll(/[^0-9.]/g,"");return n.startsWith(".")&&(n=`0${n}`),n};var L=["","K","M","B","T","P","E","Z","Y"];function v(e){return e instanceof _bignumberjs.BigNumber?e:new (0, _bignumberjs.BigNumber)(e)}function Z(e,n){return v(e).shiftedBy(n*-1)}function d(e,n={}){if(typeof n=="number"){let E=n;if(e==null)return"";if(typeof e=="object")throw new Error("Value must be a number if using deprecated version");let l=Number(e).toFixed(E);return l=l.replace(/(\.\d*?[1-9])0+$|\.0*$/,"$1"),l}let{visibleDecimals:t,compact:a=!0,percent:s=!1,roundDown:o=!1,roundUp:r=!1,compactThreshold:c,maxValue:b,symbol:u,prefixText:x="",suffixText:B="",showIsSmallerThanMin:D=!0,ifNullish:h=""}=n||{};if(e==null)return h;let f=s?Number(e)*100:Number(e);if(Number.isNaN(f))return"NaN";if(f===Number.POSITIVE_INFINITY)return"Infinity";if(f===Number.NEGATIVE_INFINITY)return"-Infinity";let i=_nullishCoalesce(t, () => (0));f===0?i=0:t===void 0&&(Math.abs(f)>1||s||u==="USD"?i=2:i=7);let R=10**-i,$=f!==0&&Math.abs(f)<Math.abs(R),q=f<0,Q=b?Math.abs(f)>b:!1,C=$?R:f,y=a&&(!c||Math.abs(f)>c);o&&!y?C=Math.trunc(Number(C)*10**i)/10**i:r&&!y&&(C=Math.ceil(Number(C)*10**i)/10**i);let g;if(Q)g=f>b?"\u221E":"-\u221E";else if(y){let E=v(C),l=E.abs().toFixed(0).length;c&&Math.abs(f)<=c&&(l=0);let U=Math.min(Math.floor(l?(l-1)/3:0),L.length-1),X=L[U],F=Z(E,3*U).toNumber();o?F=Math.trunc(Number(F)*10**i)/10**i:r&&(F=Math.ceil(Number(F)*10**i)/10**i),g=`${new Intl.NumberFormat("en-US",{maximumFractionDigits:i,minimumFractionDigits:i}).format(F)}${X}`}else{let E=new Intl.NumberFormat("en-US",{maximumFractionDigits:i,minimumFractionDigits:i}).format(Math.abs(C));g=`${q?"-":""}${E}`}let m=[];return x&&m.push(x),$&&D&&m.push(f<0?">":"<"),_optionalChain([u, 'optionalAccess', _10 => _10.toLowerCase, 'call', _11 => _11()])==="usd"&&!s&&m.push("$"),m.push(g),s&&m.push("%"),_optionalChain([u, 'optionalAccess', _12 => _12.toLowerCase, 'call', _13 => _13()])!=="usd"&&typeof u<"u"&&m.push(" ",u),B&&m.push(B),m.join("")}var He=e=>e?Number(e)>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:_nullishCoalesce(Number(e), () => (0)):0,je= exports.D =(e,n)=>{if(!e)return"0";let[t="0",a="0"]=`${e}`.split(".");return`${t}.${a.substring(0,n)}`};function Je(e){let n=new Date;return n.setDate(n.getDate()-e)*1e3}var z=["January","February","March","April","May","June","July","August","September","October","November","December"],K=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qe(e,n){let t=new Date(e*1e3),a=t.getDate(),s="th";return a===1||a===21||a===31?s="st":a===2||a===22?s="nd":(a===3||a===23)&&(s="rd"),n?`${K[t.getMonth()]} ${a}`:`${z[t.getMonth()]} ${a}${s}, ${t.getFullYear()}`}function Qe(...e){let n=e[0],t,a,s,o;if(typeof e[1]!="object")t=_nullishCoalesce(e[1], () => (!1)),a=_nullishCoalesce(e[2], () => (!1)),o=_nullishCoalesce(e[3], () => (!1)),s=!0;else{let f=e[1];t=_nullishCoalesce(f.condensed, () => (!1));let i=_nullishCoalesce(f.greaterUnit, () => ("hours"));i==="days"?(a=!0,s=!0):i==="hours"?(a=!1,s=!0,o=!1):(a=!1,s=!0),o=_nullishCoalesce(f.showSeconds, () => (!1))}let r=Math.floor(n/(3600*24)),c=Math.floor(n%(3600*24)/3600),b=Math.floor(n%3600/60),u=n%60;if(a||(c+=r*24,r=0),r===0&&c===0&&b===0)return t?"< 1 M":"less than a minute";let x=r>0?`${r}${t?"D":" day"}${!t&&r!==1?"s":""}`:"",B=c>0?`${c}${t?"H":" hour"}${!t&&c!==1?"s":""}`:"",D=b>0&&s||!r&&!c?`${b}${t?"M":" minute"}${!t&&b!==1?"s":""}`:"",h=u>0&&o?`${u}${t?"S":" second"}${!t&&u!==1?"s":""}`:"";return[x,B,D,h].filter(Boolean).join(t?" ":", ")}function Ye(e,n){let t=n?{minimumFractionDigits:0,maximumFractionDigits:0}:{},a=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",...t});try{let s=c=>typeof c=="number",o=c=>typeof c=="string";if(!s(e)&&!o(e))return a.format(0);let r;return o(e)?(r=Number.parseFloat(e),Number.isNaN(r)&&(r=0)):(r=e,Number.isNaN(r)&&(r=0)),a.format(r)}catch(s){return console.log(s),a.format(0)}}var _internal = require('@berachain/config/internal');var H=[{80094:"0x141De07E5D4C4759EC9301DA106115D4841f66cD",name:"nfts.bongBears"},{80094:"0xA0CF472E6132F6B822a944f6F31aA7b261c7c375",name:"nfts.bondBears"},{80094:"0xf49ec5db255854C4a567de5AB3826c9AAbaFc7cF",name:"nfts.booBears"},{80094:"0xDDeAf391c4be2d01ca52aBb8C159a06820ef078C",name:"nfts.babyBears"},{80094:"0x7711B2Eb2451259dbF211e30157ceB7CFeb79a19",name:"nfts.bandBears"},{80094:"0x72D876D9cdf4001b836f8E47254d0551EdA2eebB",name:"nfts.bitBears"},{80069:"",80094:"0x24147243f9c08d835C218Cda1e135f8dFD0517D0",name:"bend.morpho"},{80069:"",80094:"0xcf247Df3A2322Dea0D408f011c194906E77a6f62",name:"bend.adaptiveCurveIrm"},{80069:"",80094:"0xF920140A65D0f412f2AB3e76C4fEAB5Eef0657ae",name:"bend.bundler3"},{80069:"",80094:"0xd2B9667F5214115E27937C410cAeE83E3a901Df7",name:"bend.generalAdapter1"},{80069:"",80094:"0x5EDd48C6ACBd565Eeb31702FD9fa9Cbc86fbE616",name:"bend.metaMorphoFactoryV1_1"},{80069:"",80094:"0x80108Ee81A92091Db6B8B2326B1875ce9388f461",name:"bend.metaFeePartitioner"},{80069:"",80094:"0xB62F34Ab315eaDeAc698e8EaEB6Fc2650951BFe7",name:"bend.publicAllocator"},{80069:"",80094:"0xAf2FDC54f7bc9d6e8C2D2760E908f4e1beB04d9E",name:"bend.morphoChainlinkOracleV2Factory"},{80069:"",80094:"0x46fE2bc33b661E01A8946BbC3Bf43F2B8382d802",name:"bend.urdFactory"},{80069:"",80094:"0x30BbA9CD9Eb8c95824aa42Faa1Bb397b07545bc1",name:"bend.vaults.re7HoneyVault"},{80069:"0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3",80094:"0x77DA09bC82652f9A14d1b170a001e759640298e6",name:"pol.bgtIncentiveDistributor"},{80069:"0x1984Baf659607Cc5f206c55BB3B00eb3E180190B",80094:"0x1984Baf659607Cc5f206c55BB3B00eb3E180190B",name:"pol.bgtIncentiveFeeCollector"},{80069:"0x118D2cEeE9785eaf70C15Cd74CD84c9f8c3EeC9a",80094:"0x118D2cEeE9785eaf70C15Cd74CD84c9f8c3EeC9a",name:"pol.wberaStakerVault"},{80069:"0x4242424242424242424242424242424242424242",80094:"0x4242424242424242424242424242424242424242",name:"pol.beaconDeposit"},{80069:"0xdf960E8F3F19C481dDE769edEDD439ea1a63426a",80094:"0xdf960E8F3F19C481dDE769edEDD439ea1a63426a",name:"pol.berachef"},{80069:"0x1AE7dD7AE06F6C58B4524d9c1f816094B1bcCD8e",80094:"0x1AE7dD7AE06F6C58B4524d9c1f816094B1bcCD8e",name:"pol.blockRewardController"},{80069:"0xD2f19a79b026Fb636A7c300bF5947df113940761",80094:"0xD2f19a79b026Fb636A7c300bF5947df113940761",name:"pol.distributor"},{80069:"0x94Ad6Ac84f6C6FbA8b8CCbD71d9f4f101def52a8",80094:"0x94Ad6Ac84f6C6FbA8b8CCbD71d9f4f101def52a8",name:"pol.rewardVaultFactory"},{80069:"0x44F07Ce5AfeCbCC406e6beFD40cc2998eEb8c7C6",80094:"0x44F07Ce5AfeCbCC406e6beFD40cc2998eEb8c7C6",name:"pol.bgtStaker"},{80069:"0x7bb8DdaC7FbE3FFC0f4B3c73C4F158B06CF82650",80094:"0x7Bb8DdaC7FbE3FFC0f4B3c73C4F158B06CF82650",name:"pol.feeCollector"},{80069:"0x4f4A5c2194B8e856b7a05B348F6ba3978FB6f6D5",80094:"0x4f4A5c2194B8e856b7a05B348F6ba3978FB6f6D5",name:"pol.governance"},{80069:"0xb5f2000b5744f207c931526cAE2134cAa8b6862a",80094:"0xb5f2000b5744f207c931526cAE2134cAa8b6862a",name:"pol.timelock"},{80069:"0x656b95E550C07a9ffe548bd4085c72418Ceb1dba",80094:"0x656b95E550C07a9ffe548bd4085c72418Ceb1dba",name:"tokens.bgt"},{80069:"0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce",80094:"0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce",name:"tokens.honey"},{80069:"0xA4aFef880F5cE1f63c9fb48F661E27F8B4216401",80094:"0xA4aFef880F5cE1f63c9fb48F661E27F8B4216401",name:"tokens.honeyFactory"},{80069:"0x285e147060CDc5ba902786d3A471224ee6cE0F91",80094:"0x285e147060CDc5ba902786d3A471224ee6cE0F91",name:"tokens.honeyFactoryReader"},{80069:"0x6969696969696969696969696969696969696969",80094:"0x6969696969696969696969696969696969696969",name:"tokens.wbera"},{80069:"",80094:"0x549943e04f40284185054145c6E4e9568C1D3241",name:"tokens.usdc"},{80069:"",80094:"0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",name:"tokens.wbtc"},{80069:"",80094:"0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",name:"tokens.weth"},{80069:"0x708cA656b68A6b7384a488A36aD33505a77241FE",80094:"0x4Be03f781C497A489E3cB0287833452cA9B9E80B",name:"bex.vault"},{80069:"0x05A607aCf3548E84DD1E44c3706F850c849058Da",80094:"0xB8Cf46Cf1b1476E707619913a70B2085d26f1707",name:"bex.protocolFeesCollector"},{80069:"0xC7c981ADcDC5d48fed0CD52807fb2bAB22676C8f",80094:"0x5083737EC75a728c265BE578C9d0d5333a2c5951",name:"bex.balancerHelpers"},{80069:"0x0dC9964F6CA33d9EF38DEB4925234766127C6B36",80094:"0x55dccE8165C88aAd4403a15A9cE3A8E244657dD2",name:"bex.poolCreationHelper"},{80069:"0x8c2D77f0CfcD4Af9cF41494EfE500FE324012c06",80094:"0x1635F0E1B3e8A6713d03aE155ba79458Ba3240C7",name:"bex.protocolFeesWithdrawer"},{80069:"0xB60DbBaCEaeC23486a64d12089F467ef949f1bb1",80094:"0xDfA30BDa0375d4763711AB0CC8D91B20bfCC87E1",name:"bex.stablePoolFactory"},{80069:"0xfD772657FC8c4Ed3884AfF151b680883814052FA",80094:"0xCB4AE3030bA06F7EEE54A7B96AfcA7457f9525cf",name:"bex.batchRelayerLibrary"},{80069:"0x263a1C5B2c5851beA2177eb8D6caefdfF2A25601",80094:"0x4151083172b2CEFB83A33fD7FC9F6cBabb3Fd08d",name:"bex.batchRelayerQueryLibrary"},{80069:"0x343215E156Ff586711a5B8C49Fe3099BAF22624C",80094:"0x6044f181aB5E9C05A4ed9Ce295f3B178d2492EE7",name:"bex.balancerRelayer"},{80069:"0xf1d23276C7b271B2aC595C78977b2312E9954D57",80094:"0xa966fA8F2d5B087FFFA499C0C1240589371Af409",name:"bex.weightedPoolFactory"},{80069:"0x8119E412E00fe3c857739E95dB147817Bf615dB8",80094:"0x33C88ffdEe710ed3908C791137Bd1D4421AabBBf",name:"bex.protocolFeePercentagesProvider"},{80069:"0xE3723383a0EA73D5c0dE424BAA97F97f86f6cF92",80094:"0x3C612e132624f4Bd500eE1495F54565F0bcc9b59",name:"bex.balancerQueries"},{80069:"0x1453b808C88AAa5e5965f8d86123921E96F045Aa",80094:"0x71047aE39A7aA4f7d923542F459e50B974644Ef2",name:"bex.authorizer"},{80069:"0x41675C099F32341bf84BFc5382aF534df5C7461a",80094:"0x41675C099F32341bf84BFc5382aF534df5C7461a",name:"safe.safe"},{80069:"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",80094:"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",name:"safe.safeProxyFactory"},{80069:"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",80094:"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",name:"safe.multiSend"},{80069:"0x9641d764fc13c8B624c04430C7356C1C7C8102e2",80094:"0x9641d764fc13c8B624c04430C7356C1C7C8102e2",name:"safe.multiSendCallOnly"},{80069:"0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99",80094:"0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99",name:"safe.compatibilityFallbackHandler"},{80069:"0xd53cd0aB83D845Ac265BE939c57F53AD838012c9",80094:"0xd53cd0aB83D845Ac265BE939c57F53AD838012c9",name:"safe.signMessageLib"},{80069:"0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",80094:"0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",name:"safe.simulateTxAccessor"},{80069:"0x9b35Af71d77eaf8d7e40252370304687390A1A52",80094:"0x9b35Af71d77eaf8d7e40252370304687390A1A52",name:"safe.createCall"},{80069:"0x4e59b44847b379578588920cA78FbF26c0B4956C",80094:"0x4e59b44847b379578588920cA78FbF26c0B4956C",name:"other.create2"},{80069:"0xcA11bde05977b3631167028862bE2a173976CA11",80094:"0xcA11bde05977b3631167028862bE2a173976CA11",name:"other.multicall3"},{80069:"0x000000000022D473030F116dDEE9F6B43aC78BA3",80094:"0x000000000022D473030F116dDEE9F6B43aC78BA3",name:"other.permit2"},{80069:"0xEe233a69A36Db7fC10E03e921D90DEC52Cdce6e2",80094:"0xEe233a69A36Db7fC10E03e921D90DEC52Cdce6e2",name:"pol.rewardVaultHelper"},{80069:"0x7f09Cf6958631513aF0400488F65c7B5c0313F52",80094:"0xc8FD9a3fB3Dad4C22c9F8Cfa7cecC318A667A791",name:"pol.rewardAllocationFactory"},{80069:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",80094:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",name:"bex.balancerDelegatedOwnership"},{80069:"0x0000000000000000000000000000000000000000",80094:"0x1BDB1cf792419d2eaB5aBa8076B8f4257744fA58",name:"bex.aggregatorsRouter"},{80069:"0x0000000000000000000000000000000000000000",80094:"0x4AD3c5A427Af60F8Dd982023aE012233A66CA1f8",name:"bex.aggregatorsRouterExecutor"},{80069:null,80094:"0x24aC999FF132B32c5b3956973b6213B0d07eB2C7",name:"bex.haikuRouter"},{80069:null,80094:"0x69495273D6Dc572A830A4D6e00400a1e9d5B8f71",name:"bex.haikuAgentAddress"},{80069:"0x0eFeC4379805fAFA7269Ec599a6921f388C8841a",80094:"0xB5787B8f7b07a00229b617c4B7a616185857C147",name:"bex.recoverFundsContract"},{80069:"0x5CA67e134c52B1d11E038A5a4eD8Ddcdb1238943",80094:"0x5CA67e134c52B1d11E038A5a4eD8Ddcdb1238943",name:"honey.pythOracle"},{80069:"0x4b7cb1c197f8EE4d309866B16C2c12E3B4E7E606",80094:"0x4b7cb1c197f8EE4d309866B16C2c12E3B4E7E606",name:"honey.pythWrapper"},{80069:"0x2880aB155794e7179c9eE2e38200202908C17B43",80094:"0x2880aB155794e7179c9eE2e38200202908C17B43",name:"external.pyth"},{80069:null,80094:"0xC5FabF3a7E98a2ed89f5d5057Ab010634Ca7e71f",name:"bend.staging.morpho"},{80069:null,80094:"0x1d5376e532CcF25b740270624111D665830E5dB9",name:"bend.staging.adaptiveCurveIrm"},{80069:null,80094:"0x524061B659380a5e4576d76F0951303B20B5932f",name:"bend.staging.metaMorphoFactory"},{80069:null,80094:"0xFD6e68bC20be2a01Ec1Df687c83f927087D52811",name:"bend.staging.publicAllocator"},{80069:null,80094:"0x56811e1BFfF951B98c7940d3aCe0e549Ec4fDee8",name:"bend.staging.bundler3"},{80069:null,80094:"0x257a41E20BBfe90D750646C2e00bA700D55958C5",name:"bend.staging.generalAdapter1"},{80094:"0x19DcFf4e8Ff0B554D8a1f22d289A449fd4FbddBa",name:"bend.staging.supportedVaults.0"},{80094:"0xC0808A144CE2ea85bF84EBD1dDF5D59429f59dDE",name:"bend.staging.supportedVaults.1"}];function e0({address:e,chainId:n=_internal.defaultChainId}){return e?_optionalChain([H, 'access', _14 => _14.find, 'call', _15 => _15(a=>_optionalChain([a, 'access', _16 => _16[n], 'optionalAccess', _17 => _17.toLowerCase, 'call', _18 => _18()])===e.toLowerCase()), 'optionalAccess', _19 => _19.name]):void 0}function r0({collaterals:e,actionType:n,toAmount:t,fromAmount:a,isBasketModeEnabled:s}){if(e.length>0){if(n==="mint"){let r=["Minting"];if(r.push(d(Number(t[0]),5)),r.push("Honey from"),s)for(let c in e)r.push(d(Number(a[c]),5)),r.push(`${e[c].symbol}`),+c<e.length-2?r[r.length-1]=r[r.length-1].concat(","):+c===e.length-1?r[r.length-1]=r[r.length-1].concat("."):r.push("and");else r.push(d(Number(a[0]),5)),r.push(`${e[0].symbol}`);return r.join(" ")}let o=["Redeeming"];if(s)for(let r in e)o.push(d(Number(t[r]),5)),o.push(`${e[r].symbol}`),+r<e.length-2?o[o.length-1]=o[o.length-1].concat(","):+r===e.length-1?(o.push("for"),o.push(d(Number(a[0]),5)),o.push("Honey.")):o.push("and");else o.push(d(Number(t[0]),5)),o.push(`${e[0].symbol}`),o.push("for"),o.push(d(Number(a[0]),5)),o.push("Honey.");return o.join(" ")}return""}var _config = require('@berachain/wagmi/config');var S=new Map,i0= exports.K =(e={})=>{let n=_nullishCoalesce(e.chainId, () => (_internal.defaultChainId));if(S.has(n))return S.get(n);let t=_internal.getRpcUrls.call(void 0, n),a=[t.privateRcpUrl,t.jsonRpcUrl,t.alchemyJsonRpcUrl,t.publicJsonRpcUrl].filter(o=>o).map(o=>_viem.http.call(void 0, o));a.length===0&&a.push(_viem.http.call(void 0, ));let s=_viem.createPublicClient.call(void 0, {chain:_config.defaultBeraNetworkConfig.chain,transport:_viem.fallback.call(void 0, a)});return S.set(n,s),s};function ue(e=_internal.defaultChainId){let n=_internal.getRpcUrls.call(void 0, e);if(!n.isAnvil)throw new Error("No anvil RPC URL found");return _viem.createTestClient.call(void 0, {mode:"anvil",transport:_viem.http.call(void 0, n.jsonRpcUrl)})}var l0=(e,n,t)=>{let a=new (0, _bignumberjs2.default)(1+t).times(e),s=new (0, _bignumberjs2.default)(1-t).times(e);return a.isLessThan(n)||s.isGreaterThan(n)};function x0({lastBlockTimestamp:e,blockTime:n}){return e?e<Date.now()/1e3-n*10:!0}var E0=e=>2n*BigInt(e);function be(e,n){let t=n.originalException;return t&&(t instanceof _chunk4GY57XKGcjs.f&&(e.extra={...t,...e.extra},e.tags={...t.tags,...e.tags},e.level=n.captureContext&&"level"in n.captureContext?n.captureContext.level:t.level),t instanceof TypeError&&(e.extra={...t},e.tags={"error.reason":_chunkB47PDJZMcjs.a.isCorsError(t)?_chunkB47PDJZMcjs.a.REASON_MAP.CORS_ERROR:t.name,level:"warning"})),e}function D0(e){return Math.floor(e/1e3)}function me(e){return e*1e3}function de(e){return e*me(60)}function le(e){return e*60}function pe(e){return e*de(60)}function xe(e){return e*le(60)}function M(e){return e*pe(24)}function k(e){return e*xe(24)}function h0(e){return e*M(7)}function y0(e){return e*k(7)}function N0(e){return e*M(30)}function T0(e){return e*k(30)}function w0(e){return e*M(365)}function I0(e){return e*k(365)}function Ce(e){return{...e,..._chunkM5BKM52Ucjs.e.call(void 0, e,"BERA")&&_chunkM5BKM52Ucjs.c}}function k0(e){return e.map(n=>Ce(n))}var $0=(e,n=4,t=4,a=!1)=>{if(!e)return"";let s=a?e.toUpperCase().replace(/^0X/,"0x"):e;return`${s.substring(0,n)}...${s.substring(s.length-t)}`};var _api = require('@berachain/graphql/pol/api');function O0(e){if(e)return e===_api.GqlValidatorBlockUptimeStatus.Proposed}function V0(e){if(e)return e===_api.GqlValidatorBlockUptimeStatus.Signed}exports.a = O; exports.b = Y; exports.c = Ae; exports.d = D0; exports.e = me; exports.f = de; exports.g = le; exports.h = pe; exports.i = xe; exports.j = M; exports.k = k; exports.l = h0; exports.m = y0; exports.n = N0; exports.o = T0; exports.p = w0; exports.q = I0; exports.r = ye; exports.s = Ne; exports.t = Te; exports.u = we; exports.v = Ie; exports.w = Se; exports.x = E0; exports.y = I; exports.z = Oe; exports.A = _e; exports.B = d; exports.C = He; exports.D = je; exports.E = Je; exports.F = qe; exports.G = Qe; exports.H = Ye; exports.I = e0; exports.J = r0; exports.K = i0; exports.L = ue; exports.M = l0; exports.N = x0; exports.O = be; exports.P = Ce; exports.Q = k0; exports.R = $0; exports.S = O0; exports.T = V0;
|