@berachain/berajs 0.1.0-alpha.0 → 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.ts → BeraError-D1HS_rbb.d.cts} +3 -3
- package/dist/BeraError-D1HS_rbb.d.ts +69 -0
- package/dist/BexStatusProvider-nS3NcdxI.d.cts +70 -0
- package/dist/RequestError-D8AE6xnI.d.cts +57 -0
- package/dist/{RequestError-CtJLUaAc.d.ts → RequestError-m4jxyM7D.d.ts} +1 -1
- package/dist/abi/index.cjs +1 -0
- package/dist/abi/index.d.cts +26765 -0
- package/dist/actions/index.cjs +1 -0
- package/dist/actions/index.d.cts +1650 -0
- package/dist/actions/index.d.ts +10 -9
- package/dist/actions/index.mjs +1 -1
- package/dist/aggregatorsRouter-Cny4B_MB.d.cts +593 -0
- package/dist/{chunk-YKNKCICU.mjs → chunk-2422CKAT.mjs} +1 -1
- package/dist/{chunk-JQDPAEK2.mjs → chunk-3V2MGZRD.mjs} +1 -1
- package/dist/chunk-4E5JGLUM.cjs +1 -0
- package/dist/chunk-4GY57XKG.cjs +1 -0
- package/dist/{chunk-5GPS724E.mjs → chunk-ASRHUDAH.mjs} +1 -1
- package/dist/chunk-B47PDJZM.cjs +1 -0
- package/dist/{chunk-SMZ3PG6A.mjs → chunk-ELUMRVNE.mjs} +1 -1
- package/dist/chunk-IKAE7CQU.cjs +1 -0
- package/dist/{chunk-XX77QPIR.mjs → chunk-JHCSZSJS.mjs} +1 -1
- package/dist/chunk-K2FCHQHA.cjs +1 -0
- package/dist/chunk-KIA6GUIN.cjs +1 -0
- package/dist/chunk-LX5CM4Y6.cjs +1 -0
- package/dist/chunk-LZPBQLKP.mjs +3 -0
- package/dist/chunk-M5BKM52U.cjs +1 -0
- package/dist/chunk-NOV7UCGA.cjs +1 -0
- package/dist/{chunk-5UFI7X4U.mjs → chunk-VA37UBED.mjs} +1 -1
- package/dist/chunk-WDFIETJS.cjs +2 -0
- package/dist/chunk-WZLPSG5R.cjs +3 -0
- package/dist/contexts/index.cjs +1 -0
- package/dist/contexts/index.d.cts +81 -0
- package/dist/contexts/index.d.ts +4 -4
- package/dist/contexts/index.mjs +1 -1
- package/dist/defaultFlags-V-tJs2K8.d.cts +10 -0
- package/dist/{dex-BD7Bq3pJ.d.ts → dex-CxzGqVLe.d.ts} +1 -1
- package/dist/{dex-DreiokgL.d.ts → dex-jD95agMv.d.cts} +3 -3
- package/dist/enum/index.cjs +1 -0
- package/dist/enum/index.d.cts +31 -0
- package/dist/enum/index.d.ts +1 -1
- package/dist/errors/index.cjs +1 -0
- package/dist/errors/index.d.cts +204 -0
- package/dist/errors/index.d.ts +3 -3
- package/dist/errors/index.mjs +1 -1
- package/dist/{getValidatorQueuedOperatorAddress-DK2Xv19c.d.ts → getValidatorQueuedOperatorAddress-9jSXlAse.d.ts} +2 -2
- package/dist/{getValidatorQueuedOperatorAddress--AXNo9IY.d.ts → getValidatorQueuedOperatorAddress-BCYlvah3.d.cts} +2 -2
- package/dist/hooks/index.cjs +3 -0
- package/dist/hooks/index.d.cts +1703 -0
- package/dist/hooks/index.d.ts +8 -8
- package/dist/hooks/index.mjs +2 -2
- package/dist/polling-BKnyavLI.d.cts +8 -0
- package/dist/pythWrapper-CBjsmmsK.d.cts +1958 -0
- package/dist/{staking-Cggi38So.d.ts → staking-Bw46L2PT.d.ts} +1 -1
- package/dist/{staking-DYbVFigB.d.ts → staking-BxYDlMtj.d.cts} +1 -1
- package/dist/{txnEnum-BQKDfaeH.d.ts → txnEnum-Diichv9Z.d.cts} +0 -1
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +56 -0
- package/dist/types/index.d.ts +4 -4
- package/dist/{useHoneySwapState-CW49RVci.d.ts → useHoneySwapState-CD8v6y1k.d.ts} +1 -1
- package/dist/{useHoneySwapState-Ci8_c2bT.d.ts → useHoneySwapState-YfMSTWY3.d.cts} +1 -1
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts +349 -0
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.mjs +1 -1
- package/package.json +20 -8
- package/dist/chunk-RNESAHY2.mjs +0 -3
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
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';
|
|
25
25
|
import 'react/jsx-runtime';
|
|
26
26
|
import 'react';
|
|
27
27
|
import 'swr';
|
|
28
|
-
import '../txnEnum-
|
|
29
|
-
import '../BeraError-
|
|
28
|
+
import '../txnEnum-Diichv9Z.js';
|
|
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};
|
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
declare const aggregatorsRouterAbi: readonly [{
|
|
2
|
+
readonly type: "constructor";
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly name: "_wbera";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
readonly internalType: "address";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "_feeReceiver";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
readonly internalType: "address";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "_owner";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
readonly internalType: "address";
|
|
15
|
+
}];
|
|
16
|
+
readonly stateMutability: "nonpayable";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "receive";
|
|
19
|
+
readonly stateMutability: "payable";
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "function";
|
|
22
|
+
readonly name: "BERACHEF_ADDRESS";
|
|
23
|
+
readonly inputs: readonly [];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly type: "address";
|
|
27
|
+
readonly internalType: "address";
|
|
28
|
+
}];
|
|
29
|
+
readonly stateMutability: "view";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "function";
|
|
32
|
+
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
33
|
+
readonly inputs: readonly [];
|
|
34
|
+
readonly outputs: readonly [{
|
|
35
|
+
readonly name: "";
|
|
36
|
+
readonly type: "bytes32";
|
|
37
|
+
readonly internalType: "bytes32";
|
|
38
|
+
}];
|
|
39
|
+
readonly stateMutability: "view";
|
|
40
|
+
}, {
|
|
41
|
+
readonly type: "function";
|
|
42
|
+
readonly name: "MANAGER_ROLE";
|
|
43
|
+
readonly inputs: readonly [];
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly name: "";
|
|
46
|
+
readonly type: "bytes32";
|
|
47
|
+
readonly internalType: "bytes32";
|
|
48
|
+
}];
|
|
49
|
+
readonly stateMutability: "view";
|
|
50
|
+
}, {
|
|
51
|
+
readonly type: "function";
|
|
52
|
+
readonly name: "ONE_HUNDRED_PERCENT";
|
|
53
|
+
readonly inputs: readonly [];
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly name: "";
|
|
56
|
+
readonly type: "uint256";
|
|
57
|
+
readonly internalType: "uint256";
|
|
58
|
+
}];
|
|
59
|
+
readonly stateMutability: "view";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "function";
|
|
62
|
+
readonly name: "PAUSER_ROLE";
|
|
63
|
+
readonly inputs: readonly [];
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly name: "";
|
|
66
|
+
readonly type: "bytes32";
|
|
67
|
+
readonly internalType: "bytes32";
|
|
68
|
+
}];
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "function";
|
|
72
|
+
readonly name: "SWAP_FEE_RATE";
|
|
73
|
+
readonly inputs: readonly [];
|
|
74
|
+
readonly outputs: readonly [{
|
|
75
|
+
readonly name: "";
|
|
76
|
+
readonly type: "uint256";
|
|
77
|
+
readonly internalType: "uint256";
|
|
78
|
+
}];
|
|
79
|
+
readonly stateMutability: "view";
|
|
80
|
+
}, {
|
|
81
|
+
readonly type: "function";
|
|
82
|
+
readonly name: "aggregators";
|
|
83
|
+
readonly inputs: readonly [{
|
|
84
|
+
readonly name: "";
|
|
85
|
+
readonly type: "address";
|
|
86
|
+
readonly internalType: "address";
|
|
87
|
+
}];
|
|
88
|
+
readonly outputs: readonly [{
|
|
89
|
+
readonly name: "";
|
|
90
|
+
readonly type: "bool";
|
|
91
|
+
readonly internalType: "bool";
|
|
92
|
+
}];
|
|
93
|
+
readonly stateMutability: "view";
|
|
94
|
+
}, {
|
|
95
|
+
readonly type: "function";
|
|
96
|
+
readonly name: "executor";
|
|
97
|
+
readonly inputs: readonly [];
|
|
98
|
+
readonly outputs: readonly [{
|
|
99
|
+
readonly name: "";
|
|
100
|
+
readonly type: "address";
|
|
101
|
+
readonly internalType: "contract MetaAggregatorExecutor";
|
|
102
|
+
}];
|
|
103
|
+
readonly stateMutability: "view";
|
|
104
|
+
}, {
|
|
105
|
+
readonly type: "function";
|
|
106
|
+
readonly name: "feeReceiver";
|
|
107
|
+
readonly inputs: readonly [];
|
|
108
|
+
readonly outputs: readonly [{
|
|
109
|
+
readonly name: "";
|
|
110
|
+
readonly type: "address";
|
|
111
|
+
readonly internalType: "address";
|
|
112
|
+
}];
|
|
113
|
+
readonly stateMutability: "view";
|
|
114
|
+
}, {
|
|
115
|
+
readonly type: "function";
|
|
116
|
+
readonly name: "getRoleAdmin";
|
|
117
|
+
readonly inputs: readonly [{
|
|
118
|
+
readonly name: "role";
|
|
119
|
+
readonly type: "bytes32";
|
|
120
|
+
readonly internalType: "bytes32";
|
|
121
|
+
}];
|
|
122
|
+
readonly outputs: readonly [{
|
|
123
|
+
readonly name: "";
|
|
124
|
+
readonly type: "bytes32";
|
|
125
|
+
readonly internalType: "bytes32";
|
|
126
|
+
}];
|
|
127
|
+
readonly stateMutability: "view";
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "function";
|
|
130
|
+
readonly name: "grantRole";
|
|
131
|
+
readonly inputs: readonly [{
|
|
132
|
+
readonly name: "role";
|
|
133
|
+
readonly type: "bytes32";
|
|
134
|
+
readonly internalType: "bytes32";
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "account";
|
|
137
|
+
readonly type: "address";
|
|
138
|
+
readonly internalType: "address";
|
|
139
|
+
}];
|
|
140
|
+
readonly outputs: readonly [];
|
|
141
|
+
readonly stateMutability: "nonpayable";
|
|
142
|
+
}, {
|
|
143
|
+
readonly type: "function";
|
|
144
|
+
readonly name: "hasRole";
|
|
145
|
+
readonly inputs: readonly [{
|
|
146
|
+
readonly name: "role";
|
|
147
|
+
readonly type: "bytes32";
|
|
148
|
+
readonly internalType: "bytes32";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "account";
|
|
151
|
+
readonly type: "address";
|
|
152
|
+
readonly internalType: "address";
|
|
153
|
+
}];
|
|
154
|
+
readonly outputs: readonly [{
|
|
155
|
+
readonly name: "";
|
|
156
|
+
readonly type: "bool";
|
|
157
|
+
readonly internalType: "bool";
|
|
158
|
+
}];
|
|
159
|
+
readonly stateMutability: "view";
|
|
160
|
+
}, {
|
|
161
|
+
readonly type: "function";
|
|
162
|
+
readonly name: "pause";
|
|
163
|
+
readonly inputs: readonly [];
|
|
164
|
+
readonly outputs: readonly [];
|
|
165
|
+
readonly stateMutability: "nonpayable";
|
|
166
|
+
}, {
|
|
167
|
+
readonly type: "function";
|
|
168
|
+
readonly name: "paused";
|
|
169
|
+
readonly inputs: readonly [];
|
|
170
|
+
readonly outputs: readonly [{
|
|
171
|
+
readonly name: "";
|
|
172
|
+
readonly type: "bool";
|
|
173
|
+
readonly internalType: "bool";
|
|
174
|
+
}];
|
|
175
|
+
readonly stateMutability: "view";
|
|
176
|
+
}, {
|
|
177
|
+
readonly type: "function";
|
|
178
|
+
readonly name: "renounceRole";
|
|
179
|
+
readonly inputs: readonly [{
|
|
180
|
+
readonly name: "role";
|
|
181
|
+
readonly type: "bytes32";
|
|
182
|
+
readonly internalType: "bytes32";
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "callerConfirmation";
|
|
185
|
+
readonly type: "address";
|
|
186
|
+
readonly internalType: "address";
|
|
187
|
+
}];
|
|
188
|
+
readonly outputs: readonly [];
|
|
189
|
+
readonly stateMutability: "nonpayable";
|
|
190
|
+
}, {
|
|
191
|
+
readonly type: "function";
|
|
192
|
+
readonly name: "rescueBERA";
|
|
193
|
+
readonly inputs: readonly [];
|
|
194
|
+
readonly outputs: readonly [];
|
|
195
|
+
readonly stateMutability: "nonpayable";
|
|
196
|
+
}, {
|
|
197
|
+
readonly type: "function";
|
|
198
|
+
readonly name: "rescueTokens";
|
|
199
|
+
readonly inputs: readonly [{
|
|
200
|
+
readonly name: "token";
|
|
201
|
+
readonly type: "address";
|
|
202
|
+
readonly internalType: "address";
|
|
203
|
+
}];
|
|
204
|
+
readonly outputs: readonly [];
|
|
205
|
+
readonly stateMutability: "nonpayable";
|
|
206
|
+
}, {
|
|
207
|
+
readonly type: "function";
|
|
208
|
+
readonly name: "revokeRole";
|
|
209
|
+
readonly inputs: readonly [{
|
|
210
|
+
readonly name: "role";
|
|
211
|
+
readonly type: "bytes32";
|
|
212
|
+
readonly internalType: "bytes32";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "account";
|
|
215
|
+
readonly type: "address";
|
|
216
|
+
readonly internalType: "address";
|
|
217
|
+
}];
|
|
218
|
+
readonly outputs: readonly [];
|
|
219
|
+
readonly stateMutability: "nonpayable";
|
|
220
|
+
}, {
|
|
221
|
+
readonly type: "function";
|
|
222
|
+
readonly name: "setFeeReceiver";
|
|
223
|
+
readonly inputs: readonly [{
|
|
224
|
+
readonly name: "_feeReceiver";
|
|
225
|
+
readonly type: "address";
|
|
226
|
+
readonly internalType: "address";
|
|
227
|
+
}];
|
|
228
|
+
readonly outputs: readonly [];
|
|
229
|
+
readonly stateMutability: "nonpayable";
|
|
230
|
+
}, {
|
|
231
|
+
readonly type: "function";
|
|
232
|
+
readonly name: "supportsInterface";
|
|
233
|
+
readonly inputs: readonly [{
|
|
234
|
+
readonly name: "interfaceId";
|
|
235
|
+
readonly type: "bytes4";
|
|
236
|
+
readonly internalType: "bytes4";
|
|
237
|
+
}];
|
|
238
|
+
readonly outputs: readonly [{
|
|
239
|
+
readonly name: "";
|
|
240
|
+
readonly type: "bool";
|
|
241
|
+
readonly internalType: "bool";
|
|
242
|
+
}];
|
|
243
|
+
readonly stateMutability: "view";
|
|
244
|
+
}, {
|
|
245
|
+
readonly type: "function";
|
|
246
|
+
readonly name: "swap";
|
|
247
|
+
readonly inputs: readonly [{
|
|
248
|
+
readonly name: "inputData";
|
|
249
|
+
readonly type: "tuple";
|
|
250
|
+
readonly internalType: "struct SwapInputData";
|
|
251
|
+
readonly components: readonly [{
|
|
252
|
+
readonly name: "tokenIn";
|
|
253
|
+
readonly type: "address";
|
|
254
|
+
readonly internalType: "address";
|
|
255
|
+
}, {
|
|
256
|
+
readonly name: "amountIn";
|
|
257
|
+
readonly type: "uint256";
|
|
258
|
+
readonly internalType: "uint256";
|
|
259
|
+
}, {
|
|
260
|
+
readonly name: "isNative";
|
|
261
|
+
readonly type: "bool";
|
|
262
|
+
readonly internalType: "bool";
|
|
263
|
+
}, {
|
|
264
|
+
readonly name: "isPermit2Approval";
|
|
265
|
+
readonly type: "bool";
|
|
266
|
+
readonly internalType: "bool";
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "permit2SpenderAddress";
|
|
269
|
+
readonly type: "address";
|
|
270
|
+
readonly internalType: "address";
|
|
271
|
+
}];
|
|
272
|
+
}, {
|
|
273
|
+
readonly name: "outputData";
|
|
274
|
+
readonly type: "tuple";
|
|
275
|
+
readonly internalType: "struct SwapOutputData";
|
|
276
|
+
readonly components: readonly [{
|
|
277
|
+
readonly name: "tokenOut";
|
|
278
|
+
readonly type: "address";
|
|
279
|
+
readonly internalType: "address";
|
|
280
|
+
}, {
|
|
281
|
+
readonly name: "receiver";
|
|
282
|
+
readonly type: "address";
|
|
283
|
+
readonly internalType: "address";
|
|
284
|
+
}, {
|
|
285
|
+
readonly name: "minAmountOut";
|
|
286
|
+
readonly type: "uint256";
|
|
287
|
+
readonly internalType: "uint256";
|
|
288
|
+
}, {
|
|
289
|
+
readonly name: "isNative";
|
|
290
|
+
readonly type: "bool";
|
|
291
|
+
readonly internalType: "bool";
|
|
292
|
+
}];
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "aggregatorData";
|
|
295
|
+
readonly type: "tuple";
|
|
296
|
+
readonly internalType: "struct AggregatorData";
|
|
297
|
+
readonly components: readonly [{
|
|
298
|
+
readonly name: "aggregator";
|
|
299
|
+
readonly type: "address";
|
|
300
|
+
readonly internalType: "address";
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "data";
|
|
303
|
+
readonly type: "bytes";
|
|
304
|
+
readonly internalType: "bytes";
|
|
305
|
+
}];
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "swapAndStakeData";
|
|
308
|
+
readonly type: "tuple";
|
|
309
|
+
readonly internalType: "struct SwapAndStakeData";
|
|
310
|
+
readonly components: readonly [{
|
|
311
|
+
readonly name: "isSwapAndStake";
|
|
312
|
+
readonly type: "bool";
|
|
313
|
+
readonly internalType: "bool";
|
|
314
|
+
}, {
|
|
315
|
+
readonly name: "rewardVault";
|
|
316
|
+
readonly type: "address";
|
|
317
|
+
readonly internalType: "address";
|
|
318
|
+
}];
|
|
319
|
+
}];
|
|
320
|
+
readonly outputs: readonly [{
|
|
321
|
+
readonly name: "amountOut";
|
|
322
|
+
readonly type: "uint256";
|
|
323
|
+
readonly internalType: "uint256";
|
|
324
|
+
}];
|
|
325
|
+
readonly stateMutability: "payable";
|
|
326
|
+
}, {
|
|
327
|
+
readonly type: "function";
|
|
328
|
+
readonly name: "unpause";
|
|
329
|
+
readonly inputs: readonly [];
|
|
330
|
+
readonly outputs: readonly [];
|
|
331
|
+
readonly stateMutability: "nonpayable";
|
|
332
|
+
}, {
|
|
333
|
+
readonly type: "function";
|
|
334
|
+
readonly name: "wbera";
|
|
335
|
+
readonly inputs: readonly [];
|
|
336
|
+
readonly outputs: readonly [{
|
|
337
|
+
readonly name: "";
|
|
338
|
+
readonly type: "address";
|
|
339
|
+
readonly internalType: "contract IWBERA";
|
|
340
|
+
}];
|
|
341
|
+
readonly stateMutability: "view";
|
|
342
|
+
}, {
|
|
343
|
+
readonly type: "function";
|
|
344
|
+
readonly name: "whitelistAggregator";
|
|
345
|
+
readonly inputs: readonly [{
|
|
346
|
+
readonly name: "aggregator";
|
|
347
|
+
readonly type: "address";
|
|
348
|
+
readonly internalType: "address";
|
|
349
|
+
}, {
|
|
350
|
+
readonly name: "whitelistStatus";
|
|
351
|
+
readonly type: "bool";
|
|
352
|
+
readonly internalType: "bool";
|
|
353
|
+
}];
|
|
354
|
+
readonly outputs: readonly [];
|
|
355
|
+
readonly stateMutability: "nonpayable";
|
|
356
|
+
}, {
|
|
357
|
+
readonly type: "event";
|
|
358
|
+
readonly name: "AggregatorWhitelisted";
|
|
359
|
+
readonly inputs: readonly [{
|
|
360
|
+
readonly name: "aggregator";
|
|
361
|
+
readonly type: "address";
|
|
362
|
+
readonly indexed: true;
|
|
363
|
+
readonly internalType: "address";
|
|
364
|
+
}, {
|
|
365
|
+
readonly name: "whitelistStatus";
|
|
366
|
+
readonly type: "bool";
|
|
367
|
+
readonly indexed: false;
|
|
368
|
+
readonly internalType: "bool";
|
|
369
|
+
}];
|
|
370
|
+
readonly anonymous: false;
|
|
371
|
+
}, {
|
|
372
|
+
readonly type: "event";
|
|
373
|
+
readonly name: "FeeReceiverSet";
|
|
374
|
+
readonly inputs: readonly [{
|
|
375
|
+
readonly name: "newFeeReceiver";
|
|
376
|
+
readonly type: "address";
|
|
377
|
+
readonly indexed: true;
|
|
378
|
+
readonly internalType: "address";
|
|
379
|
+
}, {
|
|
380
|
+
readonly name: "previousFeeReceiver";
|
|
381
|
+
readonly type: "address";
|
|
382
|
+
readonly indexed: true;
|
|
383
|
+
readonly internalType: "address";
|
|
384
|
+
}];
|
|
385
|
+
readonly anonymous: false;
|
|
386
|
+
}, {
|
|
387
|
+
readonly type: "event";
|
|
388
|
+
readonly name: "Paused";
|
|
389
|
+
readonly inputs: readonly [{
|
|
390
|
+
readonly name: "account";
|
|
391
|
+
readonly type: "address";
|
|
392
|
+
readonly indexed: false;
|
|
393
|
+
readonly internalType: "address";
|
|
394
|
+
}];
|
|
395
|
+
readonly anonymous: false;
|
|
396
|
+
}, {
|
|
397
|
+
readonly type: "event";
|
|
398
|
+
readonly name: "RoleAdminChanged";
|
|
399
|
+
readonly inputs: readonly [{
|
|
400
|
+
readonly name: "role";
|
|
401
|
+
readonly type: "bytes32";
|
|
402
|
+
readonly indexed: true;
|
|
403
|
+
readonly internalType: "bytes32";
|
|
404
|
+
}, {
|
|
405
|
+
readonly name: "previousAdminRole";
|
|
406
|
+
readonly type: "bytes32";
|
|
407
|
+
readonly indexed: true;
|
|
408
|
+
readonly internalType: "bytes32";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "newAdminRole";
|
|
411
|
+
readonly type: "bytes32";
|
|
412
|
+
readonly indexed: true;
|
|
413
|
+
readonly internalType: "bytes32";
|
|
414
|
+
}];
|
|
415
|
+
readonly anonymous: false;
|
|
416
|
+
}, {
|
|
417
|
+
readonly type: "event";
|
|
418
|
+
readonly name: "RoleGranted";
|
|
419
|
+
readonly inputs: readonly [{
|
|
420
|
+
readonly name: "role";
|
|
421
|
+
readonly type: "bytes32";
|
|
422
|
+
readonly indexed: true;
|
|
423
|
+
readonly internalType: "bytes32";
|
|
424
|
+
}, {
|
|
425
|
+
readonly name: "account";
|
|
426
|
+
readonly type: "address";
|
|
427
|
+
readonly indexed: true;
|
|
428
|
+
readonly internalType: "address";
|
|
429
|
+
}, {
|
|
430
|
+
readonly name: "sender";
|
|
431
|
+
readonly type: "address";
|
|
432
|
+
readonly indexed: true;
|
|
433
|
+
readonly internalType: "address";
|
|
434
|
+
}];
|
|
435
|
+
readonly anonymous: false;
|
|
436
|
+
}, {
|
|
437
|
+
readonly type: "event";
|
|
438
|
+
readonly name: "RoleRevoked";
|
|
439
|
+
readonly inputs: readonly [{
|
|
440
|
+
readonly name: "role";
|
|
441
|
+
readonly type: "bytes32";
|
|
442
|
+
readonly indexed: true;
|
|
443
|
+
readonly internalType: "bytes32";
|
|
444
|
+
}, {
|
|
445
|
+
readonly name: "account";
|
|
446
|
+
readonly type: "address";
|
|
447
|
+
readonly indexed: true;
|
|
448
|
+
readonly internalType: "address";
|
|
449
|
+
}, {
|
|
450
|
+
readonly name: "sender";
|
|
451
|
+
readonly type: "address";
|
|
452
|
+
readonly indexed: true;
|
|
453
|
+
readonly internalType: "address";
|
|
454
|
+
}];
|
|
455
|
+
readonly anonymous: false;
|
|
456
|
+
}, {
|
|
457
|
+
readonly type: "event";
|
|
458
|
+
readonly name: "Swap";
|
|
459
|
+
readonly inputs: readonly [{
|
|
460
|
+
readonly name: "sender";
|
|
461
|
+
readonly type: "address";
|
|
462
|
+
readonly indexed: true;
|
|
463
|
+
readonly internalType: "address";
|
|
464
|
+
}, {
|
|
465
|
+
readonly name: "tokenIn";
|
|
466
|
+
readonly type: "address";
|
|
467
|
+
readonly indexed: false;
|
|
468
|
+
readonly internalType: "address";
|
|
469
|
+
}, {
|
|
470
|
+
readonly name: "amountIn";
|
|
471
|
+
readonly type: "uint256";
|
|
472
|
+
readonly indexed: false;
|
|
473
|
+
readonly internalType: "uint256";
|
|
474
|
+
}, {
|
|
475
|
+
readonly name: "aggregator";
|
|
476
|
+
readonly type: "address";
|
|
477
|
+
readonly indexed: true;
|
|
478
|
+
readonly internalType: "address";
|
|
479
|
+
}, {
|
|
480
|
+
readonly name: "tokenOut";
|
|
481
|
+
readonly type: "address";
|
|
482
|
+
readonly indexed: true;
|
|
483
|
+
readonly internalType: "address";
|
|
484
|
+
}, {
|
|
485
|
+
readonly name: "amountOut";
|
|
486
|
+
readonly type: "uint256";
|
|
487
|
+
readonly indexed: false;
|
|
488
|
+
readonly internalType: "uint256";
|
|
489
|
+
}, {
|
|
490
|
+
readonly name: "fees";
|
|
491
|
+
readonly type: "uint256";
|
|
492
|
+
readonly indexed: false;
|
|
493
|
+
readonly internalType: "uint256";
|
|
494
|
+
}];
|
|
495
|
+
readonly anonymous: false;
|
|
496
|
+
}, {
|
|
497
|
+
readonly type: "event";
|
|
498
|
+
readonly name: "SwapAndStake";
|
|
499
|
+
readonly inputs: readonly [{
|
|
500
|
+
readonly name: "sender";
|
|
501
|
+
readonly type: "address";
|
|
502
|
+
readonly indexed: true;
|
|
503
|
+
readonly internalType: "address";
|
|
504
|
+
}, {
|
|
505
|
+
readonly name: "receiver";
|
|
506
|
+
readonly type: "address";
|
|
507
|
+
readonly indexed: true;
|
|
508
|
+
readonly internalType: "address";
|
|
509
|
+
}, {
|
|
510
|
+
readonly name: "rewardVault";
|
|
511
|
+
readonly type: "address";
|
|
512
|
+
readonly indexed: true;
|
|
513
|
+
readonly internalType: "address";
|
|
514
|
+
}, {
|
|
515
|
+
readonly name: "amount";
|
|
516
|
+
readonly type: "uint256";
|
|
517
|
+
readonly indexed: false;
|
|
518
|
+
readonly internalType: "uint256";
|
|
519
|
+
}];
|
|
520
|
+
readonly anonymous: false;
|
|
521
|
+
}, {
|
|
522
|
+
readonly type: "event";
|
|
523
|
+
readonly name: "Unpaused";
|
|
524
|
+
readonly inputs: readonly [{
|
|
525
|
+
readonly name: "account";
|
|
526
|
+
readonly type: "address";
|
|
527
|
+
readonly indexed: false;
|
|
528
|
+
readonly internalType: "address";
|
|
529
|
+
}];
|
|
530
|
+
readonly anonymous: false;
|
|
531
|
+
}, {
|
|
532
|
+
readonly type: "error";
|
|
533
|
+
readonly name: "AccessControlBadConfirmation";
|
|
534
|
+
readonly inputs: readonly [];
|
|
535
|
+
}, {
|
|
536
|
+
readonly type: "error";
|
|
537
|
+
readonly name: "AccessControlUnauthorizedAccount";
|
|
538
|
+
readonly inputs: readonly [{
|
|
539
|
+
readonly name: "account";
|
|
540
|
+
readonly type: "address";
|
|
541
|
+
readonly internalType: "address";
|
|
542
|
+
}, {
|
|
543
|
+
readonly name: "neededRole";
|
|
544
|
+
readonly type: "bytes32";
|
|
545
|
+
readonly internalType: "bytes32";
|
|
546
|
+
}];
|
|
547
|
+
}, {
|
|
548
|
+
readonly type: "error";
|
|
549
|
+
readonly name: "AggregatorNotWhitelisted";
|
|
550
|
+
readonly inputs: readonly [];
|
|
551
|
+
}, {
|
|
552
|
+
readonly type: "error";
|
|
553
|
+
readonly name: "EnforcedPause";
|
|
554
|
+
readonly inputs: readonly [];
|
|
555
|
+
}, {
|
|
556
|
+
readonly type: "error";
|
|
557
|
+
readonly name: "ExpectedPause";
|
|
558
|
+
readonly inputs: readonly [];
|
|
559
|
+
}, {
|
|
560
|
+
readonly type: "error";
|
|
561
|
+
readonly name: "InvalidInputToken";
|
|
562
|
+
readonly inputs: readonly [];
|
|
563
|
+
}, {
|
|
564
|
+
readonly type: "error";
|
|
565
|
+
readonly name: "InvalidNativeTokenAmount";
|
|
566
|
+
readonly inputs: readonly [];
|
|
567
|
+
}, {
|
|
568
|
+
readonly type: "error";
|
|
569
|
+
readonly name: "InvalidOutputToken";
|
|
570
|
+
readonly inputs: readonly [];
|
|
571
|
+
}, {
|
|
572
|
+
readonly type: "error";
|
|
573
|
+
readonly name: "Reentrancy";
|
|
574
|
+
readonly inputs: readonly [];
|
|
575
|
+
}, {
|
|
576
|
+
readonly type: "error";
|
|
577
|
+
readonly name: "RewardVaultNotWhitelisted";
|
|
578
|
+
readonly inputs: readonly [];
|
|
579
|
+
}, {
|
|
580
|
+
readonly type: "error";
|
|
581
|
+
readonly name: "TokenOutCannotBeSame";
|
|
582
|
+
readonly inputs: readonly [];
|
|
583
|
+
}, {
|
|
584
|
+
readonly type: "error";
|
|
585
|
+
readonly name: "TokenOutIsNotStakeToken";
|
|
586
|
+
readonly inputs: readonly [];
|
|
587
|
+
}, {
|
|
588
|
+
readonly type: "error";
|
|
589
|
+
readonly name: "ZeroAddress";
|
|
590
|
+
readonly inputs: readonly [];
|
|
591
|
+
}];
|
|
592
|
+
|
|
593
|
+
export { aggregatorsRouterAbi as a };
|
|
@@ -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};
|