@berachain/berajs 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BeraError-D1HS_rbb.d.cts → BeraError-_mQdkanr.d.cts} +35 -10
- package/dist/{BeraError-D1HS_rbb.d.ts → BeraError-_mQdkanr.d.ts} +35 -10
- package/dist/HoneyConfigProvider-CK6mOKFH.d.ts +390 -0
- package/dist/HoneyConfigProvider-Ca3ouozs.d.cts +390 -0
- package/dist/{RequestError-D8AE6xnI.d.cts → RequestError-A8XJ6QR9.d.cts} +1 -1
- package/dist/{RequestError-m4jxyM7D.d.ts → RequestError-Dk97z8rm.d.ts} +1 -1
- package/dist/abi/exports.cjs +2 -0
- package/dist/abi/exports.cjs.map +1 -0
- package/dist/abi/{index.d.cts → exports.d.cts} +12369 -9122
- package/dist/abi/{index.d.ts → exports.d.ts} +12369 -9122
- package/dist/abi/exports.mjs +2 -0
- package/dist/abi/exports.mjs.map +1 -0
- package/dist/actions/exports.cjs +2 -0
- package/dist/actions/exports.cjs.map +1 -0
- package/dist/actions/{index.d.cts → exports.d.cts} +80 -107
- package/dist/actions/{index.d.ts → exports.d.ts} +80 -107
- package/dist/actions/exports.mjs +2 -0
- package/dist/actions/exports.mjs.map +1 -0
- package/dist/chunk-575OK77P.mjs +2 -0
- package/dist/chunk-575OK77P.mjs.map +1 -0
- package/dist/chunk-7GWTHOLO.mjs +2 -0
- package/dist/chunk-7GWTHOLO.mjs.map +1 -0
- package/dist/chunk-7SC4VD3U.cjs +2 -0
- package/dist/chunk-7SC4VD3U.cjs.map +1 -0
- package/dist/chunk-BHNQX4XC.mjs +2 -0
- package/dist/chunk-BHNQX4XC.mjs.map +1 -0
- package/dist/chunk-BOYZVULX.cjs +2 -0
- package/dist/chunk-BOYZVULX.cjs.map +1 -0
- package/dist/chunk-C3FHGFLK.mjs +2 -0
- package/dist/chunk-C3FHGFLK.mjs.map +1 -0
- package/dist/chunk-C3G5KXCH.mjs +2 -0
- package/dist/chunk-C3G5KXCH.mjs.map +1 -0
- package/dist/chunk-CYKCYPFR.cjs +2 -0
- package/dist/chunk-CYKCYPFR.cjs.map +1 -0
- package/dist/chunk-F4BKSBEM.mjs +2 -0
- package/dist/chunk-F4BKSBEM.mjs.map +1 -0
- package/dist/chunk-FL2N3XHK.cjs +2 -0
- package/dist/chunk-FL2N3XHK.cjs.map +1 -0
- package/dist/chunk-G6NA6NSM.mjs +4 -0
- package/dist/chunk-G6NA6NSM.mjs.map +1 -0
- package/dist/chunk-H2QSRMVS.mjs +2 -0
- package/dist/chunk-H2QSRMVS.mjs.map +1 -0
- package/dist/chunk-IJM76AWK.cjs +4 -0
- package/dist/chunk-IJM76AWK.cjs.map +1 -0
- package/dist/chunk-MTS5SZLA.mjs +2 -0
- package/dist/chunk-MTS5SZLA.mjs.map +1 -0
- package/dist/chunk-MUNAP5TM.cjs +2 -0
- package/dist/chunk-MUNAP5TM.cjs.map +1 -0
- package/dist/chunk-NAXAZJJY.mjs +2 -0
- package/dist/chunk-NAXAZJJY.mjs.map +1 -0
- package/dist/chunk-OGJMSGB2.mjs +2 -0
- package/dist/chunk-OGJMSGB2.mjs.map +1 -0
- package/dist/chunk-OIYXOKTT.cjs +2 -0
- package/dist/chunk-OIYXOKTT.cjs.map +1 -0
- package/dist/chunk-OS5AJMYJ.cjs +2 -0
- package/dist/chunk-OS5AJMYJ.cjs.map +1 -0
- package/dist/chunk-Q3SCM6WL.mjs +2 -0
- package/dist/chunk-Q3SCM6WL.mjs.map +1 -0
- package/dist/chunk-SWMJQOH6.cjs +2 -0
- package/dist/chunk-SWMJQOH6.cjs.map +1 -0
- package/dist/chunk-TEBJWAVU.mjs +2 -0
- package/dist/chunk-TEBJWAVU.mjs.map +1 -0
- package/dist/chunk-TJWKS54T.mjs +2 -0
- package/dist/chunk-TJWKS54T.mjs.map +1 -0
- package/dist/chunk-UQUWMHVF.cjs +2 -0
- package/dist/chunk-UQUWMHVF.cjs.map +1 -0
- package/dist/chunk-UXUWSRVV.cjs +2 -0
- package/dist/chunk-UXUWSRVV.cjs.map +1 -0
- package/dist/chunk-VP7XUOSI.cjs +2 -0
- package/dist/chunk-VP7XUOSI.cjs.map +1 -0
- package/dist/chunk-VXL2ZZ4X.cjs +2 -0
- package/dist/chunk-VXL2ZZ4X.cjs.map +1 -0
- package/dist/chunk-WRFDB3QJ.cjs +2 -0
- package/dist/chunk-WRFDB3QJ.cjs.map +1 -0
- package/dist/chunk-WTCBORPB.cjs +2 -0
- package/dist/chunk-WTCBORPB.cjs.map +1 -0
- package/dist/chunk-XNJLSA6P.cjs +2 -0
- package/dist/chunk-XNJLSA6P.cjs.map +1 -0
- package/dist/chunk-YQGZMWDT.mjs +2 -0
- package/dist/chunk-YQGZMWDT.mjs.map +1 -0
- package/dist/chunk-YXLFOEZN.mjs +2 -0
- package/dist/chunk-YXLFOEZN.mjs.map +1 -0
- package/dist/chunk-ZAKA4TGK.cjs +2 -0
- package/dist/chunk-ZAKA4TGK.cjs.map +1 -0
- package/dist/chunk-ZQRACIGR.mjs +2 -0
- package/dist/chunk-ZQRACIGR.mjs.map +1 -0
- package/dist/contexts/exports.cjs +2 -0
- package/dist/contexts/exports.cjs.map +1 -0
- package/dist/contexts/{index.d.ts → exports.d.cts} +19 -28
- package/dist/contexts/{index.d.cts → exports.d.ts} +19 -28
- package/dist/contexts/exports.mjs +2 -0
- package/dist/contexts/exports.mjs.map +1 -0
- package/dist/contracts-CQIPk0Jc.d.cts +74 -0
- package/dist/contracts-CQIPk0Jc.d.ts +74 -0
- package/dist/{defaultFlags-V-tJs2K8.d.cts → defaultFlags-d0kPbT0i.d.cts} +1 -1
- package/dist/{defaultFlags-V-tJs2K8.d.ts → defaultFlags-d0kPbT0i.d.ts} +1 -1
- package/dist/dex-C_BB0b0O.d.cts +37 -0
- package/dist/dex-C_BB0b0O.d.ts +37 -0
- package/dist/enum/exports.cjs +2 -0
- package/dist/enum/exports.cjs.map +1 -0
- package/dist/enum/exports.d.cts +24 -0
- package/dist/enum/exports.d.ts +24 -0
- package/dist/enum/exports.mjs +2 -0
- package/dist/enum/exports.mjs.map +1 -0
- package/dist/errors/exports.cjs +2 -0
- package/dist/errors/exports.cjs.map +1 -0
- package/dist/errors/exports.d.cts +385 -0
- package/dist/errors/exports.d.ts +385 -0
- package/dist/errors/exports.mjs +2 -0
- package/dist/{getValidatorQueuedOperatorAddress-9xY2RUGe.d.cts → getValidatorQueuedOperatorAddress-BX35p2Lv.d.ts} +125 -15
- package/dist/{getValidatorQueuedOperatorAddress-Ne2zoiiV.d.ts → getValidatorQueuedOperatorAddress-It0GsdvQ.d.cts} +125 -15
- package/dist/global.d-Ba-NIojH.d.cts +474 -0
- package/dist/global.d-By70bEv2.d.ts +474 -0
- package/dist/honey-CYm0RWf4.d.cts +14 -0
- package/dist/honey-CYm0RWf4.d.ts +14 -0
- package/dist/hooks/exports.cjs +4 -0
- package/dist/hooks/exports.cjs.map +1 -0
- package/dist/hooks/{index.d.cts → exports.d.cts} +223 -173
- package/dist/hooks/{index.d.ts → exports.d.ts} +223 -173
- package/dist/hooks/exports.mjs +4 -0
- package/dist/hooks/exports.mjs.map +1 -0
- package/dist/{BexStatusProvider-nS3NcdxI.d.cts → transactionStore-BvStaXf3.d.ts} +41 -1
- package/dist/{BexStatusProvider-nS3NcdxI.d.ts → transactionStore-CQrGYSY2.d.cts} +41 -1
- package/dist/{txnEnum-BQKDfaeH.d.cts → txnEnum-BYNbCxla.d.cts} +1 -0
- package/dist/{txnEnum-BQKDfaeH.d.ts → txnEnum-BYNbCxla.d.ts} +1 -0
- package/dist/types/exports.cjs +1 -0
- package/dist/types/exports.cjs.map +1 -0
- package/dist/types/exports.d.cts +58 -0
- package/dist/types/exports.d.ts +58 -0
- package/dist/types/exports.mjs +1 -0
- package/dist/{useHoneySwapState-C-9BV4VB.d.cts → useHoneySwapState-B-vmIP1b.d.cts} +1 -1
- package/dist/{useHoneySwapState-CUY5Sm1b.d.ts → useHoneySwapState-D1DKG_Of.d.ts} +1 -1
- package/dist/utils/exports.cjs +2 -0
- package/dist/utils/exports.cjs.map +1 -0
- package/dist/utils/{index.d.cts → exports.d.cts} +83 -20
- package/dist/utils/{index.d.ts → exports.d.ts} +83 -20
- package/dist/utils/exports.mjs +2 -0
- package/dist/utils/exports.mjs.map +1 -0
- package/package.json +16 -17
- package/src/abi/{index.ts → exports.ts} +3 -0
- package/src/abi/pol/LSTStakerVault.ts +2032 -0
- package/src/abi/utils/openChainErrors.ts +71 -30
- package/src/abi/utils/thirdwebMinimalAccount.ts +616 -0
- package/src/actions/clients/BeraApolloClient.ts +8 -6
- package/src/actions/dex/__tests__/aggregators.unit.test.ts +2 -5
- package/src/actions/dex/aggregators/base.ts +74 -16
- package/src/actions/dex/aggregators/bex.ts +54 -74
- package/src/actions/dex/aggregators/bgt.ts +31 -8
- package/src/actions/dex/aggregators/{enso.ts → enso/enso.ts} +18 -14
- package/src/actions/dex/aggregators/enso/ensoErc4626.debug.test.ts +37 -0
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +176 -0
- package/src/actions/dex/aggregators/erc4626.ts +122 -0
- package/src/actions/dex/aggregators/fly.ts +59 -53
- package/src/actions/dex/aggregators/haiku.ts +52 -54
- package/src/actions/dex/aggregators/honey.ts +54 -45
- package/src/actions/dex/aggregators/kyberswap.ts +41 -39
- package/src/actions/dex/aggregators/oogabooga.ts +47 -46
- package/src/actions/dex/aggregators/openOcean.ts +51 -46
- package/src/actions/dex/aggregators/wbera.ts +54 -42
- package/src/actions/dex/b-sdk.ts +5 -2
- package/src/actions/dex/getIsTokenExploited.ts +2 -2
- package/src/actions/enso/{zap.ts → getEnsoSwapBundle.ts} +4 -5
- package/src/actions/enso/getEnsoUserTokensWithBalances.debug.test.ts +73 -0
- package/src/actions/enso/{getEnsoUserToken.ts → getEnsoUserTokensWithBalances.ts} +42 -30
- package/src/actions/enso/util.ts +1 -1
- package/src/actions/{index.ts → exports.ts} +5 -0
- package/src/actions/governance/__tests__/checkProposalField.unit.test.ts +1 -1
- package/src/actions/governance/__tests__/getQuorum.integration.test.ts +1 -1
- package/src/actions/governance/checkProposalField.ts +1 -1
- package/src/actions/governance/computeActualStatus.ts +1 -1
- package/src/actions/governance/getBodyErrors.ts +1 -1
- package/src/actions/governance/getDecodedFunctionData.ts +1 -4
- package/src/actions/governance/getProposalDetails.ts +2 -2
- package/src/actions/governance/getProposalFromTx.ts +1 -2
- package/src/actions/governance/getProposalParams.ts +7 -8
- package/src/actions/governance/getQuorum.ts +1 -2
- package/src/actions/honey/getCollateralWeights.ts +1 -1
- package/src/actions/honey/getHoneyCollaterals.ts +1 -0
- package/src/actions/honey/getHoneyVaultsBalance.ts +51 -55
- package/src/actions/honey/getSwapPayload.ts +37 -35
- package/src/actions/honey/tests/pyth.integration.test.ts +0 -1
- package/src/actions/pol/__tests__/getAllValidators.integration.test.ts +1 -1
- package/src/actions/pol/getEarnedStakedBeraVault.ts +31 -0
- package/src/actions/pol/getGlobalData.ts +14 -13
- package/src/actions/pol/getLSTStakeConfig.ts +67 -0
- package/src/actions/pol/getMarkets.ts +1 -1
- package/src/actions/pol/getRewardProofsByValidator.ts +1 -1
- package/src/actions/pol/getRewardVaultIncentives.ts +3 -5
- package/src/actions/pol/getRewardVaults.ts +2 -3
- package/src/actions/pol/getSWBeraVaultMetadata.ts +7 -5
- package/src/actions/pol/getSWBeraWithdrawal.ts +41 -27
- package/src/actions/pol/getStakeWithdrawalCooldown.ts +5 -7
- package/src/actions/pol/getStakingDailyAssets.ts +21 -0
- package/src/actions/pol/getStakingTokenInformation.ts +3 -4
- package/src/actions/pol/getTotalStakedAmount.ts +47 -0
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaults.ts +8 -6
- package/src/actions/pol/getUserVaultsBalance.ts +4 -16
- package/src/actions/prices/getTokenCurrentPrices.ts +8 -3
- package/src/actions/tokens/getAllowances.ts +68 -41
- package/src/actions/tokens/getTokenInformation.ts +4 -1
- package/src/actions/tokens/getTokens.ts +1 -1
- package/src/actions/tokens/getUnderlyingToken.ts +53 -0
- package/src/actions/tokens/getWalletBalances.integration.test.ts +53 -14
- package/src/actions/tokens/getWalletBalances.ts +69 -43
- package/src/actions/transactions/beraWriteContract.integration.test.ts +18 -6
- package/src/actions/transactions/beraWriteContract.ts +3 -3
- package/src/actions/validators/getUserActiveValidators.ts +2 -3
- package/src/actions/validators/getUserBoostsOnValidator.ts +2 -3
- package/src/contexts/BeraFlags/defaultFlags.ts +4 -0
- package/src/contexts/SwrFallback.tsx +13 -3
- package/src/contexts/TokensProvider.tsx +35 -8
- package/src/{hooks/transactions → contexts}/TransactionStoreContext.tsx +32 -4
- package/src/contexts/block-time-provider.tsx +1 -1
- package/src/contexts/{index.ts → exports.ts} +1 -1
- package/src/data/contracts.ts +16 -1
- package/src/enum/contracts.ts +13 -0
- package/src/enum/dex.ts +29 -0
- package/src/enum/{index.ts → exports.ts} +3 -0
- package/src/enum/governance.ts +61 -0
- package/src/enum/honey.ts +12 -0
- package/src/enum/txnEnum.ts +1 -0
- package/src/errors/BeraError.ts +50 -11
- package/src/errors/BeraMonitoring.ts +66 -0
- package/src/errors/BeraTracing.ts +79 -0
- package/src/errors/BeraTracing.unit.test.ts +198 -0
- package/src/errors/RequestError.ts +2 -2
- package/src/errors/assert.ts +4 -2
- package/src/errors/assert.unit.test.ts +6 -2
- package/src/errors/errorMap.ts +16 -6
- package/src/errors/{index.ts → exports.ts} +7 -0
- package/src/errors/getErrorMessage.ts +22 -3
- package/src/errors/getRevertReason.integration.test.ts +17 -5
- package/src/errors/getRevertReason.ts +41 -2
- package/src/errors/initBeraError.ts +52 -7
- package/src/errors/parseViemError.ts +114 -27
- package/src/errors/severity.ts +12 -0
- package/src/hooks/bend/useGetConvertToAssets.ts +3 -2
- package/src/hooks/dex/useAggregatorsQuotes.ts +126 -365
- package/src/hooks/dex/useAllUserPools.ts +1 -1
- package/src/hooks/dex/useApiPool.ts +1 -1
- package/src/hooks/dex/useCreatePool.ts +6 -5
- package/src/hooks/dex/useExploitedTokens.ts +1 -1
- package/src/hooks/dex/useLiquidityMismatch.ts +2 -5
- package/src/hooks/dex/useLpPosition.ts +21 -20
- package/src/hooks/dex/useMultipleTokenApprovalsWithSlippage.ts +40 -29
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +1 -1
- package/src/hooks/dex/usePoolEvents.ts +1 -1
- package/src/hooks/dex/usePools.ts +1 -1
- package/src/hooks/dex/usePriceImpact.ts +40 -0
- package/src/hooks/dex/useSingleAggregatorQuote.ts +350 -0
- package/src/hooks/enso/useBendZapSupply.ts +216 -0
- package/src/hooks/enso/useEnsoSwapBundle.ts +107 -0
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +43 -0
- package/src/hooks/enso/useZapStakeBera.ts +113 -0
- package/src/hooks/{index.ts → exports.ts} +18 -7
- package/src/hooks/governance/useCreateProposal.ts +8 -8
- package/src/hooks/governance/usePollAllProposals.ts +1 -1
- package/src/hooks/governance/usePollProposal.ts +1 -1
- package/src/hooks/governance/usePollProposalThreshold.ts +1 -1
- package/src/hooks/governance/usePollUserDelegates.ts +1 -1
- package/src/hooks/governance/useProposalState.ts +2 -2
- package/src/hooks/honey/useCappedGlobally.ts +2 -1
- package/src/hooks/honey/useCappedRelatively.ts +1 -1
- package/src/hooks/honey/useCollateralWeights.ts +2 -1
- package/src/hooks/honey/useHoneyAlerts.ts +11 -11
- package/src/hooks/honey/useHoneyBalances.ts +7 -3
- package/src/hooks/honey/useHoneyGlobalData.ts +2 -1
- package/src/hooks/honey/useHoneySwapState.ts +2 -1
- package/src/hooks/honey/useHoneyVaultsBalance.ts +1 -1
- package/src/hooks/honey/useIsBadCollateralAsset.ts +2 -1
- package/src/hooks/honey/useIsBasketModeEnabled.ts +1 -1
- package/src/hooks/honey/usePythLatestPrices.ts +1 -1
- package/src/hooks/pol/useOnChainRewardVault.ts +3 -2
- package/src/hooks/pol/usePollGlobalData.ts +1 -1
- package/src/hooks/pol/usePollMarkets.ts +1 -1
- package/src/hooks/pol/useQueuedBeraUnlock.ts +17 -15
- package/src/hooks/pol/useRewardTokenToBeraRate.ts +6 -3
- package/src/hooks/pol/useRewardVault.ts +1 -1
- package/src/hooks/pol/useRewardVaults.ts +1 -1
- package/src/hooks/pol/useSWBeraVaultMetadata.ts +35 -0
- package/src/hooks/pol/useStakedAPR.ts +38 -0
- package/src/hooks/pol/useStakedData.ts +117 -0
- package/src/hooks/pol/useStakedSnapshots.ts +52 -0
- package/src/hooks/pol/useTotalStakedAmount.ts +30 -0
- package/src/hooks/pol/useUserVaultInfo.ts +1 -1
- package/src/hooks/pol/useVaultValidators.ts +1 -1
- package/src/hooks/tokens/useMultipleTokenInformation.ts +15 -6
- package/src/hooks/tokens/usePollAllowances.ts +15 -19
- package/src/hooks/tokens/usePollBalance.ts +8 -4
- package/src/hooks/tokens/usePollWalletBalances.ts +14 -11
- package/src/hooks/tokens/useStakingTokenInformation.ts +2 -1
- package/src/hooks/tokens/useTokenCurrentPrice.ts +4 -2
- package/src/hooks/tokens/useTokenCurrentPrices.ts +92 -13
- package/src/hooks/tokens/useTokenInformation.ts +11 -6
- package/src/hooks/tokens/useTokenPrice.ts +21 -0
- package/src/hooks/tokens/useTokenPrices.ts +133 -0
- package/src/hooks/tokens/useTokens.ts +1 -0
- package/src/hooks/tokens/useUnderlyingAsset.ts +23 -0
- package/src/hooks/transactions/transactionStore.ts +86 -65
- package/src/hooks/transactions/transactionStore.unit.test.ts +54 -1
- package/src/hooks/transactions/useAddRecentTransaction.ts +1 -1
- package/src/hooks/transactions/useRecentTransactions.ts +1 -1
- package/src/hooks/transactions/useSetTransactionStatus.ts +31 -0
- package/src/hooks/useContractWrite/useBeraContractWrite.ts +2 -1
- package/src/hooks/validators/useAllValidators.ts +1 -1
- package/src/hooks/validators/useApiValidator.ts +1 -1
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +1 -1
- package/src/hooks/validators/useManagedValidatorByAccount.ts +1 -1
- package/src/hooks/validators/useManagedValidatorRole.ts +1 -1
- package/src/hooks/validators/useOnChainValidator.ts +1 -1
- package/src/hooks/validators/useStakingPoolBatch.ts +1 -1
- package/src/hooks/validators/useUserActiveValidators.ts +1 -1
- package/src/hooks/validators/useUserBoostsOnValidator.ts +1 -1
- package/src/hooks/validators/useUserClaimableIncentives.ts +8 -8
- package/src/hooks/validators/useValidator.ts +1 -1
- package/src/hooks/validators/useValidatorAnalytics.ts +1 -1
- package/src/hooks/validators/useValidatorCommission.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedCommission.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +1 -1
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +1 -1
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
- package/src/types/{dex.ts → dex.d.ts} +96 -67
- package/src/types/{enso.ts → enso.d.ts} +1 -1
- package/src/types/exports.ts +8 -0
- package/src/types/{global.ts → global.d.ts} +1 -30
- package/src/types/{governance.ts → governance.d.ts} +2 -64
- package/src/types/{honeySwap.ts → honeySwap.d.ts} +1 -13
- package/src/types/{pol.ts → pol.d.ts} +12 -1
- package/src/types/staking.d.ts +22 -0
- package/src/utils/createEmitter.ts +122 -0
- package/src/utils/createEmitter.unit.test.ts +149 -0
- package/src/utils/{index.ts → exports.ts} +3 -2
- package/src/utils/filter.ts +34 -0
- package/src/utils/formatNumber.ts +1 -1
- package/src/utils/formatNumber.unit.test.ts +2 -1
- package/src/utils/formatTokenList.ts +4 -10
- package/src/utils/getHoneySwapMessage.test.ts +1 -2
- package/src/utils/getServerSideClient.ts +4 -5
- package/src/utils/isDifferenceExceedingThreshold.ts +1 -1
- package/src/utils/layerZeroScan.ts +122 -0
- package/src/utils/math.ts +1 -1
- package/src/utils/parseWhiskToken.ts +15 -0
- package/src/utils/poolNamings.ts +1 -1
- package/src/utils/tokens.ts +23 -7
- package/dist/HoneyConfigProvider-6PXZJMSU.d.cts +0 -562
- package/dist/HoneyConfigProvider-CwDFrt02.d.ts +0 -562
- package/dist/abi/index.cjs +0 -2
- package/dist/abi/index.cjs.map +0 -1
- package/dist/abi/index.mjs +0 -2
- package/dist/actions/index.cjs +0 -2
- package/dist/actions/index.cjs.map +0 -1
- package/dist/actions/index.mjs +0 -2
- package/dist/aggregatorsRouter-Cny4B_MB.d.cts +0 -593
- package/dist/aggregatorsRouter-Cny4B_MB.d.ts +0 -593
- package/dist/chunk-22MQVFHP.cjs +0 -2
- package/dist/chunk-22MQVFHP.cjs.map +0 -1
- package/dist/chunk-3TKSVFZ3.mjs +0 -2
- package/dist/chunk-3TKSVFZ3.mjs.map +0 -1
- package/dist/chunk-6VF3RF53.cjs +0 -3
- package/dist/chunk-6VF3RF53.cjs.map +0 -1
- package/dist/chunk-6W22TFYA.mjs +0 -2
- package/dist/chunk-6W22TFYA.mjs.map +0 -1
- package/dist/chunk-AMRJ4B36.mjs +0 -2
- package/dist/chunk-AMRJ4B36.mjs.map +0 -1
- package/dist/chunk-DS2ZDVKU.mjs +0 -2
- package/dist/chunk-DS2ZDVKU.mjs.map +0 -1
- package/dist/chunk-ED43NYSE.cjs +0 -2
- package/dist/chunk-ED43NYSE.cjs.map +0 -1
- package/dist/chunk-EU4WFADK.cjs +0 -2
- package/dist/chunk-EU4WFADK.cjs.map +0 -1
- package/dist/chunk-HCTFDGXL.mjs +0 -2
- package/dist/chunk-HCTFDGXL.mjs.map +0 -1
- package/dist/chunk-IOSYBHKU.mjs +0 -2
- package/dist/chunk-IOSYBHKU.mjs.map +0 -1
- package/dist/chunk-JMKLDDKY.cjs +0 -2
- package/dist/chunk-JMKLDDKY.cjs.map +0 -1
- package/dist/chunk-KMKUXP2S.mjs +0 -3
- package/dist/chunk-KMKUXP2S.mjs.map +0 -1
- package/dist/chunk-OJXJ6CZ4.mjs +0 -4
- package/dist/chunk-OJXJ6CZ4.mjs.map +0 -1
- package/dist/chunk-PHIOKO3A.mjs +0 -2
- package/dist/chunk-PHIOKO3A.mjs.map +0 -1
- package/dist/chunk-QCK474XD.cjs +0 -2
- package/dist/chunk-QCK474XD.cjs.map +0 -1
- package/dist/chunk-REDXXUK7.cjs +0 -2
- package/dist/chunk-REDXXUK7.cjs.map +0 -1
- package/dist/chunk-S74ZMG2G.cjs +0 -2
- package/dist/chunk-S74ZMG2G.cjs.map +0 -1
- package/dist/chunk-TOAXF4YW.cjs +0 -2
- package/dist/chunk-TOAXF4YW.cjs.map +0 -1
- package/dist/chunk-UZ5CB33M.cjs +0 -2
- package/dist/chunk-UZ5CB33M.cjs.map +0 -1
- package/dist/chunk-VYWYJR63.mjs +0 -2
- package/dist/chunk-VYWYJR63.mjs.map +0 -1
- package/dist/chunk-XFPTQMAK.cjs +0 -4
- package/dist/chunk-XFPTQMAK.cjs.map +0 -1
- package/dist/chunk-YK4NINF5.mjs +0 -2
- package/dist/chunk-YK4NINF5.mjs.map +0 -1
- package/dist/contexts/index.cjs +0 -2
- package/dist/contexts/index.cjs.map +0 -1
- package/dist/contexts/index.mjs +0 -2
- package/dist/contexts/index.mjs.map +0 -1
- package/dist/enum/index.cjs +0 -2
- package/dist/enum/index.cjs.map +0 -1
- package/dist/enum/index.d.cts +0 -31
- package/dist/enum/index.d.ts +0 -31
- package/dist/enum/index.mjs +0 -2
- package/dist/enum/index.mjs.map +0 -1
- package/dist/errors/index.cjs +0 -2
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.d.cts +0 -204
- package/dist/errors/index.d.ts +0 -204
- package/dist/errors/index.mjs +0 -2
- package/dist/errors/index.mjs.map +0 -1
- package/dist/hooks/index.cjs +0 -4
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.mjs +0 -4
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/staking-F9Nx9TKD.d.ts +0 -246
- package/dist/staking-f4BpYH7l.d.cts +0 -246
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -56
- package/dist/types/index.d.ts +0 -56
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
- package/dist/utils/index.cjs +0 -2
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.mjs +0 -2
- package/dist/utils/index.mjs.map +0 -1
- package/src/actions/dex/getTransactionCount.ts +0 -29
- package/src/actions/enso/bend.ts +0 -143
- package/src/actions/enso/getEnsoUserToken.debug.test.ts +0 -57
- package/src/contexts/berajsProvider/context.tsx +0 -49
- package/src/contexts/berajsProvider/index.ts +0 -2
- package/src/contexts/berajsProvider/useBeraJs.ts +0 -18
- package/src/hooks/dex/usePollVaultIsPaused.ts +0 -30
- package/src/hooks/enso/useBendTransactionRequests.ts +0 -247
- package/src/hooks/enso/useEnsoZap.ts +0 -166
- package/src/hooks/enso/useZapTransactionRequests.ts +0 -81
- package/src/hooks/pol/useEarnedStakedBeraVault.ts +0 -59
- package/src/hooks/pol/useStakedBeraSnapshots.ts +0 -27
- package/src/hooks/validators/validatorRoleManager.ts +0 -0
- package/src/types/index.ts +0 -8
- package/src/types/staking.ts +0 -7
- package/src/utils/formatAggregatorsQuotes.ts +0 -57
- package/src/utils/formatAggregatorsQuotes.unit.test.ts +0 -191
- package/src/utils/sentryBeforeSend.ts +0 -52
- /package/dist/{abi/index.mjs.map → errors/exports.mjs.map} +0 -0
- /package/dist/{actions/index.mjs.map → types/exports.mjs.map} +0 -0
- /package/src/actions/dex/{__tests__ → aggregators}/haiku.integration.test.ts +0 -0
- /package/src/types/{bribe-boost.ts → bribe-boost.d.ts} +0 -0
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
export const thirdwebMinimalAccount = [
|
|
2
|
+
{
|
|
3
|
+
inputs: [
|
|
4
|
+
{ internalType: "uint256", name: "allowanceUsage", type: "uint256" },
|
|
5
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
6
|
+
{ internalType: "uint64", name: "period", type: "uint64" },
|
|
7
|
+
],
|
|
8
|
+
name: "AllowanceExceeded",
|
|
9
|
+
type: "error",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
inputs: [
|
|
13
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
14
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
15
|
+
],
|
|
16
|
+
name: "CallPolicyViolated",
|
|
17
|
+
type: "error",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
inputs: [
|
|
21
|
+
{ internalType: "bytes32", name: "param", type: "bytes32" },
|
|
22
|
+
{ internalType: "bytes32", name: "refValue", type: "bytes32" },
|
|
23
|
+
{ internalType: "uint8", name: "condition", type: "uint8" },
|
|
24
|
+
],
|
|
25
|
+
name: "ConditionFailed",
|
|
26
|
+
type: "error",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
inputs: [
|
|
30
|
+
{ internalType: "uint256", name: "actualLength", type: "uint256" },
|
|
31
|
+
{ internalType: "uint256", name: "expectedLength", type: "uint256" },
|
|
32
|
+
],
|
|
33
|
+
name: "InvalidDataLength",
|
|
34
|
+
type: "error",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
inputs: [
|
|
38
|
+
{ internalType: "address", name: "msgSender", type: "address" },
|
|
39
|
+
{ internalType: "address", name: "thisAddress", type: "address" },
|
|
40
|
+
],
|
|
41
|
+
name: "InvalidSignature",
|
|
42
|
+
type: "error",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
inputs: [
|
|
46
|
+
{ internalType: "uint256", name: "lifetimeUsage", type: "uint256" },
|
|
47
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
48
|
+
],
|
|
49
|
+
name: "LifetimeUsageExceeded",
|
|
50
|
+
type: "error",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
inputs: [
|
|
54
|
+
{ internalType: "uint256", name: "value", type: "uint256" },
|
|
55
|
+
{ internalType: "uint256", name: "maxValuePerUse", type: "uint256" },
|
|
56
|
+
],
|
|
57
|
+
name: "MaxValueExceeded",
|
|
58
|
+
type: "error",
|
|
59
|
+
},
|
|
60
|
+
{ inputs: [], name: "NoCallsToExecute", type: "error" },
|
|
61
|
+
{ inputs: [], name: "SessionExpired", type: "error" },
|
|
62
|
+
{ inputs: [], name: "SessionExpiresTooSoon", type: "error" },
|
|
63
|
+
{ inputs: [], name: "SessionZeroSigner", type: "error" },
|
|
64
|
+
{
|
|
65
|
+
inputs: [{ internalType: "address", name: "target", type: "address" }],
|
|
66
|
+
name: "TransferPolicyViolated",
|
|
67
|
+
type: "error",
|
|
68
|
+
},
|
|
69
|
+
{ inputs: [], name: "UIDAlreadyProcessed", type: "error" },
|
|
70
|
+
{
|
|
71
|
+
anonymous: false,
|
|
72
|
+
inputs: [
|
|
73
|
+
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
74
|
+
{
|
|
75
|
+
indexed: true,
|
|
76
|
+
internalType: "address",
|
|
77
|
+
name: "signer",
|
|
78
|
+
type: "address",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
indexed: true,
|
|
82
|
+
internalType: "address",
|
|
83
|
+
name: "executor",
|
|
84
|
+
type: "address",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
indexed: false,
|
|
88
|
+
internalType: "uint256",
|
|
89
|
+
name: "batchSize",
|
|
90
|
+
type: "uint256",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
name: "Executed",
|
|
94
|
+
type: "event",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
anonymous: false,
|
|
98
|
+
inputs: [
|
|
99
|
+
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
100
|
+
{
|
|
101
|
+
indexed: true,
|
|
102
|
+
internalType: "address",
|
|
103
|
+
name: "newSigner",
|
|
104
|
+
type: "address",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
components: [
|
|
108
|
+
{ internalType: "address", name: "signer", type: "address" },
|
|
109
|
+
{ internalType: "bool", name: "isWildcard", type: "bool" },
|
|
110
|
+
{ internalType: "uint256", name: "expiresAt", type: "uint256" },
|
|
111
|
+
{
|
|
112
|
+
components: [
|
|
113
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
114
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
115
|
+
{
|
|
116
|
+
internalType: "uint256",
|
|
117
|
+
name: "maxValuePerUse",
|
|
118
|
+
type: "uint256",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
components: [
|
|
122
|
+
{
|
|
123
|
+
internalType: "enum SessionLib.LimitType",
|
|
124
|
+
name: "limitType",
|
|
125
|
+
type: "uint8",
|
|
126
|
+
},
|
|
127
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
128
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
129
|
+
],
|
|
130
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
131
|
+
name: "valueLimit",
|
|
132
|
+
type: "tuple",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
components: [
|
|
136
|
+
{
|
|
137
|
+
internalType: "enum SessionLib.Condition",
|
|
138
|
+
name: "condition",
|
|
139
|
+
type: "uint8",
|
|
140
|
+
},
|
|
141
|
+
{ internalType: "uint64", name: "index", type: "uint64" },
|
|
142
|
+
{
|
|
143
|
+
internalType: "bytes32",
|
|
144
|
+
name: "refValue",
|
|
145
|
+
type: "bytes32",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
components: [
|
|
149
|
+
{
|
|
150
|
+
internalType: "enum SessionLib.LimitType",
|
|
151
|
+
name: "limitType",
|
|
152
|
+
type: "uint8",
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
internalType: "uint256",
|
|
156
|
+
name: "limit",
|
|
157
|
+
type: "uint256",
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
internalType: "uint256",
|
|
161
|
+
name: "period",
|
|
162
|
+
type: "uint256",
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
166
|
+
name: "limit",
|
|
167
|
+
type: "tuple",
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
internalType: "struct SessionLib.Constraint[]",
|
|
171
|
+
name: "constraints",
|
|
172
|
+
type: "tuple[]",
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
internalType: "struct SessionLib.CallSpec[]",
|
|
176
|
+
name: "callPolicies",
|
|
177
|
+
type: "tuple[]",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
components: [
|
|
181
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
182
|
+
{
|
|
183
|
+
internalType: "uint256",
|
|
184
|
+
name: "maxValuePerUse",
|
|
185
|
+
type: "uint256",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
components: [
|
|
189
|
+
{
|
|
190
|
+
internalType: "enum SessionLib.LimitType",
|
|
191
|
+
name: "limitType",
|
|
192
|
+
type: "uint8",
|
|
193
|
+
},
|
|
194
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
195
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
196
|
+
],
|
|
197
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
198
|
+
name: "valueLimit",
|
|
199
|
+
type: "tuple",
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
internalType: "struct SessionLib.TransferSpec[]",
|
|
203
|
+
name: "transferPolicies",
|
|
204
|
+
type: "tuple[]",
|
|
205
|
+
},
|
|
206
|
+
{ internalType: "bytes32", name: "uid", type: "bytes32" },
|
|
207
|
+
],
|
|
208
|
+
indexed: false,
|
|
209
|
+
internalType: "struct SessionLib.SessionSpec",
|
|
210
|
+
name: "sessionSpec",
|
|
211
|
+
type: "tuple",
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
name: "SessionCreated",
|
|
215
|
+
type: "event",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
anonymous: false,
|
|
219
|
+
inputs: [
|
|
220
|
+
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
221
|
+
{ indexed: true, internalType: "address", name: "from", type: "address" },
|
|
222
|
+
{
|
|
223
|
+
indexed: false,
|
|
224
|
+
internalType: "uint256",
|
|
225
|
+
name: "value",
|
|
226
|
+
type: "uint256",
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
name: "ValueReceived",
|
|
230
|
+
type: "event",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
inputs: [
|
|
234
|
+
{
|
|
235
|
+
components: [
|
|
236
|
+
{ internalType: "address", name: "signer", type: "address" },
|
|
237
|
+
{ internalType: "bool", name: "isWildcard", type: "bool" },
|
|
238
|
+
{ internalType: "uint256", name: "expiresAt", type: "uint256" },
|
|
239
|
+
{
|
|
240
|
+
components: [
|
|
241
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
242
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
243
|
+
{
|
|
244
|
+
internalType: "uint256",
|
|
245
|
+
name: "maxValuePerUse",
|
|
246
|
+
type: "uint256",
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
components: [
|
|
250
|
+
{
|
|
251
|
+
internalType: "enum SessionLib.LimitType",
|
|
252
|
+
name: "limitType",
|
|
253
|
+
type: "uint8",
|
|
254
|
+
},
|
|
255
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
256
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
257
|
+
],
|
|
258
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
259
|
+
name: "valueLimit",
|
|
260
|
+
type: "tuple",
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
components: [
|
|
264
|
+
{
|
|
265
|
+
internalType: "enum SessionLib.Condition",
|
|
266
|
+
name: "condition",
|
|
267
|
+
type: "uint8",
|
|
268
|
+
},
|
|
269
|
+
{ internalType: "uint64", name: "index", type: "uint64" },
|
|
270
|
+
{
|
|
271
|
+
internalType: "bytes32",
|
|
272
|
+
name: "refValue",
|
|
273
|
+
type: "bytes32",
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
components: [
|
|
277
|
+
{
|
|
278
|
+
internalType: "enum SessionLib.LimitType",
|
|
279
|
+
name: "limitType",
|
|
280
|
+
type: "uint8",
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
internalType: "uint256",
|
|
284
|
+
name: "limit",
|
|
285
|
+
type: "uint256",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
internalType: "uint256",
|
|
289
|
+
name: "period",
|
|
290
|
+
type: "uint256",
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
294
|
+
name: "limit",
|
|
295
|
+
type: "tuple",
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
internalType: "struct SessionLib.Constraint[]",
|
|
299
|
+
name: "constraints",
|
|
300
|
+
type: "tuple[]",
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
internalType: "struct SessionLib.CallSpec[]",
|
|
304
|
+
name: "callPolicies",
|
|
305
|
+
type: "tuple[]",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
components: [
|
|
309
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
310
|
+
{
|
|
311
|
+
internalType: "uint256",
|
|
312
|
+
name: "maxValuePerUse",
|
|
313
|
+
type: "uint256",
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
components: [
|
|
317
|
+
{
|
|
318
|
+
internalType: "enum SessionLib.LimitType",
|
|
319
|
+
name: "limitType",
|
|
320
|
+
type: "uint8",
|
|
321
|
+
},
|
|
322
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
323
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
324
|
+
],
|
|
325
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
326
|
+
name: "valueLimit",
|
|
327
|
+
type: "tuple",
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
internalType: "struct SessionLib.TransferSpec[]",
|
|
331
|
+
name: "transferPolicies",
|
|
332
|
+
type: "tuple[]",
|
|
333
|
+
},
|
|
334
|
+
{ internalType: "bytes32", name: "uid", type: "bytes32" },
|
|
335
|
+
],
|
|
336
|
+
internalType: "struct SessionLib.SessionSpec",
|
|
337
|
+
name: "sessionSpec",
|
|
338
|
+
type: "tuple",
|
|
339
|
+
},
|
|
340
|
+
{ internalType: "bytes", name: "signature", type: "bytes" },
|
|
341
|
+
],
|
|
342
|
+
name: "createSessionWithSig",
|
|
343
|
+
outputs: [],
|
|
344
|
+
stateMutability: "nonpayable",
|
|
345
|
+
type: "function",
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
inputs: [],
|
|
349
|
+
name: "eip712Domain",
|
|
350
|
+
outputs: [
|
|
351
|
+
{ internalType: "bytes1", name: "fields", type: "bytes1" },
|
|
352
|
+
{ internalType: "string", name: "name", type: "string" },
|
|
353
|
+
{ internalType: "string", name: "version", type: "string" },
|
|
354
|
+
{ internalType: "uint256", name: "chainId", type: "uint256" },
|
|
355
|
+
{ internalType: "address", name: "verifyingContract", type: "address" },
|
|
356
|
+
{ internalType: "bytes32", name: "salt", type: "bytes32" },
|
|
357
|
+
{ internalType: "uint256[]", name: "extensions", type: "uint256[]" },
|
|
358
|
+
],
|
|
359
|
+
stateMutability: "view",
|
|
360
|
+
type: "function",
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
inputs: [
|
|
364
|
+
{
|
|
365
|
+
components: [
|
|
366
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
367
|
+
{ internalType: "uint256", name: "value", type: "uint256" },
|
|
368
|
+
{ internalType: "bytes", name: "data", type: "bytes" },
|
|
369
|
+
],
|
|
370
|
+
internalType: "struct Call[]",
|
|
371
|
+
name: "calls",
|
|
372
|
+
type: "tuple[]",
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
name: "execute",
|
|
376
|
+
outputs: [],
|
|
377
|
+
stateMutability: "payable",
|
|
378
|
+
type: "function",
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
inputs: [
|
|
382
|
+
{
|
|
383
|
+
components: [
|
|
384
|
+
{
|
|
385
|
+
components: [
|
|
386
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
387
|
+
{ internalType: "uint256", name: "value", type: "uint256" },
|
|
388
|
+
{ internalType: "bytes", name: "data", type: "bytes" },
|
|
389
|
+
],
|
|
390
|
+
internalType: "struct Call[]",
|
|
391
|
+
name: "calls",
|
|
392
|
+
type: "tuple[]",
|
|
393
|
+
},
|
|
394
|
+
{ internalType: "bytes32", name: "uid", type: "bytes32" },
|
|
395
|
+
],
|
|
396
|
+
internalType: "struct WrappedCalls",
|
|
397
|
+
name: "wrappedCalls",
|
|
398
|
+
type: "tuple",
|
|
399
|
+
},
|
|
400
|
+
{ internalType: "bytes", name: "signature", type: "bytes" },
|
|
401
|
+
],
|
|
402
|
+
name: "executeWithSig",
|
|
403
|
+
outputs: [],
|
|
404
|
+
stateMutability: "payable",
|
|
405
|
+
type: "function",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
inputs: [{ internalType: "address", name: "signer", type: "address" }],
|
|
409
|
+
name: "getCallPoliciesForSigner",
|
|
410
|
+
outputs: [
|
|
411
|
+
{
|
|
412
|
+
components: [
|
|
413
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
414
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
415
|
+
{ internalType: "uint256", name: "maxValuePerUse", type: "uint256" },
|
|
416
|
+
{
|
|
417
|
+
components: [
|
|
418
|
+
{
|
|
419
|
+
internalType: "enum SessionLib.LimitType",
|
|
420
|
+
name: "limitType",
|
|
421
|
+
type: "uint8",
|
|
422
|
+
},
|
|
423
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
424
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
425
|
+
],
|
|
426
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
427
|
+
name: "valueLimit",
|
|
428
|
+
type: "tuple",
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
components: [
|
|
432
|
+
{
|
|
433
|
+
internalType: "enum SessionLib.Condition",
|
|
434
|
+
name: "condition",
|
|
435
|
+
type: "uint8",
|
|
436
|
+
},
|
|
437
|
+
{ internalType: "uint64", name: "index", type: "uint64" },
|
|
438
|
+
{ internalType: "bytes32", name: "refValue", type: "bytes32" },
|
|
439
|
+
{
|
|
440
|
+
components: [
|
|
441
|
+
{
|
|
442
|
+
internalType: "enum SessionLib.LimitType",
|
|
443
|
+
name: "limitType",
|
|
444
|
+
type: "uint8",
|
|
445
|
+
},
|
|
446
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
447
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
448
|
+
],
|
|
449
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
450
|
+
name: "limit",
|
|
451
|
+
type: "tuple",
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
internalType: "struct SessionLib.Constraint[]",
|
|
455
|
+
name: "constraints",
|
|
456
|
+
type: "tuple[]",
|
|
457
|
+
},
|
|
458
|
+
],
|
|
459
|
+
internalType: "struct SessionLib.CallSpec[]",
|
|
460
|
+
name: "",
|
|
461
|
+
type: "tuple[]",
|
|
462
|
+
},
|
|
463
|
+
],
|
|
464
|
+
stateMutability: "view",
|
|
465
|
+
type: "function",
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
inputs: [{ internalType: "address", name: "signer", type: "address" }],
|
|
469
|
+
name: "getSessionExpirationForSigner",
|
|
470
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
471
|
+
stateMutability: "view",
|
|
472
|
+
type: "function",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
inputs: [{ internalType: "address", name: "signer", type: "address" }],
|
|
476
|
+
name: "getSessionStateForSigner",
|
|
477
|
+
outputs: [
|
|
478
|
+
{
|
|
479
|
+
components: [
|
|
480
|
+
{
|
|
481
|
+
components: [
|
|
482
|
+
{ internalType: "uint256", name: "remaining", type: "uint256" },
|
|
483
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
484
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
485
|
+
{ internalType: "uint256", name: "index", type: "uint256" },
|
|
486
|
+
],
|
|
487
|
+
internalType: "struct SessionLib.LimitState[]",
|
|
488
|
+
name: "transferValue",
|
|
489
|
+
type: "tuple[]",
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
components: [
|
|
493
|
+
{ internalType: "uint256", name: "remaining", type: "uint256" },
|
|
494
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
495
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
496
|
+
{ internalType: "uint256", name: "index", type: "uint256" },
|
|
497
|
+
],
|
|
498
|
+
internalType: "struct SessionLib.LimitState[]",
|
|
499
|
+
name: "callValue",
|
|
500
|
+
type: "tuple[]",
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
components: [
|
|
504
|
+
{ internalType: "uint256", name: "remaining", type: "uint256" },
|
|
505
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
506
|
+
{ internalType: "bytes4", name: "selector", type: "bytes4" },
|
|
507
|
+
{ internalType: "uint256", name: "index", type: "uint256" },
|
|
508
|
+
],
|
|
509
|
+
internalType: "struct SessionLib.LimitState[]",
|
|
510
|
+
name: "callParams",
|
|
511
|
+
type: "tuple[]",
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
internalType: "struct SessionLib.SessionState",
|
|
515
|
+
name: "",
|
|
516
|
+
type: "tuple",
|
|
517
|
+
},
|
|
518
|
+
],
|
|
519
|
+
stateMutability: "view",
|
|
520
|
+
type: "function",
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
inputs: [{ internalType: "address", name: "signer", type: "address" }],
|
|
524
|
+
name: "getTransferPoliciesForSigner",
|
|
525
|
+
outputs: [
|
|
526
|
+
{
|
|
527
|
+
components: [
|
|
528
|
+
{ internalType: "address", name: "target", type: "address" },
|
|
529
|
+
{ internalType: "uint256", name: "maxValuePerUse", type: "uint256" },
|
|
530
|
+
{
|
|
531
|
+
components: [
|
|
532
|
+
{
|
|
533
|
+
internalType: "enum SessionLib.LimitType",
|
|
534
|
+
name: "limitType",
|
|
535
|
+
type: "uint8",
|
|
536
|
+
},
|
|
537
|
+
{ internalType: "uint256", name: "limit", type: "uint256" },
|
|
538
|
+
{ internalType: "uint256", name: "period", type: "uint256" },
|
|
539
|
+
],
|
|
540
|
+
internalType: "struct SessionLib.UsageLimit",
|
|
541
|
+
name: "valueLimit",
|
|
542
|
+
type: "tuple",
|
|
543
|
+
},
|
|
544
|
+
],
|
|
545
|
+
internalType: "struct SessionLib.TransferSpec[]",
|
|
546
|
+
name: "",
|
|
547
|
+
type: "tuple[]",
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
stateMutability: "view",
|
|
551
|
+
type: "function",
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
inputs: [
|
|
555
|
+
{ internalType: "bytes32", name: "hash", type: "bytes32" },
|
|
556
|
+
{ internalType: "bytes", name: "signature", type: "bytes" },
|
|
557
|
+
],
|
|
558
|
+
name: "isValidSignature",
|
|
559
|
+
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
|
|
560
|
+
stateMutability: "view",
|
|
561
|
+
type: "function",
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
inputs: [{ internalType: "address", name: "signer", type: "address" }],
|
|
565
|
+
name: "isWildcardSigner",
|
|
566
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
567
|
+
stateMutability: "view",
|
|
568
|
+
type: "function",
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
inputs: [
|
|
572
|
+
{ internalType: "address", name: "", type: "address" },
|
|
573
|
+
{ internalType: "address", name: "", type: "address" },
|
|
574
|
+
{ internalType: "uint256[]", name: "", type: "uint256[]" },
|
|
575
|
+
{ internalType: "uint256[]", name: "", type: "uint256[]" },
|
|
576
|
+
{ internalType: "bytes", name: "", type: "bytes" },
|
|
577
|
+
],
|
|
578
|
+
name: "onERC1155BatchReceived",
|
|
579
|
+
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
|
|
580
|
+
stateMutability: "nonpayable",
|
|
581
|
+
type: "function",
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
inputs: [
|
|
585
|
+
{ internalType: "address", name: "", type: "address" },
|
|
586
|
+
{ internalType: "address", name: "", type: "address" },
|
|
587
|
+
{ internalType: "uint256", name: "", type: "uint256" },
|
|
588
|
+
{ internalType: "uint256", name: "", type: "uint256" },
|
|
589
|
+
{ internalType: "bytes", name: "", type: "bytes" },
|
|
590
|
+
],
|
|
591
|
+
name: "onERC1155Received",
|
|
592
|
+
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
|
|
593
|
+
stateMutability: "nonpayable",
|
|
594
|
+
type: "function",
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
inputs: [
|
|
598
|
+
{ internalType: "address", name: "", type: "address" },
|
|
599
|
+
{ internalType: "address", name: "", type: "address" },
|
|
600
|
+
{ internalType: "uint256", name: "", type: "uint256" },
|
|
601
|
+
{ internalType: "bytes", name: "", type: "bytes" },
|
|
602
|
+
],
|
|
603
|
+
name: "onERC721Received",
|
|
604
|
+
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
|
|
605
|
+
stateMutability: "nonpayable",
|
|
606
|
+
type: "function",
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
|
|
610
|
+
name: "supportsInterface",
|
|
611
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
612
|
+
stateMutability: "view",
|
|
613
|
+
type: "function",
|
|
614
|
+
},
|
|
615
|
+
{ stateMutability: "payable", type: "receive" },
|
|
616
|
+
] as const;
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
type OperationVariables,
|
|
6
6
|
ServerError,
|
|
7
7
|
} from "@apollo/client";
|
|
8
|
-
import * as Sentry from "@sentry/nextjs";
|
|
9
8
|
|
|
10
9
|
import { appConfig } from "@berachain/config/internal";
|
|
11
10
|
|
|
12
11
|
import { BeraError } from "~/errors/BeraError";
|
|
12
|
+
import { BeraTracing } from "~/errors/BeraTracing";
|
|
13
13
|
import { RequestError } from "~/errors/RequestError";
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -60,16 +60,18 @@ export class BeraApolloClient extends ApolloClient {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
try {
|
|
63
|
-
const
|
|
63
|
+
const executeQuery = () =>
|
|
64
|
+
super.query<TData, TVariables>(
|
|
65
|
+
options as ApolloClient.QueryOptions<TData, TVariables>,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const res = await BeraTracing.startSpan(
|
|
64
69
|
{
|
|
65
70
|
name: `GraphQL ${queryName}`,
|
|
66
71
|
op: "BeraApolloClient.query",
|
|
67
72
|
attributes: tags,
|
|
68
73
|
},
|
|
69
|
-
|
|
70
|
-
super.query<TData, TVariables>(
|
|
71
|
-
options as ApolloClient.QueryOptions<TData, TVariables>,
|
|
72
|
-
),
|
|
74
|
+
executeQuery,
|
|
73
75
|
);
|
|
74
76
|
|
|
75
77
|
if (res.error || res.data === undefined) {
|
|
@@ -2,12 +2,9 @@ import { beforeEach, describe, expect, test } from "vitest";
|
|
|
2
2
|
|
|
3
3
|
import { ChainId } from "@berachain/config/internal";
|
|
4
4
|
|
|
5
|
+
import { Aggregators } from "~/enum/dex";
|
|
5
6
|
import { BeraError } from "~/errors/BeraError";
|
|
6
|
-
import {
|
|
7
|
-
Aggregators,
|
|
8
|
-
type IAggregatorArgs,
|
|
9
|
-
type IRawAggregatorQuote,
|
|
10
|
-
} from "~/types";
|
|
7
|
+
import type { IAggregatorArgs, IRawAggregatorQuote } from "~/types/dex";
|
|
11
8
|
import { BaseAggregator } from "../aggregators/base";
|
|
12
9
|
|
|
13
10
|
// Test implementation of BaseAggregator to access protected methods
|