@berachain/berajs 0.2.8-beta.4 → 0.2.8-beta.6
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/abi/exports.cjs +1 -4452
- package/dist/abi/exports.cjs.map +1 -1
- package/dist/abi/exports.mjs +1 -4452
- package/dist/abi/exports.mjs.map +1 -1
- package/dist/actions/exports.cjs +1 -918
- package/dist/actions/exports.cjs.map +1 -1
- package/dist/actions/exports.mjs +1 -918
- package/dist/actions/exports.mjs.map +1 -1
- package/dist/chunk-3MZ7MLKF.mjs +2 -0
- package/dist/{chunk-PBCE7JTE.mjs.map → chunk-3MZ7MLKF.mjs.map} +1 -1
- package/dist/chunk-53TSJM6P.cjs +2 -0
- package/dist/chunk-53TSJM6P.cjs.map +1 -0
- package/dist/chunk-575OK77P.mjs +2 -0
- package/dist/{chunk-GLWPRM33.mjs.map → chunk-575OK77P.mjs.map} +1 -1
- package/dist/chunk-5NDYN2IB.mjs +4 -0
- package/dist/chunk-5NDYN2IB.mjs.map +1 -0
- package/dist/chunk-5W7UKRHX.mjs +2 -0
- package/dist/{chunk-J6EHBYSV.mjs.map → chunk-5W7UKRHX.mjs.map} +1 -1
- package/dist/chunk-7EAKCNQT.cjs +2 -0
- package/dist/chunk-7EAKCNQT.cjs.map +1 -0
- package/dist/chunk-CWKDFUFR.mjs +2 -0
- package/dist/{chunk-OWUI3VPI.mjs.map → chunk-CWKDFUFR.mjs.map} +1 -1
- package/dist/chunk-DDEQFR3M.cjs +2 -0
- package/dist/chunk-DDEQFR3M.cjs.map +1 -0
- package/dist/chunk-DKY4QPWU.cjs +2 -0
- package/dist/chunk-DKY4QPWU.cjs.map +1 -0
- package/dist/chunk-DTBJO6VT.cjs +2 -0
- package/dist/chunk-DTBJO6VT.cjs.map +1 -0
- package/dist/chunk-E32UP4GV.cjs +2 -0
- package/dist/chunk-E32UP4GV.cjs.map +1 -0
- package/dist/chunk-ESAVA5OD.mjs +2 -0
- package/dist/{chunk-ALPEMPZI.mjs.map → chunk-ESAVA5OD.mjs.map} +1 -1
- package/dist/chunk-G4CNETLS.mjs +2 -0
- package/dist/{chunk-CYBZH6U3.mjs.map → chunk-G4CNETLS.mjs.map} +1 -1
- package/dist/chunk-I7M43BB4.cjs +2 -0
- package/dist/chunk-I7M43BB4.cjs.map +1 -0
- package/dist/chunk-KT6L4K4K.cjs +2 -0
- package/dist/chunk-KT6L4K4K.cjs.map +1 -0
- package/dist/chunk-MK5NS5B5.mjs +2 -0
- package/dist/{chunk-7TFV6UKF.mjs.map → chunk-MK5NS5B5.mjs.map} +1 -1
- package/dist/chunk-NAXAZJJY.mjs +2 -0
- package/dist/{chunk-ZCEFC2TK.mjs.map → chunk-NAXAZJJY.mjs.map} +1 -1
- package/dist/chunk-NLVWRMGD.mjs +2 -0
- package/dist/{chunk-GWSTVITN.mjs.map → chunk-NLVWRMGD.mjs.map} +1 -1
- package/dist/chunk-OGBD5YOG.mjs +2 -0
- package/dist/{chunk-JA4DHMTG.mjs.map → chunk-OGBD5YOG.mjs.map} +1 -1
- package/dist/chunk-OGJMSGB2.mjs +2 -0
- package/dist/{chunk-KL6YZ5VR.mjs.map → chunk-OGJMSGB2.mjs.map} +1 -1
- package/dist/chunk-OIYXOKTT.cjs +2 -0
- package/dist/chunk-OIYXOKTT.cjs.map +1 -0
- package/dist/chunk-OUD27MU7.cjs +2 -0
- package/dist/chunk-OUD27MU7.cjs.map +1 -0
- package/dist/chunk-QFLDL4UV.cjs +2 -0
- package/dist/chunk-QFLDL4UV.cjs.map +1 -0
- package/dist/chunk-RSDCKN4Q.mjs +2 -0
- package/dist/chunk-RSDCKN4Q.mjs.map +1 -0
- package/dist/chunk-RWOICHRW.cjs +2 -0
- package/dist/chunk-RWOICHRW.cjs.map +1 -0
- package/dist/chunk-S5VOCVBR.mjs +2 -0
- package/dist/{chunk-MKS6W5NI.mjs.map → chunk-S5VOCVBR.mjs.map} +1 -1
- package/dist/chunk-SSPFPAWX.mjs +2 -0
- package/dist/{chunk-WAFQFAI7.mjs.map → chunk-SSPFPAWX.mjs.map} +1 -1
- package/dist/chunk-T5FSQ3YE.mjs +2 -0
- package/dist/{chunk-WEULAXBE.mjs.map → chunk-T5FSQ3YE.mjs.map} +1 -1
- package/dist/chunk-WD4B3SXS.cjs +4 -0
- package/dist/chunk-WD4B3SXS.cjs.map +1 -0
- package/dist/chunk-WRFDB3QJ.cjs +2 -0
- package/dist/chunk-WRFDB3QJ.cjs.map +1 -0
- package/dist/chunk-XNJLSA6P.cjs +2 -0
- package/dist/chunk-XNJLSA6P.cjs.map +1 -0
- package/dist/chunk-ZYXVUXFQ.cjs +2 -0
- package/dist/chunk-ZYXVUXFQ.cjs.map +1 -0
- package/dist/contexts/exports.cjs +1 -82
- package/dist/contexts/exports.cjs.map +1 -1
- package/dist/contexts/exports.mjs +1 -82
- package/dist/contexts/exports.mjs.map +1 -1
- package/dist/enum/exports.cjs +1 -58
- package/dist/enum/exports.cjs.map +1 -1
- package/dist/enum/exports.mjs +1 -58
- package/dist/enum/exports.mjs.map +1 -1
- package/dist/errors/exports.cjs +1 -38
- package/dist/errors/exports.cjs.map +1 -1
- package/dist/errors/exports.mjs +1 -38
- package/dist/hooks/exports.cjs +3 -8327
- package/dist/hooks/exports.cjs.map +1 -1
- package/dist/hooks/exports.mjs +3 -8327
- package/dist/hooks/exports.mjs.map +1 -1
- package/dist/utils/exports.cjs +1 -786
- package/dist/utils/exports.cjs.map +1 -1
- package/dist/utils/exports.mjs +1 -786
- package/dist/utils/exports.mjs.map +1 -1
- package/package.json +4 -4
- package/src/actions/dex/aggregators/base.ts +1 -3
- package/src/actions/governance/getDecodedFunctionData.ts +4 -8
- package/src/actions/tokens/getUnderlyingToken.ts +1 -3
- package/src/errors/BeraError.ts +7 -2
- package/src/hooks/dex/usePoolHistoricalData.ts +1 -1
- package/src/hooks/enso/useBendZapSupply.ts +1 -1
- package/src/hooks/perps/usePythUpdateFee.ts +1 -1
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
- package/dist/chunk-24HMIYTN.cjs +0 -36
- package/dist/chunk-24HMIYTN.cjs.map +0 -1
- package/dist/chunk-2LL77B3T.cjs +0 -135
- package/dist/chunk-2LL77B3T.cjs.map +0 -1
- package/dist/chunk-3LXVARBJ.cjs +0 -417
- package/dist/chunk-3LXVARBJ.cjs.map +0 -1
- package/dist/chunk-4HDIUUSV.cjs +0 -130
- package/dist/chunk-4HDIUUSV.cjs.map +0 -1
- package/dist/chunk-7ONKBHXY.cjs +0 -169
- package/dist/chunk-7ONKBHXY.cjs.map +0 -1
- package/dist/chunk-7TFV6UKF.mjs +0 -24
- package/dist/chunk-A4FPM7U3.cjs +0 -63
- package/dist/chunk-A4FPM7U3.cjs.map +0 -1
- package/dist/chunk-A7P3JVU7.cjs +0 -4694
- package/dist/chunk-A7P3JVU7.cjs.map +0 -1
- package/dist/chunk-ALPEMPZI.mjs +0 -417
- package/dist/chunk-BEHP54S3.cjs +0 -24
- package/dist/chunk-BEHP54S3.cjs.map +0 -1
- package/dist/chunk-CYBZH6U3.mjs +0 -135
- package/dist/chunk-EWBKSMPG.cjs +0 -13
- package/dist/chunk-EWBKSMPG.cjs.map +0 -1
- package/dist/chunk-GLWPRM33.mjs +0 -13
- package/dist/chunk-GWSTVITN.mjs +0 -572
- package/dist/chunk-H3Z37RYU.cjs +0 -15
- package/dist/chunk-H3Z37RYU.cjs.map +0 -1
- package/dist/chunk-HCC4FJTD.cjs +0 -97
- package/dist/chunk-HCC4FJTD.cjs.map +0 -1
- package/dist/chunk-J6EHBYSV.mjs +0 -97
- package/dist/chunk-JA4DHMTG.mjs +0 -15
- package/dist/chunk-KL6YZ5VR.mjs +0 -63
- package/dist/chunk-MILSHCKW.cjs +0 -168
- package/dist/chunk-MILSHCKW.cjs.map +0 -1
- package/dist/chunk-MKS6W5NI.mjs +0 -403
- package/dist/chunk-MXWPP6MS.cjs +0 -572
- package/dist/chunk-MXWPP6MS.cjs.map +0 -1
- package/dist/chunk-OWUI3VPI.mjs +0 -169
- package/dist/chunk-PBCE7JTE.mjs +0 -36
- package/dist/chunk-QISQSMCV.cjs +0 -1843
- package/dist/chunk-QISQSMCV.cjs.map +0 -1
- package/dist/chunk-SYWYIMY7.mjs +0 -4694
- package/dist/chunk-SYWYIMY7.mjs.map +0 -1
- package/dist/chunk-TDW5SPXR.cjs +0 -244
- package/dist/chunk-TDW5SPXR.cjs.map +0 -1
- package/dist/chunk-TGHG6Q3C.cjs +0 -403
- package/dist/chunk-TGHG6Q3C.cjs.map +0 -1
- package/dist/chunk-WAFQFAI7.mjs +0 -130
- package/dist/chunk-WEULAXBE.mjs +0 -168
- package/dist/chunk-ZCEFC2TK.mjs +0 -244
- package/dist/chunk-ZV7DCQQY.mjs +0 -1843
- package/dist/chunk-ZV7DCQQY.mjs.map +0 -1
package/dist/actions/exports.mjs
CHANGED
|
@@ -1,919 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BalancerApi,
|
|
3
|
-
BaseAggregator,
|
|
4
|
-
BeraApolloClient,
|
|
5
|
-
HoneyPreviewMethod,
|
|
6
|
-
MOCKED_PROPOSAL_STATUSES,
|
|
7
|
-
RewardVaultDistributionMode,
|
|
8
|
-
beraWriteContract,
|
|
9
|
-
checkProposalField,
|
|
10
|
-
computeActualStatus,
|
|
11
|
-
formatValidatorRewardAllocation,
|
|
12
|
-
getAllPools,
|
|
13
|
-
getAllProposals,
|
|
14
|
-
getAllValidators,
|
|
15
|
-
getAllowances,
|
|
16
|
-
getApiEnrichedAllocation,
|
|
17
|
-
getApiPool,
|
|
18
|
-
getApiValidator,
|
|
19
|
-
getApolloClient,
|
|
20
|
-
getBgtAprSimulation,
|
|
21
|
-
getBlockTimestamp,
|
|
22
|
-
getBodyErrors,
|
|
23
|
-
getChartData,
|
|
24
|
-
getCollateralWeights,
|
|
25
|
-
getConvertToAssets,
|
|
26
|
-
getDailyValidatorBlockStats,
|
|
27
|
-
getDefaultRewardAllocation,
|
|
28
|
-
getEarnedStakedBeraVault,
|
|
29
|
-
getGlobalCapLimit,
|
|
30
|
-
getGlobalData,
|
|
31
|
-
getGlobalLiquidityAndSwapVolume,
|
|
32
|
-
getHoneyCollaterals,
|
|
33
|
-
getHoneyGlobalData,
|
|
34
|
-
getHoneyPreview,
|
|
35
|
-
getHoneyVaultsBalance,
|
|
36
|
-
getIncentiveFeeClaimStats,
|
|
37
|
-
getMarkets,
|
|
38
|
-
getOnChainPool,
|
|
39
|
-
getPoolEvents,
|
|
40
|
-
getPoolHistoricalData,
|
|
41
|
-
getPoolPausedState,
|
|
42
|
-
getProposalDetails,
|
|
43
|
-
getProposalFromTx,
|
|
44
|
-
getProposalVotes,
|
|
45
|
-
getPythLatestPrices,
|
|
46
|
-
getPythUpdateFee,
|
|
47
|
-
getRelativeCapLimit,
|
|
48
|
-
getRewardProofsByValidator,
|
|
49
|
-
getRewardTokenToBeraRate,
|
|
50
|
-
getRewardVault,
|
|
51
|
-
getRewardVaultIncentives,
|
|
52
|
-
getRewardVaultRewards,
|
|
53
|
-
getRewardVaultStakingToken,
|
|
54
|
-
getRewardVaults,
|
|
55
|
-
getSWBeraVaultMetadata,
|
|
56
|
-
getSWBeraWithdrawal,
|
|
57
|
-
getStakeWithdrawalCooldown,
|
|
58
|
-
getStakedBeraAPR,
|
|
59
|
-
getStakedBeraSnapshots,
|
|
60
|
-
getStakingPoolBatch,
|
|
61
|
-
getSwapPayload,
|
|
62
|
-
getTokenCurrentPrices,
|
|
63
|
-
getTokenInformation,
|
|
64
|
-
getTotalStakedAmount,
|
|
65
|
-
getUserActiveValidators,
|
|
66
|
-
getUserBoostsOnValidator,
|
|
67
|
-
getUserClaimableIncentives,
|
|
68
|
-
getUserStakingPositions,
|
|
69
|
-
getUserVaultInfo,
|
|
70
|
-
getUserVaults,
|
|
71
|
-
getUserVaultsReward,
|
|
72
|
-
getValidatorAnalytics,
|
|
73
|
-
getValidatorCommission,
|
|
74
|
-
getValidatorEstimatedBgtPerYear,
|
|
75
|
-
getValidatorOperatorAddress,
|
|
76
|
-
getValidatorQueuedCommission,
|
|
77
|
-
getValidatorQueuedOperatorAddress,
|
|
78
|
-
getValidatorQueuedRewardAllocation,
|
|
79
|
-
getValidatorRewardAllocation,
|
|
80
|
-
getVaultHistory,
|
|
81
|
-
getVaultValidators,
|
|
82
|
-
gql,
|
|
83
|
-
isBadCollateralAsset,
|
|
84
|
-
isBasketModeEnabled,
|
|
85
|
-
isDefaultRewardAllocation,
|
|
86
|
-
isImpersonateAccount,
|
|
87
|
-
isSameRewardAllocation,
|
|
88
|
-
parseProposalBody
|
|
89
|
-
} from "../chunk-SYWYIMY7.mjs";
|
|
90
|
-
import "../chunk-GWSTVITN.mjs";
|
|
91
|
-
import {
|
|
92
|
-
getBalanceCall,
|
|
93
|
-
getEnsoClient,
|
|
94
|
-
getWalletBalances
|
|
95
|
-
} from "../chunk-CYBZH6U3.mjs";
|
|
96
|
-
import "../chunk-ZCEFC2TK.mjs";
|
|
97
|
-
import "../chunk-KL6YZ5VR.mjs";
|
|
98
|
-
import "../chunk-WAFQFAI7.mjs";
|
|
99
|
-
import {
|
|
100
|
-
assertAddress,
|
|
101
|
-
assertDefined,
|
|
102
|
-
assertPublicClient
|
|
103
|
-
} from "../chunk-OWUI3VPI.mjs";
|
|
104
|
-
import {
|
|
105
|
-
beraFetchJson,
|
|
106
|
-
bignumber_js_default,
|
|
107
|
-
hoursInSeconds,
|
|
108
|
-
msToSeconds
|
|
109
|
-
} from "../chunk-ALPEMPZI.mjs";
|
|
110
|
-
import {
|
|
111
|
-
isToken,
|
|
112
|
-
parseBaseArgs
|
|
113
|
-
} from "../chunk-J6EHBYSV.mjs";
|
|
114
|
-
import "../chunk-ZV7DCQQY.mjs";
|
|
115
|
-
|
|
116
|
-
// src/actions/bend/getMaxDeposit.ts
|
|
117
|
-
import { formatEther } from "viem";
|
|
118
|
-
import { metaMorphoV11Abi as metaMorphoAbi } from "@berachain/abis/bend-metamorpho/metaMorphoV11";
|
|
119
|
-
async function getMaxDeposit({
|
|
120
|
-
vaultAddress,
|
|
121
|
-
publicClient
|
|
122
|
-
}) {
|
|
123
|
-
const maxDeposit = await publicClient.readContract({
|
|
124
|
-
address: vaultAddress,
|
|
125
|
-
abi: metaMorphoAbi,
|
|
126
|
-
functionName: "maxDeposit",
|
|
127
|
-
args: [vaultAddress]
|
|
128
|
-
});
|
|
129
|
-
return formatEther(maxDeposit);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// src/actions/dex/getPoolWithState.ts
|
|
133
|
-
import {
|
|
134
|
-
mapPoolType
|
|
135
|
-
} from "@berachain-foundation/berancer-sdk";
|
|
136
|
-
var getPoolState = (apiPool) => {
|
|
137
|
-
return {
|
|
138
|
-
type: mapPoolType(apiPool.type),
|
|
139
|
-
protocolVersion: apiPool.protocolVersion,
|
|
140
|
-
tokens: apiPool.tokens.map(
|
|
141
|
-
(pt) => ({
|
|
142
|
-
...pt,
|
|
143
|
-
address: pt.address
|
|
144
|
-
})
|
|
145
|
-
),
|
|
146
|
-
id: apiPool.id,
|
|
147
|
-
address: apiPool.address
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// src/actions/dex/getVaultPausedState.ts
|
|
152
|
-
import { vaultAbi as balancerVaultAbi } from "@berachain/abis/bex/vault";
|
|
153
|
-
async function getVaultPausedState({
|
|
154
|
-
publicClient,
|
|
155
|
-
...args
|
|
156
|
-
}) {
|
|
157
|
-
const { config } = parseBaseArgs(args);
|
|
158
|
-
const vaultPausedState = await publicClient.readContract({
|
|
159
|
-
address: config.bex.vault,
|
|
160
|
-
abi: balancerVaultAbi,
|
|
161
|
-
functionName: "getPausedState"
|
|
162
|
-
});
|
|
163
|
-
return vaultPausedState[0];
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// src/actions/governance/getDecodedFunctionData.ts
|
|
167
|
-
import {
|
|
168
|
-
decodeFunctionData,
|
|
169
|
-
erc20Abi,
|
|
170
|
-
pad,
|
|
171
|
-
toFunctionSignature,
|
|
172
|
-
trim
|
|
173
|
-
} from "viem";
|
|
174
|
-
import { appConfig, defaultChainId } from "@berachain/config/internal";
|
|
175
|
-
import { beraChefAbi } from "@berachain/abis/pol/rewards/beraChef";
|
|
176
|
-
import { rewardVaultAbi } from "@berachain/abis/pol/rewards/rewardVault";
|
|
177
|
-
function isProxyABI(abi) {
|
|
178
|
-
return abi.some(
|
|
179
|
-
(item) => item.name === "implementation" || item.name === "proxyType" || item.type === "constructor" && item.inputs?.[0]?.name === "implementation"
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
async function _getAbi({
|
|
183
|
-
contractAddress,
|
|
184
|
-
chainId,
|
|
185
|
-
publicClient
|
|
186
|
-
}) {
|
|
187
|
-
const url = `https://api.etherscan.io/v2/api?module=contract&action=getabi&address=${contractAddress}&apikey=${appConfig.apiKeys.private.etherscan}&chainId=${chainId}`;
|
|
188
|
-
const response = await fetch(url);
|
|
189
|
-
if (!response.ok) {
|
|
190
|
-
throw new Error(`Failed to fetch ABI: ${response.statusText}`);
|
|
191
|
-
}
|
|
192
|
-
const data = await response.json();
|
|
193
|
-
if (data.status === "0") throw new Error(data.result);
|
|
194
|
-
const abi = JSON.parse(data.result);
|
|
195
|
-
if (!isProxyABI(abi)) return abi;
|
|
196
|
-
const implementationResult = await publicClient.getStorageAt({
|
|
197
|
-
address: contractAddress,
|
|
198
|
-
// bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)).
|
|
199
|
-
slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
|
|
200
|
-
});
|
|
201
|
-
if (!implementationResult || trim(implementationResult) === "0x00")
|
|
202
|
-
return abi;
|
|
203
|
-
const implementationAddress = pad(trim(implementationResult), { size: 20 });
|
|
204
|
-
return _getAbi({
|
|
205
|
-
contractAddress: implementationAddress,
|
|
206
|
-
chainId,
|
|
207
|
-
publicClient
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
async function _getAbiForCallData({
|
|
211
|
-
address,
|
|
212
|
-
callData,
|
|
213
|
-
knownAbi,
|
|
214
|
-
chainId,
|
|
215
|
-
publicClient
|
|
216
|
-
}) {
|
|
217
|
-
try {
|
|
218
|
-
if (decodeFunctionData({ data: callData, abi: knownAbi })) {
|
|
219
|
-
return knownAbi;
|
|
220
|
-
}
|
|
221
|
-
} catch {
|
|
222
|
-
}
|
|
223
|
-
try {
|
|
224
|
-
const abi = await _getAbi({
|
|
225
|
-
contractAddress: address,
|
|
226
|
-
chainId,
|
|
227
|
-
publicClient
|
|
228
|
-
});
|
|
229
|
-
return abi;
|
|
230
|
-
} catch {
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
function _decodeCallData(callData, abi) {
|
|
234
|
-
try {
|
|
235
|
-
return decodeFunctionData({ data: callData, abi });
|
|
236
|
-
} catch {
|
|
237
|
-
return void 0;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
function _findAbiItem(abi, functionName) {
|
|
241
|
-
return abi.find(
|
|
242
|
-
(a) => a.type === "function" && a.name === functionName
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
function _getFunctionSignature(abiItem) {
|
|
246
|
-
if (!abiItem) return;
|
|
247
|
-
try {
|
|
248
|
-
return toFunctionSignature(abiItem);
|
|
249
|
-
} catch (error) {
|
|
250
|
-
console.error(error);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
async function getDecodedFunctionData({
|
|
254
|
-
address,
|
|
255
|
-
callData,
|
|
256
|
-
chainId = defaultChainId,
|
|
257
|
-
publicClient
|
|
258
|
-
}) {
|
|
259
|
-
const knownAbi = [...beraChefAbi, ...rewardVaultAbi, ...erc20Abi];
|
|
260
|
-
const abi = await _getAbiForCallData({
|
|
261
|
-
address,
|
|
262
|
-
callData,
|
|
263
|
-
knownAbi,
|
|
264
|
-
chainId,
|
|
265
|
-
publicClient
|
|
266
|
-
});
|
|
267
|
-
const decodedData = _decodeCallData(callData, abi);
|
|
268
|
-
if (!abi || !decodedData) {
|
|
269
|
-
return { args: [] };
|
|
270
|
-
}
|
|
271
|
-
const abiItem = _findAbiItem(abi, decodedData.functionName);
|
|
272
|
-
const functionSignature = _getFunctionSignature(abiItem);
|
|
273
|
-
return {
|
|
274
|
-
abiItem,
|
|
275
|
-
functionSignature,
|
|
276
|
-
functionName: decodedData.functionName,
|
|
277
|
-
args: decodedData.args
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// src/actions/honey/getHoneyFees.ts
|
|
282
|
-
import { formatUnits } from "viem";
|
|
283
|
-
import { honeyFactoryAbi } from "@berachain/abis/honey/honeyFactory";
|
|
284
|
-
async function getHoneyFees({
|
|
285
|
-
client,
|
|
286
|
-
collateralList,
|
|
287
|
-
...args
|
|
288
|
-
}) {
|
|
289
|
-
const { config } = parseBaseArgs(args);
|
|
290
|
-
try {
|
|
291
|
-
const promiseList = {
|
|
292
|
-
mint: [],
|
|
293
|
-
redeem: []
|
|
294
|
-
};
|
|
295
|
-
for (const coll of collateralList) {
|
|
296
|
-
promiseList.mint.push(
|
|
297
|
-
client.readContract({
|
|
298
|
-
address: config.honey.factory,
|
|
299
|
-
abi: honeyFactoryAbi,
|
|
300
|
-
functionName: "mintRates",
|
|
301
|
-
args: [coll.address]
|
|
302
|
-
})
|
|
303
|
-
);
|
|
304
|
-
promiseList.redeem.push(
|
|
305
|
-
client.readContract({
|
|
306
|
-
address: config.honey.factory,
|
|
307
|
-
abi: honeyFactoryAbi,
|
|
308
|
-
functionName: "redeemRates",
|
|
309
|
-
args: [coll.address]
|
|
310
|
-
})
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
const [mintRates, redeemRates, collateralWeights] = await Promise.all([
|
|
314
|
-
Promise.all(promiseList.mint),
|
|
315
|
-
Promise.all(promiseList.redeem),
|
|
316
|
-
// fetch the collateral weights, needed to calculate the weighted basket rates
|
|
317
|
-
client.readContract({
|
|
318
|
-
address: config.honey.factory,
|
|
319
|
-
abi: honeyFactoryAbi,
|
|
320
|
-
functionName: "getWeights"
|
|
321
|
-
})
|
|
322
|
-
]);
|
|
323
|
-
return collateralList.reduce(
|
|
324
|
-
(acc, coll) => {
|
|
325
|
-
const collIdx = collateralList.indexOf(coll);
|
|
326
|
-
acc.single[coll.address] = {
|
|
327
|
-
mintFee: 1 - +formatUnits(mintRates[collIdx], 18),
|
|
328
|
-
redeemFee: 1 - +formatUnits(redeemRates[collIdx], 18)
|
|
329
|
-
};
|
|
330
|
-
acc.basket.mintFee += acc.single[coll.address].mintFee * +formatUnits(collateralWeights[collIdx], 18);
|
|
331
|
-
acc.basket.redeemFee += acc.single[coll.address].redeemFee * +formatUnits(collateralWeights[collIdx], 18);
|
|
332
|
-
return acc;
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
single: {},
|
|
336
|
-
basket: { mintFee: 0, redeemFee: 0 }
|
|
337
|
-
}
|
|
338
|
-
);
|
|
339
|
-
} catch (e) {
|
|
340
|
-
console.log(e);
|
|
341
|
-
throw e;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// src/actions/honey/getHoneyPausedState.ts
|
|
346
|
-
import { honeyAbi } from "@berachain/abis/honey/honey";
|
|
347
|
-
async function getHoneyPausedState({
|
|
348
|
-
client,
|
|
349
|
-
...args
|
|
350
|
-
}) {
|
|
351
|
-
const { config } = parseBaseArgs(args);
|
|
352
|
-
const honeyAddress = config.honey.token;
|
|
353
|
-
const honeyPausedState = await client.readContract({
|
|
354
|
-
address: honeyAddress,
|
|
355
|
-
abi: honeyAbi,
|
|
356
|
-
functionName: "paused"
|
|
357
|
-
});
|
|
358
|
-
return honeyPausedState;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// src/actions/honey/getHoneyPythPriceOracle.ts
|
|
362
|
-
import { rootPriceOracleAbi as honeyRootOracleAbi } from "@berachain/abis/extras/rootPriceOracle";
|
|
363
|
-
async function getHoneyPythOracle({
|
|
364
|
-
pythOracle,
|
|
365
|
-
publicClient
|
|
366
|
-
}) {
|
|
367
|
-
return publicClient.readContract({
|
|
368
|
-
address: pythOracle,
|
|
369
|
-
abi: honeyRootOracleAbi,
|
|
370
|
-
functionName: "pythOracle"
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// src/actions/honey/getHoneyRootPriceOracle.ts
|
|
375
|
-
import { honeyFactoryAbi as honeyFactoryAbi2 } from "@berachain/abis/honey/honeyFactory";
|
|
376
|
-
async function getHoneyRootPriceOracle({
|
|
377
|
-
publicClient,
|
|
378
|
-
factory,
|
|
379
|
-
...args
|
|
380
|
-
}) {
|
|
381
|
-
const { config } = parseBaseArgs(args);
|
|
382
|
-
return publicClient.readContract({
|
|
383
|
-
address: factory ?? config.honey.factory,
|
|
384
|
-
abi: honeyFactoryAbi2,
|
|
385
|
-
functionName: "priceOracle"
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// src/actions/pol/getBlockTime.ts
|
|
390
|
-
async function getBlockTime({
|
|
391
|
-
defaultBlockTime,
|
|
392
|
-
publicClient,
|
|
393
|
-
blocksSpan,
|
|
394
|
-
...args
|
|
395
|
-
}) {
|
|
396
|
-
assertPublicClient(publicClient);
|
|
397
|
-
const { config } = parseBaseArgs(args);
|
|
398
|
-
const blockTime = defaultBlockTime ?? config.averageBlockTime;
|
|
399
|
-
const span = blocksSpan ?? Math.floor(hoursInSeconds(1) / blockTime);
|
|
400
|
-
const currentBlock = await publicClient?.getBlock({ blockTag: "latest" });
|
|
401
|
-
const oldestBlock = await publicClient?.getBlock({
|
|
402
|
-
blockNumber: currentBlock.number - BigInt(span)
|
|
403
|
-
});
|
|
404
|
-
return (
|
|
405
|
-
// we need to use current timestamp as the latest block might not have been minted (chain halted)
|
|
406
|
-
(msToSeconds(Date.now()) - Number(oldestBlock?.timestamp)) / (Number(currentBlock?.number) - Number(oldestBlock?.number))
|
|
407
|
-
);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// src/actions/pol/getLSTStakeConfig.ts
|
|
411
|
-
import { lstStakerVaultAbi } from "@berachain/abis/pol/lst/lstStakerVault";
|
|
412
|
-
async function getLSTStakeConfig({
|
|
413
|
-
tokenList,
|
|
414
|
-
publicClient,
|
|
415
|
-
lstStakingVaults,
|
|
416
|
-
...args
|
|
417
|
-
}) {
|
|
418
|
-
assertPublicClient(publicClient);
|
|
419
|
-
const { config } = parseBaseArgs({
|
|
420
|
-
...args,
|
|
421
|
-
chainId: publicClient.chain?.id ?? args.chainId
|
|
422
|
-
});
|
|
423
|
-
const lstStakingTokens = tokenList.filter(
|
|
424
|
-
(token) => lstStakingVaults.includes(token.address)
|
|
425
|
-
);
|
|
426
|
-
if (lstStakingTokens.length === 0) {
|
|
427
|
-
return [];
|
|
428
|
-
}
|
|
429
|
-
const assets = await Promise.all(
|
|
430
|
-
lstStakingTokens.map(async (stakingToken) => {
|
|
431
|
-
const assetTokenAddress = await publicClient.readContract({
|
|
432
|
-
address: stakingToken.address,
|
|
433
|
-
abi: lstStakerVaultAbi,
|
|
434
|
-
functionName: "asset"
|
|
435
|
-
});
|
|
436
|
-
return { assetTokenAddress, stakingToken };
|
|
437
|
-
})
|
|
438
|
-
);
|
|
439
|
-
return assets.reduce(
|
|
440
|
-
(acc, { assetTokenAddress, stakingToken }) => {
|
|
441
|
-
const assetToken = tokenList.find(
|
|
442
|
-
(token) => isToken(token, assetTokenAddress)
|
|
443
|
-
);
|
|
444
|
-
if (!assetToken) return acc;
|
|
445
|
-
acc.push({
|
|
446
|
-
id: stakingToken.address,
|
|
447
|
-
receiptToken: stakingToken,
|
|
448
|
-
inputTokens: [assetToken]
|
|
449
|
-
});
|
|
450
|
-
return acc;
|
|
451
|
-
},
|
|
452
|
-
[]
|
|
453
|
-
);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
// src/actions/pol/getRewardVaultDurationConstants.ts
|
|
457
|
-
import { rewardVaultAbi as rewardVaultAbi2 } from "@berachain/abis/pol/rewards/rewardVault";
|
|
458
|
-
|
|
459
|
-
// src/actions/pol/getRewardVaultBeaconImplementation.ts
|
|
460
|
-
import { rewardVaultFactoryAbi } from "@berachain/abis/pol/rewards/rewardVaultFactory";
|
|
461
|
-
|
|
462
|
-
// src/abi/utils/upgradableBeacon.ts
|
|
463
|
-
var upgradableBeaconAbi = [
|
|
464
|
-
{
|
|
465
|
-
inputs: [
|
|
466
|
-
{ internalType: "address", name: "initialOwner", type: "address" },
|
|
467
|
-
{
|
|
468
|
-
internalType: "address",
|
|
469
|
-
name: "initialImplementation",
|
|
470
|
-
type: "address"
|
|
471
|
-
}
|
|
472
|
-
],
|
|
473
|
-
stateMutability: "payable",
|
|
474
|
-
type: "constructor"
|
|
475
|
-
},
|
|
476
|
-
{ inputs: [], name: "NewImplementationHasNoCode", type: "error" },
|
|
477
|
-
{ inputs: [], name: "NewOwnerIsZeroAddress", type: "error" },
|
|
478
|
-
{ inputs: [], name: "Unauthorized", type: "error" },
|
|
479
|
-
{
|
|
480
|
-
anonymous: false,
|
|
481
|
-
inputs: [
|
|
482
|
-
{
|
|
483
|
-
indexed: true,
|
|
484
|
-
internalType: "address",
|
|
485
|
-
name: "oldOwner",
|
|
486
|
-
type: "address"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
indexed: true,
|
|
490
|
-
internalType: "address",
|
|
491
|
-
name: "newOwner",
|
|
492
|
-
type: "address"
|
|
493
|
-
}
|
|
494
|
-
],
|
|
495
|
-
name: "OwnershipTransferred",
|
|
496
|
-
type: "event"
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
anonymous: false,
|
|
500
|
-
inputs: [
|
|
501
|
-
{
|
|
502
|
-
indexed: true,
|
|
503
|
-
internalType: "address",
|
|
504
|
-
name: "implementation",
|
|
505
|
-
type: "address"
|
|
506
|
-
}
|
|
507
|
-
],
|
|
508
|
-
name: "Upgraded",
|
|
509
|
-
type: "event"
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
inputs: [],
|
|
513
|
-
name: "implementation",
|
|
514
|
-
outputs: [{ internalType: "address", name: "result", type: "address" }],
|
|
515
|
-
stateMutability: "view",
|
|
516
|
-
type: "function"
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
inputs: [],
|
|
520
|
-
name: "owner",
|
|
521
|
-
outputs: [{ internalType: "address", name: "result", type: "address" }],
|
|
522
|
-
stateMutability: "view",
|
|
523
|
-
type: "function"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
inputs: [],
|
|
527
|
-
name: "renounceOwnership",
|
|
528
|
-
outputs: [],
|
|
529
|
-
stateMutability: "nonpayable",
|
|
530
|
-
type: "function"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
|
534
|
-
name: "transferOwnership",
|
|
535
|
-
outputs: [],
|
|
536
|
-
stateMutability: "nonpayable",
|
|
537
|
-
type: "function"
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
inputs: [
|
|
541
|
-
{ internalType: "address", name: "newImplementation", type: "address" }
|
|
542
|
-
],
|
|
543
|
-
name: "upgradeTo",
|
|
544
|
-
outputs: [],
|
|
545
|
-
stateMutability: "nonpayable",
|
|
546
|
-
type: "function"
|
|
547
|
-
}
|
|
548
|
-
];
|
|
549
|
-
|
|
550
|
-
// src/actions/pol/getRewardVaultBeaconImplementation.ts
|
|
551
|
-
async function getRewardVaultBeaconImplementation({
|
|
552
|
-
publicClient,
|
|
553
|
-
...args
|
|
554
|
-
}) {
|
|
555
|
-
const { config } = parseBaseArgs(args);
|
|
556
|
-
const factoryAddress = config.pol.factory;
|
|
557
|
-
assertDefined(publicClient, "publicClient");
|
|
558
|
-
assertAddress(config.pol.factory, "factoryAddress");
|
|
559
|
-
const beacon = await publicClient.readContract({
|
|
560
|
-
address: factoryAddress,
|
|
561
|
-
abi: rewardVaultFactoryAbi,
|
|
562
|
-
functionName: "beacon"
|
|
563
|
-
});
|
|
564
|
-
return publicClient.readContract({
|
|
565
|
-
address: beacon,
|
|
566
|
-
abi: upgradableBeaconAbi,
|
|
567
|
-
functionName: "implementation"
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
// src/actions/pol/getRewardVaultDurationConstants.ts
|
|
572
|
-
async function getRewardVaultDurationConstants({
|
|
573
|
-
publicClient,
|
|
574
|
-
...baseArgs
|
|
575
|
-
}) {
|
|
576
|
-
assertPublicClient(publicClient);
|
|
577
|
-
const beaconImplementation = await getRewardVaultBeaconImplementation({
|
|
578
|
-
publicClient,
|
|
579
|
-
...baseArgs
|
|
580
|
-
});
|
|
581
|
-
const [minRewardDuration, maxRewardDuration] = await Promise.all([
|
|
582
|
-
publicClient.readContract({
|
|
583
|
-
address: beaconImplementation,
|
|
584
|
-
abi: rewardVaultAbi2,
|
|
585
|
-
functionName: "MIN_REWARD_DURATION"
|
|
586
|
-
}),
|
|
587
|
-
publicClient.readContract({
|
|
588
|
-
address: beaconImplementation,
|
|
589
|
-
abi: rewardVaultAbi2,
|
|
590
|
-
functionName: "MAX_REWARD_DURATION"
|
|
591
|
-
})
|
|
592
|
-
]);
|
|
593
|
-
return {
|
|
594
|
-
minRewardDuration: Number(minRewardDuration),
|
|
595
|
-
maxRewardDuration: Number(maxRewardDuration)
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
// src/actions/pol/getRewardVaultFromToken.ts
|
|
600
|
-
import { zeroAddress } from "viem";
|
|
601
|
-
import { rewardVaultFactoryAbi as rewardVaultFactoryAbi2 } from "@berachain/abis/pol/rewards/rewardVaultFactory";
|
|
602
|
-
async function getRewardVaultFromToken({
|
|
603
|
-
tokenAddress,
|
|
604
|
-
publicClient,
|
|
605
|
-
factoryAddress,
|
|
606
|
-
...args
|
|
607
|
-
}) {
|
|
608
|
-
const { config } = parseBaseArgs(args);
|
|
609
|
-
const vaultAddress = await publicClient.readContract({
|
|
610
|
-
address: factoryAddress ?? config.pol.factory,
|
|
611
|
-
abi: rewardVaultFactoryAbi2,
|
|
612
|
-
functionName: "getVault",
|
|
613
|
-
args: [tokenAddress]
|
|
614
|
-
});
|
|
615
|
-
if (vaultAddress === zeroAddress) {
|
|
616
|
-
return null;
|
|
617
|
-
}
|
|
618
|
-
return vaultAddress;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// src/actions/pyth/getHoneyPythFeeds.ts
|
|
622
|
-
import { pythPriceOracleAbi } from "@berachain/abis/extras/pythPriceOracle";
|
|
623
|
-
async function getHoneyPythFeeds({
|
|
624
|
-
tokenList,
|
|
625
|
-
publicClient,
|
|
626
|
-
...args
|
|
627
|
-
}) {
|
|
628
|
-
const { config } = parseBaseArgs(args);
|
|
629
|
-
try {
|
|
630
|
-
const priceFeedIds = await Promise.all(
|
|
631
|
-
tokenList.map(
|
|
632
|
-
(token) => publicClient.readContract({
|
|
633
|
-
address: config.honey.pythOracle,
|
|
634
|
-
abi: pythPriceOracleAbi,
|
|
635
|
-
functionName: "feeds",
|
|
636
|
-
args: [token]
|
|
637
|
-
})
|
|
638
|
-
)
|
|
639
|
-
);
|
|
640
|
-
return tokenList.reduce(
|
|
641
|
-
(acc, token, index) => ({
|
|
642
|
-
...acc,
|
|
643
|
-
[token]: priceFeedIds[index]
|
|
644
|
-
}),
|
|
645
|
-
{}
|
|
646
|
-
);
|
|
647
|
-
} catch (e) {
|
|
648
|
-
console.error("getPythPriceFeedId", e);
|
|
649
|
-
throw e;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// src/actions/tokens/getTokens.ts
|
|
654
|
-
async function getTokens({
|
|
655
|
-
url,
|
|
656
|
-
...args
|
|
657
|
-
} = {}) {
|
|
658
|
-
const { config } = parseBaseArgs(args);
|
|
659
|
-
const tokenList = await beraFetchJson({
|
|
660
|
-
url: url ?? config.lists.tokenList,
|
|
661
|
-
type: "rest",
|
|
662
|
-
name: "GitHub"
|
|
663
|
-
});
|
|
664
|
-
return tokenList.tokens ?? [];
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
// src/actions/validators/getActiveBoostAndCommissionChangeDelay.ts
|
|
668
|
-
import { bgtAbi } from "@berachain/abis/pol/bgt";
|
|
669
|
-
import { beraChefAbi as beraChefAbi2 } from "@berachain/abis/pol/rewards/beraChef";
|
|
670
|
-
async function getActiveBoostAndCommissionChangeDelay({
|
|
671
|
-
publicClient,
|
|
672
|
-
ui,
|
|
673
|
-
...args
|
|
674
|
-
}) {
|
|
675
|
-
const { config } = parseBaseArgs(args);
|
|
676
|
-
const [
|
|
677
|
-
maxCommissionRate,
|
|
678
|
-
commissionChangeDelay,
|
|
679
|
-
rewardAllocationBlockDelay,
|
|
680
|
-
maxWeightPerVault,
|
|
681
|
-
maxNumWeightsPerRewardAllocation,
|
|
682
|
-
dropBoostDelay,
|
|
683
|
-
activateBoostDelay,
|
|
684
|
-
rewardAllocationInactivityBlockSpan
|
|
685
|
-
] = await Promise.all([
|
|
686
|
-
publicClient.readContract({
|
|
687
|
-
address: config.pol.beraChef,
|
|
688
|
-
abi: beraChefAbi2,
|
|
689
|
-
functionName: "MAX_COMMISSION_RATE"
|
|
690
|
-
}),
|
|
691
|
-
publicClient.readContract({
|
|
692
|
-
address: config.pol.beraChef,
|
|
693
|
-
abi: beraChefAbi2,
|
|
694
|
-
functionName: "commissionChangeDelay"
|
|
695
|
-
}),
|
|
696
|
-
publicClient.readContract({
|
|
697
|
-
address: config.pol.beraChef,
|
|
698
|
-
abi: beraChefAbi2,
|
|
699
|
-
functionName: "rewardAllocationBlockDelay"
|
|
700
|
-
}),
|
|
701
|
-
publicClient.readContract({
|
|
702
|
-
address: config.pol.beraChef,
|
|
703
|
-
abi: beraChefAbi2,
|
|
704
|
-
functionName: "maxWeightPerVault"
|
|
705
|
-
}),
|
|
706
|
-
publicClient.readContract({
|
|
707
|
-
address: config.pol.beraChef,
|
|
708
|
-
abi: beraChefAbi2,
|
|
709
|
-
functionName: "maxNumWeightsPerRewardAllocation"
|
|
710
|
-
}),
|
|
711
|
-
publicClient.readContract({
|
|
712
|
-
address: config.tokens.bgt,
|
|
713
|
-
abi: bgtAbi,
|
|
714
|
-
functionName: "dropBoostDelay"
|
|
715
|
-
}),
|
|
716
|
-
publicClient.readContract({
|
|
717
|
-
address: config.tokens.bgt,
|
|
718
|
-
abi: bgtAbi,
|
|
719
|
-
functionName: "activateBoostDelay"
|
|
720
|
-
}),
|
|
721
|
-
publicClient.readContract({
|
|
722
|
-
address: config.pol.beraChef,
|
|
723
|
-
abi: beraChefAbi2,
|
|
724
|
-
functionName: "rewardAllocationInactivityBlockSpan"
|
|
725
|
-
})
|
|
726
|
-
]);
|
|
727
|
-
return {
|
|
728
|
-
maxCommissionRate: Number(maxCommissionRate) / 1e4,
|
|
729
|
-
boostDelay: Number(activateBoostDelay),
|
|
730
|
-
unboostDelay: Number(dropBoostDelay),
|
|
731
|
-
commissionChangeDelay: Number(commissionChangeDelay),
|
|
732
|
-
rewardAllocationBlockDelay: Number(rewardAllocationBlockDelay),
|
|
733
|
-
maxWeightPerVault: Number(maxWeightPerVault) / 1e4,
|
|
734
|
-
maxNumWeightsPerRewardAllocation: Number(maxNumWeightsPerRewardAllocation),
|
|
735
|
-
rewardAllocationInactivityBlockSpan: Number(
|
|
736
|
-
rewardAllocationInactivityBlockSpan
|
|
737
|
-
),
|
|
738
|
-
ui
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
// src/actions/validators/utils/aggregateValidatorIncentives.ts
|
|
743
|
-
function aggregateValidatorIncentives({
|
|
744
|
-
rewardAllocationWeights,
|
|
745
|
-
activeOnly = true
|
|
746
|
-
}) {
|
|
747
|
-
const map = rewardAllocationWeights.filter((x) => x?.receivingVault).reduce((acc, rv) => {
|
|
748
|
-
for (const incentive of rv.receivingVault?.activeIncentives ?? []) {
|
|
749
|
-
if (activeOnly && incentive.remainingAmount === "0") {
|
|
750
|
-
continue;
|
|
751
|
-
}
|
|
752
|
-
const incentiveRate = new bignumber_js_default(incentive.incentiveRate).times(
|
|
753
|
-
rv.percentage
|
|
754
|
-
);
|
|
755
|
-
const incentiveRateUsd = new bignumber_js_default(
|
|
756
|
-
incentive.incentiveRateUsd
|
|
757
|
-
).times(rv.percentage);
|
|
758
|
-
const token = incentive.token.address.toLowerCase();
|
|
759
|
-
const existing = acc.get(token);
|
|
760
|
-
if (existing) {
|
|
761
|
-
acc.set(token, {
|
|
762
|
-
...existing,
|
|
763
|
-
incentiveRate: new bignumber_js_default(existing.incentiveRate).plus(incentiveRate).toString(),
|
|
764
|
-
incentiveRateUsd: new bignumber_js_default(existing.incentiveRateUsd).plus(incentiveRateUsd).toString(),
|
|
765
|
-
remainingAmount: new bignumber_js_default(existing.remainingAmount).plus(incentive.remainingAmount).toString(),
|
|
766
|
-
remainingAmountUsd: new bignumber_js_default(existing.remainingAmountUsd).plus(incentive.remainingAmountUsd).toString()
|
|
767
|
-
});
|
|
768
|
-
} else {
|
|
769
|
-
acc.set(token, {
|
|
770
|
-
...incentive,
|
|
771
|
-
tokenAddress: incentive.token.address,
|
|
772
|
-
token: incentive.token,
|
|
773
|
-
incentiveRate: incentiveRate.toString(),
|
|
774
|
-
incentiveRateUsd: incentiveRateUsd.toString(),
|
|
775
|
-
remainingAmount: incentive.remainingAmount
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
return acc;
|
|
780
|
-
}, /* @__PURE__ */ new Map());
|
|
781
|
-
return Array.from(map.values());
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
// src/actions/validators/utils/getValidatorBoostApy.ts
|
|
785
|
-
function getValidatorReturnPerBgt(validator) {
|
|
786
|
-
return validator?.rewardAllocationWeights?.reduce((acc, ab) => {
|
|
787
|
-
if (!ab) return acc;
|
|
788
|
-
const totalIncentiveValue = ab.receivingVault?.activeIncentives.filter((inc) => Number(inc.remainingAmount) > 0).reduce((totalIncentiveValue2, currIncentive) => {
|
|
789
|
-
const tokenPrice = Number(currIncentive.remainingAmountUsd) / Number(currIncentive.remainingAmount);
|
|
790
|
-
return totalIncentiveValue2 + Number(currIncentive.incentiveRate) * tokenPrice;
|
|
791
|
-
}, 0) ?? 0;
|
|
792
|
-
return acc + totalIncentiveValue * ab.percentage;
|
|
793
|
-
}, 0);
|
|
794
|
-
}
|
|
795
|
-
function getValidatorBoostApy({
|
|
796
|
-
validator,
|
|
797
|
-
bgtPrice
|
|
798
|
-
}) {
|
|
799
|
-
const validatorActiveBoostAmount = Number(
|
|
800
|
-
validator.dynamicData?.activeBoostAmount ?? 0
|
|
801
|
-
);
|
|
802
|
-
const returnPerBgt = getValidatorReturnPerBgt(validator);
|
|
803
|
-
if (!returnPerBgt || !validatorActiveBoostAmount) {
|
|
804
|
-
return 0;
|
|
805
|
-
}
|
|
806
|
-
const boostApy = returnPerBgt * Number(validator.dynamicData?.lastDayDistributedBGTAmount ?? 0) * 365 / (validatorActiveBoostAmount * bgtPrice);
|
|
807
|
-
return boostApy;
|
|
808
|
-
}
|
|
809
|
-
export {
|
|
810
|
-
BalancerApi,
|
|
811
|
-
BaseAggregator,
|
|
812
|
-
BeraApolloClient,
|
|
813
|
-
HoneyPreviewMethod,
|
|
814
|
-
MOCKED_PROPOSAL_STATUSES,
|
|
815
|
-
RewardVaultDistributionMode,
|
|
816
|
-
aggregateValidatorIncentives,
|
|
817
|
-
beraWriteContract,
|
|
818
|
-
checkProposalField,
|
|
819
|
-
computeActualStatus,
|
|
820
|
-
formatValidatorRewardAllocation,
|
|
821
|
-
getActiveBoostAndCommissionChangeDelay,
|
|
822
|
-
getAllPools,
|
|
823
|
-
getAllProposals,
|
|
824
|
-
getAllValidators,
|
|
825
|
-
getAllowances,
|
|
826
|
-
getApiEnrichedAllocation,
|
|
827
|
-
getApiPool,
|
|
828
|
-
getApiValidator,
|
|
829
|
-
getApolloClient,
|
|
830
|
-
getBalanceCall,
|
|
831
|
-
getBgtAprSimulation,
|
|
832
|
-
getBlockTime,
|
|
833
|
-
getBlockTimestamp,
|
|
834
|
-
getBodyErrors,
|
|
835
|
-
getChartData,
|
|
836
|
-
getCollateralWeights,
|
|
837
|
-
getConvertToAssets,
|
|
838
|
-
getDailyValidatorBlockStats,
|
|
839
|
-
getDecodedFunctionData,
|
|
840
|
-
getDefaultRewardAllocation,
|
|
841
|
-
getEarnedStakedBeraVault,
|
|
842
|
-
getEnsoClient,
|
|
843
|
-
getGlobalCapLimit,
|
|
844
|
-
getGlobalData,
|
|
845
|
-
getGlobalLiquidityAndSwapVolume,
|
|
846
|
-
getHoneyCollaterals,
|
|
847
|
-
getHoneyFees,
|
|
848
|
-
getHoneyGlobalData,
|
|
849
|
-
getHoneyPausedState,
|
|
850
|
-
getHoneyPreview,
|
|
851
|
-
getHoneyPythFeeds,
|
|
852
|
-
getHoneyPythOracle,
|
|
853
|
-
getHoneyRootPriceOracle,
|
|
854
|
-
getHoneyVaultsBalance,
|
|
855
|
-
getIncentiveFeeClaimStats,
|
|
856
|
-
getLSTStakeConfig,
|
|
857
|
-
getMarkets,
|
|
858
|
-
getMaxDeposit,
|
|
859
|
-
getOnChainPool,
|
|
860
|
-
getPoolEvents,
|
|
861
|
-
getPoolHistoricalData,
|
|
862
|
-
getPoolPausedState,
|
|
863
|
-
getPoolState,
|
|
864
|
-
getProposalDetails,
|
|
865
|
-
getProposalFromTx,
|
|
866
|
-
getProposalVotes,
|
|
867
|
-
getPythLatestPrices,
|
|
868
|
-
getPythUpdateFee,
|
|
869
|
-
getRelativeCapLimit,
|
|
870
|
-
getRewardProofsByValidator,
|
|
871
|
-
getRewardTokenToBeraRate,
|
|
872
|
-
getRewardVault,
|
|
873
|
-
getRewardVaultDurationConstants,
|
|
874
|
-
getRewardVaultFromToken,
|
|
875
|
-
getRewardVaultIncentives,
|
|
876
|
-
getRewardVaultRewards,
|
|
877
|
-
getRewardVaultStakingToken,
|
|
878
|
-
getRewardVaults,
|
|
879
|
-
getSWBeraVaultMetadata,
|
|
880
|
-
getSWBeraWithdrawal,
|
|
881
|
-
getStakeWithdrawalCooldown,
|
|
882
|
-
getStakedBeraAPR,
|
|
883
|
-
getStakedBeraSnapshots,
|
|
884
|
-
getStakingPoolBatch,
|
|
885
|
-
getSwapPayload,
|
|
886
|
-
getTokenCurrentPrices,
|
|
887
|
-
getTokenInformation,
|
|
888
|
-
getTokens,
|
|
889
|
-
getTotalStakedAmount,
|
|
890
|
-
getUserActiveValidators,
|
|
891
|
-
getUserBoostsOnValidator,
|
|
892
|
-
getUserClaimableIncentives,
|
|
893
|
-
getUserStakingPositions,
|
|
894
|
-
getUserVaultInfo,
|
|
895
|
-
getUserVaults,
|
|
896
|
-
getUserVaultsReward,
|
|
897
|
-
getValidatorAnalytics,
|
|
898
|
-
getValidatorBoostApy,
|
|
899
|
-
getValidatorCommission,
|
|
900
|
-
getValidatorEstimatedBgtPerYear,
|
|
901
|
-
getValidatorOperatorAddress,
|
|
902
|
-
getValidatorQueuedCommission,
|
|
903
|
-
getValidatorQueuedOperatorAddress,
|
|
904
|
-
getValidatorQueuedRewardAllocation,
|
|
905
|
-
getValidatorReturnPerBgt,
|
|
906
|
-
getValidatorRewardAllocation,
|
|
907
|
-
getVaultHistory,
|
|
908
|
-
getVaultPausedState,
|
|
909
|
-
getVaultValidators,
|
|
910
|
-
getWalletBalances,
|
|
911
|
-
gql,
|
|
912
|
-
isBadCollateralAsset,
|
|
913
|
-
isBasketModeEnabled,
|
|
914
|
-
isDefaultRewardAllocation,
|
|
915
|
-
isImpersonateAccount,
|
|
916
|
-
isSameRewardAllocation,
|
|
917
|
-
parseProposalBody
|
|
918
|
-
};
|
|
1
|
+
import{$ as rt,A as Fe,Aa as Dt,B as Re,Ba as Tt,C as De,Ca as It,D as Te,Da as Mt,E as Ie,Ea as Vt,F as Me,Fa as Ot,G as Ve,Ga as Wt,H as Oe,I as We,J as Je,K as Ue,L as _e,M as He,N as Ee,O as $e,P as Le,Q as Ge,R as qe,S as ze,T as Xe,U as je,V as Ke,W as Ze,X as Qe,Y as Ye,Z as et,_ as tt,a as ae,aa as ot,b as D,ba as nt,c as T,ca as at,d as I,da as it,e as se,ea as st,f as me,fa as mt,g as de,ga as dt,h as ce,ha as ct,i as pe,ia as pt,j as ue,ja as ut,k as le,ka as lt,l as fe,la as yt,m as ge,ma as bt,n as ye,na as At,o as be,oa as xt,p as Ae,pa as ht,q as xe,qa as Ct,r as he,ra as Pt,s as Ce,sa as wt,t as Pe,ta as kt,u as we,ua as Bt,v as ke,va as Nt,w as Be,wa as St,x as Ne,xa as vt,y as Se,ya as Ft,z as ve,za as Rt}from"../chunk-5NDYN2IB.mjs";import{a as ie,b as ft,c as gt}from"../chunk-G4CNETLS.mjs";import"../chunk-OGJMSGB2.mjs";import{a as u,d as A,l as P,q as w}from"../chunk-ESAVA5OD.mjs";import{a as d,e as x}from"../chunk-5W7UKRHX.mjs";import"../chunk-NLVWRMGD.mjs";import"../chunk-NAXAZJJY.mjs";import"../chunk-SSPFPAWX.mjs";import{b as h,c as l,d as C}from"../chunk-CWKDFUFR.mjs";import"../chunk-RSDCKN4Q.mjs";import{formatEther as M}from"viem";import{metaMorphoV11Abi as V}from"@berachain/abis/bend-metamorpho/metaMorphoV11";async function _t({vaultAddress:e,publicClient:t}){let o=await t.readContract({address:e,abi:V,functionName:"maxDeposit",args:[e]});return M(o)}import{mapPoolType as O}from"@berachain-foundation/berancer-sdk";var $t=e=>({type:O(e.type),protocolVersion:e.protocolVersion,tokens:e.tokens.map(t=>({...t,address:t.address})),id:e.id,address:e.address});import{vaultAbi as W}from"@berachain/abis/bex/vault";async function zt({publicClient:e,...t}){let{config:o}=d(t);return(await e.readContract({address:o.bex.vault,abi:W,functionName:"getPausedState"}))[0]}import{decodeFunctionData as B,erc20Abi as J,pad as U,toFunctionSignature as _,trim as k}from"viem";import{appConfig as H,defaultChainId as E}from"@berachain/config/internal";import{beraChefAbi as $}from"@berachain/abis/pol/rewards/beraChef";import{rewardVaultAbi as L}from"@berachain/abis/pol/rewards/rewardVault";function G(e){return e.some(t=>t.name==="implementation"||t.name==="proxyType"||t.type==="constructor"&&t.inputs?.[0]?.name==="implementation")}async function N({contractAddress:e,chainId:t,publicClient:o}){let r=`https://api.etherscan.io/v2/api?module=contract&action=getabi&address=${e}&apikey=${H.apiKeys.private.etherscan}&chainId=${t}`,n=await fetch(r);if(!n.ok)throw new Error(`Failed to fetch ABI: ${n.statusText}`);let a=await n.json();if(a.status==="0")throw new Error(a.result);let m=JSON.parse(a.result);if(!G(m))return m;let i=await o.getStorageAt({address:e,slot:"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"});if(!i||k(i)==="0x00")return m;let s=U(k(i),{size:20});return N({contractAddress:s,chainId:t,publicClient:o})}async function q({address:e,callData:t,knownAbi:o,chainId:r,publicClient:n}){try{if(B({data:t,abi:o}))return o}catch{}return N({contractAddress:e,chainId:r,publicClient:n}).catch(()=>{})}function z(e,t){try{return B({data:e,abi:t})}catch{return}}function X(e,t){return e.find(o=>o.type==="function"&&o.name===t)}function j(e){if(e)try{return _(e)}catch(t){console.error(t)}}async function Yt({address:e,callData:t,chainId:o=E,publicClient:r}){let n=[...$,...L,...J],a=await q({address:e,callData:t,knownAbi:n,chainId:o,publicClient:r}),m=z(t,a);if(!a||!m)return{args:[]};let i=X(a,m.functionName),s=j(i);return{abiItem:i,functionSignature:s,functionName:m.functionName,args:m.args}}import{formatUnits as g}from"viem";import{honeyFactoryAbi as b}from"@berachain/abis/honey/honeyFactory";async function nr({client:e,collateralList:t,...o}){let{config:r}=d(o);try{let n={mint:[],redeem:[]};for(let s of t)n.mint.push(e.readContract({address:r.honey.factory,abi:b,functionName:"mintRates",args:[s.address]})),n.redeem.push(e.readContract({address:r.honey.factory,abi:b,functionName:"redeemRates",args:[s.address]}));let[a,m,i]=await Promise.all([Promise.all(n.mint),Promise.all(n.redeem),e.readContract({address:r.honey.factory,abi:b,functionName:"getWeights"})]);return t.reduce((s,c)=>{let p=t.indexOf(c);return s.single[c.address]={mintFee:1-+g(a[p],18),redeemFee:1-+g(m[p],18)},s.basket.mintFee+=s.single[c.address].mintFee*+g(i[p],18),s.basket.redeemFee+=s.single[c.address].redeemFee*+g(i[p],18),s},{single:{},basket:{mintFee:0,redeemFee:0}})}catch(n){throw console.log(n),n}}import{honeyAbi as K}from"@berachain/abis/honey/honey";async function mr({client:e,...t}){let{config:o}=d(t),r=o.honey.token;return await e.readContract({address:r,abi:K,functionName:"paused"})}import{rootPriceOracleAbi as Z}from"@berachain/abis/extras/rootPriceOracle";async function pr({pythOracle:e,publicClient:t}){return t.readContract({address:e,abi:Z,functionName:"pythOracle"})}import{honeyFactoryAbi as Q}from"@berachain/abis/honey/honeyFactory";async function gr({publicClient:e,factory:t,...o}){let{config:r}=d(o);return e.readContract({address:t??r.honey.factory,abi:Q,functionName:"priceOracle"})}async function hr({defaultBlockTime:e,publicClient:t,blocksSpan:o,...r}){l(t);let{config:n}=d(r),a=e??n.averageBlockTime,m=o??Math.floor(w(1)/a),i=await t?.getBlock({blockTag:"latest"}),s=await t?.getBlock({blockNumber:i.number-BigInt(m)});return(P(Date.now())-Number(s?.timestamp))/(Number(i?.number)-Number(s?.number))}import{lstStakerVaultAbi as Y}from"@berachain/abis/pol/lst/lstStakerVault";async function Nr({tokenList:e,publicClient:t,lstStakingVaults:o,...r}){l(t);let{config:n}=d({...r,chainId:t.chain?.id??r.chainId}),a=e.filter(i=>o.includes(i.address));return a.length===0?[]:(await Promise.all(a.map(async i=>({assetTokenAddress:await t.readContract({address:i.address,abi:Y,functionName:"asset"}),stakingToken:i})))).reduce((i,{assetTokenAddress:s,stakingToken:c})=>{let p=e.find(y=>x(y,s));return p&&i.push({id:c.address,receiptToken:c,inputTokens:[p]}),i},[])}import{rewardVaultAbi as F}from"@berachain/abis/pol/rewards/rewardVault";import{rewardVaultFactoryAbi as ee}from"@berachain/abis/pol/rewards/rewardVaultFactory";var S=[{inputs:[{internalType:"address",name:"initialOwner",type:"address"},{internalType:"address",name:"initialImplementation",type:"address"}],stateMutability:"payable",type:"constructor"},{inputs:[],name:"NewImplementationHasNoCode",type:"error"},{inputs:[],name:"NewOwnerIsZeroAddress",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"result",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"result",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"}];async function v({publicClient:e,...t}){let{config:o}=d(t),r=o.pol.factory;h(e,"publicClient"),C(o.pol.factory,"factoryAddress");let n=await e.readContract({address:r,abi:ee,functionName:"beacon"});return e.readContract({address:n,abi:S,functionName:"implementation"})}async function Wr({publicClient:e,...t}){l(e);let o=await v({publicClient:e,...t}),[r,n]=await Promise.all([e.readContract({address:o,abi:F,functionName:"MIN_REWARD_DURATION"}),e.readContract({address:o,abi:F,functionName:"MAX_REWARD_DURATION"})]);return{minRewardDuration:Number(r),maxRewardDuration:Number(n)}}import{zeroAddress as te}from"viem";import{rewardVaultFactoryAbi as re}from"@berachain/abis/pol/rewards/rewardVaultFactory";async function Er({tokenAddress:e,publicClient:t,factoryAddress:o,...r}){let{config:n}=d(r),a=await t.readContract({address:o??n.pol.factory,abi:re,functionName:"getVault",args:[e]});return a===te?null:a}import{pythPriceOracleAbi as oe}from"@berachain/abis/extras/pythPriceOracle";async function qr({tokenList:e,publicClient:t,...o}){let{config:r}=d(o);try{let n=await Promise.all(e.map(a=>t.readContract({address:r.honey.pythOracle,abi:oe,functionName:"feeds",args:[a]})));return e.reduce((a,m,i)=>({...a,[m]:n[i]}),{})}catch(n){throw console.error("getPythPriceFeedId",n),n}}async function Kr({url:e,...t}={}){let{config:o}=d(t);return(await A({url:e??o.lists.tokenList,type:"rest",name:"GitHub"})).tokens??[]}import{bgtAbi as R}from"@berachain/abis/pol/bgt";import{beraChefAbi as f}from"@berachain/abis/pol/rewards/beraChef";async function to({publicClient:e,ui:t,...o}){let{config:r}=d(o),[n,a,m,i,s,c,p,y]=await Promise.all([e.readContract({address:r.pol.beraChef,abi:f,functionName:"MAX_COMMISSION_RATE"}),e.readContract({address:r.pol.beraChef,abi:f,functionName:"commissionChangeDelay"}),e.readContract({address:r.pol.beraChef,abi:f,functionName:"rewardAllocationBlockDelay"}),e.readContract({address:r.pol.beraChef,abi:f,functionName:"maxWeightPerVault"}),e.readContract({address:r.pol.beraChef,abi:f,functionName:"maxNumWeightsPerRewardAllocation"}),e.readContract({address:r.tokens.bgt,abi:R,functionName:"dropBoostDelay"}),e.readContract({address:r.tokens.bgt,abi:R,functionName:"activateBoostDelay"}),e.readContract({address:r.pol.beraChef,abi:f,functionName:"rewardAllocationInactivityBlockSpan"})]);return{maxCommissionRate:Number(n)/1e4,boostDelay:Number(p),unboostDelay:Number(c),commissionChangeDelay:Number(a),rewardAllocationBlockDelay:Number(m),maxWeightPerVault:Number(i)/1e4,maxNumWeightsPerRewardAllocation:Number(s),rewardAllocationInactivityBlockSpan:Number(y),ui:t}}function no({rewardAllocationWeights:e,activeOnly:t=!0}){let o=e.filter(r=>r?.receivingVault).reduce((r,n)=>{for(let a of n.receivingVault?.activeIncentives??[]){if(t&&a.remainingAmount==="0")continue;let m=new u(a.incentiveRate).times(n.percentage),i=new u(a.incentiveRateUsd).times(n.percentage),s=a.token.address.toLowerCase(),c=r.get(s);c?r.set(s,{...c,incentiveRate:new u(c.incentiveRate).plus(m).toString(),incentiveRateUsd:new u(c.incentiveRateUsd).plus(i).toString(),remainingAmount:new u(c.remainingAmount).plus(a.remainingAmount).toString(),remainingAmountUsd:new u(c.remainingAmountUsd).plus(a.remainingAmountUsd).toString()}):r.set(s,{...a,tokenAddress:a.token.address,token:a.token,incentiveRate:m.toString(),incentiveRateUsd:i.toString(),remainingAmount:a.remainingAmount})}return r},new Map);return Array.from(o.values())}function ne(e){return e?.rewardAllocationWeights?.reduce((t,o)=>{if(!o)return t;let r=o.receivingVault?.activeIncentives.filter(n=>Number(n.remainingAmount)>0).reduce((n,a)=>{let m=Number(a.remainingAmountUsd)/Number(a.remainingAmount);return n+Number(a.incentiveRate)*m},0)??0;return t+r*o.percentage},0)}function io({validator:e,bgtPrice:t}){let o=Number(e.dynamicData?.activeBoostAmount??0),r=ne(e);return!r||!o?0:r*Number(e.dynamicData?.lastDayDistributedBGTAmount??0)*365/(o*t)}export{me as BalancerApi,se as BaseAggregator,D as BeraApolloClient,Te as HoneyPreviewMethod,be as MOCKED_PROPOSAL_STATUSES,He as RewardVaultDistributionMode,no as aggregateValidatorIncentives,bt as beraWriteContract,ye as checkProposalField,Ae as computeActualStatus,Pt as formatValidatorRewardAllocation,to as getActiveBoostAndCommissionChangeDelay,de as getAllPools,xe as getAllProposals,At as getAllValidators,lt as getAllowances,xt as getApiEnrichedAllocation,ce as getApiPool,ht as getApiValidator,T as getApolloClient,ft as getBalanceCall,$e as getBgtAprSimulation,hr as getBlockTime,_e as getBlockTimestamp,he as getBodyErrors,Be as getChartData,Ne as getCollateralWeights,ae as getConvertToAssets,Ct as getDailyValidatorBlockStats,Yt as getDecodedFunctionData,Nt as getDefaultRewardAllocation,Le as getEarnedStakedBeraVault,ie as getEnsoClient,Re as getGlobalCapLimit,qe as getGlobalData,pe as getGlobalLiquidityAndSwapVolume,ve as getHoneyCollaterals,nr as getHoneyFees,De as getHoneyGlobalData,mr as getHoneyPausedState,Ie as getHoneyPreview,qr as getHoneyPythFeeds,pr as getHoneyPythOracle,gr as getHoneyRootPriceOracle,Me as getHoneyVaultsBalance,ze as getIncentiveFeeClaimStats,Nr as getLSTStakeConfig,Xe as getMarkets,_t as getMaxDeposit,le as getOnChainPool,fe as getPoolEvents,ge as getPoolHistoricalData,ue as getPoolPausedState,$t as getPoolState,Ce as getProposalDetails,we as getProposalFromTx,ke as getProposalVotes,Ve as getPythLatestPrices,We as getPythUpdateFee,Oe as getRelativeCapLimit,je as getRewardProofsByValidator,Ke as getRewardTokenToBeraRate,Ze as getRewardVault,Wr as getRewardVaultDurationConstants,Er as getRewardVaultFromToken,Qe as getRewardVaultIncentives,Ee as getRewardVaultRewards,Ye as getRewardVaultStakingToken,Ge as getRewardVaults,ot as getSWBeraVaultMetadata,nt as getSWBeraWithdrawal,rt as getStakeWithdrawalCooldown,et as getStakedBeraAPR,tt as getStakedBeraSnapshots,St as getStakingPoolBatch,Je as getSwapPayload,ut as getTokenCurrentPrices,Se as getTokenInformation,Kr as getTokens,at as getTotalStakedAmount,Ft as getUserActiveValidators,vt as getUserBoostsOnValidator,it as getUserClaimableIncentives,Rt as getUserStakingPositions,mt as getUserVaultInfo,dt as getUserVaults,st as getUserVaultsReward,Dt as getValidatorAnalytics,io as getValidatorBoostApy,Tt as getValidatorCommission,It as getValidatorEstimatedBgtPerYear,Mt as getValidatorOperatorAddress,Vt as getValidatorQueuedCommission,Ot as getValidatorQueuedOperatorAddress,Wt as getValidatorQueuedRewardAllocation,ne as getValidatorReturnPerBgt,kt as getValidatorRewardAllocation,ct as getVaultHistory,zt as getVaultPausedState,pt as getVaultValidators,gt as getWalletBalances,I as gql,Fe as isBadCollateralAsset,Ue as isBasketModeEnabled,Bt as isDefaultRewardAllocation,yt as isImpersonateAccount,wt as isSameRewardAllocation,Pe as parseProposalBody};
|
|
919
2
|
//# sourceMappingURL=exports.mjs.map
|