@imtbl/checkout-widgets 2.24.0 → 2.24.1-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/browser/{AddTokensWidget-A8qPX24o.js → AddTokensWidget-CwL3dW01.js} +3 -3
- package/dist/browser/{BridgeWidget-DqnYCczC.js → BridgeWidget-CTpqCXez.js} +6 -6
- package/dist/browser/{CommerceWidget-BLVkxF1K.js → CommerceWidget-B8KjKeAb.js} +13 -13
- package/dist/browser/{FeesBreakdown-DUJ0v_u-.js → FeesBreakdown-BxSNPjKq.js} +1 -1
- package/dist/browser/{OnRampWidget-kBGeaK29.js → OnRampWidget-DPg5SiW1.js} +3 -3
- package/dist/browser/{SaleWidget-Cw-IV2SN.js → SaleWidget-Cb_a97Gp.js} +10 -10
- package/dist/browser/{SpendingCapHero-cGWTAKp3.js → SpendingCapHero-Bzu2mPRk.js} +1 -1
- package/dist/browser/{SwapWidget-beF0gT5f.js → SwapWidget-Cs_Kn1B5.js} +6 -6
- package/dist/browser/{TokenImage-z1aQ8ORH.js → TokenImage-DSvU0sju.js} +1 -1
- package/dist/browser/{TopUpView-BPhi1qH7.js → TopUpView-46P-pQlO.js} +1 -1
- package/dist/browser/{WalletApproveHero-F0FFDVaw.js → WalletApproveHero-BapUR0FQ.js} +2 -2
- package/dist/browser/{WalletWidget-CSUY6YWu.js → WalletWidget-C4k88Tqd.js} +3 -3
- package/dist/browser/{auto-track-DDY3EqOr.js → auto-track-NKFv7sOR.js} +1 -1
- package/dist/browser/{index-BJ5j0XHC.js → index-Bj6fKhiT.js} +19 -19
- package/dist/browser/{index-CU_ZjjLe.js → index-CE6fJsS4.js} +2 -2
- package/dist/browser/{index-CSR-_hTG.js → index-CigrTnR-.js} +1 -1
- package/dist/browser/{index-B6w36rZU.js → index-CnPg4cq4.js} +1 -1
- package/dist/browser/{index-NMzUpVld.js → index-DB-5H6fn.js} +1 -1
- package/dist/browser/{index-DN_nlZpW.js → index-DIi2D2Sk.js} +1 -1
- package/dist/browser/{index-UNDKy4kF.js → index-DUtDMn2M.js} +1 -1
- package/dist/browser/{index-CZvWIkbM.js → index-DkN9NihW.js} +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{index.umd-_ntE43Kb.js → index.umd-CbRT3NhO.js} +1 -1
- package/dist/browser/{useInterval-D4mF_TNa.js → useInterval-Cg1C8cPf.js} +1 -1
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as reactExports, ac as hFlex, ad as _defineProperty, ae as _objectWithoutProperties, af as useForwardLocalDomRef, ag as _slicedToArray, ah as useResizeObserver, Q as useTheme, ai as usePrevious, aj as useGetMotionProfile, ak as useBrowserEffect, al as merge, am as getHeadingTextStyles, an as getMotionProfileSx, ao as useConvertSxToEmotionStyles, ap as DUMMY_WIDTH_PUSHER_TEXT, v as jsxs, q as jsx, x as Box, aq as useGetSubcomponentChild, ar as flattenChildren, as as vFlex, at as centerFlexChildren, au as SmartClone, av as FormControlLabel, aw as FormControlValidation, ax as FormControlCaption, w, d as de, ay as getDefaultExportFromCjs, az as commonjsGlobal, h as useTranslation, aA as Drawer, aB as Divider, H as Heading, y as Button, aC as useProvidersContext, F as useAnalytics, aD as WalletDrawer, aE as UnableToConnectDrawer, aF as Fragment, aG as Ue, U as UserJourney, aH as removeSpace, aI as getProviderSlugFromRdns, aJ as L, aK as isPassportProvider, aL as connectEIP6963Provider, aM as identifyUser, aN as ConnectEIP6963ProviderError, aO as ProvidersContextActions, aP as MenuItem, aQ as Ce, aR as SQUID_NATIVE_TOKEN, aS as commonjsRequire, W as getRemoteImage, aT as OnboardingPagination, aU as ViewContext, aV as useHandover, G as EventTargetContext, aW as HandoverTarget, V as ViewActions, k as getRemoteRive, aX as APPROVE_TXN_ANIMATION, aY as RiveStateMachineInput, aZ as HandoverContent, a_ as keyframes, B as Be, a$ as isNativeToken, b0 as getTokenImageByAddress, b1 as FramedImage, b2 as FramedIcon, b3 as ButtCon, b4 as TextInput, b5 as VerticalMenu, K as getDefaultTokenImage, b6 as TOKEN_PRIORITY_ORDER, A as Body, b7 as EllipsizedText, b8 as Tooltip, b9 as Sticker, ba as getDurationFormatted, bb as getTotalRouteFees, bc as getRouteAndTokenBalances, S as Stack, bd as Icon, be as Badge, bf as getFormattedAmounts, bg as getRemoteVideo, bh as FramedVideo, bi as listVariants, bj as motion, bk as listItemVariants, bl as Banner, bm as useRoutes, bn as useInjectedProviders, bo as X, bp as RouteError, z as SimpleLayout, bq as dist, O as orchestrationEvents, b as parseUnits, a5 as SharedViews, br as SquidFooter, bs as TOOLKIT_SQUID_URL, bt as merge$1, bu as SvgIcon, bv as WalletWarningHero, bw as getFormattedNumber, bx as FIXED_HANDOVER_DURATION, by as EXECUTE_TXN_ANIMATION, L as Link, bz as Trans, bA as useExecute, bB as getRouteChains, bC as t, bD as convertToNetworkChangeableProvider, bE as verifyAndSwitchChain, bF as PriceDisplay, a0 as LoadingView, bG as getFromAmountData, bH as viewReducer, bI as initialViewState, bJ as useSquid, bK as useTokens, bL as v4, bM as r, bN as isValidAddress, P as amountInputValidation, bO as fetchChains, bP as fetchBalances, R as CloudImage, a6 as ErrorView, bQ as ServiceUnavailableErrorView } from './index-
|
|
2
|
-
import { T as TokenImage } from './TokenImage-
|
|
3
|
-
import { f as fetchRiskAssessmentV2, r as resultHasSanctionedWallets, F as FeesBreakdown } from './FeesBreakdown-
|
|
1
|
+
import { r as reactExports, ac as hFlex, ad as _defineProperty, ae as _objectWithoutProperties, af as useForwardLocalDomRef, ag as _slicedToArray, ah as useResizeObserver, Q as useTheme, ai as usePrevious, aj as useGetMotionProfile, ak as useBrowserEffect, al as merge, am as getHeadingTextStyles, an as getMotionProfileSx, ao as useConvertSxToEmotionStyles, ap as DUMMY_WIDTH_PUSHER_TEXT, v as jsxs, q as jsx, x as Box, aq as useGetSubcomponentChild, ar as flattenChildren, as as vFlex, at as centerFlexChildren, au as SmartClone, av as FormControlLabel, aw as FormControlValidation, ax as FormControlCaption, w, d as de, ay as getDefaultExportFromCjs, az as commonjsGlobal, h as useTranslation, aA as Drawer, aB as Divider, H as Heading, y as Button, aC as useProvidersContext, F as useAnalytics, aD as WalletDrawer, aE as UnableToConnectDrawer, aF as Fragment, aG as Ue, U as UserJourney, aH as removeSpace, aI as getProviderSlugFromRdns, aJ as L, aK as isPassportProvider, aL as connectEIP6963Provider, aM as identifyUser, aN as ConnectEIP6963ProviderError, aO as ProvidersContextActions, aP as MenuItem, aQ as Ce, aR as SQUID_NATIVE_TOKEN, aS as commonjsRequire, W as getRemoteImage, aT as OnboardingPagination, aU as ViewContext, aV as useHandover, G as EventTargetContext, aW as HandoverTarget, V as ViewActions, k as getRemoteRive, aX as APPROVE_TXN_ANIMATION, aY as RiveStateMachineInput, aZ as HandoverContent, a_ as keyframes, B as Be, a$ as isNativeToken, b0 as getTokenImageByAddress, b1 as FramedImage, b2 as FramedIcon, b3 as ButtCon, b4 as TextInput, b5 as VerticalMenu, K as getDefaultTokenImage, b6 as TOKEN_PRIORITY_ORDER, A as Body, b7 as EllipsizedText, b8 as Tooltip, b9 as Sticker, ba as getDurationFormatted, bb as getTotalRouteFees, bc as getRouteAndTokenBalances, S as Stack, bd as Icon, be as Badge, bf as getFormattedAmounts, bg as getRemoteVideo, bh as FramedVideo, bi as listVariants, bj as motion, bk as listItemVariants, bl as Banner, bm as useRoutes, bn as useInjectedProviders, bo as X, bp as RouteError, z as SimpleLayout, bq as dist, O as orchestrationEvents, b as parseUnits, a5 as SharedViews, br as SquidFooter, bs as TOOLKIT_SQUID_URL, bt as merge$1, bu as SvgIcon, bv as WalletWarningHero, bw as getFormattedNumber, bx as FIXED_HANDOVER_DURATION, by as EXECUTE_TXN_ANIMATION, L as Link, bz as Trans, bA as useExecute, bB as getRouteChains, bC as t, bD as convertToNetworkChangeableProvider, bE as verifyAndSwitchChain, bF as PriceDisplay, a0 as LoadingView, bG as getFromAmountData, bH as viewReducer, bI as initialViewState, bJ as useSquid, bK as useTokens, bL as v4, bM as r, bN as isValidAddress, P as amountInputValidation, bO as fetchChains, bP as fetchBalances, R as CloudImage, a6 as ErrorView, bQ as ServiceUnavailableErrorView } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { T as TokenImage } from './TokenImage-DSvU0sju.js';
|
|
3
|
+
import { f as fetchRiskAssessmentV2, r as resultHasSanctionedWallets, F as FeesBreakdown } from './FeesBreakdown-BxSNPjKq.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The function `useInterval` sets up an interval that repeatedly calls a given callback function with
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { cp as toQuantity, cq as toBeHex, cr as getAddress, cs as keccak256, ct as concat, cu as AbiCoder, cv as axios, cw as ZeroAddress, C as Contract, Z as isAddress, bM as r, aQ as Ce$1, cx as we$1, cy as Se$1, r as reactExports, w as w$1, i as ie$1, v as jsxs, q as jsx, cz as ShimmerBox, aP as MenuItem, S as Stack, h as useTranslation, A as Body, y as Button, x as Box, cA as PASSPORT_URL, L as Link, cB as getChainImage, b1 as FramedImage, b7 as EllipsizedText, bd as Icon, cC as getChainIdBySlug, aU as ViewContext, F as useAnalytics, aF as Fragment, aB as Divider, U as UserJourney, V as ViewActions, cD as useWalletConnect, cE as Logo, cF as RawImage, cG as isWalletConnectProvider, I as CryptoFiatContext, a$ as isNativeToken, b0 as getTokenImageByAddress, cH as getNativeSymbolByChainSlug, cb as formatUnits, g as calculateCryptoToFiat, G as EventTargetContext, B as Be$1, cI as JsonRpcProvider, a1 as CryptoFiatActions, aJ as L$1, bn as useInjectedProviders, cJ as retry, M as HeaderNavigation, c5 as FooterLogo, aD as WalletDrawer, z as SimpleLayout, cK as getChainSlugById, aK as isPassportProvider, cL as DEFAULT_TRANSACTIONS_RETRY_POLICY, aG as Ue, a0 as LoadingView, Q as useTheme, H as Heading, cM as getChainNameById, cN as getWalletProviderNameByProvider, cO as isMetaMaskProvider, cP as He, aA as Drawer, b3 as ButtCon, cQ as ButtonNavigationStyles, O as orchestrationEvents, J as tokenValueFormat, e as formatZeroAmount, cR as NATIVE, bU as Z$1, b as parseUnits, P as amountInputValidation, R as CloudImage, cS as ETH_TOKEN_SYMBOL, W as getRemoteImage, bF as PriceDisplay, cT as Re$1, cU as DEFAULT_QUOTE_REFRESH_INTERVAL, cV as addChainChangedListener, cW as removeChainChangedListener, cX as di, cY as IMX_TOKEN_SYMBOL, a5 as SharedViews, cZ as DEFAULT_TOKEN_DECIMALS, j as dist, c_ as CHECKOUT_CDN_BASE_URL, c$ as heroBackGroundStyles, d0 as heroImageStyles, be as Badge, d1 as SimpleTextBody, d2 as FooterButton, d3 as getEthTokenImage, d4 as WITHDRAWAL_CLAIM_GAS_LIMIT, d5 as Wt, bH as viewReducer, bI as initialViewState, d6 as a, d7 as StatusView, c6 as StatusType, a6 as ErrorView, bQ as ServiceUnavailableErrorView, X as CryptoFiatProvider, K as getDefaultTokenImage } from './index-
|
|
2
|
-
import { B as BridgeWidgetViews, T as TopUpView } from './TopUpView-
|
|
3
|
-
import { T as TokenImage } from './TokenImage-
|
|
4
|
-
import { A as Accordion, S as SelectForm, T as TextInputForm, a as TransactionRejected, g as getAllowedBalances, b as gasAmountAccordionStyles, c as gasAmountHeadingStyles, N as NetworkSwitchDrawer, W as WalletApproveHero } from './WalletApproveHero-
|
|
5
|
-
import { f as fetchRiskAssessmentV2, r as resultHasSanctionedWallets, F as FeesBreakdown } from './FeesBreakdown-
|
|
6
|
-
import { u as useInterval } from './useInterval-
|
|
1
|
+
import { cp as toQuantity, cq as toBeHex, cr as getAddress, cs as keccak256, ct as concat, cu as AbiCoder, cv as axios, cw as ZeroAddress, C as Contract, Z as isAddress, bM as r, aQ as Ce$1, cx as we$1, cy as Se$1, r as reactExports, w as w$1, i as ie$1, v as jsxs, q as jsx, cz as ShimmerBox, aP as MenuItem, S as Stack, h as useTranslation, A as Body, y as Button, x as Box, cA as PASSPORT_URL, L as Link, cB as getChainImage, b1 as FramedImage, b7 as EllipsizedText, bd as Icon, cC as getChainIdBySlug, aU as ViewContext, F as useAnalytics, aF as Fragment, aB as Divider, U as UserJourney, V as ViewActions, cD as useWalletConnect, cE as Logo, cF as RawImage, cG as isWalletConnectProvider, I as CryptoFiatContext, a$ as isNativeToken, b0 as getTokenImageByAddress, cH as getNativeSymbolByChainSlug, cb as formatUnits, g as calculateCryptoToFiat, G as EventTargetContext, B as Be$1, cI as JsonRpcProvider, a1 as CryptoFiatActions, aJ as L$1, bn as useInjectedProviders, cJ as retry, M as HeaderNavigation, c5 as FooterLogo, aD as WalletDrawer, z as SimpleLayout, cK as getChainSlugById, aK as isPassportProvider, cL as DEFAULT_TRANSACTIONS_RETRY_POLICY, aG as Ue, a0 as LoadingView, Q as useTheme, H as Heading, cM as getChainNameById, cN as getWalletProviderNameByProvider, cO as isMetaMaskProvider, cP as He, aA as Drawer, b3 as ButtCon, cQ as ButtonNavigationStyles, O as orchestrationEvents, J as tokenValueFormat, e as formatZeroAmount, cR as NATIVE, bU as Z$1, b as parseUnits, P as amountInputValidation, R as CloudImage, cS as ETH_TOKEN_SYMBOL, W as getRemoteImage, bF as PriceDisplay, cT as Re$1, cU as DEFAULT_QUOTE_REFRESH_INTERVAL, cV as addChainChangedListener, cW as removeChainChangedListener, cX as di, cY as IMX_TOKEN_SYMBOL, a5 as SharedViews, cZ as DEFAULT_TOKEN_DECIMALS, j as dist, c_ as CHECKOUT_CDN_BASE_URL, c$ as heroBackGroundStyles, d0 as heroImageStyles, be as Badge, d1 as SimpleTextBody, d2 as FooterButton, d3 as getEthTokenImage, d4 as WITHDRAWAL_CLAIM_GAS_LIMIT, d5 as Wt, bH as viewReducer, bI as initialViewState, d6 as a, d7 as StatusView, c6 as StatusType, a6 as ErrorView, bQ as ServiceUnavailableErrorView, X as CryptoFiatProvider, K as getDefaultTokenImage } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { B as BridgeWidgetViews, T as TopUpView } from './TopUpView-46P-pQlO.js';
|
|
3
|
+
import { T as TokenImage } from './TokenImage-DSvU0sju.js';
|
|
4
|
+
import { A as Accordion, S as SelectForm, T as TextInputForm, a as TransactionRejected, g as getAllowedBalances, b as gasAmountAccordionStyles, c as gasAmountHeadingStyles, N as NetworkSwitchDrawer, W as WalletApproveHero } from './WalletApproveHero-BapUR0FQ.js';
|
|
5
|
+
import { f as fetchRiskAssessmentV2, r as resultHasSanctionedWallets, F as FeesBreakdown } from './FeesBreakdown-BxSNPjKq.js';
|
|
6
|
+
import { u as useInterval } from './useInterval-Cg1C8cPf.js';
|
|
7
7
|
|
|
8
8
|
const d=[{inputs:[{internalType:`address`,name:`_gateway`,type:`address`},{internalType:`address`,name:`_initializerAddress`,type:`address`}],stateMutability:`nonpayable`,type:`constructor`},{inputs:[],name:`CallerNotBridge`,type:`error`},{inputs:[],name:`InvalidAddress`,type:`error`},{inputs:[],name:`InvalidChildBridgeAdaptor`,type:`error`},{inputs:[],name:`InvalidChildChain`,type:`error`},{inputs:[],name:`InvalidSourceAddress`,type:`error`},{inputs:[],name:`InvalidSourceChain`,type:`error`},{inputs:[],name:`NoGas`,type:`error`},{inputs:[],name:`NotApprovedByGateway`,type:`error`},{inputs:[],name:`UnauthorizedInitializer`,type:`error`},{inputs:[],name:`UnsupportedOperation`,type:`error`},{inputs:[],name:`ZeroAddresses`,type:`error`},{anonymous:!1,inputs:[{indexed:!1,internalType:`string`,name:`sourceChain`,type:`string`},{indexed:!1,internalType:`string`,name:`sourceAddress_`,type:`string`},{indexed:!1,internalType:`bytes`,name:`payload_`,type:`bytes`}],name:`AdaptorExecute`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`string`,name:`childChain`,type:`string`},{indexed:!0,internalType:`string`,name:`childBridgeAdaptor`,type:`string`},{indexed:!0,internalType:`bytes`,name:`payload`,type:`bytes`}],name:`AxelarMessageSent`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`string`,name:`oldChildBridgeAdaptor`,type:`string`},{indexed:!1,internalType:`string`,name:`newChildBridgeAdaptor`,type:`string`}],name:`ChildBridgeAdaptorUpdated`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`string`,name:`oldChildChain`,type:`string`},{indexed:!0,internalType:`string`,name:`newChildChain`,type:`string`}],name:`ChildChainUpdated`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`oldGasService`,type:`address`},{indexed:!0,internalType:`address`,name:`newGasService`,type:`address`}],name:`GasServiceUpdated`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`uint8`,name:`version`,type:`uint8`}],name:`Initialized`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`bytes32`,name:`previousAdminRole`,type:`bytes32`},{indexed:!0,internalType:`bytes32`,name:`newAdminRole`,type:`bytes32`}],name:`RoleAdminChanged`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`address`,name:`account`,type:`address`},{indexed:!0,internalType:`address`,name:`sender`,type:`address`}],name:`RoleGranted`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`address`,name:`account`,type:`address`},{indexed:!0,internalType:`address`,name:`sender`,type:`address`}],name:`RoleRevoked`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`oldRootBridge`,type:`address`},{indexed:!0,internalType:`address`,name:`newRootBridge`,type:`address`}],name:`RootBridgeUpdated`,type:`event`},{inputs:[],name:`BRIDGE_MANAGER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`DEFAULT_ADMIN_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`GAS_SERVICE_MANAGER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`TARGET_MANAGER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childBridgeAdaptor`,outputs:[{internalType:`string`,name:``,type:`string`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childChainId`,outputs:[{internalType:`string`,name:``,type:`string`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes32`,name:`commandId`,type:`bytes32`},{internalType:`string`,name:`sourceChain`,type:`string`},{internalType:`string`,name:`sourceAddress`,type:`string`},{internalType:`bytes`,name:`payload`,type:`bytes`}],name:`execute`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`commandId`,type:`bytes32`},{internalType:`string`,name:`sourceChain`,type:`string`},{internalType:`string`,name:`sourceAddress`,type:`string`},{internalType:`bytes`,name:`payload`,type:`bytes`},{internalType:`string`,name:`tokenSymbol`,type:`string`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`executeWithToken`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`gasService`,outputs:[{internalType:`contract IAxelarGasService`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`gateway`,outputs:[{internalType:`contract IAxelarGateway`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`}],name:`getRoleAdmin`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantBridgeManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantGasServiceManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`grantRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantTargetManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`hasRole`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[{components:[{internalType:`address`,name:`defaultAdmin`,type:`address`},{internalType:`address`,name:`bridgeManager`,type:`address`},{internalType:`address`,name:`gasServiceManager`,type:`address`},{internalType:`address`,name:`targetManager`,type:`address`}],internalType:`struct IRootAxelarBridgeAdaptor.InitializationRoles`,name:`_adaptorRoles`,type:`tuple`},{internalType:`address`,name:`_rootBridge`,type:`address`},{internalType:`string`,name:`_childChainId`,type:`string`},{internalType:`string`,name:`_childBridgeAdaptor`,type:`string`},{internalType:`address`,name:`_gasService`,type:`address`}],name:`initialize`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`initializerAddress`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`renounceRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeBridgeManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeGasServiceManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`revokeRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeTargetManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`rootBridge`,outputs:[{internalType:`contract IRootERC20Bridge`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes`,name:`payload`,type:`bytes`},{internalType:`address`,name:`refundRecipient`,type:`address`}],name:`sendMessage`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`bytes4`,name:`interfaceId`,type:`bytes4`}],name:`supportsInterface`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`string`,name:`newChildBridgeAdaptor`,type:`string`}],name:`updateChildBridgeAdaptor`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`string`,name:`newChildChain`,type:`string`}],name:`updateChildChain`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`newGasService`,type:`address`}],name:`updateGasService`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`newRootBridge`,type:`address`}],name:`updateRootBridge`,outputs:[],stateMutability:`nonpayable`,type:`function`}];(function(e){return e.SUCCESS=`SUCCESS`,e.PENDING=`PENDING`,e.FAILED=`FAILED`,e})({});(function(e){return e.DEPOSIT=`DEPOSIT`,e.WITHDRAW=`WITHDRAW`,e.FINALISE_WITHDRAWAL=`FINALISE_WITHDRAWAL`,e})({});(function(e){return e[e.DEPOSIT_SOURCE=15e4]=`DEPOSIT_SOURCE`,e[e.DEPOSIT_DESTINATION=25e4]=`DEPOSIT_DESTINATION`,e[e.WITHDRAW_SOURCE=25e4]=`WITHDRAW_SOURCE`,e[e.WITHDRAW_DESTINATION=25e4]=`WITHDRAW_DESTINATION`,e[e.MAP_TOKEN_SOURCE=2e5]=`MAP_TOKEN_SOURCE`,e[e.MAP_TOKEN_DESTINATION=2e5]=`MAP_TOKEN_DESTINATION`,e[e.FINALISE_WITHDRAWAL=2e5]=`FINALISE_WITHDRAWAL`,e[e.APPROVE_TOKEN=55e3]=`APPROVE_TOKEN`,e})({});(function(e){return e.PENDING=`PENDING`,e.PROCESSING=`PROCESSING`,e.COMPLETE=`COMPLETE`,e.RETRY=`RETRY`,e.ERROR=`ERROR`,e.NOT_ENOUGH_GAS=`NOT_ENOUGH_GAS`,e.FLOW_RATE_CONTROLLED=`FLOW_RATE_CONTROLLED`,e})({});const g=`NATIVE`,_=`11155111`,y=`15003`,b=`13473`,x=`13371`,C=`0x0000000000000000000000000000000000000eee`,w=`0x7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869`,T=`0x07b0d4304f82012bd3b70b1d531c160e326067c90829e2a3d386722ad10b89c3`,E=`0x0000000000000000000000000000000000000000000000000000000000000004`,D={mainnet:`0x3a0c2ba54d6cbd3121f01b96dfd20e99d1696c9d`,testnet:`0x1CcCa691501174B4A623CeDA58cC8f1a76dc3439`,devnet:``},O={mainnet:`0xf57e7e7c23978c3caec3c3548e3d615c346e79ff`,testnet:`0xe2629e08f4125d14e446660028bD98ee60EE69F2`,devnet:``},ee={mainnet:`0x52a6c53869ce09a731cd772f245b97a4401d3348`,testnet:`0xe9E96d1aad82562b7588F03f49aD34186f996478`,devnet:``},te={mainnet:`0x4f49b53928a71e553bb1b0f66a5bcb54fd4e8932`,testnet:`0x6328Ac88ba8D466a0F551FC7C42C61d1aC7f92ab`,devnet:``},ne={mainnet:`0x4f49b53928a71e553bb1b0f66a5bcb54fd4e8932`,testnet:`0x6328Ac88ba8D466a0F551FC7C42C61d1aC7f92ab`,devnet:``},k={mainnet:`immutable`,testnet:`immutable`,devnet:``},A={mainnet:`0x4F4495243837681061C4743b74B3eEdf548D56A5`,testnet:`0xe432150cce91c13a887f7D836923d5597adD8E31`,devnet:``},j={rootChainID:_,childChainID:y},M={rootChainID:_,childChainID:b},N={rootChainID:`1`,childChainID:x},P={mainnet:`https://api.gmp.axelarscan.io`,testnet:`https://testnet.api.gmp.axelarscan.io`,devnet:`https://stagenet.api.gmp.axelarscan.io`},F={mainnet:`https://bridge-api.immutable.com/v1/tenderly/estimate`,testnet:`https://bridge-api.sandbox.immutable.com/v1/tenderly/estimate`,devnet:`https://bridge-api.dev.immutable.com/v1/tenderly/estimate`},I={11155111:{id:`ethereum-sepolia`,symbol:`ETH`},1:{id:`ethereum`,symbol:`ETH`},15003:{id:`immutable`,symbol:`IMX`},13473:{id:`immutable`,symbol:`IMX`},13371:{id:`immutable`,symbol:`IMX`}},L={deposit:{token:`deposit`,tokenTo:`depositTo`,native:`depositETH`,nativeTo:`depositToETH`},withdraw:{token:`withdraw`,tokenTo:`withdrawTo`,native:`withdrawIMX`,nativeTo:`withdrawIMXTo`}};(function(e){return e.UNSUPPORTED_ERROR=`UNSUPPORTED_ERROR`,e.INVALID_ADDRESS=`INVALID_ADDRESS`,e.INVALID_AMOUNT=`INVALID_AMOUNT`,e.INTERNAL_ERROR=`INTERNAL_ERROR`,e.PROVIDER_ERROR=`PROVIDER_ERROR`,e.ROOT_PROVIDER_ERROR=`ROOT_PROVIDER_ERROR`,e.CHILD_PROVIDER_ERROR=`CHILD_PROVIDER_ERROR`,e.TRANSACTION_REVERTED=`TRANSACTION_REVERTED`,e.INVALID_TOKEN=`INVALID_TOKEN`,e.INVALID_TRANSACTION=`INVALID_TRANSACTION`,e.INVALID_SOURCE_CHAIN_ID=`INVALID_SOURCE_CHAIN_ID`,e.INVALID_DESTINATION_CHAIN_ID=`INVALID_DESTINATION_CHAIN_ID`,e.INVALID_SOURCE_OR_DESTINATION_CHAIN=`INVALID_SOURCE_OR_DESTINATION_CHAIN`,e.CHAIN_IDS_MATCH=`CHAIN_IDS_MATCH`,e.AXELAR_CHAIN_NOT_FOUND=`AXELAR_CHAIN_NOT_FOUND`,e.AXELAR_GAS_ESTIMATE_FAILED=`AXELAR_GAS_ESTIMATE_FAILED`,e.TENDERLY_GAS_ESTIMATE_FAILED=`TENDERLY_GAS_ESTIMATE_FAILED`,e.INVALID_RECIPIENT=`INVALID_RECIPIENT`,e.FLOW_RATE_ERROR=`FLOW_RATE_ERROR`,e.INVALID_FLOWRATE_INDEX=`INVALID_FLOWRATE_INDEX`,e})({});var R=class extends Error{type;constructor(e,t){super(e),this.type=t;}};const z=async(e,t,n)=>{try{return await e()}catch(e){let r=`${t}: ${e.message||`UnknownError`}`;throw new R(r,t)}};async function B(e,t,r){return await z(async()=>new Contract(e,t,r),`PROVIDER_ERROR`)}function V(e,t){let n;return n=e===N.rootChainID||e===N.childChainID?t.mainnet:e===M.rootChainID||e===M.childChainID?t.testnet:t.devnet,n}function ie(e){return V(e,ee)}function ae(e,t){return e.toUpperCase()===ie(t).toUpperCase()}function H(e){return V(e,O)}function oe(e,t){return e.toUpperCase()===H(t).toUpperCase()}function se(e){return V(e,te)}function ce(e){return V(e,ne)}function le(e){return V(e,k)}function ue(e){return V(e,A)}function U(e){return V(e,P)}function de(e){return V(e,F)}function fe(e){return V(e,D)}function W(e,t){return e.toUpperCase()===fe(t).toUpperCase()}function G(e,t){return e.sourceChainId===t.rootChainID&&e.destinationChainId===t.childChainID&&e.action===`DEPOSIT`}function pe(e,t){return e===t.rootChainID}function K(e,t){return e.sourceChainId===t.childChainID&&e.destinationChainId===t.rootChainID&&e.action===`WITHDRAW`}function me(e,t,n){return K(t,n)&&!W(e,t.sourceChainId)}function he(e){return !(`token`in e)||e.token.toUpperCase()===`NATIVE`}function ge(e,t,n){return K(t,n)&&W(e,t.sourceChainId)}async function _e(e){let t=`Please upgrade to the latest version of the Bridge SDK or provide valid configuration`,n=await z(async()=>e.rootProvider.getNetwork(),`ROOT_PROVIDER_ERROR`);if(n.chainId.toString()!==e.bridgeInstance.rootChainID)throw new R(`Rootchain provider chainID ${n.chainId} does not match expected chainID ${e.bridgeInstance.rootChainID}. ${t}`,`UNSUPPORTED_ERROR`);let r=await z(async()=>e.childProvider.getNetwork(),`CHILD_PROVIDER_ERROR`);if(r.chainId.toString()!==e.bridgeInstance.childChainID)throw new R(`Childchain provider chainID ${r.chainId} does not match expected chainID ${e.bridgeInstance.childChainID}. ${t} `,`UNSUPPORTED_ERROR`)}async function ve(e,t,n,r){let i;if(t===r.bridgeInstance.rootChainID){if(!ae(e,t))return;i=r.rootProvider;}else {if(!oe(e,t))return;i=r.childProvider;}if((await i.getCode(n)).length<=2)return;let a=await B(n,[`function receive()`],i);try{await a.receive.estimateGas();}catch{try{await i.estimateGas({to:n});}catch{throw new R(`address ${n} is not a valid receipient`,`INVALID_RECIPIENT`)}}}async function q(e,t,n){if(e!==n.bridgeInstance.rootChainID&&e!==n.bridgeInstance.childChainID)throw new R(`the sourceChainId ${e} is not a valid`,`INVALID_SOURCE_CHAIN_ID`);if(t!==n.bridgeInstance.rootChainID&&t!==n.bridgeInstance.childChainID)throw new R(`the destinationChainId ${t} is not a valid`,`INVALID_DESTINATION_CHAIN_ID`);if(e===t)throw new R(`the sourceChainId ${e} cannot be the same as the destinationChainId ${t}`,`CHAIN_IDS_MATCH`)}async function ye(e,t){if(await q(e.sourceChainId,e.destinationChainId,t),!isAddress(e.senderAddress)||!isAddress(e.recipientAddress))throw new R(`address ${e.senderAddress} or ${e.recipientAddress} is not a valid address`,`INVALID_ADDRESS`);if(e.amount<=0n)throw new R(`deposit amount ${e.amount.toString()} is invalid`,`INVALID_AMOUNT`);if(e.token.toUpperCase()!==`NATIVE`&&!isAddress(e.token))throw new R(`token address ${e.token} is not a valid address`,`INVALID_ADDRESS`)}function be(e,t){if(e.action===`FINALISE_WITHDRAWAL`&&e.sourceChainId!==t.bridgeInstance.rootChainID)throw new R(`Finalised withdrawals must be on the root chain (${t.bridgeInstance.rootChainID})`,`INVALID_SOURCE_CHAIN_ID`);if(!(`destinationChainId`in e))throw new R(`DEPOSIT or WITHDRAW used without destinationChainId`,`INVALID_DESTINATION_CHAIN_ID`);let n={sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,action:e.action};if(!G(n,t.bridgeInstance)&&!K(n,t.bridgeInstance))throw new R(`This request is neither a valid deposit nor a valid withdrawal`,`INVALID_SOURCE_OR_DESTINATION_CHAIN`)}const xe=e=>!!e.maxFeePerGas&&!!e.maxPriorityFeePerGas,Se=e=>{if(xe(e)){let{maxFeePerGas:t,maxPriorityFeePerGas:n}=e;return t===null||n===null?null:n+(t-n)/BigInt(2)}return e.gasPrice?e.gasPrice:null};function J(e,t){let n=Se(e);return n?n*BigInt(t):BigInt(0)}const Y=[{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`owner`,type:`address`},{indexed:!0,internalType:`address`,name:`spender`,type:`address`},{indexed:!1,internalType:`uint256`,name:`value`,type:`uint256`}],name:`Approval`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`uint8`,name:`version`,type:`uint8`}],name:`Initialized`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`userAddress`,type:`address`},{indexed:!1,internalType:`address`,name:`relayerAddress`,type:`address`},{indexed:!1,internalType:`bytes`,name:`functionSignature`,type:`bytes`}],name:`MetaTransactionExecuted`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`from`,type:`address`},{indexed:!0,internalType:`address`,name:`to`,type:`address`},{indexed:!1,internalType:`uint256`,name:`value`,type:`uint256`}],name:`Transfer`,type:`event`},{inputs:[{internalType:`address`,name:`owner`,type:`address`},{internalType:`address`,name:`spender`,type:`address`}],name:`allowance`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`spender`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`approve`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`balanceOf`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[],name:`bridge`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`burn`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`decimals`,outputs:[{internalType:`uint8`,name:``,type:`uint8`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`spender`,type:`address`},{internalType:`uint256`,name:`subtractedValue`,type:`uint256`}],name:`decreaseAllowance`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`userAddress`,type:`address`},{internalType:`bytes`,name:`functionSignature`,type:`bytes`},{internalType:`bytes32`,name:`sigR`,type:`bytes32`},{internalType:`bytes32`,name:`sigS`,type:`bytes32`},{internalType:`uint8`,name:`sigV`,type:`uint8`}],name:`executeMetaTransaction`,outputs:[{internalType:`bytes`,name:``,type:`bytes`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`user`,type:`address`}],name:`getNonce`,outputs:[{internalType:`uint256`,name:`nonce`,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`spender`,type:`address`},{internalType:`uint256`,name:`addedValue`,type:`uint256`}],name:`increaseAllowance`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`rootToken_`,type:`address`},{internalType:`string`,name:`name_`,type:`string`},{internalType:`string`,name:`symbol_`,type:`string`},{internalType:`uint8`,name:`decimals_`,type:`uint8`}],name:`initialize`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`uint256`,name:`offset`,type:`uint256`}],name:`invalidateNext`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`mint`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`name`,outputs:[{internalType:`string`,name:``,type:`string`}],stateMutability:`view`,type:`function`},{inputs:[],name:`rootToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`symbol`,outputs:[{internalType:`string`,name:``,type:`string`}],stateMutability:`view`,type:`function`},{inputs:[],name:`totalSupply`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`to`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`transfer`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`from`,type:`address`},{internalType:`address`,name:`to`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`transferFrom`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`}];function Ce(e){return keccak256(AbiCoder.defaultAbiCoder().encode([`bytes`,`uint256`],[e,new Date().getTime()]))}function we(e,n,r,i){return AbiCoder.defaultAbiCoder().encode([`bytes32`,`address`,`address`,`address`,`uint256`],[w,e,n,r,i])}async function Te(e,t){return B(e,Y,t)}async function Ee(e,t,n){if(e.toUpperCase()===`NATIVE`||W(e,t))return H(t);let r=await Te(e,n);return z(()=>r.rootToken(),`PROVIDER_ERROR`)}function De(e){let t={};return e.forEach(e=>{let{contractAddress:n,stateDiff:r}=e,{storageSlot:i,value:a}=r;t[n]===void 0&&(t[n]={stateDiff:{}}),t[n].stateDiff[i]=a;}),t}async function X(t,n,r){let i,a=de(t),o=r?De(r):void 0;try{i=await axios.post(a,{jsonrpc:`2.0`,id:0,method:`tenderly_simulateBundle`,params:[n,`latest`,o]},{headers:{"Content-Type":`application/json`}});}catch(e){i=e.response;}if(i.data.error)throw new R(`Estimating gas failed with the reason: ${i.data.error.message}`,`TENDERLY_GAS_ESTIMATE_FAILED`);let s=i.data.result;if(s.length!==n.length)throw new R(`Estimating gas failed with mismatched responses`,`TENDERLY_GAS_ESTIMATE_FAILED`);let c=[],l=!1,u=!1,d=!1,f=0,p=!1,m=n.find(e=>e.data?.startsWith(`0x84a3291a0`))!==void 0;for(let e=0;e<s.length;e++){if(s[e].error)throw new R(`Estimating deposit gas failed with the reason: ${s[e].error.message}`,`TENDERLY_GAS_ESTIMATE_FAILED`);if(s[e].gasUsed===void 0)throw new R(`Estimating gas did not return simulation results`,`TENDERLY_GAS_ESTIMATE_FAILED`);if(m&&s[e].logs!==void 0){let t=s[e].logs.find(e=>e.name===`QueuedWithdrawal`);if(t!==void 0){let e=new Map(t.inputs.map(e=>[e.name,e.value]));l=e.get(`delayWithdrawalLargeAmount`)||!1,u=e.get(`delayWithdrawalUnknownToken`)||!1,d=e.get(`withdrawalQueueActivated`)||!1;}}if(m&&s[e].trace!==void 0){let t=s[e].trace.find(e=>e.method===`largeTransferThresholds`);t!==void 0&&(f=t.output,p=!0);}p||c.push(s[e].gasUsed);}return {gas:c,delayWithdrawalLargeAmount:l,delayWithdrawalUnknownToken:u,withdrawalQueueActivated:d,largeTransferThresholds:f}}async function Oe(e,t,n,r,i,o){let s,c;if(r.toUpperCase()===`NATIVE`)e===t?(s=i.native,c=[n]):(s=i.nativeTo,c=[t,n]);else {let o=getAddress(r);e===t?(s=i.token,c=[o,n]):(s=i.tokenTo,c=[o,t,n]);}return await z(async()=>o.interface.encodeFunctionData(s,c),`INTERNAL_ERROR`)}const Z=[{inputs:[{internalType:`address`,name:`_initializerAddress`,type:`address`}],stateMutability:`nonpayable`,type:`constructor`},{inputs:[],name:`AlreadyMapped`,type:`error`},{inputs:[{internalType:`uint256`,name:`actualBalance`,type:`uint256`},{internalType:`uint256`,name:`expectedBalance`,type:`uint256`}],name:`BalanceInvariantCheckFailed`,type:`error`},{inputs:[],name:`CantMapETH`,type:`error`},{inputs:[],name:`CantMapIMX`,type:`error`},{inputs:[],name:`CantMapWETH`,type:`error`},{inputs:[],name:`ImxDepositLimitExceeded`,type:`error`},{inputs:[],name:`ImxDepositLimitTooLow`,type:`error`},{inputs:[{internalType:`uint256`,name:`lengthOfQueue`,type:`uint256`},{internalType:`uint256`,name:`requestedIndex`,type:`uint256`}],name:`IndexOutsideWithdrawalQueue`,type:`error`},{inputs:[],name:`InsufficientValue`,type:`error`},{inputs:[],name:`InvalidCapacity`,type:`error`},{inputs:[],name:`InvalidChildChain`,type:`error`},{inputs:[{internalType:`string`,name:`reason`,type:`string`}],name:`InvalidData`,type:`error`},{inputs:[],name:`InvalidRefillRate`,type:`error`},{inputs:[],name:`InvalidToken`,type:`error`},{inputs:[{internalType:`address`,name:`token`,type:`address`},{internalType:`address`,name:`actualToken`,type:`address`}],name:`MixedTokens`,type:`error`},{inputs:[],name:`NoGas`,type:`error`},{inputs:[],name:`NonWrappedNativeTransfer`,type:`error`},{inputs:[],name:`NotBridgeAdaptor`,type:`error`},{inputs:[],name:`NotMapped`,type:`error`},{inputs:[],name:`ProvideAtLeastOneIndex`,type:`error`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`}],name:`TokenIsZero`,type:`error`},{inputs:[],name:`TokenNotSupported`,type:`error`},{inputs:[],name:`UnauthorizedInitializer`,type:`error`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`index`,type:`uint256`}],name:`WithdrawalAlreadyProcessed`,type:`error`},{inputs:[{internalType:`uint256`,name:`timeNow`,type:`uint256`},{internalType:`uint256`,name:`currentWithdrawalTime`,type:`uint256`}],name:`WithdrawalRequestTooEarly`,type:`error`},{inputs:[],name:`WrongInitializer`,type:`error`},{inputs:[],name:`ZeroAddress`,type:`error`},{inputs:[],name:`ZeroAmount`,type:`error`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`who`,type:`address`}],name:`ActivatedWithdrawalQueue`,type:`event`},{anonymous:!1,inputs:[],name:`AutoActivatedWithdrawalQueue`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`ChildChainERC20Deposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`who`,type:`address`}],name:`DeactivatedWithdrawalQueue`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`token`,type:`address`},{indexed:!0,internalType:`address`,name:`withdrawer`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`timestamp`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`index`,type:`uint256`}],name:`EnQueuedWithdrawal`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`IMXDeposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`uint8`,name:`version`,type:`uint8`}],name:`Initialized`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`}],name:`L1TokenMapped`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`NativeEthDeposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`uint256`,name:`oldImxDepositLimit`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`newImxDepositLimit`,type:`uint256`}],name:`NewImxDepositLimit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`account`,type:`address`}],name:`Paused`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`token`,type:`address`},{indexed:!0,internalType:`address`,name:`withdrawer`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`timestamp`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`index`,type:`uint256`}],name:`ProcessedWithdrawal`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`token`,type:`address`},{indexed:!0,internalType:`address`,name:`withdrawer`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`},{indexed:!1,internalType:`bool`,name:`delayWithdrawalLargeAmount`,type:`bool`},{indexed:!1,internalType:`bool`,name:`delayWithdrawalUnknownToken`,type:`bool`},{indexed:!1,internalType:`bool`,name:`withdrawalQueueActivated`,type:`bool`}],name:`QueuedWithdrawal`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`token`,type:`address`},{indexed:!1,internalType:`uint256`,name:`capacity`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`refillRate`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`largeTransferThreshold`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`previousCapacity`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`previousRefillRate`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`previousLargeTransferThreshold`,type:`uint256`}],name:`RateControlThresholdSet`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`bytes32`,name:`previousAdminRole`,type:`bytes32`},{indexed:!0,internalType:`bytes32`,name:`newAdminRole`,type:`bytes32`}],name:`RoleAdminChanged`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`address`,name:`account`,type:`address`},{indexed:!0,internalType:`address`,name:`sender`,type:`address`}],name:`RoleGranted`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`address`,name:`account`,type:`address`},{indexed:!0,internalType:`address`,name:`sender`,type:`address`}],name:`RoleRevoked`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`oldRootBridgeAdaptor`,type:`address`},{indexed:!1,internalType:`address`,name:`newRootBridgeAdaptor`,type:`address`}],name:`RootBridgeAdaptorUpdated`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`withdrawer`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`RootChainERC20Withdraw`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`withdrawer`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`RootChainETHWithdraw`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`account`,type:`address`}],name:`Unpaused`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`WETHDeposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`uint256`,name:`delay`,type:`uint256`},{indexed:!1,internalType:`uint256`,name:`previousDelay`,type:`uint256`}],name:`WithdrawalDelayUpdated`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`token`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`WithdrawalForNonFlowRatedToken`,type:`event`},{inputs:[],name:`ADAPTOR_MANAGER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`DEFAULT_ADMIN_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`DEPOSIT_SIG`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`MAP_TOKEN_SIG`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`NATIVE_ETH`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`NATIVE_IMX`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`PAUSER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`UNLIMITED_DEPOSIT`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[],name:`UNPAUSER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`VARIABLE_MANAGER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`WITHDRAW_SIG`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`activateWithdrawalQueue`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`childERC20Bridge`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childETHToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childTokenTemplate`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`deactivateWithdrawalQueue`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`contract IERC20Metadata`,name:`rootToken`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`deposit`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`depositETH`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`contract IERC20Metadata`,name:`rootToken`,type:`address`},{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`depositTo`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`depositToETH`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`index`,type:`uint256`}],name:`finaliseQueuedWithdrawal`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`address`,name:`token`,type:`address`},{internalType:`uint256[]`,name:`indices`,type:`uint256[]`}],name:`finaliseQueuedWithdrawalsAggregated`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`address`,name:`token`,type:`address`},{internalType:`uint256`,name:`startIndex`,type:`uint256`},{internalType:`uint256`,name:`stopIndex`,type:`uint256`},{internalType:`uint256`,name:`maxFind`,type:`uint256`}],name:`findPendingWithdrawals`,outputs:[{components:[{internalType:`uint256`,name:`index`,type:`uint256`},{internalType:`uint256`,name:`amount`,type:`uint256`},{internalType:`uint256`,name:`timestamp`,type:`uint256`}],internalType:`struct FlowRateWithdrawalQueue.FindPendingWithdrawal[]`,name:`found`,type:`tuple[]`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:``,type:`address`}],name:`flowRateBuckets`,outputs:[{internalType:`uint256`,name:`capacity`,type:`uint256`},{internalType:`uint256`,name:`depth`,type:`uint256`},{internalType:`uint256`,name:`refillTime`,type:`uint256`},{internalType:`uint256`,name:`refillRate`,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256[]`,name:`indices`,type:`uint256[]`}],name:`getPendingWithdrawals`,outputs:[{components:[{internalType:`address`,name:`withdrawer`,type:`address`},{internalType:`address`,name:`token`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`},{internalType:`uint256`,name:`timestamp`,type:`uint256`}],internalType:`struct FlowRateWithdrawalQueue.PendingWithdrawal[]`,name:`pending`,type:`tuple[]`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`}],name:`getPendingWithdrawalsLength`,outputs:[{internalType:`uint256`,name:`length`,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`}],name:`getRoleAdmin`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantAdaptorManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantPauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`grantRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantUnpauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantVariableManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`hasRole`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[],name:`imxCumulativeDepositLimit`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{components:[{internalType:`address`,name:`defaultAdmin`,type:`address`},{internalType:`address`,name:`pauser`,type:`address`},{internalType:`address`,name:`unpauser`,type:`address`},{internalType:`address`,name:`variableManager`,type:`address`},{internalType:`address`,name:`adaptorManager`,type:`address`}],internalType:`struct IRootERC20Bridge.InitializationRoles`,name:`newRoles`,type:`tuple`},{internalType:`address`,name:`newRootBridgeAdaptor`,type:`address`},{internalType:`address`,name:`newChildERC20Bridge`,type:`address`},{internalType:`address`,name:`newChildTokenTemplate`,type:`address`},{internalType:`address`,name:`newRootIMXToken`,type:`address`},{internalType:`address`,name:`newRootWETHToken`,type:`address`},{internalType:`uint256`,name:`newImxCumulativeDepositLimit`,type:`uint256`},{internalType:`address`,name:`rateAdmin`,type:`address`}],name:`initialize`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{components:[{internalType:`address`,name:`defaultAdmin`,type:`address`},{internalType:`address`,name:`pauser`,type:`address`},{internalType:`address`,name:`unpauser`,type:`address`},{internalType:`address`,name:`variableManager`,type:`address`},{internalType:`address`,name:`adaptorManager`,type:`address`}],internalType:`struct IRootERC20Bridge.InitializationRoles`,name:``,type:`tuple`},{internalType:`address`,name:``,type:`address`},{internalType:`address`,name:``,type:`address`},{internalType:`address`,name:``,type:`address`},{internalType:`address`,name:``,type:`address`},{internalType:`address`,name:``,type:`address`},{internalType:`uint256`,name:``,type:`uint256`}],name:`initialize`,outputs:[],stateMutability:`pure`,type:`function`},{inputs:[],name:`initializerAddress`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:``,type:`address`}],name:`largeTransferThresholds`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`contract IERC20Metadata`,name:`rootToken`,type:`address`}],name:`mapToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`bytes`,name:`data`,type:`bytes`}],name:`onMessageReceive`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`pause`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`paused`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`renounceRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeAdaptorManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokePauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`revokeRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeUnpauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeVariableManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`rootBridgeAdaptor`,outputs:[{internalType:`contract IRootBridgeAdaptor`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`rootIMXToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:``,type:`address`}],name:`rootTokenToChildToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`rootWETHToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`token`,type:`address`},{internalType:`uint256`,name:`capacity`,type:`uint256`},{internalType:`uint256`,name:`refillRate`,type:`uint256`},{internalType:`uint256`,name:`largeTransferThreshold`,type:`uint256`}],name:`setRateControlThreshold`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`uint256`,name:`delay`,type:`uint256`}],name:`setWithdrawalDelay`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes4`,name:`interfaceId`,type:`bytes4`}],name:`supportsInterface`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[],name:`unpause`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`uint256`,name:`newImxCumulativeDepositLimit`,type:`uint256`}],name:`updateImxCumulativeDepositLimit`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`newRootBridgeAdaptor`,type:`address`}],name:`updateRootBridgeAdaptor`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`withdrawalDelay`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[],name:`withdrawalQueueActivated`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{stateMutability:`payable`,type:`receive`}],Q=[{inputs:[{internalType:`string`,name:`name_`,type:`string`},{internalType:`string`,name:`symbol_`,type:`string`}],stateMutability:`nonpayable`,type:`constructor`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`owner`,type:`address`},{indexed:!0,internalType:`address`,name:`spender`,type:`address`},{indexed:!1,internalType:`uint256`,name:`value`,type:`uint256`}],name:`Approval`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`from`,type:`address`},{indexed:!0,internalType:`address`,name:`to`,type:`address`},{indexed:!1,internalType:`uint256`,name:`value`,type:`uint256`}],name:`Transfer`,type:`event`},{inputs:[{internalType:`address`,name:`owner`,type:`address`},{internalType:`address`,name:`spender`,type:`address`}],name:`allowance`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`spender`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`approve`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`balanceOf`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[],name:`decimals`,outputs:[{internalType:`uint8`,name:``,type:`uint8`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`spender`,type:`address`},{internalType:`uint256`,name:`subtractedValue`,type:`uint256`}],name:`decreaseAllowance`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`spender`,type:`address`},{internalType:`uint256`,name:`addedValue`,type:`uint256`}],name:`increaseAllowance`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`name`,outputs:[{internalType:`string`,name:``,type:`string`}],stateMutability:`view`,type:`function`},{inputs:[],name:`symbol`,outputs:[{internalType:`string`,name:``,type:`string`}],stateMutability:`view`,type:`function`},{inputs:[],name:`totalSupply`,outputs:[{internalType:`uint256`,name:``,type:`uint256`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`to`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`transfer`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`from`,type:`address`},{internalType:`address`,name:`to`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`transferFrom`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`nonpayable`,type:`function`}],$=[{inputs:[{internalType:`address`,name:`_initializerAddress`,type:`address`}],stateMutability:`nonpayable`,type:`constructor`},{inputs:[],name:`AlreadyMapped`,type:`error`},{inputs:[{internalType:`uint256`,name:`actualBalance`,type:`uint256`},{internalType:`uint256`,name:`expectedBalance`,type:`uint256`}],name:`BalanceInvariantCheckFailed`,type:`error`},{inputs:[],name:`BridgeNotSet`,type:`error`},{inputs:[],name:`BurnFailed`,type:`error`},{inputs:[],name:`CantMapETH`,type:`error`},{inputs:[],name:`CantMapIMX`,type:`error`},{inputs:[],name:`EmptyTokenContract`,type:`error`},{inputs:[],name:`IncorrectBridgeAddress`,type:`error`},{inputs:[],name:`InsufficientIMX`,type:`error`},{inputs:[],name:`InsufficientValue`,type:`error`},{inputs:[{internalType:`string`,name:`reason`,type:`string`}],name:`InvalidData`,type:`error`},{inputs:[],name:`MintFailed`,type:`error`},{inputs:[],name:`NoGas`,type:`error`},{inputs:[],name:`NonWrappedNativeTransfer`,type:`error`},{inputs:[],name:`NotBridgeAdaptor`,type:`error`},{inputs:[],name:`NotMapped`,type:`error`},{inputs:[],name:`TransferWIMXFailed`,type:`error`},{inputs:[],name:`UnauthorizedInitializer`,type:`error`},{inputs:[],name:`ZeroAddress`,type:`error`},{inputs:[],name:`ZeroAddressRootToken`,type:`error`},{inputs:[],name:`ZeroAmount`,type:`error`},{inputs:[],name:`ZeroValue`,type:`error`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`oldChildBridgeAdaptor`,type:`address`},{indexed:!1,internalType:`address`,name:`newChildBridgeAdaptor`,type:`address`}],name:`ChildBridgeAdaptorUpdated`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`ChildChainERC20Deposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`ChildChainERC20Withdraw`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`ChildChainEthWithdraw`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`ChildChainNativeIMXWithdraw`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`ChildChainWrappedIMXWithdraw`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`IMXDeposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`uint8`,name:`version`,type:`uint8`}],name:`Initialized`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!1,internalType:`address`,name:`childToken`,type:`address`}],name:`L2TokenMapped`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`rootToken`,type:`address`},{indexed:!0,internalType:`address`,name:`childToken`,type:`address`},{indexed:!1,internalType:`address`,name:`depositor`,type:`address`},{indexed:!0,internalType:`address`,name:`receiver`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`NativeEthDeposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`account`,type:`address`}],name:`Paused`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`address`,name:`depositor`,type:`address`},{indexed:!1,internalType:`uint256`,name:`amount`,type:`uint256`}],name:`PrivilegedDeposit`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`bytes32`,name:`previousAdminRole`,type:`bytes32`},{indexed:!0,internalType:`bytes32`,name:`newAdminRole`,type:`bytes32`}],name:`RoleAdminChanged`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`address`,name:`account`,type:`address`},{indexed:!0,internalType:`address`,name:`sender`,type:`address`}],name:`RoleGranted`,type:`event`},{anonymous:!1,inputs:[{indexed:!0,internalType:`bytes32`,name:`role`,type:`bytes32`},{indexed:!0,internalType:`address`,name:`account`,type:`address`},{indexed:!0,internalType:`address`,name:`sender`,type:`address`}],name:`RoleRevoked`,type:`event`},{anonymous:!1,inputs:[{indexed:!1,internalType:`address`,name:`account`,type:`address`}],name:`Unpaused`,type:`event`},{inputs:[],name:`ADAPTOR_MANAGER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`DEFAULT_ADMIN_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`DEPOSIT_SIG`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`MAP_TOKEN_SIG`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`NATIVE_ETH`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`NATIVE_IMX`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`PAUSER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`PRIVILEGED_DEPOSITOR_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`UNPAUSER_ROLE`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`WITHDRAW_SIG`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childBridgeAdaptor`,outputs:[{internalType:`contract IChildBridgeAdaptor`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childETHToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[],name:`childTokenTemplate`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`}],name:`getRoleAdmin`,outputs:[{internalType:`bytes32`,name:``,type:`bytes32`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantAdaptorManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantPauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`grantRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`grantUnpauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`hasRole`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[{components:[{internalType:`address`,name:`defaultAdmin`,type:`address`},{internalType:`address`,name:`pauser`,type:`address`},{internalType:`address`,name:`unpauser`,type:`address`},{internalType:`address`,name:`adaptorManager`,type:`address`},{internalType:`address`,name:`initialDepositor`,type:`address`},{internalType:`address`,name:`treasuryManager`,type:`address`}],internalType:`struct IChildERC20Bridge.InitializationRoles`,name:`newRoles`,type:`tuple`},{internalType:`address`,name:`newBridgeAdaptor`,type:`address`},{internalType:`address`,name:`newChildTokenTemplate`,type:`address`},{internalType:`address`,name:`newRootIMXToken`,type:`address`},{internalType:`address`,name:`newWIMXToken`,type:`address`}],name:`initialize`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`initializerAddress`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes`,name:`data`,type:`bytes`}],name:`onMessageReceive`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`pause`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`paused`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[],name:`privilegedDeposit`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`renounceRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeAdaptorManagerRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokePauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`bytes32`,name:`role`,type:`bytes32`},{internalType:`address`,name:`account`,type:`address`}],name:`revokeRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`account`,type:`address`}],name:`revokeUnpauserRole`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`rootIMXToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`address`,name:``,type:`address`}],name:`rootTokenToChildToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`bytes4`,name:`interfaceId`,type:`bytes4`}],name:`supportsInterface`,outputs:[{internalType:`bool`,name:``,type:`bool`}],stateMutability:`view`,type:`function`},{inputs:[],name:`unpause`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[{internalType:`address`,name:`newBridgeAdaptor`,type:`address`}],name:`updateChildBridgeAdaptor`,outputs:[],stateMutability:`nonpayable`,type:`function`},{inputs:[],name:`wIMXToken`,outputs:[{internalType:`address`,name:``,type:`address`}],stateMutability:`view`,type:`function`},{inputs:[{internalType:`contract IChildERC20`,name:`childToken`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdraw`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawETH`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawETHTo`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawIMX`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawIMXTo`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`contract IChildERC20`,name:`childToken`,type:`address`},{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawTo`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawWIMX`,outputs:[],stateMutability:`payable`,type:`function`},{inputs:[{internalType:`address`,name:`receiver`,type:`address`},{internalType:`uint256`,name:`amount`,type:`uint256`}],name:`withdrawWIMXTo`,outputs:[],stateMutability:`payable`,type:`function`},{stateMutability:`payable`,type:`receive`}];(function(e){return e.SRC_GATEWAY_CALLED=`source_gateway_called`,e.DEST_GATEWAY_APPROVED=`destination_gateway_approved`,e.DEST_EXECUTED=`destination_executed`,e.EXPRESS_EXECUTED=`express_executed`,e.DEST_EXECUTE_ERROR=`error`,e.DEST_EXECUTING=`executing`,e.APPROVING=`approving`,e.FORECALLED=`forecalled`,e.FORECALLED_WITHOUT_GAS_PAID=`forecalled_without_gas_paid`,e.NOT_EXECUTED=`not_executed`,e.NOT_EXECUTED_WITHOUT_GAS_PAID=`not_executed_without_gas_paid`,e.INSUFFICIENT_FEE=`insufficient_fee`,e.UNKNOWN_ERROR=`unknown_error`,e.CANNOT_FETCH_STATUS=`cannot_fetch_status`,e.SRC_GATEWAY_CONFIRMED=`confirmed`,e})({});(function(e){return e.GAS_UNPAID=`gas_unpaid`,e.GAS_PAID=`gas_paid`,e.GAS_PAID_NOT_ENOUGH_GAS=`gas_paid_not_enough_gas`,e.GAS_PAID_ENOUGH_GAS=`gas_paid_enough_gas`,e})({});const je=e=>{let{error:t,status:n}=e;return n===`error`&&t?`error`:n===`executed`?`destination_executed`:n===`approved`?`destination_gateway_approved`:n===`called`?`source_gateway_called`:n===`executing`?`executing`:n},Me=e=>{if(e.error)return {message:e.error.error.message,txHash:e.error.error.transactionHash,chain:e.error.chain};if(e.is_insufficient_fee)return {message:`Insufficient fee`,txHash:e.call.transaction.hash,chain:e.call.chain}},Ne=async(e,t)=>fetch(`${e}?${new URLSearchParams(t).toString()}`,{method:`GET`,headers:{"Content-Type":`application/json`},cache:`no-store`}).then(e=>e.json()).then(e=>e.data),Pe=async(e,t,n)=>Ne(e,{method:`searchGMP`,txHash:t,txLogIndex:n}).then(e=>e.find(e=>e.id.indexOf(t)>-1||e.call.transactionHash.indexOf(t)>-1)).catch(()=>void 0),Fe=async(e,t,n)=>{let r=await Pe(e,t,n);if(!r)return {status:`cannot_fetch_status`};let{call:i,gas_status:a,gas_paid:o,executed:s,express_executed:c,approved:l,callback:u}=r,d={status:a,details:o},f=r.time_spent;return f&&(f.total=f.total||Object.values(f).reduce((e,t)=>e+t,0)),{status:je(r),error:Me(r),timeSpent:f,gasPaidInfo:d,callTx:i,executed:s,expressExecuted:c,approved:l,callback:u}};var Ie=class{config;initialised;constructor(e){this.config=e,this.initialised=!1;}async initialise(){this.initialised||=(await _e(this.config),!0);}async getFee(e){let[,,t]=await Promise.all([this.initialise(),async()=>{e.action!==`FINALISE_WITHDRAWAL`&&await q(e.sourceChainId,e.destinationChainId,this.config);},this.getFeePrivate(e)]);return t}async getFinaliseWithdrawFee(){return J(await this.config.rootProvider.getFeeData(),2e5)}async getDepositOrWithdrawFee(e){let t;t=e.sourceChainId===this.config.bridgeInstance.rootChainID?await this.config.rootProvider.getFeeData():await this.config.childProvider.getFeeData();let n=BigInt(0),r=BigInt(0),i=BigInt(0),a;if(e.action===`DEPOSIT`)a={sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,action:`DEPOSIT`};else if(e.action===`WITHDRAW`)a={sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,action:`WITHDRAW`};else throw new R(`Invalid action`,`INTERNAL_ERROR`);if(!(G(a,this.config.bridgeInstance)||K(a,this.config.bridgeInstance)))throw new R(`Invalid direction`,`INTERNAL_ERROR`);he(e)||(G(a,this.config.bridgeInstance)||`token`in e&&ge(e.token,a,this.config.bridgeInstance))&&(r=J(t,55e3));let o;return e.action===`DEPOSIT`?(n=J(t,15e4),o=25e4):(n=J(t,25e4),o=25e4),i=await this.getAxelarFee(e.sourceChainId,e.destinationChainId,o,e.gasMultiplier),{sourceChainFee:n,approvalFee:r,bridgeFee:i}}async getFeePrivate(e){be(e,this.config);let t=BigInt(0),n=BigInt(0),r=BigInt(0);if(e.action===`FINALISE_WITHDRAWAL`)t=await this.getFinaliseWithdrawFee();else {let i=await this.getDepositOrWithdrawFee(e);t=i.sourceChainFee,n=i.approvalFee,r=i.bridgeFee;}let i=t+n+r;return {sourceChainGas:t,approvalFee:n,bridgeFee:r,imtblFee:BigInt(`0`),totalFees:i}}async getUnsignedApproveBridgeTx(e){let t=await this.getUnsignedBridgeBundledTx({senderAddress:e.senderAddress,recipientAddress:e.senderAddress,token:e.token,amount:e.amount,sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,gasMultiplier:1.1});return {contractToApprove:t.contractToApprove,unsignedTx:t.unsignedApprovalTx}}async getBridgeMethods(e){let t;return t=G(e,this.config.bridgeInstance)?L.deposit:L.withdraw,t}async getBridgeContract(e){if(G(e,this.config.bridgeInstance)){let e=this.config.bridgeContracts.rootERC20BridgeFlowRate;return await B(e,Z,this.config.rootProvider)}let t=this.config.bridgeContracts.childERC20Bridge;return await B(t,$,this.config.childProvider)}async getConfigAndBridgeTxCalldata(e,t,n,r,i){return Oe(e,t,n,r,await this.getBridgeMethods(i),await this.getBridgeContract(i))}async getUnsignedBridgeTx(e){let t=await this.getUnsignedBridgeBundledTx({senderAddress:e.senderAddress,recipientAddress:e.senderAddress,token:e.token,amount:e.amount,sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,gasMultiplier:e.gasMultiplier});return {feeData:t.feeData,unsignedTx:t.unsignedBridgeTx}}async getUnsignedBridgeBundledTx(e){let[,,,t]=await Promise.all([this.initialise(),ye(e,this.config),ve(e.token,e.destinationChainId,e.recipientAddress,this.config),this.getUnsignedBridgeBundledTxPrivate(e)]);return t}async getUnsignedBridgeBundledTxPrivate(e){let t;if(t=pe(e.sourceChainId,this.config.bridgeInstance)?{sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,action:`DEPOSIT`}:{sourceChainId:e.sourceChainId,destinationChainId:e.destinationChainId,action:`WITHDRAW`},G(t,this.config.bridgeInstance))return this.getUnsignedBridgeDepositBundledTxPrivate(t,e.senderAddress,e.recipientAddress,e.token,e.amount,e.gasMultiplier);if(K(t,this.config.bridgeInstance))return this.getUnsignedBridgeWithdrawBundledTxPrivate(t,e.senderAddress,e.recipientAddress,e.token,e.amount,e.gasMultiplier);throw new R(`Invalid Bridge Bundled TX`,`INVALID_TRANSACTION`)}async getUnsignedBridgeDepositBundledTxPrivate(e,t,n,r,i,a){let[o,s,c,l]=await Promise.all([this.getAllowance(e,r,t),this.config.rootProvider.getFeeData(),this.getDynamicDepositGas(this.config.bridgeInstance.rootChainID,t,n,r,i),this.getAxelarFee(this.config.bridgeInstance.rootChainID,this.config.bridgeInstance.childChainID,25e4,a)]),u,d,f=BigInt(0),p=BigInt(0),m=l,h=BigInt(0);if(r.toUpperCase()!==`NATIVE`&&o<i){u=r.startsWith(`0x`)?r:`0x${r}`;let e=await B(u,Q,this.config.rootProvider);d={data:await z(async()=>e.interface.encodeFunctionData(`approve`,[this.config.bridgeContracts.rootERC20BridgeFlowRate,i]),`INTERNAL_ERROR`),to:u,value:0,from:t,chainId:parseInt(this.config.bridgeInstance.rootChainID,10)},p=J(s,c.approvalGas);}else u=null,d=null;let g=await this.getConfigAndBridgeTxCalldata(t,n,i,r,e),_=r.toUpperCase()===`NATIVE`?(i+m).toString():m.toString(),v={data:g,to:this.config.bridgeContracts.rootERC20BridgeFlowRate,value:_,from:t,chainId:parseInt(this.config.bridgeInstance.rootChainID,10)};f=J(s,c.sourceChainGas);let y=f+p+m+h;return {feeData:{sourceChainGas:f,approvalFee:p,bridgeFee:m,imtblFee:h,totalFees:y},contractToApprove:u,unsignedApprovalTx:d,unsignedBridgeTx:v,delayWithdrawalLargeAmount:null,delayWithdrawalUnknownToken:null,withdrawalQueueActivated:null,largeTransferThresholds:null}}async getUnsignedBridgeWithdrawBundledTxPrivate(e,t,n,r,i,a){let[o,s,c]=await Promise.all([this.getAllowance(e,r,t),this.config.childProvider.getFeeData(),await this.getDynamicWithdrawGasRootChain(e.destinationChainId,t,n,r,i)]),l=c.gas[0],u=await this.getAxelarFee(this.config.bridgeInstance.childChainID,this.config.bridgeInstance.rootChainID,l,a),d,f,p=BigInt(0),m=BigInt(0),h=u,g=BigInt(0);if(W(r,this.config.bridgeInstance.childChainID)&&o<i){d=r;let e=await B(r,Q,this.config.childProvider);f={data:await z(async()=>e.interface.encodeFunctionData(`approve`,[this.config.bridgeContracts.childERC20Bridge,i]),`INTERNAL_ERROR`),to:r,value:0,from:t,chainId:parseInt(this.config.bridgeInstance.childChainID,10)},m=J(s,55e3);}else d=null,f=null;let _=await this.getConfigAndBridgeTxCalldata(t,n,i,r,e),v=r.toUpperCase()===`NATIVE`?(i+h).toString():h.toString(),y={data:_,to:this.config.bridgeContracts.rootERC20BridgeFlowRate,value:v,from:t,chainId:parseInt(this.config.bridgeInstance.rootChainID,10)};p=J(s,25e4);let b=p+m+h+g;return {feeData:{sourceChainGas:p,approvalFee:m,bridgeFee:h,imtblFee:g,totalFees:b},contractToApprove:d,unsignedApprovalTx:f,unsignedBridgeTx:y,delayWithdrawalLargeAmount:c.delayWithdrawalLargeAmount,delayWithdrawalUnknownToken:c.delayWithdrawalUnknownToken,withdrawalQueueActivated:c.withdrawalQueueActivated,largeTransferThresholds:c.largeTransferThresholds}}async getDynamicDepositGas(e,t,n,r,i){let a=[];if(r.toUpperCase()!==`NATIVE`){let e=await B(r,Q,this.config.rootProvider),n=await z(async()=>e.interface.encodeFunctionData(`approve`,[this.config.bridgeContracts.rootERC20BridgeFlowRate,i]),`INTERNAL_ERROR`);a.push({from:t,to:r,data:n});}let o={action:`DEPOSIT`,sourceChainId:e,destinationChainId:this.config.bridgeInstance.childChainID},s=await this.getConfigAndBridgeTxCalldata(t,n,i,r,o),u=r.toUpperCase()===`NATIVE`?toQuantity(toBeHex(i+BigInt(1))):`0x1`;a.push({from:t,to:this.config.bridgeContracts.rootERC20BridgeFlowRate,data:s,value:u});let{gas:d}=await X(e,a),f={};return d.length===1?(f.approvalGas=0,[f.sourceChainGas]=d):[f.approvalGas,f.sourceChainGas]=d,f}async getDynamicWithdrawGasRootChain(e,n,r,o,c){let l=await Ee(o,e,this.config.childProvider),u=we(l,n,r,c.toString()),f=Ce(u),p=le(e),m=getAddress(se(e)).toString(),h=ce(e),g=keccak256(u),_=keccak256(concat([keccak256(AbiCoder.defaultAbiCoder().encode([`bytes32`,`bytes32`,`string`,`string`,`address`,`bytes32`],[T,f,p,m,h,g])),E])),v=await B(h,d,this.config.rootProvider),y=await z(async()=>v.interface.encodeFunctionData(`execute`,[f,p,m,u]),`INTERNAL_ERROR`),b=ue(e),x=[{from:n,to:h,data:y}],S=this.config.bridgeContracts.rootERC20BridgeFlowRate,C=await B(S,Z,this.config.rootProvider),w=await z(async()=>C.interface.encodeFunctionData(`largeTransferThresholds`,[l]),`INTERNAL_ERROR`);return x.push({from:n,to:S,data:w}),await X(e,x,[{contractAddress:b,stateDiff:{storageSlot:_,value:`0x0000000000000000000000000000000000000000000000000000000000000001`}}])}async getAllowance(e,t,n){if(t.toUpperCase()===`NATIVE`||me(t,e,this.config.bridgeInstance))return BigInt(0);let r,i;G(e,this.config.bridgeInstance)?(r=this.config.rootProvider,i=this.config.bridgeContracts.rootERC20BridgeFlowRate):(r=this.config.childProvider,i=this.config.bridgeContracts.childERC20Bridge);let a=await B(t,Q,r);return await z(()=>a.allowance(n,i),`PROVIDER_ERROR`)}async getAxelarFee(t,n,r,i=`auto`){let a=I[t],o=I[n];if(!a)throw new R(`Source chainID ${t} can not be matched to an Axelar chain.`,`AXELAR_CHAIN_NOT_FOUND`);if(!o)throw new R(`Destination chainID ${n} can not be matched to an Axelar chain.`,`AXELAR_CHAIN_NOT_FOUND`);let s=U(t),c={method:`estimateGasFee`,sourceChain:a.id,destinationChain:o.id,symbol:a.symbol,gasLimit:r,gasMultiplier:i,minGasPrice:1e9},l;try{l=await axios.post(s,c);}catch(e){l=e.response;}if(l.data.error)throw new R(`Estimating Axelar Gas failed with the reason: ${l.data.message}`,`AXELAR_GAS_ESTIMATE_FAILED`);try{return BigInt(`${l.data}`)}catch(e){throw new R(`Estimating Axelar Gas failed with the reason: ${e}`,`AXELAR_GAS_ESTIMATE_FAILED`)}}async getTransactionStatus(e){let t={transactions:[]},n=await this.getAxelarStatus(e.transactions,e.sourceChainId),r=await this.getUniqueReceivers(n,e.sourceChainId),i=[];for(let e of r)i.push(this.getPendingWithdrawals({recipient:e}));let a=[];try{a=await Promise.all(i);}catch(e){throw new R(`Failed to fetch the pending withdrawals with: ${e}`,`FLOW_RATE_ERROR`)}t.transactions=n;for(let e of t.transactions)e.status===`COMPLETE`&&(()=>{for(let t of a){let n=t.pending.findIndex(t=>t.amount.toString()===e.amount.toString()&&t.token===e.token&&t.withdrawer===e.sender&&t.recipient===e.recipient);if(n!==-1){e.status=`FLOW_RATE_CONTROLLED`,e.data={canWithdraw:t.pending[n].canWithdraw,timeoutStart:t.pending[n].timeoutStart,timeoutEnd:t.pending[n].timeoutEnd},t.pending.splice(n,1);return}}})();return t}async getUniqueReceivers(e,t){let n=[],r=[y,b,x].includes(t);for(let t=0,i=e.length;t<i;t++)e[t].status===`COMPLETE`&&r&&e[t].recipient&&n.findIndex(n=>n===e[t].recipient)===-1&&n.push(e[t].recipient);return n}async getAxelarStatus(e,n){let r=[],i=[],a=U(n),o=[`gas_unpaid`,`gas_paid_not_enough_gas`],s=new AbiCoder;for(let t of e)i.push(Fe(a,t.txHash));let c;try{c=await Promise.all(i);}catch(e){throw new R(`Failed to fetch the Axelar Status with the reason: ${e}`,`AXELAR_GAS_ESTIMATE_FAILED`)}for(let t=0,n=c.length;t<n;t++){let n;switch(c[t].status){case`cannot_fetch_status`:n=`PENDING`;break;case`source_gateway_called`:case`destination_gateway_approved`:case`executing`:case`confirmed`:case`approving`:n=`PROCESSING`;break;case`not_executed`:n=`RETRY`;break;case`not_executed_without_gas_paid`:case`insufficient_fee`:n=`NOT_ENOUGH_GAS`;break;case`destination_executed`:n=`COMPLETE`;break;default:n=`ERROR`;}c[t].gasPaidInfo&&o.includes(c[t].gasPaidInfo.status)&&(n=`NOT_ENOUGH_GAS`);let i={txHash:e[t].txHash,status:n,data:{gmpResponse:c[t].status}},a;c[t]?.callTx?.returnValues?.payload&&(a=s.decode([`bytes32`,`address`,`address`,`address`,`uint256`],c[t].callTx.returnValues.payload),i={...i,token:a[1],sender:a[2],recipient:a[3],amount:a[4]}),r.push(i);}return r}async getFlowRateInfo(e){if(!e.tokens||e.tokens.length===0)throw new R(`invalid tokens array ${e.tokens}`,`INVALID_TOKEN`);let t=this.config.bridgeContracts.rootERC20BridgeFlowRate,n=await B(t,Z,this.config.rootProvider),r=[];r.push(n.withdrawalQueueActivated()),r.push(n.withdrawalDelay());for(let t of e.tokens)t.toUpperCase()===`NATIVE`&&(t=C),r.push(n.flowRateBuckets(t)),r.push(n.largeTransferThresholds(t));let i;try{i=await Promise.all(r);}catch{throw new R(`unable to query contract for flowrate info`,`INTERNAL_ERROR`)}let a={},o=i[0],s=Number(i[1]);i.splice(0,2);for(let t=0,n=e.tokens.length;t<n;t++){let n=t*2;a[e.tokens[t]]={capacity:i[n].capacity,depth:i[n].depth,refillTime:Number(i[n].refillTime),refillRate:i[n].refillRate,largeTransferThreshold:i[n+1]};}return {withdrawalQueueActivated:o,withdrawalDelay:s,tokens:a}}async getPendingWithdrawals(e){if(!e.recipient)throw new R(`invalid recipient ${e.recipient}`,`INVALID_RECIPIENT`);let t=this.config.bridgeContracts.rootERC20BridgeFlowRate,n=await B(t,Z,this.config.rootProvider),r=await n.getPendingWithdrawalsLength(e.recipient),i={pending:[]};if(Number(r)===0)return i;let a=[];for(let e=0;e<Number(r);e++)a.push(e);let o=await n.getPendingWithdrawals(e.recipient,a),s=Math.floor(Date.now()/1e3),c=await n.withdrawalDelay();for(let t=0,n=o.length;t<n;t++){let n=Number(o[t].timestamp+c);n>s?i.pending[t]={canWithdraw:!1}:i.pending[t]={canWithdraw:!0},i.pending[t].recipient=e.recipient,i.pending[t].withdrawer=o[t].withdrawer,i.pending[t].token=o[t].token,i.pending[t].amount=o[t].amount,i.pending[t].timeoutStart=Number(o[t].timestamp),i.pending[t].timeoutEnd=n;}return i}async getFlowRateWithdrawTx(e){if(!e.recipient)throw new R(`invalid recipient ${e.recipient}`,`INVALID_RECIPIENT`);if(e.index<0)throw new R(`invalid index ${e.index}`,`INVALID_FLOWRATE_INDEX`);let t=this.config.bridgeContracts.rootERC20BridgeFlowRate,n=await B(t,Z,this.config.rootProvider),i=await n.getPendingWithdrawals(e.recipient,[e.index]);if(i[0].withdrawer===ZeroAddress||i[0].token===ZeroAddress||i[0].amount===BigInt(0)||i[0].timestamp===BigInt(0))throw new R(`pending withdrawal not found for ${e.recipient} at index ${e.index}`,`FLOW_RATE_ERROR`);let a=await n.withdrawalDelay(),o=Number(i[0].timestamp+a);if(o>Math.floor(Date.now()/1e3))return {pendingWithdrawal:{canWithdraw:!1,withdrawer:i[0].withdrawer,recipient:e.recipient,token:i[0].token,amount:i[0].amount,timeoutStart:Number(i[0].timestamp),timeoutEnd:o},unsignedTx:null};let s=await z(async()=>n.interface.encodeFunctionData(`finaliseQueuedWithdrawal`,[e.recipient,e.index]),`INTERNAL_ERROR`);return {pendingWithdrawal:{canWithdraw:!0,withdrawer:i[0].withdrawer,recipient:e.recipient,token:i[0].token,amount:i[0].amount,timeoutStart:Number(i[0].timestamp),timeoutEnd:o},unsignedTx:{data:s,to:this.config.bridgeContracts.rootERC20BridgeFlowRate,value:0,chainId:parseInt(this.config.bridgeInstance.rootChainID,10)}}}async getTokenMapping(e){if(e.rootToken.toUpperCase()===`NATIVE`||e.rootToken===this.config.bridgeContracts.rootChainWrappedETH){let t=this.config.bridgeContracts.childERC20Bridge,n=await(await B(t,$,this.config.childProvider)).childETHToken();return {rootToken:e.rootToken,childToken:n}}let t=this.config.bridgeContracts.rootERC20BridgeFlowRate,n=await(await B(t,Z,this.config.rootProvider)).rootTokenToChildToken(e.rootToken);return n===ZeroAddress?{rootToken:e.rootToken,childToken:null}:n===e.rootToken?{rootToken:e.rootToken,childToken:g}:{rootToken:e.rootToken,childToken:n}}};const Le=[j,M],Re=[N],ze={[r.SANDBOX]:Le,[r.PRODUCTION]:Re},Be=new Map().set(j,{rootERC20BridgeFlowRate:`0x0`,childERC20Bridge:`0x0`,rootChainIMX:`0x0`,rootChainWrappedETH:`0x0`,childChainWrappedETH:`0x0`,childChainWrappedIMX:`0x0`}).set(M,{rootERC20BridgeFlowRate:`0x0D3C59c779Fd552C27b23F723E80246c840100F5`,childERC20Bridge:`0x0D3C59c779Fd552C27b23F723E80246c840100F5`,rootChainIMX:`0xe2629e08f4125d14e446660028bD98ee60EE69F2`,rootChainWrappedETH:`0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9`,childChainWrappedETH:`0xe9E96d1aad82562b7588F03f49aD34186f996478`,childChainWrappedIMX:`0x1CcCa691501174B4A623CeDA58cC8f1a76dc3439`}).set(N,{rootERC20BridgeFlowRate:`0xBa5E35E26Ae59c7aea6F029B68c6460De2d13eB6`,childERC20Bridge:`0xBa5E35E26Ae59c7aea6F029B68c6460De2d13eB6`,rootChainIMX:`0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF`,rootChainWrappedETH:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,childChainWrappedETH:`0x52a6c53869ce09a731cd772f245b97a4401d3348`,childChainWrappedIMX:`0x3a0c2ba54d6cbd3121f01b96dfd20e99d1696c9d`});var Ve=class{baseConfig;bridgeInstance;bridgeContracts;rootProvider;childProvider;constructor({bridgeInstance:e,rootProvider:t,childProvider:n,baseConfig:r,overrides:i}){if(this.baseConfig=r,this.bridgeInstance=e,this.rootProvider=t,this.childProvider=n,i){this.bridgeContracts=i.bridgeContracts;return}if(!ze[r.environment].includes(e)||!Be.has(e))throw Error(`Bridge instance with rootchain ${e.rootChainID} and childchain ${e.childChainID} is not supported in environment ${r.environment}`);let a=Be.get(e);if(!a)throw Error(`Bridge instance with rootchain ${e.rootChainID} and childchain ${e.childChainID} is not supported in environment ${r.environment}`);this.bridgeContracts=a;}};
|
|
9
9
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { w, _ as _e, T, s as se, E, l as le, c as ce, D, u as ue, t as te, d as de, i as ie, o as oe, n as ne, f as fe, p as pe, a as ae, r as reactExports, V as ViewActions, b as parseUnits, e as formatZeroAmount, g as calculateCryptoToFiat, C as Contract, B as Be, h as useTranslation, j as dist, k as getRemoteRive, m as gi, q as jsx, v as jsxs, x as Box, H as Heading, L as Link, y as Button, S as Stack, z as SimpleLayout, A as Body, F as useAnalytics, G as EventTargetContext, I as CryptoFiatContext, J as tokenValueFormat, K as getDefaultTokenImage, U as UserJourney, M as HeaderNavigation, N as sendCloseWidgetEvent, O as orchestrationEvents$1, P as amountInputValidation, Q as useTheme, R as CloudImage, W as getRemoteImage, X as CryptoFiatProvider, Y as ConnectLoaderContext, Z as isAddress, $ as isError, a0 as LoadingView, a1 as CryptoFiatActions, a2 as useViewState, a3 as useEventTargetState, a4 as commerceFlows, a5 as SharedViews, a6 as ErrorView, a7 as ConnectWidget, a8 as ProvidersContextProvider, a9 as PurchaseWidget, aa as ConnectLoader, ab as ViewContextProvider } from './index-
|
|
2
|
-
import { S as SelectInput, a as SwapWidget } from './SwapWidget-
|
|
3
|
-
import { B as BridgeWidget } from './BridgeWidget-
|
|
4
|
-
import OnRampWidget from './OnRampWidget-
|
|
5
|
-
import WalletWidget from './WalletWidget-
|
|
6
|
-
import SaleWidget from './SaleWidget-
|
|
7
|
-
import AddTokensWidget from './AddTokensWidget-
|
|
8
|
-
import { g as getAllowedBalances, T as TextInputForm } from './WalletApproveHero-
|
|
9
|
-
import './useInterval-
|
|
10
|
-
import './TopUpView-
|
|
11
|
-
import './FeesBreakdown-
|
|
12
|
-
import './SpendingCapHero-
|
|
13
|
-
import './TokenImage-
|
|
1
|
+
import { w, _ as _e, T, s as se, E, l as le, c as ce, D, u as ue, t as te, d as de, i as ie, o as oe, n as ne, f as fe, p as pe, a as ae, r as reactExports, V as ViewActions, b as parseUnits, e as formatZeroAmount, g as calculateCryptoToFiat, C as Contract, B as Be, h as useTranslation, j as dist, k as getRemoteRive, m as gi, q as jsx, v as jsxs, x as Box, H as Heading, L as Link, y as Button, S as Stack, z as SimpleLayout, A as Body, F as useAnalytics, G as EventTargetContext, I as CryptoFiatContext, J as tokenValueFormat, K as getDefaultTokenImage, U as UserJourney, M as HeaderNavigation, N as sendCloseWidgetEvent, O as orchestrationEvents$1, P as amountInputValidation, Q as useTheme, R as CloudImage, W as getRemoteImage, X as CryptoFiatProvider, Y as ConnectLoaderContext, Z as isAddress, $ as isError, a0 as LoadingView, a1 as CryptoFiatActions, a2 as useViewState, a3 as useEventTargetState, a4 as commerceFlows, a5 as SharedViews, a6 as ErrorView, a7 as ConnectWidget, a8 as ProvidersContextProvider, a9 as PurchaseWidget, aa as ConnectLoader, ab as ViewContextProvider } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { S as SelectInput, a as SwapWidget } from './SwapWidget-Cs_Kn1B5.js';
|
|
3
|
+
import { B as BridgeWidget } from './BridgeWidget-CTpqCXez.js';
|
|
4
|
+
import OnRampWidget from './OnRampWidget-DPg5SiW1.js';
|
|
5
|
+
import WalletWidget from './WalletWidget-C4k88Tqd.js';
|
|
6
|
+
import SaleWidget from './SaleWidget-Cb_a97Gp.js';
|
|
7
|
+
import AddTokensWidget from './AddTokensWidget-CwL3dW01.js';
|
|
8
|
+
import { g as getAllowedBalances, T as TextInputForm } from './WalletApproveHero-BapUR0FQ.js';
|
|
9
|
+
import './useInterval-Cg1C8cPf.js';
|
|
10
|
+
import './TopUpView-46P-pQlO.js';
|
|
11
|
+
import './FeesBreakdown-BxSNPjKq.js';
|
|
12
|
+
import './SpendingCapHero-Bzu2mPRk.js';
|
|
13
|
+
import './TokenImage-DSvU0sju.js';
|
|
14
14
|
|
|
15
15
|
const sendCheckoutEvent = (eventTarget, detail) => {
|
|
16
16
|
const event = new CustomEvent(w.IMTBL_COMMERCE_WIDGET_EVENT, { detail });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cv as axios, dG as M, v as jsxs, q as jsx, A as Body, bF as PriceDisplay, x as Box, h as useTranslation, aA as Drawer, aP as MenuItem, aF as Fragment, aB as Divider, J as tokenValueFormat, e as formatZeroAmount, c5 as FooterLogo } from './index-
|
|
1
|
+
import { cv as axios, dG as M, v as jsxs, q as jsx, A as Body, bF as PriceDisplay, x as Box, h as useTranslation, aA as Drawer, aP as MenuItem, aF as Fragment, aB as Divider, J as tokenValueFormat, e as formatZeroAmount, c5 as FooterLogo } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
const fetchRiskAssessmentV2 = async (assessmentData, config) => {
|
|
4
4
|
const result = Object.fromEntries(assessmentData.map((data) => [data.address.toLowerCase(), { sanctioned: false }]));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as reactExports, Y as ConnectLoaderContext, G as EventTargetContext, h as useTranslation, aU as ViewContext, a5 as SharedViews, F as useAnalytics, U as UserJourney, V as ViewActions, q as jsx, z as SimpleLayout, M as HeaderNavigation, d8 as sendOnRampWidgetCloseEvent, O as orchestrationEvents, w, x as Box, aK as isPassportProvider, d9 as url, da as TRANSAK_ORIGIN, db as Qe, c5 as FooterLogo, v as jsxs, d1 as SimpleTextBody, bH as viewReducer, bI as initialViewState, cR as NATIVE, a0 as LoadingView, dc as sendOnRampSuccessEvent, c6 as StatusType, d7 as StatusView, dd as sendOnRampFailedEvent, bQ as ServiceUnavailableErrorView } from './index-
|
|
2
|
-
import { O as OnRampWidgetViews, T as TopUpView } from './TopUpView-
|
|
3
|
-
import { S as SpendingCapHero } from './SpendingCapHero-
|
|
1
|
+
import { r as reactExports, Y as ConnectLoaderContext, G as EventTargetContext, h as useTranslation, aU as ViewContext, a5 as SharedViews, F as useAnalytics, U as UserJourney, V as ViewActions, q as jsx, z as SimpleLayout, M as HeaderNavigation, d8 as sendOnRampWidgetCloseEvent, O as orchestrationEvents, w, x as Box, aK as isPassportProvider, d9 as url, da as TRANSAK_ORIGIN, db as Qe, c5 as FooterLogo, v as jsxs, d1 as SimpleTextBody, bH as viewReducer, bI as initialViewState, cR as NATIVE, a0 as LoadingView, dc as sendOnRampSuccessEvent, c6 as StatusType, d7 as StatusView, dd as sendOnRampFailedEvent, bQ as ServiceUnavailableErrorView } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { O as OnRampWidgetViews, T as TopUpView } from './TopUpView-46P-pQlO.js';
|
|
3
|
+
import { S as SpendingCapHero } from './SpendingCapHero-Bzu2mPRk.js';
|
|
4
4
|
|
|
5
5
|
const containerStyle = (showIframe) => ({
|
|
6
6
|
position: 'relative',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { bM as r, C as Contract, r as reactExports, bR as errorToString, bS as hexToText, bT as compareStr, aU as ViewContext, V as ViewActions, bU as Z, q as jsx, bV as re, h as useTranslation, bW as TransakIframe, g as calculateCryptoToFiat, F as useAnalytics, G as EventTargetContext, bX as toPascalCase, bY as sendSaleWidgetCloseEvent, bZ as toStringifyTransactions, b_ as sendSaleSuccessEvent, b$ as sendSaleFailedEvent, c0 as sendSaleTransactionSuccessEvent, c1 as sendSalePaymentMethodEvent, c2 as sendSalePaymentTokenEvent, U as UserJourney, M as HeaderNavigation, v as jsxs, c3 as LoadingOverlay, x as Box, aF as Fragment, z as SimpleLayout, aV as useHandover, aW as HandoverTarget, k as getRemoteRive, H as Heading, c4 as HandoverDuration, aK as isPassportProvider, aZ as HandoverContent, aP as MenuItem, bj as motion, bi as listVariants, bk as listItemVariants, a5 as SharedViews, c5 as FooterLogo, c6 as StatusType, c7 as prettyFormatNumber, J as tokenValueFormat, c8 as ShimmerCircle, y as Button, S as Stack, c9 as Ze, ca as abbreviateWalletAddress, cb as formatUnits, aA as Drawer, cc as Caption, aB as Divider, cd as tokenSymbolNameOverrides, ce as qe, cf as Je, cg as Ke, ch as Ye, a$ as isNativeToken, b0 as getTokenImageByAddress, ci as isGasFree, I as CryptoFiatContext, Y as ConnectLoaderContext, cj as eventTargetReducer, ck as initialEventTargetState, w, cl as EventTargetActions, a0 as LoadingView, aQ as Ce, cm as ConnectWidgetViews, a7 as ConnectWidget, o as oe, t as te, i as ie, E, cn as ConnectLoaderActions, b as parseUnits, a1 as CryptoFiatActions, b3 as ButtCon, A as Body, co as widgetTheme, bH as viewReducer, bI as initialViewState, m as gi, bQ as ServiceUnavailableErrorView, X as CryptoFiatProvider } from './index-
|
|
2
|
-
import { u as useMount, T as TopUpView } from './TopUpView-
|
|
3
|
-
import { T as TokenImage } from './TokenImage-
|
|
4
|
-
import { F as Fees, B as BridgeWidget } from './BridgeWidget-
|
|
5
|
-
import OnRampWidget from './OnRampWidget-
|
|
6
|
-
import { a as SwapWidget } from './SwapWidget-
|
|
7
|
-
import { f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-
|
|
8
|
-
import './WalletApproveHero-
|
|
9
|
-
import './useInterval-
|
|
10
|
-
import './SpendingCapHero-
|
|
1
|
+
import { bM as r, C as Contract, r as reactExports, bR as errorToString, bS as hexToText, bT as compareStr, aU as ViewContext, V as ViewActions, bU as Z, q as jsx, bV as re, h as useTranslation, bW as TransakIframe, g as calculateCryptoToFiat, F as useAnalytics, G as EventTargetContext, bX as toPascalCase, bY as sendSaleWidgetCloseEvent, bZ as toStringifyTransactions, b_ as sendSaleSuccessEvent, b$ as sendSaleFailedEvent, c0 as sendSaleTransactionSuccessEvent, c1 as sendSalePaymentMethodEvent, c2 as sendSalePaymentTokenEvent, U as UserJourney, M as HeaderNavigation, v as jsxs, c3 as LoadingOverlay, x as Box, aF as Fragment, z as SimpleLayout, aV as useHandover, aW as HandoverTarget, k as getRemoteRive, H as Heading, c4 as HandoverDuration, aK as isPassportProvider, aZ as HandoverContent, aP as MenuItem, bj as motion, bi as listVariants, bk as listItemVariants, a5 as SharedViews, c5 as FooterLogo, c6 as StatusType, c7 as prettyFormatNumber, J as tokenValueFormat, c8 as ShimmerCircle, y as Button, S as Stack, c9 as Ze, ca as abbreviateWalletAddress, cb as formatUnits, aA as Drawer, cc as Caption, aB as Divider, cd as tokenSymbolNameOverrides, ce as qe, cf as Je, cg as Ke, ch as Ye, a$ as isNativeToken, b0 as getTokenImageByAddress, ci as isGasFree, I as CryptoFiatContext, Y as ConnectLoaderContext, cj as eventTargetReducer, ck as initialEventTargetState, w, cl as EventTargetActions, a0 as LoadingView, aQ as Ce, cm as ConnectWidgetViews, a7 as ConnectWidget, o as oe, t as te, i as ie, E, cn as ConnectLoaderActions, b as parseUnits, a1 as CryptoFiatActions, b3 as ButtCon, A as Body, co as widgetTheme, bH as viewReducer, bI as initialViewState, m as gi, bQ as ServiceUnavailableErrorView, X as CryptoFiatProvider } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { u as useMount, T as TopUpView } from './TopUpView-46P-pQlO.js';
|
|
3
|
+
import { T as TokenImage } from './TokenImage-DSvU0sju.js';
|
|
4
|
+
import { F as Fees, B as BridgeWidget } from './BridgeWidget-CTpqCXez.js';
|
|
5
|
+
import OnRampWidget from './OnRampWidget-DPg5SiW1.js';
|
|
6
|
+
import { a as SwapWidget } from './SwapWidget-Cs_Kn1B5.js';
|
|
7
|
+
import { f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-BxSNPjKq.js';
|
|
8
|
+
import './WalletApproveHero-BapUR0FQ.js';
|
|
9
|
+
import './useInterval-Cg1C8cPf.js';
|
|
10
|
+
import './SpendingCapHero-Bzu2mPRk.js';
|
|
11
11
|
|
|
12
12
|
var SaleWidgetViews;
|
|
13
13
|
(function (SaleWidgetViews) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as jsx, c$ as heroBackGroundStyles, x as Box, d0 as heroImageStyles, dF as heroImageBottomAlign, v as jsxs } from './index-
|
|
1
|
+
import { q as jsx, c$ as heroBackGroundStyles, x as Box, d0 as heroImageStyles, dF as heroImageBottomAlign, v as jsxs } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
function SpendingCapHero() {
|
|
4
4
|
return (jsx(Box, { sx: { ...heroBackGroundStyles, background: 'base.color.translucent.emphasis.100' }, children: jsx(Box, { sx: { ...heroImageStyles, ...heroImageBottomAlign }, children: jsxs("svg", { width: "430", height: "305", viewBox: "0 0 430 305", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M94.0614 105.632L93.6321 104L92 104.429L92.4292 106.061L94.0614 105.632Z", fill: "white" }), jsx("path", { d: "M63.6531 193.101L63.1006 191L60.9996 191.553L61.5521 193.654L63.6531 193.101Z", fill: "white" }), jsx("path", { d: "M344.489 224.345L342.345 224L342 226.145L344.144 226.49L344.489 224.345Z", fill: "white" }), jsx("path", { d: "M372.286 139.905L372.905 138.619L371.619 138L371 139.286L372.286 139.905Z", fill: "white" }), jsx("path", { d: "M341.653 78.101L341.101 76L339 76.5525L339.552 78.6535L341.653 78.101Z", fill: "white" }), jsx("path", { d: "M359.286 242.905L359.905 241.619L358.619 241L358 242.286L359.286 242.905Z", fill: "white" }), jsx("path", { d: "M87.0123 112.087L86.0869 111L85.0002 111.925L85.9256 113.012L87.0123 112.087Z", fill: "white" }), jsx("path", { d: "M84.2862 248.905L84.9053 247.619L83.6192 247L83.0001 248.286L84.2862 248.905Z", fill: "white" }), jsx("path", { d: "M215.496 262.992C268.237 262.992 310.993 220.237 310.993 167.496C310.993 114.755 268.237 72 215.496 72C162.755 72 120 114.755 120 167.496C120 220.237 162.755 262.992 215.496 262.992Z", fill: "white", fillOpacity: "0.24", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M159.82 95.1695C179.975 79.6536 204.651 73.1506 227.89 77.0665C261.089 82.6606 253.281 101.028 199.197 121.314C151.934 139.037 123.49 136.348 143.823 110.95C148.422 105.208 153.721 99.8623 159.82 95.1695Z", fill: "white", fillOpacity: "0.08" }), jsx("path", { d: "M215.497 227.183C171.451 227.183 135.159 219.871 130.194 210.462H130.187C145.912 241.626 178.21 263.001 215.497 263.001C252.705 263.001 284.942 241.719 300.706 210.664C295.33 219.98 259.232 227.183 215.505 227.183H215.497Z", fill: "#36E0F8", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M284.219 219.607L283.978 219.84C281.275 222.482 256.583 215.986 253.172 218.418C222.389 240.36 182.779 269.061 146.099 219.397C146.099 219.397 140.761 217.641 138.609 216.686C139.425 217.96 140.279 219.226 141.165 220.469C170.425 261.516 227.423 271.073 268.47 241.813C276.97 235.752 284.118 228.503 289.852 220.454L292.424 216.841L288.252 218.302C287.086 218.713 285.851 219.11 284.553 219.498L284.227 219.599L284.219 219.607Z", fill: "black" }), jsx("path", { d: "M215.496 241.4C262.183 241.4 300.03 226.557 300.03 208.248C300.03 189.938 262.183 175.095 215.496 175.095C168.81 175.095 130.963 189.938 130.963 208.248C130.963 226.557 168.81 241.4 215.496 241.4Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M300.705 210.659C300.705 210.659 300.705 210.65 300.705 210.641C300.705 210.641 300.705 210.65 300.705 210.659Z", fill: "#EBE9E9", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 204.511C208.952 204.511 221.377 199.638 221.377 193.626C221.377 187.614 208.952 182.741 193.624 182.741C178.297 182.741 165.871 187.614 165.871 193.626C165.871 199.638 178.297 204.511 193.624 204.511Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 204.511C208.954 204.511 221.377 199.64 221.377 193.626V201.349C221.377 207.363 208.954 212.234 193.624 212.234C178.295 212.234 165.871 207.363 165.871 201.349V193.626C165.871 199.64 178.295 204.511 193.624 204.511Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 204.41C199.49 204.294 201.573 204.084 203.546 203.789V211.512C201.573 211.807 199.49 212.017 197.33 212.133V204.41Z", fill: "#D0F500" }), jsx("path", { d: "M206.398 203.291C211.246 202.304 215.255 200.774 217.905 198.901V206.624C215.255 208.497 211.246 210.027 206.398 211.014V203.291Z", fill: "black" }), jsx("path", { d: "M193.624 204.511C208.954 204.511 221.377 199.64 221.377 193.626V201.349C221.377 207.363 208.954 212.234 193.624 212.234C178.295 212.234 165.871 207.363 165.871 201.349V193.626C165.871 199.64 178.295 204.511 193.624 204.511Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 211.015C211.246 210.028 215.255 208.497 217.905 206.625", stroke: "#A66CFF", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 196.788C208.952 196.788 221.377 191.914 221.377 185.903C221.377 179.891 208.952 175.017 193.624 175.017C178.297 175.017 165.871 179.891 165.871 185.903C165.871 191.914 178.297 196.788 193.624 196.788Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 196.788C208.954 196.788 221.377 191.917 221.377 185.903V193.626C221.377 199.639 208.954 204.511 193.624 204.511C178.295 204.511 165.871 199.639 165.871 193.626V185.903C165.871 191.917 178.295 196.788 193.624 196.788Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 196.687C199.49 196.57 201.573 196.361 203.546 196.065V203.788C201.573 204.084 199.49 204.293 197.33 204.41V196.687Z", fill: "#36E0F8" }), jsx("path", { d: "M206.398 195.568C211.246 194.581 215.255 193.051 217.905 191.178V198.901C215.255 200.774 211.246 202.304 206.398 203.291V195.568Z", fill: "black" }), jsx("path", { d: "M193.624 196.788C208.954 196.788 221.377 191.917 221.377 185.903V193.626C221.377 199.639 208.954 204.511 193.624 204.511C178.295 204.511 165.871 199.639 165.871 193.626V185.903C165.871 191.917 178.295 196.788 193.624 196.788Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 203.291C211.246 202.304 215.255 200.774 217.905 198.901", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 189.065C208.952 189.065 221.377 184.192 221.377 178.18C221.377 172.168 208.952 167.294 193.624 167.294C178.297 167.294 165.871 172.168 165.871 178.18C165.871 184.192 178.297 189.065 193.624 189.065Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 189.065C208.954 189.065 221.377 184.194 221.377 178.18V185.903C221.377 191.917 208.954 196.788 193.624 196.788C178.295 196.788 165.871 191.917 165.871 185.903V178.18C165.871 184.194 178.295 189.065 193.624 189.065Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 188.965C199.49 188.849 201.573 188.639 203.546 188.343V196.067C201.573 196.362 199.49 196.571 197.33 196.688V188.965Z", fill: "#F191FA" }), jsx("path", { d: "M206.398 187.845C211.246 186.858 215.255 185.327 217.905 183.455V191.178C215.255 193.05 211.246 194.581 206.398 195.568V187.845Z", fill: "black" }), jsx("path", { d: "M193.624 189.065C208.954 189.065 221.377 184.194 221.377 178.18V185.903C221.377 191.917 208.954 196.788 193.624 196.788C178.295 196.788 165.871 191.917 165.871 185.903V178.18C165.871 184.194 178.295 189.065 193.624 189.065Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 195.569C211.246 194.582 215.255 193.052 217.905 191.179", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 212.934C253.929 212.934 266.354 208.06 266.354 202.049C266.354 196.037 253.929 191.164 238.601 191.164C223.274 191.164 210.848 196.037 210.848 202.049C210.848 208.06 223.274 212.934 238.601 212.934Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 212.935C253.931 212.935 266.354 208.063 266.354 202.049V209.772C266.354 215.786 253.931 220.658 238.601 220.658C223.272 220.658 210.848 215.786 210.848 209.772V202.049C210.848 208.063 223.272 212.935 238.601 212.935Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 212.833C244.467 212.717 246.55 212.507 248.523 212.212V219.935C246.55 220.23 244.467 220.44 242.307 220.556V212.833Z", fill: "#F191FA" }), jsx("path", { d: "M251.375 211.713C256.223 210.727 260.232 209.196 262.882 207.324V215.047C260.232 216.919 256.223 218.45 251.375 219.436V211.713Z", fill: "black" }), jsx("path", { d: "M238.601 212.935C253.931 212.935 266.354 208.063 266.354 202.049V209.772C266.354 215.786 253.931 220.658 238.601 220.658C223.272 220.658 210.848 215.786 210.848 209.772V202.049C210.848 208.063 223.272 212.935 238.601 212.935Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 219.437C256.223 218.45 260.232 216.919 262.882 215.047", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 205.21C253.929 205.21 266.354 200.336 266.354 194.324C266.354 188.313 253.929 183.439 238.601 183.439C223.274 183.439 210.848 188.313 210.848 194.324C210.848 200.336 223.274 205.21 238.601 205.21Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 205.21C253.931 205.21 266.354 200.339 266.354 194.325V202.048C266.354 208.062 253.931 212.934 238.601 212.934C223.272 212.934 210.848 208.062 210.848 202.048V194.325C210.848 200.339 223.272 205.21 238.601 205.21Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 205.109C244.467 204.993 246.55 204.783 248.523 204.488V212.211C246.55 212.506 244.467 212.716 242.307 212.832V205.109Z", fill: "#36E0F8" }), jsx("path", { d: "M251.375 203.989C256.223 203.003 260.232 201.472 262.882 199.6V207.323C260.232 209.195 256.223 210.726 251.375 211.712V203.989Z", fill: "black" }), jsx("path", { d: "M238.601 205.21C253.931 205.21 266.354 200.339 266.354 194.325V202.048C266.354 208.062 253.931 212.934 238.601 212.934C223.272 212.934 210.848 208.062 210.848 202.048V194.325C210.848 200.339 223.272 205.21 238.601 205.21Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 211.713C256.223 210.726 260.232 209.195 262.882 207.323", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 197.487C253.929 197.487 266.354 192.613 266.354 186.602C266.354 180.59 253.929 175.716 238.601 175.716C223.274 175.716 210.848 180.59 210.848 186.602C210.848 192.613 223.274 197.487 238.601 197.487Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 197.487C253.931 197.487 266.354 192.616 266.354 186.602V194.325C266.354 200.339 253.931 205.21 238.601 205.21C223.272 205.21 210.848 200.339 210.848 194.325V186.602C210.848 192.616 223.272 197.487 238.601 197.487Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 197.386C244.467 197.27 246.55 197.06 248.523 196.765V204.488C246.55 204.783 244.467 204.992 242.307 205.109V197.386Z", fill: "#F191FA" }), jsx("path", { d: "M251.375 196.267C256.223 195.28 260.232 193.75 262.882 191.877V199.6C260.232 201.473 256.223 203.003 251.375 203.99V196.267Z", fill: "#9AEFFB" }), jsx("path", { d: "M238.601 197.487C253.931 197.487 266.354 192.616 266.354 186.602V194.325C266.354 200.339 253.931 205.21 238.601 205.21C223.272 205.21 210.848 200.339 210.848 194.325V186.602C210.848 192.616 223.272 197.487 238.601 197.487Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 203.99C256.223 203.004 260.232 201.473 262.882 199.601", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M232.652 189.678C247.979 189.678 260.405 184.804 260.405 178.793C260.405 172.781 247.979 167.908 232.652 167.908C217.324 167.908 204.899 172.781 204.899 178.793C204.899 184.804 217.324 189.678 232.652 189.678Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M232.652 189.678C247.981 189.678 260.405 184.807 260.405 178.793V186.516C260.405 192.53 247.981 197.401 232.652 197.401C217.323 197.401 204.899 192.53 204.899 186.516V178.793C204.899 184.807 217.323 189.678 232.652 189.678Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M236.358 189.578C238.518 189.461 240.6 189.251 242.574 188.956V196.679C240.6 196.974 238.518 197.184 236.358 197.301V189.578Z", fill: "#F191FA" }), jsx("path", { d: "M245.426 188.458C250.274 187.471 254.283 185.94 256.932 184.067V191.791C254.283 193.663 250.274 195.194 245.426 196.18V188.458Z", fill: "black" }), jsx("path", { d: "M232.652 189.678C247.981 189.678 260.405 184.807 260.405 178.793V186.516C260.405 192.53 247.981 197.401 232.652 197.401C217.323 197.401 204.899 192.53 204.899 186.516V178.793C204.899 184.807 217.323 189.678 232.652 189.678Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M245.426 196.182C250.274 195.195 254.283 193.664 256.932 191.792", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M240.99 180.021C256.317 180.021 268.743 175.148 268.743 169.136C268.743 163.124 256.317 158.25 240.99 158.25C225.662 158.25 213.237 163.124 213.237 169.136C213.237 175.148 225.662 180.021 240.99 180.021Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M240.99 180.021C256.319 180.021 268.743 175.15 268.743 169.136V176.859C268.743 182.873 256.319 187.744 240.99 187.744C225.66 187.744 213.237 182.873 213.237 176.859V169.136C213.237 175.15 225.66 180.021 240.99 180.021Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M244.696 179.92C246.856 179.804 248.938 179.594 250.911 179.299V187.022C248.938 187.317 246.856 187.527 244.696 187.643V179.92Z", fill: "#9AEFFB" }), jsx("path", { d: "M253.763 178.801C258.612 177.815 262.621 176.284 265.27 174.412V182.135C262.621 184.007 258.612 185.538 253.763 186.524V178.801Z", fill: "black" }), jsx("path", { d: "M240.99 180.021C256.319 180.021 268.743 175.15 268.743 169.136V176.859C268.743 182.873 256.319 187.744 240.99 187.744C225.66 187.744 213.237 182.873 213.237 176.859V169.136C213.237 175.15 225.66 180.021 240.99 180.021Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M253.763 186.525C258.612 185.538 262.621 184.007 265.27 182.135", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M189.911 223.803C205.238 223.803 217.664 218.929 217.664 212.918C217.664 206.906 205.238 202.032 189.911 202.032C174.583 202.032 162.158 206.906 162.158 212.918C162.158 218.929 174.583 223.803 189.911 223.803Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M189.911 223.803C205.24 223.803 217.664 218.932 217.664 212.918V220.641C217.664 226.655 205.24 231.526 189.911 231.526C174.581 231.526 162.158 226.655 162.158 220.641V212.918C162.158 218.932 174.581 223.803 189.911 223.803Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.625 223.71C195.785 223.593 197.867 223.384 199.84 223.088V230.811C197.867 231.107 195.785 231.316 193.625 231.433V223.71Z", fill: "#F191FA" }), jsx("path", { d: "M202.685 222.583C207.533 221.596 211.542 220.066 214.191 218.193V225.916C211.542 227.789 207.533 229.319 202.685 230.306V222.583Z", fill: "#9AEFFB" }), jsx("path", { d: "M189.911 223.803C205.24 223.803 217.664 218.932 217.664 212.918V220.641C217.664 226.655 205.24 231.526 189.911 231.526C174.581 231.526 162.158 226.655 162.158 220.641V212.918C162.158 218.932 174.581 223.803 189.911 223.803Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M202.685 230.306C207.533 229.32 211.542 227.789 214.191 225.917", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M300.705 210.658C300.705 210.658 300.705 210.649 300.705 210.641C300.705 210.641 300.705 210.649 300.705 210.658Z", fill: "#A66CFF", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" })] }) }) }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as useTranslation, v as jsxs, de as quickswapFooterStyles, x as Box, df as quickswapFooterLogoStyles, q as jsx, A as Body, dg as quickswapFooterDisclaimerTextStyles, dh as ve, W as getRemoteImage, r as reactExports, y as Button, aA as Drawer, R as CloudImage, H as Heading, cE as Logo, di as getImxTokenImage, cb as formatUnits, g as calculateCryptoToFiat, J as tokenValueFormat, ci as isGasFree, b as parseUnits, e as formatZeroAmount, cz as ShimmerBox, bF as PriceDisplay, aF as Fragment, dj as getCryptoToUSDConversion, Y as ConnectLoaderContext, a$ as isNativeToken, cR as NATIVE, aU as ViewContext, F as useAnalytics, dk as calculateFeesFiat, U as UserJourney, cU as DEFAULT_QUOTE_REFRESH_INTERVAL, aK as isPassportProvider, dl as parseEther, P as amountInputValidation, b3 as ButtCon, bj as motion, b8 as Tooltip, bd as Icon, bM as r, V as ViewActions, a5 as SharedViews, K as getDefaultTokenImage, dm as ESTIMATE_DEBOUNCE, dn as DEFAULT_TOKEN_VALIDATION_DECIMALS, cZ as DEFAULT_TOKEN_DECIMALS, G as EventTargetContext, a0 as LoadingView, z as SimpleLayout, dp as sendSwapWidgetCloseEvent, O as orchestrationEvents, w, M as HeaderNavigation, cY as IMX_TOKEN_SYMBOL, cy as Se, d1 as SimpleTextBody, d2 as FooterButton, dq as O, c$ as heroBackGroundStyles, d0 as heroImageStyles, bz as Trans, L as Link, aV as useHandover, bH as viewReducer, bI as initialViewState, dr as DEFAULT_BALANCE_RETRY_POLICY, ds as ge, d7 as StatusView, dt as sendSwapSuccessEvent, c6 as StatusType, du as sendSwapFailedEvent, dv as sendSwapRejectedEvent, a6 as ErrorView, bQ as ServiceUnavailableErrorView, B as Be, cP as He } from './index-
|
|
2
|
-
import { S as SelectForm, T as TextInputForm, A as Accordion, b as gasAmountAccordionStyles, a as TransactionRejected, N as NetworkSwitchDrawer, W as WalletApproveHero, g as getAllowedBalances } from './WalletApproveHero-
|
|
3
|
-
import { u as useInterval } from './useInterval-
|
|
4
|
-
import { S as SwapWidgetViews, T as TopUpView } from './TopUpView-
|
|
5
|
-
import { F as FeesBreakdown, f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-
|
|
6
|
-
import { S as SpendingCapHero } from './SpendingCapHero-
|
|
1
|
+
import { h as useTranslation, v as jsxs, de as quickswapFooterStyles, x as Box, df as quickswapFooterLogoStyles, q as jsx, A as Body, dg as quickswapFooterDisclaimerTextStyles, dh as ve, W as getRemoteImage, r as reactExports, y as Button, aA as Drawer, R as CloudImage, H as Heading, cE as Logo, di as getImxTokenImage, cb as formatUnits, g as calculateCryptoToFiat, J as tokenValueFormat, ci as isGasFree, b as parseUnits, e as formatZeroAmount, cz as ShimmerBox, bF as PriceDisplay, aF as Fragment, dj as getCryptoToUSDConversion, Y as ConnectLoaderContext, a$ as isNativeToken, cR as NATIVE, aU as ViewContext, F as useAnalytics, dk as calculateFeesFiat, U as UserJourney, cU as DEFAULT_QUOTE_REFRESH_INTERVAL, aK as isPassportProvider, dl as parseEther, P as amountInputValidation, b3 as ButtCon, bj as motion, b8 as Tooltip, bd as Icon, bM as r, V as ViewActions, a5 as SharedViews, K as getDefaultTokenImage, dm as ESTIMATE_DEBOUNCE, dn as DEFAULT_TOKEN_VALIDATION_DECIMALS, cZ as DEFAULT_TOKEN_DECIMALS, G as EventTargetContext, a0 as LoadingView, z as SimpleLayout, dp as sendSwapWidgetCloseEvent, O as orchestrationEvents, w, M as HeaderNavigation, cY as IMX_TOKEN_SYMBOL, cy as Se, d1 as SimpleTextBody, d2 as FooterButton, dq as O, c$ as heroBackGroundStyles, d0 as heroImageStyles, bz as Trans, L as Link, aV as useHandover, bH as viewReducer, bI as initialViewState, dr as DEFAULT_BALANCE_RETRY_POLICY, ds as ge, d7 as StatusView, dt as sendSwapSuccessEvent, c6 as StatusType, du as sendSwapFailedEvent, dv as sendSwapRejectedEvent, a6 as ErrorView, bQ as ServiceUnavailableErrorView, B as Be, cP as He } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { S as SelectForm, T as TextInputForm, A as Accordion, b as gasAmountAccordionStyles, a as TransactionRejected, N as NetworkSwitchDrawer, W as WalletApproveHero, g as getAllowedBalances } from './WalletApproveHero-BapUR0FQ.js';
|
|
3
|
+
import { u as useInterval } from './useInterval-Cg1C8cPf.js';
|
|
4
|
+
import { S as SwapWidgetViews, T as TopUpView } from './TopUpView-46P-pQlO.js';
|
|
5
|
+
import { F as FeesBreakdown, f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-BxSNPjKq.js';
|
|
6
|
+
import { S as SpendingCapHero } from './SpendingCapHero-Bzu2mPRk.js';
|
|
7
7
|
|
|
8
8
|
function QuickswapFooter({ theme, environment }) {
|
|
9
9
|
const { t } = useTranslation();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, K as getDefaultTokenImage, q as jsx } from './index-
|
|
1
|
+
import { r as reactExports, K as getDefaultTokenImage, q as jsx } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
function TokenImage({ src, name, environment, theme, defaultImage, ...forwardedProps }) {
|
|
4
4
|
const [error, setError] = reactExports.useState(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, cb as formatUnits, q as jsx, v as jsxs, dH as isDualVariantIcon, aP as MenuItem, x as Box, h as useTranslation, aU as ViewContext, I as CryptoFiatContext, G as EventTargetContext, F as useAnalytics, a1 as CryptoFiatActions, dI as DEFAULT_TOKEN_SYMBOLS, cT as Re, M as HeaderNavigation, H as Heading, A as Body, z as SimpleLayout, w, V as ViewActions, O as orchestrationEvents, bM as r } from './index-
|
|
1
|
+
import { r as reactExports, cb as formatUnits, q as jsx, v as jsxs, dH as isDualVariantIcon, aP as MenuItem, x as Box, h as useTranslation, aU as ViewContext, I as CryptoFiatContext, G as EventTargetContext, F as useAnalytics, a1 as CryptoFiatActions, dI as DEFAULT_TOKEN_SYMBOLS, cT as Re, M as HeaderNavigation, H as Heading, A as Body, z as SimpleLayout, w, V as ViewActions, O as orchestrationEvents, bM as r } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
var BridgeWidgetViews;
|
|
4
4
|
(function (BridgeWidgetViews) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ac as hFlex, q as jsx, dw as motion, ae as _objectWithoutProperties, Q as useTheme, r as reactExports, ag as _slicedToArray, aq as useGetSubcomponentChild, al as merge, v as jsxs, dx as BaseClickable, b3 as ButtCon, au as SmartClone, dy as AnimatePresence, x as Box, S as Stack, dz as ClassNames, ad as _defineProperty, dA as getTertiaryButtonStyles, ar as flattenChildren, dB as isChildSubcomponent, aB as Divider, b4 as TextInput, dC as FormControlWrapper, h as useTranslation, aP as MenuItem, aA as Drawer, A as Body, aF as Fragment, F as useAnalytics, dD as Select, bM as r, dE as DuoCon, H as Heading, y as Button, cJ as retry, cR as NATIVE, b0 as getTokenImageByAddress, a$ as isNativeToken, dr as DEFAULT_BALANCE_RETRY_POLICY, cO as isMetaMaskProvider, R as CloudImage, c5 as FooterLogo, W as getRemoteImage, cM as getChainNameById, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign } from './index-
|
|
2
|
-
import { T as TokenImage } from './TokenImage-
|
|
1
|
+
import { ac as hFlex, q as jsx, dw as motion, ae as _objectWithoutProperties, Q as useTheme, r as reactExports, ag as _slicedToArray, aq as useGetSubcomponentChild, al as merge, v as jsxs, dx as BaseClickable, b3 as ButtCon, au as SmartClone, dy as AnimatePresence, x as Box, S as Stack, dz as ClassNames, ad as _defineProperty, dA as getTertiaryButtonStyles, ar as flattenChildren, dB as isChildSubcomponent, aB as Divider, b4 as TextInput, dC as FormControlWrapper, h as useTranslation, aP as MenuItem, aA as Drawer, A as Body, aF as Fragment, F as useAnalytics, dD as Select, bM as r, dE as DuoCon, H as Heading, y as Button, cJ as retry, cR as NATIVE, b0 as getTokenImageByAddress, a$ as isNativeToken, dr as DEFAULT_BALANCE_RETRY_POLICY, cO as isMetaMaskProvider, R as CloudImage, c5 as FooterLogo, W as getRemoteImage, cM as getChainNameById, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { T as TokenImage } from './TokenImage-DSvU0sju.js';
|
|
3
3
|
|
|
4
4
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ae as _objectWithoutProperties, Q as useTheme, dJ as getStartingSize, dK as DEFAULT_BUTTON_SIZE, al as merge, r as reactExports, ar as flattenChildren, q as jsx, dB as isChildSubcomponent, au as SmartClone, x as Box, dL as getResponsiveSx, dM as BUTTON_SIZES, dN as setDefaultSxBackgroundColor, b3 as ButtCon, dz as ClassNames, y as Button, ad as _defineProperty, B as Be, h as useTranslation, aU as ViewContext, v as jsxs, A as Body, V as ViewActions, Y as ConnectLoaderContext, F as useAnalytics, G as EventTargetContext, bM as r, aP as MenuItem, J as tokenValueFormat, U as UserJourney, O as orchestrationEvents, w, e as formatZeroAmount, aK as isPassportProvider, dO as ZERO_BALANCE_STRING, a$ as isNativeToken, dP as sendNetworkSwitchEvent, cy as Se, a5 as SharedViews, dQ as ze, dR as sortNetworksCompareFn, cB as getChainImage, cJ as retry, dr as DEFAULT_BALANCE_RETRY_POLICY, dS as sortTokensByAmount, b0 as getTokenImageByAddress, g as calculateCryptoToFiat, I as CryptoFiatContext, a1 as CryptoFiatActions, M as HeaderNavigation, cQ as ButtonNavigationStyles, dT as sendWalletWidgetCloseEvent, c5 as FooterLogo, z as SimpleLayout, cP as He, cN as getWalletProviderNameByProvider, dH as isDualVariantIcon, ca as abbreviateWalletAddress, H as Heading, aA as Drawer, cD as useWalletConnect, dU as sendDisconnectWalletEvent, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign, d1 as SimpleTextBody, dV as FAQS_LINK, L as Link, bH as viewReducer, bI as initialViewState, X as CryptoFiatProvider, a0 as LoadingView, a6 as ErrorView } from './index-
|
|
2
|
-
import { T as TokenImage } from './TokenImage-
|
|
3
|
-
import { u as useInterval } from './useInterval-
|
|
1
|
+
import { ae as _objectWithoutProperties, Q as useTheme, dJ as getStartingSize, dK as DEFAULT_BUTTON_SIZE, al as merge, r as reactExports, ar as flattenChildren, q as jsx, dB as isChildSubcomponent, au as SmartClone, x as Box, dL as getResponsiveSx, dM as BUTTON_SIZES, dN as setDefaultSxBackgroundColor, b3 as ButtCon, dz as ClassNames, y as Button, ad as _defineProperty, B as Be, h as useTranslation, aU as ViewContext, v as jsxs, A as Body, V as ViewActions, Y as ConnectLoaderContext, F as useAnalytics, G as EventTargetContext, bM as r, aP as MenuItem, J as tokenValueFormat, U as UserJourney, O as orchestrationEvents, w, e as formatZeroAmount, aK as isPassportProvider, dO as ZERO_BALANCE_STRING, a$ as isNativeToken, dP as sendNetworkSwitchEvent, cy as Se, a5 as SharedViews, dQ as ze, dR as sortNetworksCompareFn, cB as getChainImage, cJ as retry, dr as DEFAULT_BALANCE_RETRY_POLICY, dS as sortTokensByAmount, b0 as getTokenImageByAddress, g as calculateCryptoToFiat, I as CryptoFiatContext, a1 as CryptoFiatActions, M as HeaderNavigation, cQ as ButtonNavigationStyles, dT as sendWalletWidgetCloseEvent, c5 as FooterLogo, z as SimpleLayout, cP as He, cN as getWalletProviderNameByProvider, dH as isDualVariantIcon, ca as abbreviateWalletAddress, H as Heading, aA as Drawer, cD as useWalletConnect, dU as sendDisconnectWalletEvent, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign, d1 as SimpleTextBody, dV as FAQS_LINK, L as Link, bH as viewReducer, bI as initialViewState, X as CryptoFiatProvider, a0 as LoadingView, a6 as ErrorView } from './index-Bj6fKhiT.js';
|
|
2
|
+
import { T as TokenImage } from './TokenImage-DSvU0sju.js';
|
|
3
|
+
import { u as useInterval } from './useInterval-Cg1C8cPf.js';
|
|
4
4
|
|
|
5
5
|
var horizontalMenuSxProps = {
|
|
6
6
|
justifyContent: "stretch",
|
|
@@ -375,7 +375,7 @@ const clearGlobalNamespace = (namespace) => {
|
|
|
375
375
|
};
|
|
376
376
|
lib$4.clearGlobalNamespace = clearGlobalNamespace;
|
|
377
377
|
|
|
378
|
-
const i$6=()=>typeof window>`u`,a$5=()=>!i$6();const s$4=()=>a$5()&&window.localStorage,c$6=e=>{if(e!==null)try{return JSON.parse(e)}catch{return e}},l$4=e=>typeof e==`string`?e:JSON.stringify(e),u$2=e=>`__IMX-${e}`;function d$5(e){if(s$4())return c$6(window.localStorage.getItem(u$2(e)))}const f$7=(e,t)=>s$4()?(window.localStorage.setItem(u$2(e),l$4(t)),!0):!1;let m$3=0;const h$4=e=>{let t=parseInt(e,10)*1e3,n=new Date(t),r=new Date;return m$3=n.getTime()-r.getTime(),m$3},g$6=()=>{let e=new Date().getTime()+m$3;return new Date(e).toISOString()};(function(e){return e.RUNTIME_ID=`rid`,e.PASSPORT_CLIENT_ID=`passportClientId`,e.ENVIRONMENT=`env`,e.PUBLISHABLE_API_KEY=`pak`,e.IDENTITY=`uid`,e.DOMAIN=`domain`,e.SDK_VERSION=`sdkVersion`,e})({});const v$4=e=>{if(typeof Buffer<`u`)return Buffer.from(e,`utf-8`).toString(`base64`);if(typeof btoa==`function`)return btoa(unescape(encodeURIComponent(e)));throw Error(`Base64 encoding not supported in this environment`)};async function y$8(e,t){let n=JSON.stringify(t),r={payload:v$4(n)},i=await fetch(`https://api.immutable.com${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});if(!i.ok){let e=await i.text().catch(()=>``);throw Error(`Request failed (${i.status}): ${e||i.statusText}`)}return i.json()}let b$5,x$3;b$5=d$5(`metrics-events`)||[],x$3=d$5(`metrics-runtime`)||{};const S$5=(e,t)=>{x$3={...x$3,[e]:t},f$7(`metrics-runtime`,x$3);},C$5=e=>{if(x$3[e]!==void 0)return x$3[e]},w$6=()=>x$3,T$5=()=>b$5,E$8=e=>{b$5.push(e),f$7(`metrics-events`,b$5);},D$5=e=>{b$5=b$5.slice(e),f$7(`metrics-events`,b$5);},O$6=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{(typeof e==`string`||typeof n==`string`||typeof n==`number`||typeof n==`boolean`)&&t.push([e,n.toString()]);}),t},k$3=`2.24.0`,A$2=()=>i$6()?``:window.location.ancestorOrigins&&window.location.ancestorOrigins.length>0?new URL(window.location.ancestorOrigins[0]).hostname:document.referrer?new URL(window.document.referrer).hostname:``,j$7=()=>{if(i$6())return ``;let e;try{window.self!==window.top&&(e=A$2());}catch{}return e||=window.location.hostname,e},M$5=()=>{if(S$5(`sdkVersion`,k$3),i$6())return {browser:`nodejs`,sdkVersion:k$3};let e=j$7();return e&&S$5(`domain`,e),{sdkVersion:k$3,browser:window.navigator.userAgent,domain:e,tz:Intl.DateTimeFormat().resolvedOptions().timeZone,screen:`${window.screen.width}x${window.screen.height}`}};let N$4=!1;const P$1=()=>N$4,F$1=async()=>{N$4=!0;try{let{runtimeId:e,sTime:t}=await y$8(`/v1/sdk/initialise`,{version:1,data:{runtimeDetails:O$6(M$5()),runtimeId:C$5(`rid`),uId:C$5(`uid`)}});S$5(`rid`,e),h$4(t);}catch{N$4=!1;}};function I$3(e,t){return (...n)=>{try{let r=e(...n);return r instanceof Promise?r.catch(()=>t):r}catch{return t}}}function L$7(){return a$5()||typeof process>`u`?!1:process.env.JEST_WORKER_ID!==void 0}const R$1=I$3(L$7,!1),z$6=`imtbl__metrics`,B$3=(e,n)=>getGlobalisedValue_1(z$6,e,n),V$3=I$3(((n,r)=>{let i=memorise(r,{lruOptions:{ttl:5e3,max:1e3}});return getGlobalisedValue_1(z$6,n,i)})(`track`,(e,t,n)=>{E$8({event:`${e}.${t}`,time:g$6(),...n&&{properties:O$6(n)}});})),H$1=I$3(async()=>{if(P$1()===!1){await F$1();return}let e=T$5();if(e.length===0)return;let t=e.length;await y$8(`/v1/sdk/metrics`,{version:1,data:{events:e,details:w$6()}})instanceof Error||D$5(t);}),U$1=async()=>{await H$1(),setTimeout(U$1,5e3);};let W$1=!1;R$1()||I$3(B$3(`startFlushing`,()=>{W$1||(W$1=!0,U$1());}))();const G$3=(e,t,n,r)=>V$3(e,t,{...r||{},duration:Math.round(n)}),K$5=()=>{let e=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return `${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`},q$3=(...e)=>{if(!e.some(e=>!!e))return {};let t={};return e.forEach(e=>{e&&(t={...t,...e});}),t},J$2=e=>e.replace(/[^a-zA-Z0-9\s\-_]/g,``),Y$1=(e,t)=>`${e}_${J$2(t)}`,X$2=I$3((e,t,n=!0,r)=>{let i=K$5(),a=Date.now(),o=0,s=0,c={},l=(...e)=>q$3(c,...e,{flowId:i,flowName:t});c=l(r);let u=e=>{e&&(c=l(e));},d=(n,r)=>{let i=Y$1(t,n),a=0,c=performance.now();o>0&&(a=c-s);let u=l(r,{flowEventName:n,flowStep:o});G$3(e,i,a,u),o++,s=c;};return n&&d(`Start`),{details:{moduleName:e,flowName:t,flowId:i,flowStartTime:a},addEvent:I$3(d),addFlowProperties:I$3(u)}}),Z$2=I$3((e,t,n,r)=>{let{message:i}=n,a=n.stack||``,{cause:o}=n;o instanceof Error&&(a=`${a} \nCause: ${o.message}\n ${o.stack}`),V$3(e,`trackError_${t}`,{...r||{},errorMessage:i,errorStack:a,isTrackError:!0});}),ee$1=I$3(B$3(`setEnvironment`,e=>{S$5(`env`,e);}));I$3(B$3(`setPassportClientId`,e=>{S$5(`passportClientId`,e);}));I$3(B$3(`setPublishableApiKey`,e=>{S$5(`pak`,e);}));I$3(B$3(`getDetail`,C$5));
|
|
378
|
+
const i$6=()=>typeof window>`u`,a$5=()=>!i$6();const s$4=()=>a$5()&&window.localStorage,c$6=e=>{if(e!==null)try{return JSON.parse(e)}catch{return e}},l$4=e=>typeof e==`string`?e:JSON.stringify(e),u$2=e=>`__IMX-${e}`;function d$5(e){if(s$4())return c$6(window.localStorage.getItem(u$2(e)))}const f$7=(e,t)=>s$4()?(window.localStorage.setItem(u$2(e),l$4(t)),!0):!1;let m$3=0;const h$4=e=>{let t=parseInt(e,10)*1e3,n=new Date(t),r=new Date;return m$3=n.getTime()-r.getTime(),m$3},g$6=()=>{let e=new Date().getTime()+m$3;return new Date(e).toISOString()};(function(e){return e.RUNTIME_ID=`rid`,e.PASSPORT_CLIENT_ID=`passportClientId`,e.ENVIRONMENT=`env`,e.PUBLISHABLE_API_KEY=`pak`,e.IDENTITY=`uid`,e.DOMAIN=`domain`,e.SDK_VERSION=`sdkVersion`,e})({});const v$4=e=>{if(typeof Buffer<`u`)return Buffer.from(e,`utf-8`).toString(`base64`);if(typeof btoa==`function`)return btoa(unescape(encodeURIComponent(e)));throw Error(`Base64 encoding not supported in this environment`)};async function y$8(e,t){let n=JSON.stringify(t),r={payload:v$4(n)},i=await fetch(`https://api.immutable.com${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});if(!i.ok){let e=await i.text().catch(()=>``);throw Error(`Request failed (${i.status}): ${e||i.statusText}`)}return i.json()}let b$5,x$3;b$5=d$5(`metrics-events`)||[],x$3=d$5(`metrics-runtime`)||{};const S$5=(e,t)=>{x$3={...x$3,[e]:t},f$7(`metrics-runtime`,x$3);},C$5=e=>{if(x$3[e]!==void 0)return x$3[e]},w$6=()=>x$3,T$5=()=>b$5,E$8=e=>{b$5.push(e),f$7(`metrics-events`,b$5);},D$5=e=>{b$5=b$5.slice(e),f$7(`metrics-events`,b$5);},O$6=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{(typeof e==`string`||typeof n==`string`||typeof n==`number`||typeof n==`boolean`)&&t.push([e,n.toString()]);}),t},k$3=`2.24.1-0`,A$2=()=>i$6()?``:window.location.ancestorOrigins&&window.location.ancestorOrigins.length>0?new URL(window.location.ancestorOrigins[0]).hostname:document.referrer?new URL(window.document.referrer).hostname:``,j$7=()=>{if(i$6())return ``;let e;try{window.self!==window.top&&(e=A$2());}catch{}return e||=window.location.hostname,e},M$5=()=>{if(S$5(`sdkVersion`,k$3),i$6())return {browser:`nodejs`,sdkVersion:k$3};let e=j$7();return e&&S$5(`domain`,e),{sdkVersion:k$3,browser:window.navigator.userAgent,domain:e,tz:Intl.DateTimeFormat().resolvedOptions().timeZone,screen:`${window.screen.width}x${window.screen.height}`}};let N$4=!1;const P$1=()=>N$4,F$1=async()=>{N$4=!0;try{let{runtimeId:e,sTime:t}=await y$8(`/v1/sdk/initialise`,{version:1,data:{runtimeDetails:O$6(M$5()),runtimeId:C$5(`rid`),uId:C$5(`uid`)}});S$5(`rid`,e),h$4(t);}catch{N$4=!1;}};function I$3(e,t){return (...n)=>{try{let r=e(...n);return r instanceof Promise?r.catch(()=>t):r}catch{return t}}}function L$7(){return a$5()||typeof process>`u`?!1:process.env.JEST_WORKER_ID!==void 0}const R$1=I$3(L$7,!1),z$6=`imtbl__metrics`,B$3=(e,n)=>getGlobalisedValue_1(z$6,e,n),V$3=I$3(((n,r)=>{let i=memorise(r,{lruOptions:{ttl:5e3,max:1e3}});return getGlobalisedValue_1(z$6,n,i)})(`track`,(e,t,n)=>{E$8({event:`${e}.${t}`,time:g$6(),...n&&{properties:O$6(n)}});})),H$1=I$3(async()=>{if(P$1()===!1){await F$1();return}let e=T$5();if(e.length===0)return;let t=e.length;await y$8(`/v1/sdk/metrics`,{version:1,data:{events:e,details:w$6()}})instanceof Error||D$5(t);}),U$1=async()=>{await H$1(),setTimeout(U$1,5e3);};let W$1=!1;R$1()||I$3(B$3(`startFlushing`,()=>{W$1||(W$1=!0,U$1());}))();const G$3=(e,t,n,r)=>V$3(e,t,{...r||{},duration:Math.round(n)}),K$5=()=>{let e=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return `${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`},q$3=(...e)=>{if(!e.some(e=>!!e))return {};let t={};return e.forEach(e=>{e&&(t={...t,...e});}),t},J$2=e=>e.replace(/[^a-zA-Z0-9\s\-_]/g,``),Y$1=(e,t)=>`${e}_${J$2(t)}`,X$2=I$3((e,t,n=!0,r)=>{let i=K$5(),a=Date.now(),o=0,s=0,c={},l=(...e)=>q$3(c,...e,{flowId:i,flowName:t});c=l(r);let u=e=>{e&&(c=l(e));},d=(n,r)=>{let i=Y$1(t,n),a=0,c=performance.now();o>0&&(a=c-s);let u=l(r,{flowEventName:n,flowStep:o});G$3(e,i,a,u),o++,s=c;};return n&&d(`Start`),{details:{moduleName:e,flowName:t,flowId:i,flowStartTime:a},addEvent:I$3(d),addFlowProperties:I$3(u)}}),Z$2=I$3((e,t,n,r)=>{let{message:i}=n,a=n.stack||``,{cause:o}=n;o instanceof Error&&(a=`${a} \nCause: ${o.message}\n ${o.stack}`),V$3(e,`trackError_${t}`,{...r||{},errorMessage:i,errorStack:a,isTrackError:!0});}),ee$1=I$3(B$3(`setEnvironment`,e=>{S$5(`env`,e);}));I$3(B$3(`setPassportClientId`,e=>{S$5(`passportClientId`,e);}));I$3(B$3(`setPublishableApiKey`,e=>{S$5(`pak`,e);}));I$3(B$3(`getDetail`,C$5));
|
|
379
379
|
|
|
380
380
|
let r$7=function(e){return e.PRODUCTION=`production`,e.SANDBOX=`sandbox`,e}({});(function(e){return e.API_KEY=`x-immutable-api-key`,e.PUBLISHABLE_KEY=`x-immutable-publishable-key`,e.RATE_LIMITING_KEY=`x-api-key`,e})({});var a$4=class a{environment;rateLimitingKey;apiKey;publishableKey;constructor(t){this.environment=t.environment,this.publishableKey=t.publishableKey,this.apiKey=t.apiKey,this.rateLimitingKey=t.rateLimitingKey,ee$1(t.environment),V$3(`config`,`created_imtbl_config`);}};
|
|
381
381
|
|
|
@@ -73005,7 +73005,7 @@ function snapshot(proxyObject, handlePromise) {
|
|
|
73005
73005
|
|
|
73006
73006
|
const o$2=proxy({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),T$3={state:o$2,subscribe(e){return subscribe(o$2,()=>e(o$2))},push(e,t){e!==o$2.view&&(o$2.view=e,t&&(o$2.data=t),o$2.history.push(e));},reset(e){o$2.view=e,o$2.history=[e];},replace(e){o$2.history.length>1&&(o$2.history[o$2.history.length-1]=e,o$2.view=e);},goBack(){if(o$2.history.length>1){o$2.history.pop();const[e]=o$2.history.slice(-1);o$2.view=e;}},setData(e){o$2.data=e;}},a$2={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return a$2.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return a$2.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(a$2.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return `${n}wc?uri=${i}`},formatUniversalUrl(e,t,s){if(!a$2.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return `${n}wc?uri=${i}`},async wait(e){return new Promise(t=>{setTimeout(t,e);})},openHref(e,t){window.open(e,t,"noreferrer noopener");},setWalletConnectDeepLink(e,t){try{localStorage.setItem(a$2.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}));}catch{console.info("Unable to set WalletConnect deep link");}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(a$2.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}));}catch{console.info("Unable to set WalletConnect android deep link");}},removeWalletConnectDeepLink(){try{localStorage.removeItem(a$2.WALLETCONNECT_DEEPLINK_CHOICE);}catch{console.info("Unable to remove WalletConnect deep link");}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(a$2.WCM_VERSION,"2.6.2");}catch{console.info("Unable to set Web3Modal version in storage");}},getWalletRouterData(){var e;const t=(e=T$3.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},_$2=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),r$4=proxy({enabled:_$2,userSessionId:"",events:[],connectedWalletId:void 0}),R={state:r$4,subscribe(e){return subscribe(r$4.events,()=>e(snapshot(r$4.events[r$4.events.length-1])))},initialize(){r$4.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(r$4.userSessionId=crypto.randomUUID());},setConnectedWalletId(e){r$4.connectedWalletId=e;},click(e){if(r$4.enabled){const t={type:"CLICK",name:e.name,userSessionId:r$4.userSessionId,timestamp:Date.now(),data:e};r$4.events.push(t);}},track(e){if(r$4.enabled){const t={type:"TRACK",name:e.name,userSessionId:r$4.userSessionId,timestamp:Date.now(),data:e};r$4.events.push(t);}},view(e){if(r$4.enabled){const t={type:"VIEW",name:e.name,userSessionId:r$4.userSessionId,timestamp:Date.now(),data:e};r$4.events.push(t);}}},c$3=proxy({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),p$5={state:c$3,subscribe(e){return subscribe(c$3,()=>e(c$3))},setChains(e){c$3.chains=e;},setWalletConnectUri(e){c$3.walletConnectUri=e;},setIsCustomDesktop(e){c$3.isCustomDesktop=e;},setIsCustomMobile(e){c$3.isCustomMobile=e;},setIsDataLoaded(e){c$3.isDataLoaded=e;},setIsUiLoaded(e){c$3.isUiLoaded=e;},setIsAuth(e){c$3.isAuth=e;}},W=proxy({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),y$6={state:W,subscribe(e){return subscribe(W,()=>e(W))},setConfig(e){var t,s;R.initialize(),p$5.setChains(e.chains),p$5.setIsAuth(Boolean(e.enableAuthMode)),p$5.setIsCustomMobile(Boolean((t=e.mobileWallets)==null?void 0:t.length)),p$5.setIsCustomDesktop(Boolean((s=e.desktopWallets)==null?void 0:s.length)),a$2.setModalVersionInStorage(),Object.assign(W,e);}};var V$2=Object.defineProperty,D$3=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B$2=Object.prototype.propertyIsEnumerable,M$3=(e,t,s)=>t in e?V$2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K$3=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&M$3(e,s,t[s]);if(D$3)for(var s of D$3(t))B$2.call(t,s)&&M$3(e,s,t[s]);return e};const L$5="https://explorer-api.walletconnect.com",E$6="wcm",O$4="js-2.6.2";async function w$4(e,t){const s=K$3({sdkType:E$6,sdkVersion:O$4},t),n=new URL(e,L$5);return n.searchParams.append("projectId",y$6.state.projectId),Object.entries(s).forEach(([i,l])=>{l&&n.searchParams.append(i,String(l));}),(await fetch(n)).json()}const m$2={async getDesktopListings(e){return w$4("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return w$4("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return w$4("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return w$4("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return `${L$5}/w3m/v1/getWalletImage/${e}?projectId=${y$6.state.projectId}&sdkType=${E$6}&sdkVersion=${O$4}`},getAssetImageUrl(e){return `${L$5}/w3m/v1/getAssetImage/${e}?projectId=${y$6.state.projectId}&sdkType=${E$6}&sdkVersion=${O$4}`}};var z$5=Object.defineProperty,j$5=Object.getOwnPropertySymbols,J$1=Object.prototype.hasOwnProperty,q$2=Object.prototype.propertyIsEnumerable,k$2=(e,t,s)=>t in e?z$5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))J$1.call(t,s)&&k$2(e,s,t[s]);if(j$5)for(var s of j$5(t))q$2.call(t,s)&&k$2(e,s,t[s]);return e};const N$2=a$2.isMobile(),d$4=proxy({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),te$1={state:d$4,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=y$6.state;if(e==="NONE"||t==="ALL"&&!e)return d$4.recomendedWallets;if(a$2.isArray(e)){const s={recommendedIds:e.join(",")},{listings:n}=await m$2.getAllListings(s),i=Object.values(n);i.sort((l,v)=>{const b=e.indexOf(l.id),f=e.indexOf(v.id);return b-f}),d$4.recomendedWallets=i;}else {const{chains:s,isAuth:n}=p$5.state,i=s?.join(","),l=a$2.isArray(t),v={page:1,sdks:n?"auth_v1":void 0,entries:a$2.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:l?t.join(","):void 0},{listings:b}=N$2?await m$2.getMobileListings(v):await m$2.getDesktopListings(v);d$4.recomendedWallets=Object.values(b);}return d$4.recomendedWallets},async getWallets(e){const t=F({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=y$6.state,{recomendedWallets:i}=d$4;if(n==="ALL")return d$4.wallets;i.length?t.excludedIds=i.map(x=>x.id).join(","):a$2.isArray(s)&&(t.excludedIds=s.join(",")),a$2.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),p$5.state.isAuth&&(t.sdks="auth_v1");const{page:l,search:v}=e,{listings:b,total:f}=N$2?await m$2.getMobileListings(t):await m$2.getDesktopListings(t),A=Object.values(b),U=v?"search":"wallets";return d$4[U]={listings:[...d$4[U].listings,...A],total:f,page:l??1},{listings:A,total:f}},getWalletImageUrl(e){return m$2.getWalletImageUrl(e)},getAssetImageUrl(e){return m$2.getAssetImageUrl(e)},resetSearch(){d$4.search={listings:[],total:0,page:1};}},I$2=proxy({open:!1}),se$1={state:I$2,subscribe(e){return subscribe(I$2,()=>e(I$2))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=p$5.state;if(a$2.removeWalletConnectDeepLink(),p$5.setWalletConnectUri(e?.uri),p$5.setChains(e?.chains),T$3.reset("ConnectWallet"),s&&n)I$2.open=!0,t();else {const i=setInterval(()=>{const l=p$5.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(i),I$2.open=!0,t());},200);}})},close(){I$2.open=!1;}};var G$1=Object.defineProperty,$$1=Object.getOwnPropertySymbols,Q$3=Object.prototype.hasOwnProperty,X$1=Object.prototype.propertyIsEnumerable,S$4=(e,t,s)=>t in e?G$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Y=(e,t)=>{for(var s in t||(t={}))Q$3.call(t,s)&&S$4(e,s,t[s]);if($$1)for(var s of $$1(t))X$1.call(t,s)&&S$4(e,s,t[s]);return e};function Z$1(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const C$4=proxy({themeMode:Z$1()?"dark":"light"}),ne$2={state:C$4,subscribe(e){return subscribe(C$4,()=>e(C$4))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(C$4.themeMode=t),s&&(C$4.themeVariables=Y({},s));}},g$5=proxy({open:!1,message:"",variant:"success"}),oe$2={state:g$5,subscribe(e){return subscribe(g$5,()=>e(g$5))},openToast(e,t){g$5.open=!0,g$5.message=e,g$5.variant=t;},closeToast(){g$5.open=!1;}};
|
|
73007
73007
|
|
|
73008
|
-
let d$3 = class d{constructor(e){this.openModal=se$1.open,this.closeModal=se$1.close,this.subscribeModal=se$1.subscribe,this.setTheme=ne$2.setThemeConfig,ne$2.setThemeConfig(e),y$6.setConfig(e),this.initUi();}async initUi(){if(typeof window<"u"){await import('./index-
|
|
73008
|
+
let d$3 = class d{constructor(e){this.openModal=se$1.open,this.closeModal=se$1.close,this.subscribeModal=se$1.subscribe,this.setTheme=ne$2.setThemeConfig,ne$2.setThemeConfig(e),y$6.setConfig(e),this.initUi();}async initUi(){if(typeof window<"u"){await import('./index-CigrTnR-.js');const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),p$5.setIsUiLoaded(!0);}}};
|
|
73009
73009
|
|
|
73010
73010
|
var index$2 = /*#__PURE__*/Object.freeze({
|
|
73011
73011
|
__proto__: null,
|
|
@@ -105652,7 +105652,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
105652
105652
|
return __generator(this, function (_b) {
|
|
105653
105653
|
switch (_b.label) {
|
|
105654
105654
|
case 0: return [4 /*yield*/, import(
|
|
105655
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
105655
|
+
/* webpackChunkName: "auto-track" */ './auto-track-NKFv7sOR.js')];
|
|
105656
105656
|
case 1:
|
|
105657
105657
|
autotrack = _b.sent();
|
|
105658
105658
|
return [2 /*return*/, (_a = autotrack.link).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -105671,7 +105671,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
105671
105671
|
return __generator(this, function (_b) {
|
|
105672
105672
|
switch (_b.label) {
|
|
105673
105673
|
case 0: return [4 /*yield*/, import(
|
|
105674
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
105674
|
+
/* webpackChunkName: "auto-track" */ './auto-track-NKFv7sOR.js')];
|
|
105675
105675
|
case 1:
|
|
105676
105676
|
autotrack = _b.sent();
|
|
105677
105677
|
return [2 /*return*/, (_a = autotrack.link).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -105690,7 +105690,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
105690
105690
|
return __generator(this, function (_b) {
|
|
105691
105691
|
switch (_b.label) {
|
|
105692
105692
|
case 0: return [4 /*yield*/, import(
|
|
105693
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
105693
|
+
/* webpackChunkName: "auto-track" */ './auto-track-NKFv7sOR.js')];
|
|
105694
105694
|
case 1:
|
|
105695
105695
|
autotrack = _b.sent();
|
|
105696
105696
|
return [2 /*return*/, (_a = autotrack.form).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -105709,7 +105709,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
105709
105709
|
return __generator(this, function (_b) {
|
|
105710
105710
|
switch (_b.label) {
|
|
105711
105711
|
case 0: return [4 /*yield*/, import(
|
|
105712
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
105712
|
+
/* webpackChunkName: "auto-track" */ './auto-track-NKFv7sOR.js')];
|
|
105713
105713
|
case 1:
|
|
105714
105714
|
autotrack = _b.sent();
|
|
105715
105715
|
return [2 /*return*/, (_a = autotrack.form).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -105859,7 +105859,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
105859
105859
|
return [2 /*return*/, []];
|
|
105860
105860
|
}
|
|
105861
105861
|
return [4 /*yield*/, import(
|
|
105862
|
-
/* webpackChunkName: "queryString" */ './index-
|
|
105862
|
+
/* webpackChunkName: "queryString" */ './index-DUtDMn2M.js')];
|
|
105863
105863
|
case 1:
|
|
105864
105864
|
queryString = (_a.sent()).queryString;
|
|
105865
105865
|
return [2 /*return*/, queryString(this, query)];
|
|
@@ -108563,7 +108563,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
108563
108563
|
case 0:
|
|
108564
108564
|
if (!hasTsubMiddleware(legacySettings)) return [3 /*break*/, 2];
|
|
108565
108565
|
return [4 /*yield*/, import(
|
|
108566
|
-
/* webpackChunkName: "tsub-middleware" */ './index-
|
|
108566
|
+
/* webpackChunkName: "tsub-middleware" */ './index-CnPg4cq4.js').then(function (mod) {
|
|
108567
108567
|
return mod.tsubMiddleware(legacySettings.middlewareSettings.routingRules);
|
|
108568
108568
|
})];
|
|
108569
108569
|
case 1:
|
|
@@ -108576,7 +108576,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
108576
108576
|
tsubMiddleware = _d;
|
|
108577
108577
|
if (!(hasLegacyDestinations(legacySettings) || legacyIntegrationSources.length > 0)) return [3 /*break*/, 5];
|
|
108578
108578
|
return [4 /*yield*/, import(
|
|
108579
|
-
/* webpackChunkName: "ajs-destination" */ './index-
|
|
108579
|
+
/* webpackChunkName: "ajs-destination" */ './index-DIi2D2Sk.js').then(function (mod) {
|
|
108580
108580
|
return mod.ajsDestinations(writeKey, legacySettings, analytics.integrations, opts, tsubMiddleware, legacyIntegrationSources);
|
|
108581
108581
|
})];
|
|
108582
108582
|
case 4:
|
|
@@ -108589,7 +108589,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
108589
108589
|
legacyDestinations = _e;
|
|
108590
108590
|
if (!legacySettings.legacyVideoPluginsEnabled) return [3 /*break*/, 8];
|
|
108591
108591
|
return [4 /*yield*/, import(
|
|
108592
|
-
/* webpackChunkName: "legacyVideos" */ './index-
|
|
108592
|
+
/* webpackChunkName: "legacyVideos" */ './index-CE6fJsS4.js').then(function (mod) {
|
|
108593
108593
|
return mod.loadLegacyVideoPlugins(analytics);
|
|
108594
108594
|
})];
|
|
108595
108595
|
case 7:
|
|
@@ -108598,7 +108598,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
108598
108598
|
case 8:
|
|
108599
108599
|
if (!((_a = opts.plan) === null || _a === void 0 ? void 0 : _a.track)) return [3 /*break*/, 10];
|
|
108600
108600
|
return [4 /*yield*/, import(
|
|
108601
|
-
/* webpackChunkName: "schemaFilter" */ './index-
|
|
108601
|
+
/* webpackChunkName: "schemaFilter" */ './index-DkN9NihW.js').then(function (mod) {
|
|
108602
108602
|
var _a;
|
|
108603
108603
|
return mod.schemaFilter((_a = opts.plan) === null || _a === void 0 ? void 0 : _a.track, legacySettings);
|
|
108604
108604
|
})];
|
|
@@ -108637,7 +108637,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
108637
108637
|
return enabled;
|
|
108638
108638
|
})) return [3 /*break*/, 17];
|
|
108639
108639
|
return [4 /*yield*/, import(
|
|
108640
|
-
/* webpackChunkName: "remoteMiddleware" */ './index-
|
|
108640
|
+
/* webpackChunkName: "remoteMiddleware" */ './index-DB-5H6fn.js').then(function (_a) {
|
|
108641
108641
|
var remoteMiddlewares = _a.remoteMiddlewares;
|
|
108642
108642
|
return __awaiter$5(_this, void 0, void 0, function () {
|
|
108643
108643
|
var middleware, promises;
|
|
@@ -192323,7 +192323,7 @@ const useProvidersContext = () => {
|
|
|
192323
192323
|
return context;
|
|
192324
192324
|
};
|
|
192325
192325
|
|
|
192326
|
-
const AddTokensWidget = React$2.lazy(() => import('./AddTokensWidget-
|
|
192326
|
+
const AddTokensWidget = React$2.lazy(() => import('./AddTokensWidget-CwL3dW01.js'));
|
|
192327
192327
|
class AddTokens extends Base$3 {
|
|
192328
192328
|
eventTopic = w$5.IMTBL_ADD_TOKENS_WIDGET_EVENT;
|
|
192329
192329
|
getValidatedProperties({ config, }) {
|
|
@@ -192367,7 +192367,7 @@ class AddTokens extends Base$3 {
|
|
|
192367
192367
|
}
|
|
192368
192368
|
}
|
|
192369
192369
|
|
|
192370
|
-
const BridgeWidget = React$2.lazy(() => import('./BridgeWidget-
|
|
192370
|
+
const BridgeWidget = React$2.lazy(() => import('./BridgeWidget-CTpqCXez.js').then(function (n) { return n.a; }));
|
|
192371
192371
|
class Bridge extends Base$3 {
|
|
192372
192372
|
eventTopic = w$5.IMTBL_BRIDGE_WIDGET_EVENT;
|
|
192373
192373
|
getValidatedProperties({ config }) {
|
|
@@ -192510,7 +192510,7 @@ const commerceFlows = [
|
|
|
192510
192510
|
_e$2.TRANSFER,
|
|
192511
192511
|
];
|
|
192512
192512
|
|
|
192513
|
-
const CommerceWidget = React$2.lazy(() => import('./CommerceWidget-
|
|
192513
|
+
const CommerceWidget = React$2.lazy(() => import('./CommerceWidget-B8KjKeAb.js'));
|
|
192514
192514
|
class CommerceWidgetRoot extends Base$3 {
|
|
192515
192515
|
eventTopic = w$5.IMTBL_COMMERCE_WIDGET_EVENT;
|
|
192516
192516
|
getValidatedProperties({ config, }) {
|
|
@@ -194765,7 +194765,7 @@ const orchestrationEvents = {
|
|
|
194765
194765
|
sendRequestAddTokensEvent,
|
|
194766
194766
|
};
|
|
194767
194767
|
|
|
194768
|
-
const OnRampWidget = React$2.lazy(() => import('./OnRampWidget-
|
|
194768
|
+
const OnRampWidget = React$2.lazy(() => import('./OnRampWidget-DPg5SiW1.js'));
|
|
194769
194769
|
class OnRamp extends Base$3 {
|
|
194770
194770
|
eventTopic = w$5.IMTBL_ONRAMP_WIDGET_EVENT;
|
|
194771
194771
|
getValidatedProperties({ config }) {
|
|
@@ -194904,7 +194904,7 @@ const sendSalePaymentTokenEvent = (eventTarget, details) => {
|
|
|
194904
194904
|
eventTarget.dispatchEvent(event);
|
|
194905
194905
|
};
|
|
194906
194906
|
|
|
194907
|
-
const SaleWidget = React$2.lazy(() => import('./SaleWidget-
|
|
194907
|
+
const SaleWidget = React$2.lazy(() => import('./SaleWidget-Cb_a97Gp.js'));
|
|
194908
194908
|
class Sale extends Base$3 {
|
|
194909
194909
|
eventTopic = w$5.IMTBL_SALE_WIDGET_EVENT;
|
|
194910
194910
|
// TODO: add specific validation logic for the sale items
|
|
@@ -195055,7 +195055,7 @@ const sendSwapRejectedEvent = (eventTarget, reason) => {
|
|
|
195055
195055
|
eventTarget.dispatchEvent(rejectedEvent);
|
|
195056
195056
|
};
|
|
195057
195057
|
|
|
195058
|
-
const SwapWidget = React$2.lazy(() => import('./SwapWidget-
|
|
195058
|
+
const SwapWidget = React$2.lazy(() => import('./SwapWidget-Cs_Kn1B5.js').then(function (n) { return n.b; }));
|
|
195059
195059
|
class Swap extends Base$3 {
|
|
195060
195060
|
eventTopic = w$5.IMTBL_SWAP_WIDGET_EVENT;
|
|
195061
195061
|
getValidatedProperties({ config }) {
|
|
@@ -195162,7 +195162,7 @@ function sendDisconnectWalletEvent(eventTarget) {
|
|
|
195162
195162
|
eventTarget.dispatchEvent(disconnectWalletEvent);
|
|
195163
195163
|
}
|
|
195164
195164
|
|
|
195165
|
-
const WalletWidget = React$2.lazy(() => import('./WalletWidget-
|
|
195165
|
+
const WalletWidget = React$2.lazy(() => import('./WalletWidget-C4k88Tqd.js'));
|
|
195166
195166
|
class Wallet extends Base$3 {
|
|
195167
195167
|
eventTopic = w$5.IMTBL_WALLET_WIDGET_EVENT;
|
|
195168
195168
|
getValidatedProperties({ config }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e5 as __awaiter, e6 as __generator } from './index-
|
|
1
|
+
import { e5 as __awaiter, e6 as __generator } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
function loadLegacyVideoPlugins(analytics) {
|
|
4
4
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -7,7 +7,7 @@ function loadLegacyVideoPlugins(analytics) {
|
|
|
7
7
|
switch (_a.label) {
|
|
8
8
|
case 0: return [4 /*yield*/, import(
|
|
9
9
|
// @ts-expect-error
|
|
10
|
-
'./index.umd-
|
|
10
|
+
'./index.umd-CbRT3NhO.js').then(function (n) { return n.i; })
|
|
11
11
|
// This is super gross, but we need to support the `window.analytics.plugins` namespace
|
|
12
12
|
// that is linked in the segment docs in order to be backwards compatible with ajs-classic
|
|
13
13
|
// @ts-expect-error
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dX as se$1, dY as T$2, dZ as oe$1, d_ as R$1, d$ as a$2, e0 as te$1, e1 as p$1, e2 as ne$1, e3 as y$1 } from './index-
|
|
1
|
+
import { dX as se$1, dY as T$2, dZ as oe$1, d_ as R$1, d$ as a$2, e0 as te$1, e1 as p$1, e2 as ne$1, e3 as y$1 } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e5 as __awaiter, e6 as __generator, eg as isServer, e8 as getNextIntegrationsURL, e7 as loadScript } from './index-
|
|
1
|
+
import { e5 as __awaiter, e6 as __generator, eg as isServer, e8 as getNextIntegrationsURL, e7 as loadScript } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
function remoteMiddlewares(ctx, settings, obfuscate) {
|
|
4
4
|
var _a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e5 as __awaiter, e6 as __generator, e7 as loadScript, e8 as getNextIntegrationsURL, e9 as unloadScript, ea as __spreadArray, eb as isOffline, ec as __assign, ed as ContextCancelation, ee as applyDestinationMiddleware, ef as dist, eg as isServer, eh as mergedOptions, ei as isPlainObject, ej as pWhile, ek as PriorityQueue, el as PersistedPriorityQueue, em as attempt, en as isOnline, eo as Context } from './index-
|
|
1
|
+
import { e5 as __awaiter, e6 as __generator, e7 as loadScript, e8 as getNextIntegrationsURL, e9 as unloadScript, ea as __spreadArray, eb as isOffline, ec as __assign, ed as ContextCancelation, ee as applyDestinationMiddleware, ef as dist, eg as isServer, eh as mergedOptions, ei as isPlainObject, ej as pWhile, ek as PriorityQueue, el as PersistedPriorityQueue, em as attempt, en as isOnline, eo as Context } from './index-Bj6fKhiT.js';
|
|
2
2
|
import { i as isPlanEventEnabled } from './is-plan-event-enabled-mXX0dwl-.js';
|
|
3
3
|
|
|
4
4
|
function normalizeName(name) {
|
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { er as WidgetsFactory } from './index-
|
|
1
|
+
export { er as WidgetsFactory } from './index-Bj6fKhiT.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, dW as useBrowserLayoutEffect } from './index-
|
|
1
|
+
import { r as reactExports, dW as useBrowserLayoutEffect } from './index-Bj6fKhiT.js';
|
|
2
2
|
|
|
3
3
|
// Inspired by https://usehooks-ts.com/react-hook/use-interval
|
|
4
4
|
function useInterval(callback, delay) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/checkout-widgets",
|
|
3
|
-
"version": "2.24.0",
|
|
3
|
+
"version": "2.24.1-0",
|
|
4
4
|
"browserslist": {
|
|
5
5
|
"production": [
|
|
6
6
|
">0.2%",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"react-i18next": "^13.5.0",
|
|
37
37
|
"ts-deepmerge": "^7.0.2",
|
|
38
38
|
"uuid": "^9.0.1",
|
|
39
|
-
"@imtbl/bridge-sdk": "2.24.0",
|
|
40
|
-
"@imtbl/
|
|
41
|
-
"@imtbl/config": "2.24.0",
|
|
42
|
-
"@imtbl/
|
|
43
|
-
"@imtbl/dex-sdk": "2.24.0",
|
|
44
|
-
"@imtbl/passport": "2.24.0"
|
|
39
|
+
"@imtbl/bridge-sdk": "2.24.1-0",
|
|
40
|
+
"@imtbl/checkout-sdk": "2.24.1-0",
|
|
41
|
+
"@imtbl/config": "2.24.1-0",
|
|
42
|
+
"@imtbl/cryptofiat": "2.24.1-0",
|
|
43
|
+
"@imtbl/dex-sdk": "2.24.1-0",
|
|
44
|
+
"@imtbl/passport": "2.24.1-0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@0xsquid/squid-types": "^0.1.108",
|