From 724172f5f4ba0d332f82663e9550e7d873e66b99 Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 11:12:32 +0200 Subject: [PATCH 01/32] initial changes --- packages/arb-token-bridge-ui/package.json | 2 +- .../components/TransactionHistory/helpers.ts | 34 ++- .../TransferPanel/CustomFeeTokenUtils.ts | 4 +- .../src/components/common/AddCustomChain.tsx | 28 +-- .../components/common/WithdrawalCountdown.tsx | 5 +- .../src/hooks/arbTokenBridge.types.ts | 34 +-- .../src/hooks/useArbTokenBridge.ts | 34 +-- .../src/hooks/useClaimWithdrawal.ts | 6 +- .../src/hooks/useNativeCurrency.ts | 10 +- .../src/hooks/useNetworks.ts | 4 +- .../src/hooks/useRedeemRetryable.ts | 13 +- .../src/hooks/useTransactionHistory.ts | 8 +- .../src/hooks/useTransactions.ts | 4 +- .../arb-token-bridge-ui/src/pages/index.tsx | 4 +- .../src/state/app/utils.ts | 12 +- .../src/state/cctpState.ts | 4 +- .../token-bridge-sdk/Erc20DepositStarter.ts | 24 +- .../Erc20WithdrawalStarter.ts | 4 +- .../src/token-bridge-sdk/EthDepositStarter.ts | 12 +- .../token-bridge-sdk/EthWithdrawalStarter.ts | 2 +- .../src/types/ChainQueryParam.ts | 6 +- .../src/util/EthDepositUtils.ts | 4 +- .../src/util/RetryableUtils.ts | 14 +- .../src/util/TokenDepositUtils.ts | 10 +- .../src/util/TokenUtils.ts | 10 +- .../src/util/WithdrawalUtils.ts | 6 +- .../src/util/deposits/helpers.ts | 52 ++-- .../src/util/fetchL2Gateways.ts | 14 +- .../arb-token-bridge-ui/src/util/networks.ts | 231 +++++++++--------- .../src/util/orbitChainsList.ts | 81 ++---- .../src/util/wagmi/setup.ts | 4 +- .../src/util/wagmi/wagmiAdditionalNetworks.ts | 4 +- .../fetchETHWithdrawalsFromEventLogs.ts | 4 +- .../src/util/withdrawals/helpers.ts | 21 +- yarn.lock | 13 +- 35 files changed, 353 insertions(+), 369 deletions(-) diff --git a/packages/arb-token-bridge-ui/package.json b/packages/arb-token-bridge-ui/package.json index ca081a4356..c349e3aade 100644 --- a/packages/arb-token-bridge-ui/package.json +++ b/packages/arb-token-bridge-ui/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@apollo/client": "^3.7.11", - "@arbitrum/sdk": "^3.3.3", + "@arbitrum/sdk": "4.0.0-alpha.0", "@ethersproject/providers": "^5.7.0", "@headlessui/react": "^1.7.8", "@headlessui/tailwindcss": "^0.1.2", diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index 06ce407686..be34076da5 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -3,18 +3,23 @@ import { StaticJsonRpcProvider, TransactionReceipt } from '@ethersproject/providers' -import { EthDepositStatus, L1ToL2MessageStatus } from '@arbitrum/sdk' +import { EthDepositStatus, ParentToChildMessageStatus } from '@arbitrum/sdk' import { EthDepositMessage, - L1ToL2MessageReader -} from '@arbitrum/sdk/dist/lib/message/L1ToL2Message' + ParentToChildMessageReader +} from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' import { DepositStatus, MergedTransaction, WithdrawalStatus } from '../../state/app/state' -import { ChainId, getBlockTime, isNetwork, rpcURLs } from '../../util/networks' +import { + ChainId, + getL1BlockTime, + isNetwork, + rpcURLs +} from '../../util/networks' import { Deposit, Transfer } from '../../hooks/useTransactionHistory' import { getWagmiChain } from '../../util/wagmi/getWagmiChain' import { getL1ToL2MessageDataFromL1TxHash } from '../../util/deposits/helpers' @@ -290,12 +295,13 @@ export async function getUpdatedEthDeposit( l1ToL2MsgData: { fetchingUpdate: false, status: isDeposited - ? L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2 - : L1ToL2MessageStatus.NOT_YET_CREATED, - retryableCreationTxID: (l1ToL2Msg as EthDepositMessage).l2DepositTxHash, + ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + : ParentToChildMessageStatus.NOT_YET_CREATED, + retryableCreationTxID: (l1ToL2Msg as EthDepositMessage) + .chainDepositTxHash, // Only show `l2TxID` after the deposit is confirmed l2TxID: isDeposited - ? (l1ToL2Msg as EthDepositMessage).l2DepositTxHash + ? (l1ToL2Msg as EthDepositMessage).chainDepositTxHash : undefined } } @@ -324,7 +330,7 @@ export async function getUpdatedTokenDeposit( l1Provider: getProvider(tx.parentChainId), l2Provider: getProvider(tx.childChainId) }) - const _l1ToL2Msg = l1ToL2Msg as L1ToL2MessageReader + const _l1ToL2Msg = l1ToL2Msg as ParentToChildMessageReader if (!l1ToL2Msg) { const receipt = await getTxReceipt(tx) @@ -341,8 +347,8 @@ export async function getUpdatedTokenDeposit( const res = await _l1ToL2Msg.getSuccessfulRedeem() const l2TxID = (() => { - if (res.status === L1ToL2MessageStatus.REDEEMED) { - return res.l2TxReceipt.transactionHash + if (res.status === ParentToChildMessageStatus.REDEEMED) { + return res.chainTxReceipt.transactionHash } else { return undefined } @@ -352,7 +358,9 @@ export async function getUpdatedTokenDeposit( ...tx, status: _l1ToL2Msg.retryableCreationId ? 'success' : tx.status, resolvedAt: - res.status === L1ToL2MessageStatus.REDEEMED ? dayjs().valueOf() : null, + res.status === ParentToChildMessageStatus.REDEEMED + ? dayjs().valueOf() + : null, l1ToL2MsgData: { status: res.status, l2TxID, @@ -406,7 +414,7 @@ export async function getUpdatedCctpTransfer( const requiredL1BlocksBeforeConfirmation = getBlockBeforeConfirmation( tx.parentChainId ) - const blockTime = getBlockTime(tx.parentChainId) + const blockTime = getL1BlockTime(tx.parentChainId) const txWithTxId: MergedTransaction = { ...tx, txId: receipt.transactionHash } diff --git a/packages/arb-token-bridge-ui/src/components/TransferPanel/CustomFeeTokenUtils.ts b/packages/arb-token-bridge-ui/src/components/TransferPanel/CustomFeeTokenUtils.ts index 5560afcf8d..682e606df9 100644 --- a/packages/arb-token-bridge-ui/src/components/TransferPanel/CustomFeeTokenUtils.ts +++ b/packages/arb-token-bridge-ui/src/components/TransferPanel/CustomFeeTokenUtils.ts @@ -42,8 +42,8 @@ export async function approveCustomFeeTokenForGatewayEstimateGas(params: { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) const txRequest = await erc20Bridger.getApproveGasTokenRequest({ - erc20L1Address, - l1Provider + erc20ParentAddress: erc20L1Address, + parentProvider: l1Provider }) return l1Signer.estimateGas(txRequest) diff --git a/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx b/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx index e3a4dd62ff..ca330e8aad 100644 --- a/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx +++ b/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx @@ -2,7 +2,7 @@ import { useState } from 'react' import { isAddress } from 'ethers/lib/utils.js' import { Popover } from '@headlessui/react' import { - addCustomNetwork, + addCustomArbitrumNetwork, constants as arbitrumSdkConstants } from '@arbitrum/sdk' import { StaticJsonRpcProvider } from '@ethersproject/providers' @@ -181,7 +181,7 @@ async function mapOrbitConfigToOrbitChain( const confirmPeriodBlocks = (await rollup.confirmPeriodBlocks()).toNumber() ?? 150 return { - chainID: data.chainInfo.chainId, + chainId: data.chainInfo.chainId, confirmPeriodBlocks, ethBridge: { bridge: data.coreContracts.bridge, @@ -194,15 +194,9 @@ async function mapOrbitConfigToOrbitChain( explorerUrl: data.chainInfo.explorerUrl, isCustom: true, name: data.chainInfo.chainName, - partnerChainID: data.chainInfo.parentChainId, - partnerChainIDs: [], + parentChainId: data.chainInfo.parentChainId, retryableLifetimeSeconds: 604800, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - blockTime: arbitrumSdkConstants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, nativeToken: data.chainInfo.nativeToken, - isArbitrum: true, tokenBridge: { l1CustomGateway: data.tokenBridgeContracts.l2Contracts.customGateway, l1ERC20Gateway: data.tokenBridgeContracts.l2Contracts.standardGateway, @@ -271,7 +265,7 @@ export const AddCustomChain = () => { const nativeToken = await fetchNativeToken(data) // Orbit config has been validated and will be added to the custom list after page refreshes // let's still try to add it here to handle eventual errors - addCustomNetwork({ customL2Network: customChain }) + addCustomArbitrumNetwork(customChain) saveCustomChainToLocalStorage({ ...customChain, ...nativeToken }) saveOrbitConfigToLocalStorage(data) // reload to apply changes @@ -333,20 +327,20 @@ export const AddCustomChain = () => { {customChains.map(customChain => ( {customChain.name} - {customChain.chainID} + {customChain.chainId} - {getNetworkName(customChain.partnerChainID)} + {getNetworkName(customChain.parentChainId)} - {customChain.partnerChainID} + {customChain.parentChainId} @@ -359,10 +353,10 @@ export const AddCustomChain = () => { className="rounded-t p-4 text-left transition duration-300 hover:bg-[#333333]" onClick={() => { removeCustomChainFromLocalStorage( - customChain.chainID + customChain.chainId ) removeOrbitConfigFromLocalStorage( - customChain.chainID + customChain.chainId ) // reload to apply changes location.reload() @@ -375,7 +369,7 @@ export const AddCustomChain = () => { href={`data:text/json;charset=utf-8,${encodeURIComponent( JSON.stringify( getOrbitConfigFromLocalStorageById( - customChain.chainID + customChain.chainId ) ) )}`} diff --git a/packages/arb-token-bridge-ui/src/components/common/WithdrawalCountdown.tsx b/packages/arb-token-bridge-ui/src/components/common/WithdrawalCountdown.tsx index ca0dbc9288..09012b177d 100644 --- a/packages/arb-token-bridge-ui/src/components/common/WithdrawalCountdown.tsx +++ b/packages/arb-token-bridge-ui/src/components/common/WithdrawalCountdown.tsx @@ -2,7 +2,7 @@ import dayjs, { Dayjs } from 'dayjs' import { getBaseChainIdByChainId, - getBlockTime, + getL1BlockTime, getConfirmPeriodBlocks } from '../../util/networks' import { MergedTransaction } from '../../state/app/state' @@ -28,7 +28,8 @@ export function getTxConfirmationDate({ // the block time is always base chain's block time regardless of withdrawing from L3 to L2 or from L2 to L1 // and similarly, the confirm period blocks is always the number of blocks on the base chain const confirmationSeconds = - getBlockTime(baseChainId) * getConfirmPeriodBlocks(withdrawalFromChainId) + + getL1BlockTime(baseChainId) * + getConfirmPeriodBlocks(withdrawalFromChainId) + CONFIRMATION_BUFFER_MINUTES * SECONDS_IN_MIN return createdAt.add(confirmationSeconds, 'second') } diff --git a/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts b/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts index 42f1ed1c00..fae731a4c0 100644 --- a/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts +++ b/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts @@ -2,22 +2,22 @@ import { Signer } from '@ethersproject/abstract-signer' import { TransactionReceipt } from '@ethersproject/abstract-provider' import { BigNumber, ContractReceipt, ethers } from 'ethers' import { TokenList } from '@uniswap/token-lists' -import { L2ToL1MessageStatus as OutgoingMessageState } from '@arbitrum/sdk' +import { ChildToParentMessageStatus as OutgoingMessageState } from '@arbitrum/sdk' import { StandardArbERC20 } from '@arbitrum/sdk/dist/lib/abi/StandardArbERC20' import { WithdrawalInitiatedEvent } from '@arbitrum/sdk/dist/lib/abi/L2ArbitrumGateway' -import { L2ToL1TransactionEvent } from '@arbitrum/sdk/dist/lib/message/L2ToL1Message' +import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' import { EventArgs } from '@arbitrum/sdk/dist/lib/dataEntities/event' import { - L1EthDepositTransaction, - L1EthDepositTransactionReceipt, - L1ContractCallTransaction, - L1ContractCallTransactionReceipt -} from '@arbitrum/sdk/dist/lib/message/L1Transaction' + ParentEthDepositTransaction, + ParentEthDepositTransactionReceipt, + ParentContractCallTransaction, + ParentContractCallTransactionReceipt +} from '@arbitrum/sdk/dist/lib/message/ParentTransaction' import { - L2ContractTransaction, - L2TransactionReceipt -} from '@arbitrum/sdk/dist/lib/message/L2Transaction' + ChildContractTransaction, + ChildTransactionReceipt +} from '@arbitrum/sdk/dist/lib/message/ChildTransaction' import { NewTransaction, @@ -43,18 +43,18 @@ export type TransactionLifecycle = Partial<{ }> export type L1EthDepositTransactionLifecycle = TransactionLifecycle< - L1EthDepositTransaction, - L1EthDepositTransactionReceipt + ParentEthDepositTransaction, + ParentEthDepositTransactionReceipt > export type L1ContractCallTransactionLifecycle = TransactionLifecycle< - L1ContractCallTransaction, - L1ContractCallTransactionReceipt + ParentContractCallTransaction, + ParentContractCallTransactionReceipt > export type L2ContractCallTransactionLifecycle = TransactionLifecycle< - L2ContractTransaction, - L2TransactionReceipt + ChildContractTransaction, + ChildTransactionReceipt > export enum NodeBlockDeadlineStatusTypes { @@ -67,7 +67,7 @@ export type NodeBlockDeadlineStatus = | NodeBlockDeadlineStatusTypes.NODE_NOT_CREATED | NodeBlockDeadlineStatusTypes.EXECUTE_CALL_EXCEPTION -export type L2ToL1EventResult = L2ToL1TransactionEvent +export type L2ToL1EventResult = ChildToParentTransactionEvent export type L2ToL1EventResultPlus = L2ToL1EventResult & { sender?: string diff --git a/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts b/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts index 0a931d37b6..238e70850c 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts @@ -6,11 +6,11 @@ import { JsonRpcProvider } from '@ethersproject/providers' import { useLocalStorage } from '@rehooks/local-storage' import { TokenList } from '@uniswap/token-lists' import { MaxUint256 } from '@ethersproject/constants' -import { EthBridger, Erc20Bridger, L2ToL1Message } from '@arbitrum/sdk' -import { L1EthDepositTransaction } from '@arbitrum/sdk/dist/lib/message/L1Transaction' +import { EthBridger, Erc20Bridger, ChildToParentMessage } from '@arbitrum/sdk' +import { ParentEthDepositTransaction } from '@arbitrum/sdk/dist/lib/message/ParentTransaction' import { ERC20__factory } from '@arbitrum/sdk/dist/lib/abi/factories/ERC20__factory' import { EventArgs } from '@arbitrum/sdk/dist/lib/dataEntities/event' -import { L2ToL1TransactionEvent } from '@arbitrum/sdk/dist/lib/message/L2ToL1Message' +import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' import { L2ToL1TransactionEvent as ClassicL2ToL1TransactionEvent } from '@arbitrum/sdk/dist/lib/abi/ArbSys' import dayjs from 'dayjs' @@ -55,7 +55,7 @@ export const wait = (ms = 0) => { } function isClassicL2ToL1TransactionEvent( - event: L2ToL1TransactionEvent + event: ChildToParentTransactionEvent ): event is EventArgs { return typeof (event as any).batchNumber !== 'undefined' } @@ -189,14 +189,14 @@ export const useArbTokenBridge = ( from: walletAddress }) - let tx: L1EthDepositTransaction + let tx: ParentEthDepositTransaction try { const gasLimit = await l1.provider.estimateGas(depositRequest.txRequest) tx = await ethBridger.deposit({ amount, - l1Signer, + parentSigner: l1Signer, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(5)) } }) @@ -288,7 +288,7 @@ export const useArbTokenBridge = ( const tx = await ethBridger.withdraw({ ...withdrawalRequest, - l2Signer, + childSigner: l2Signer, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(30)) } }) @@ -358,8 +358,8 @@ export const useArbTokenBridge = ( } const tx = await erc20Bridger.approveToken({ - erc20L1Address, - l1Signer + erc20ParentAddress: erc20L1Address, + parentSigner: l1Signer }) const { symbol } = await fetchErc20Data({ @@ -464,10 +464,10 @@ export const useArbTokenBridge = ( }) const depositRequest = await erc20Bridger.getDepositRequest({ - l1Provider: l1.provider, - l2Provider: l2.provider, + parentProvider: l1.provider, + childProvider: l2.provider, from: walletAddress, - erc20L1Address, + erc20ParentAddress: erc20L1Address, destinationAddress, amount, retryableGasOverrides: { @@ -481,7 +481,7 @@ export const useArbTokenBridge = ( const tx = await erc20Bridger.deposit({ ...depositRequest, - l1Signer, + parentSigner: l1Signer, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(5)) } }) @@ -592,7 +592,7 @@ export const useArbTokenBridge = ( const withdrawalRequest = await erc20Bridger.getWithdrawalRequest({ from: walletAddress, - erc20l1Address: erc20L1Address, + erc20ParentAddress: erc20L1Address, destinationAddress: destinationAddress ?? walletAddress, amount }) @@ -603,7 +603,7 @@ export const useArbTokenBridge = ( const tx = await erc20Bridger.withdraw({ ...withdrawalRequest, - l2Signer, + childSigner: l2Signer, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(30)) } }) @@ -936,7 +936,7 @@ export const useArbTokenBridge = ( const parentChainProvider = getProvider(event.parentChainId) const childChainProvider = getProvider(event.childChainId) - const messageWriter = L2ToL1Message.fromEvent( + const messageWriter = ChildToParentMessage.fromEvent( l1Signer, event, parentChainProvider @@ -992,7 +992,7 @@ export const useArbTokenBridge = ( const parentChainProvider = getProvider(event.parentChainId) const childChainProvider = getProvider(event.childChainId) - const messageWriter = L2ToL1Message.fromEvent( + const messageWriter = ChildToParentMessage.fromEvent( l1Signer, event, parentChainProvider diff --git a/packages/arb-token-bridge-ui/src/hooks/useClaimWithdrawal.ts b/packages/arb-token-bridge-ui/src/hooks/useClaimWithdrawal.ts index a41233f679..4e874b3e5c 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useClaimWithdrawal.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useClaimWithdrawal.ts @@ -11,7 +11,7 @@ import { getProvider, setParentChainTxDetailsOfWithdrawalClaimTx } from '../components/TransactionHistory/helpers' -import { L2TransactionReceipt } from '@arbitrum/sdk' +import { ChildTransactionReceipt } from '@arbitrum/sdk' import { ContractReceipt, utils } from 'ethers' import { useTransactionHistory } from './useTransactionHistory' import dayjs from 'dayjs' @@ -49,8 +49,8 @@ export function useClaimWithdrawal( const childChainProvider = getProvider(tx.childChainId) const txReceipt = await childChainProvider.getTransactionReceipt(tx.txId) - const l2TxReceipt = new L2TransactionReceipt(txReceipt) - const [event] = l2TxReceipt.getL2ToL1Events() + const l2TxReceipt = new ChildTransactionReceipt(txReceipt) + const [event] = l2TxReceipt.getChildToParentEvents() if (!event) { setIsClaiming(false) diff --git a/packages/arb-token-bridge-ui/src/hooks/useNativeCurrency.ts b/packages/arb-token-bridge-ui/src/hooks/useNativeCurrency.ts index 8cfedbc9ba..f315990e28 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useNativeCurrency.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useNativeCurrency.ts @@ -1,5 +1,5 @@ import { Provider, StaticJsonRpcProvider } from '@ethersproject/providers' -import { EthBridger, L2Network, getL2Network } from '@arbitrum/sdk' +import { EthBridger, ArbitrumNetwork, getArbitrumNetwork } from '@arbitrum/sdk' import useSWRImmutable from 'swr/immutable' import { ETHER_TOKEN_LOGO, ether } from '../constants' @@ -57,10 +57,10 @@ export async function fetchNativeCurrency({ }: { provider: Provider }): Promise { - let chain: L2Network + let chain: ArbitrumNetwork try { - chain = await getL2Network(provider) + chain = await getArbitrumNetwork(provider) } catch (error) { // This will only throw for L1s, so we can safely assume that the native currency is ETH return nativeCurrencyEther @@ -74,7 +74,7 @@ export async function fetchNativeCurrency({ } const address = ethBridger.nativeToken.toLowerCase() - const parentChainId = chain.partnerChainID + const parentChainId = chain.parentChainId const parentChainProvider = new StaticJsonRpcProvider(rpcURLs[parentChainId]) const { name, symbol, decimals } = await fetchErc20Data({ @@ -84,7 +84,7 @@ export async function fetchNativeCurrency({ return { name, - logoUrl: getBridgeUiConfigForChain(chain.chainID).nativeTokenData?.logoUrl, + logoUrl: getBridgeUiConfigForChain(chain.chainId).nativeTokenData?.logoUrl, symbol, decimals, address, diff --git a/packages/arb-token-bridge-ui/src/hooks/useNetworks.ts b/packages/arb-token-bridge-ui/src/hooks/useNetworks.ts index a771276f25..cec34168a9 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useNetworks.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useNetworks.ts @@ -54,7 +54,7 @@ export function isSupportedChainId( } const customChainIds = getCustomChainsFromLocalStorage().map( - chain => chain.chainID + chain => chain.chainId ) return [ @@ -67,7 +67,7 @@ export function isSupportedChainId( stylusTestnet.id, arbitrumLocal.id, local.id, - ...getOrbitChains().map(chain => chain.chainID), + ...getOrbitChains().map(chain => chain.chainId), ...customChainIds ].includes(chainId) } diff --git a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts index cb05915b90..a66b273f54 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts @@ -1,5 +1,5 @@ import { useCallback, useState } from 'react' -import { L1ToL2MessageStatus } from '@arbitrum/sdk' +import { ParentToChildMessageStatus } from '@arbitrum/sdk' import { useSigner } from 'wagmi' import dayjs from 'dayjs' import { TransactionReceipt } from '@ethersproject/providers' @@ -52,12 +52,13 @@ export function useRedeemRetryable( await reedemTx.wait() const status = await retryableTicket.status() - const isSuccess = status === L1ToL2MessageStatus.REDEEMED + const isSuccess = status === ParentToChildMessageStatus.REDEEMED - const redeemReceipt = (await retryableTicket.getSuccessfulRedeem()) as { - status: L1ToL2MessageStatus.REDEEMED - l2TxReceipt: TransactionReceipt - } + const redeemReceipt = + (await retryableTicket.getSuccessfulRedeem()) as unknown as { + status: ParentToChildMessageStatus.REDEEMED + l2TxReceipt: TransactionReceipt + } updatePendingTransaction({ ...tx, diff --git a/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts b/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts index 108835b11f..f9fcb86ce9 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts @@ -2,6 +2,7 @@ import { useAccount, useNetwork } from 'wagmi' import useSWRImmutable from 'swr/immutable' import useSWRInfinite from 'swr/infinite' import { useCallback, useEffect, useMemo, useState } from 'react' +import { getChildrenForNetwork } from '@arbitrum/sdk' import dayjs from 'dayjs' import { ChainId, getChains, isNetwork } from '../util/networks' @@ -95,10 +96,13 @@ function sortByTimestampDescending(a: Transfer, b: Transfer) { } function getMultiChainFetchList(): ChainPair[] { + console.log('chains: ', getChains()) return getChains().flatMap(chain => { // We only grab child chains because we don't want duplicates and we need the parent chain // Although the type is correct here we default to an empty array for custom networks backwards compatibility - const childChainIds = chain.partnerChainIDs ?? [] + const childChainIds = getChildrenForNetwork(chain.chainId).map( + childChain => childChain.chainId + ) const isParentChain = childChainIds.length > 0 if (!isParentChain) { @@ -108,7 +112,7 @@ function getMultiChainFetchList(): ChainPair[] { // For each destination chain, map to an array of ChainPair objects return childChainIds.map(childChainId => ({ - parentChainId: chain.chainID, + parentChainId: chain.chainId, childChainId: childChainId })) }) diff --git a/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts b/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts index 440e70eb6b..d2fb7de8dc 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts @@ -2,7 +2,7 @@ import { useReducer, useEffect, useMemo } from 'react' import { TransactionReceipt } from '@ethersproject/abstract-provider' import { AssetType, TransactionActions } from './arbTokenBridge.types' import { BigNumber, ethers } from 'ethers' -import { L1ToL2MessageStatus } from '@arbitrum/sdk' +import { ParentToChildMessageStatus } from '@arbitrum/sdk' type Action = | { type: 'ADD_TRANSACTION'; transaction: Transaction } @@ -63,7 +63,7 @@ export const txnTypeToLayer = (txnType: TxnType): 1 | 2 => { } export interface L1ToL2MessageData { - status: L1ToL2MessageStatus + status: ParentToChildMessageStatus retryableCreationTxID: string l2TxID?: string fetchingUpdate: boolean diff --git a/packages/arb-token-bridge-ui/src/pages/index.tsx b/packages/arb-token-bridge-ui/src/pages/index.tsx index 13dd68a349..1a86070862 100644 --- a/packages/arb-token-bridge-ui/src/pages/index.tsx +++ b/packages/arb-token-bridge-ui/src/pages/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react' import dynamic from 'next/dynamic' -import { addCustomNetwork } from '@arbitrum/sdk' +import { addCustomArbitrumNetwork } from '@arbitrum/sdk' import { AppConnectionFallbackContainer } from '../components/App/AppConnectionFallbackContainer' import { Loader } from '../components/common/atoms/Loader' @@ -29,7 +29,7 @@ export default function Index() { ;[...getOrbitChains(), ...getCustomChainsFromLocalStorage()].forEach( chain => { try { - addCustomNetwork({ customL2Network: chain }) + addCustomArbitrumNetwork(chain) mapCustomChainToNetworkData(chain) } catch (_) { // already added diff --git a/packages/arb-token-bridge-ui/src/state/app/utils.ts b/packages/arb-token-bridge-ui/src/state/app/utils.ts index 4246c91eb4..8aa70e7715 100644 --- a/packages/arb-token-bridge-ui/src/state/app/utils.ts +++ b/packages/arb-token-bridge-ui/src/state/app/utils.ts @@ -1,5 +1,5 @@ import dayjs from 'dayjs' -import { L1ToL2MessageStatus } from '@arbitrum/sdk' +import { ParentToChildMessageStatus } from '@arbitrum/sdk' import { ethers, BigNumber } from 'ethers' import { DepositStatus, MergedTransaction } from './state' @@ -53,20 +53,20 @@ export const getDepositStatus = (tx: Transaction | MergedTransaction) => { return DepositStatus.L2_PENDING } switch (l1ToL2MsgData.status) { - case L1ToL2MessageStatus.NOT_YET_CREATED: + case ParentToChildMessageStatus.NOT_YET_CREATED: return DepositStatus.L2_PENDING - case L1ToL2MessageStatus.CREATION_FAILED: + case ParentToChildMessageStatus.CREATION_FAILED: return DepositStatus.CREATION_FAILED - case L1ToL2MessageStatus.EXPIRED: + case ParentToChildMessageStatus.EXPIRED: return tx.assetType === AssetType.ETH ? DepositStatus.L2_SUCCESS : DepositStatus.EXPIRED - case L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2: { + case ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN: { return tx.assetType === AssetType.ETH ? DepositStatus.L2_SUCCESS : DepositStatus.L2_FAILURE } - case L1ToL2MessageStatus.REDEEMED: + case ParentToChildMessageStatus.REDEEMED: return DepositStatus.L2_SUCCESS } } diff --git a/packages/arb-token-bridge-ui/src/state/cctpState.ts b/packages/arb-token-bridge-ui/src/state/cctpState.ts index 1fb9a548b3..42e3898d74 100644 --- a/packages/arb-token-bridge-ui/src/state/cctpState.ts +++ b/packages/arb-token-bridge-ui/src/state/cctpState.ts @@ -8,7 +8,7 @@ import { useInterval } from 'react-use' import { getCctpUtils } from '@/token-bridge-sdk/cctp' import { ChainId, - getBlockTime, + getL1BlockTime, getNetworkName, isNetwork } from '../util/networks' @@ -607,7 +607,7 @@ function getConfirmedDate(tx: MergedTransaction) { const requiredL1BlocksBeforeConfirmation = getBlockBeforeConfirmation( tx.parentChainId ) - const blockTime = getBlockTime(tx.parentChainId) + const blockTime = getL1BlockTime(tx.parentChainId) return dayjs(tx.createdAt).add( requiredL1BlocksBeforeConfirmation * blockTime, diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts index d861da81af..35e8f1b4ae 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts @@ -47,7 +47,7 @@ export class Erc20DepositStarter extends BridgeTransferStarter { const erc20Bridger = await Erc20Bridger.fromProvider( this.destinationChainProvider ) - const l2Network = erc20Bridger.l2Network + const l2Network = erc20Bridger.childChain if (typeof l2Network.nativeToken === 'undefined') { return false // native currency doesn't require approval @@ -114,8 +114,8 @@ export class Erc20DepositStarter extends BridgeTransferStarter { ) const txRequest = await erc20Bridger.getApproveGasTokenRequest({ - erc20L1Address: this.sourceChainErc20Address, - l1Provider: this.sourceChainProvider, + erc20ParentAddress: this.sourceChainErc20Address, + parentProvider: this.sourceChainProvider, amount }) @@ -134,7 +134,7 @@ export class Erc20DepositStarter extends BridgeTransferStarter { this.destinationChainProvider ) - const l2Network = erc20Bridger.l2Network + const l2Network = erc20Bridger.childChain if (typeof l2Network.nativeToken === 'undefined') { throw Error('Network does not have a custom native token') @@ -168,8 +168,8 @@ export class Erc20DepositStarter extends BridgeTransferStarter { ) return erc20Bridger.approveGasToken({ - erc20L1Address: this.sourceChainErc20Address, - l1Signer: signer, + erc20ParentAddress: this.sourceChainErc20Address, + parentSigner: signer, amount: estimatedDestinationChainGasFee }) } @@ -240,8 +240,8 @@ export class Erc20DepositStarter extends BridgeTransferStarter { this.destinationChainProvider ) return erc20Bridger.approveToken({ - erc20L1Address: this.sourceChainErc20Address, - l1Signer: signer, + erc20ParentAddress: this.sourceChainErc20Address, + parentSigner: signer, amount: amount ?? constants.MaxUint256 }) } @@ -276,10 +276,10 @@ export class Erc20DepositStarter extends BridgeTransferStarter { ) const depositRequest = await erc20Bridger.getDepositRequest({ - l1Provider: this.sourceChainProvider, - l2Provider: this.destinationChainProvider, + parentProvider: this.sourceChainProvider, + childProvider: this.destinationChainProvider, from: address, - erc20L1Address: tokenAddress, + erc20ParentAddress: tokenAddress, destinationAddress, amount, retryableGasOverrides: { @@ -295,7 +295,7 @@ export class Erc20DepositStarter extends BridgeTransferStarter { const sourceChainTransaction = await erc20Bridger.deposit({ ...depositRequest, - l1Signer: signer, + parentSigner: signer, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(5)) } }) diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20WithdrawalStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20WithdrawalStarter.ts index c4e494b847..f305094458 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20WithdrawalStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20WithdrawalStarter.ts @@ -215,8 +215,8 @@ export class Erc20WithdrawalStarter extends BridgeTransferStarter { ) const tx = await erc20Bridger.withdraw({ - l2Signer: signer, - erc20l1Address: tokenAddress, + childSigner: signer, + erc20ParentAddress: tokenAddress, destinationAddress: destinationAddress ?? address, amount }) diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts index b846d384fc..b45229bd70 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts @@ -25,17 +25,17 @@ export class EthDepositStarter extends BridgeTransferStarter { const ethBridger = await EthBridger.fromProvider( this.destinationChainProvider ) - const { l2Network } = ethBridger + const { childChain } = ethBridger - if (typeof l2Network.nativeToken === 'undefined') { + if (typeof childChain.nativeToken === 'undefined') { return false // native currency doesn't require approval } const customFeeTokenAllowanceForInbox = await fetchErc20Allowance({ - address: l2Network.nativeToken, + address: childChain.nativeToken, provider: this.sourceChainProvider, owner: address, - spender: l2Network.ethBridge.inbox + spender: childChain.ethBridge.inbox }) // We want to bridge a certain amount of the custom fee token, so we have to check if the allowance is enough. @@ -62,7 +62,7 @@ export class EthDepositStarter extends BridgeTransferStarter { this.destinationChainProvider ) return ethBridger.approveGasToken({ - l1Signer: signer, + parentSigner: signer, amount }) } @@ -106,7 +106,7 @@ export class EthDepositStarter extends BridgeTransferStarter { const sourceChainTransaction = await ethBridger.deposit({ amount, - l1Signer: signer, + parentSigner: signer, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(5)) } }) diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthWithdrawalStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthWithdrawalStarter.ts index eb0d09cdbb..538924053f 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthWithdrawalStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthWithdrawalStarter.ts @@ -50,7 +50,7 @@ export class EthWithdrawalStarter extends BridgeTransferStarter { const ethBridger = await EthBridger.fromProvider(this.sourceChainProvider) const tx = await ethBridger.withdraw({ amount, - l2Signer: signer, + childSigner: signer, destinationAddress: address, from: address }) diff --git a/packages/arb-token-bridge-ui/src/types/ChainQueryParam.ts b/packages/arb-token-bridge-ui/src/types/ChainQueryParam.ts index 12e79e6820..dcc880984b 100644 --- a/packages/arb-token-bridge-ui/src/types/ChainQueryParam.ts +++ b/packages/arb-token-bridge-ui/src/types/ChainQueryParam.ts @@ -71,11 +71,11 @@ export function getChainQueryParamForChain(chainId: ChainId): ChainQueryParam { const orbitChain = orbitChains[chainId] if (customChain) { - return customChain.chainID + return customChain.chainId } if (orbitChain) { - return orbitChain.slug ?? orbitChain.chainID + return orbitChain.slug ?? orbitChain.chainId } throw new Error( @@ -116,7 +116,7 @@ export function getChainForChainKeyQueryParam( const orbitChain = getOrbitChains().find( chain => chain.slug === chainKeyQueryParam ?? - chain.chainID === Number(chainKeyQueryParam) + chain.chainId === Number(chainKeyQueryParam) ) if (orbitChain) { diff --git a/packages/arb-token-bridge-ui/src/util/EthDepositUtils.ts b/packages/arb-token-bridge-ui/src/util/EthDepositUtils.ts index 403ea5816d..87e194b364 100644 --- a/packages/arb-token-bridge-ui/src/util/EthDepositUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/EthDepositUtils.ts @@ -1,4 +1,4 @@ -import { EthBridger, getL2Network } from '@arbitrum/sdk' +import { EthBridger, getArbitrumNetwork } from '@arbitrum/sdk' import { BigNumber, constants } from 'ethers' import { DepositGasEstimates } from '../hooks/arbTokenBridge.types' @@ -20,7 +20,7 @@ async function customFeeTokenAllowanceIsInsufficient( params: DepositEthEstimateGasParams ) { const { amount, address, parentChainProvider, childChainProvider } = params - const l2Network = await getL2Network(childChainProvider) + const l2Network = await getArbitrumNetwork(childChainProvider) if (typeof l2Network.nativeToken === 'undefined') { throw new Error( diff --git a/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts b/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts index bfed80c5e6..62827a23f3 100644 --- a/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts @@ -1,6 +1,6 @@ import { - L1TransactionReceipt, - L1ToL2MessageWriter as IL1ToL2MessageWriter + ParentTransactionReceipt, + ParentToChildMessageWriter as IParentToChildMessageWriter } from '@arbitrum/sdk' import { Signer } from '@ethersproject/abstract-signer' import { Provider } from '@ethersproject/abstract-provider' @@ -33,16 +33,16 @@ export async function getRetryableTicket({ retryableCreationId, l1Provider, l2Signer -}: GetRetryableTicketParams): Promise { +}: GetRetryableTicketParams): Promise { if (!retryableCreationId) { throw new Error("Error: Couldn't find retryable ticket creation id") } - const l1TxReceipt = new L1TransactionReceipt( + const l1TxReceipt = new ParentTransactionReceipt( await l1Provider.getTransactionReceipt(l1TxHash) ) - const retryableTicket = (await l1TxReceipt.getL1ToL2Messages(l2Signer)) + const retryableTicket = (await l1TxReceipt.getParentToChildMessages(l2Signer)) // Find message with the matching id .find(m => m.retryableCreationId === retryableCreationId) @@ -67,8 +67,8 @@ export const getRetryableTicketExpiration = async ({ try { const depositTxReceipt = await l1Provider.getTransactionReceipt(l1TxHash) - const l1TxReceipt = new L1TransactionReceipt(depositTxReceipt) - const [l1ToL2Msg] = await l1TxReceipt.getL1ToL2Messages(l2Provider) + const l1TxReceipt = new ParentTransactionReceipt(depositTxReceipt) + const [l1ToL2Msg] = await l1TxReceipt.getParentToChildMessages(l2Provider) const now = dayjs() diff --git a/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts index 96441f351c..8165829644 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts @@ -111,16 +111,16 @@ export async function depositTokenEstimateGas( ) return fetchTokenFallbackGasEstimates({ - inboxAddress: erc20Bridger.l2Network.ethBridge.inbox, + inboxAddress: erc20Bridger.childChain.ethBridge.inbox, parentChainProvider }) } const { txRequest, retryableData } = await erc20Bridger.getDepositRequest({ amount, - erc20L1Address, - l1Provider: parentChainProvider, - l2Provider: childChainProvider, + erc20ParentAddress: erc20L1Address, + parentProvider: parentChainProvider, + childProvider: childChainProvider, from: address, retryableGasOverrides: { // the gas limit may vary by about 20k due to SSTORE (zero vs nonzero) @@ -138,7 +138,7 @@ export async function depositTokenEstimateGas( Sentry.captureException(error) return fetchTokenFallbackGasEstimates({ - inboxAddress: erc20Bridger.l2Network.ethBridge.inbox, + inboxAddress: erc20Bridger.childChain.ethBridge.inbox, parentChainProvider }) } diff --git a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts index b63c751abf..c1446f894b 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts @@ -221,7 +221,7 @@ export async function getL1ERC20Address({ }): Promise { try { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - return await erc20Bridger.getL1ERC20Address(erc20L2Address, l2Provider) + return await erc20Bridger.getParentERC20Address(erc20L2Address, l2Provider) } catch (error) { return null } @@ -273,7 +273,7 @@ export async function getL2ERC20Address({ l2Provider: Provider }): Promise { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - return await erc20Bridger.getL2ERC20Address(erc20L1Address, l1Provider) + return await erc20Bridger.getChildERC20Address(erc20L1Address, l1Provider) } /* @@ -289,7 +289,7 @@ export async function l1TokenIsDisabled({ l2Provider: Provider }): Promise { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - return erc20Bridger.l1TokenIsDisabled(erc20L1Address, l1Provider) + return erc20Bridger.parentTokenIsDisabled(erc20L1Address, l1Provider) } type SanitizeTokenOptions = { @@ -414,7 +414,7 @@ export async function isGatewayRegistered({ }): Promise { const erc20Bridger = await Erc20Bridger.fromProvider(childChainProvider) const parentChainStandardGatewayAddressFromChainConfig = - erc20Bridger.l2Network.tokenBridge.l1ERC20Gateway.toLowerCase() + erc20Bridger.childChain.tokenBridge.l1ERC20Gateway.toLowerCase() const parentChainGatewayAddressFromParentGatewayRouter = ( await erc20Bridger.getL1GatewayAddress( @@ -432,7 +432,7 @@ export async function isGatewayRegistered({ } const tokenChildChainAddressFromParentGatewayRouter = ( - await erc20Bridger.getL2ERC20Address( + await erc20Bridger.getChildERC20Address( erc20ParentChainAddress, parentChainProvider ) diff --git a/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts b/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts index 5db7cf52df..c4332a1f97 100644 --- a/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts @@ -2,7 +2,7 @@ import { Erc20Bridger, EthBridger } from '@arbitrum/sdk' import { Provider } from '@ethersproject/providers' import { BigNumber } from 'ethers' import * as Sentry from '@sentry/react' -import { L2ToL1TransactionRequest } from '@arbitrum/sdk/dist/lib/dataEntities/transactionRequest' +import { ChildToParentTransactionRequest } from '@arbitrum/sdk/dist/lib/dataEntities/transactionRequest' import { GasEstimates } from '../hooks/arbTokenBridge.types' import { Address } from './AddressUtils' @@ -27,7 +27,7 @@ export async function withdrawInitTxEstimateGas({ const estimatedParentChainGas = BigNumber.from(0) try { - let withdrawalRequest: L2ToL1TransactionRequest + let withdrawalRequest: ChildToParentTransactionRequest if (isToken) { const bridger = await Erc20Bridger.fromProvider(childChainProvider) @@ -35,7 +35,7 @@ export async function withdrawInitTxEstimateGas({ amount, destinationAddress: address, from: address, - erc20l1Address: erc20L1Address + erc20ParentAddress: erc20L1Address }) } else { const bridger = await EthBridger.fromProvider(childChainProvider) diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index 3904c66e48..0177bc420e 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -1,13 +1,13 @@ import { - L1TransactionReceipt, - L1ToL2MessageStatus, + ParentTransactionReceipt, + ParentToChildMessageStatus, EthDepositStatus } from '@arbitrum/sdk' import { EthDepositMessage, - L1ToL2MessageReader, - L1ToL2MessageReaderClassic -} from '@arbitrum/sdk/dist/lib/message/L1ToL2Message' + ParentToChildMessageReader, + ParentToChildMessageReaderClassic +} from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' import { Provider } from '@ethersproject/providers' import { AssetType } from '../../hooks/arbTokenBridge.types' import { Transaction } from '../../hooks/useTransactions' @@ -56,7 +56,7 @@ export const updateAdditionalDepositData = async ({ if (isClassic) { return updateClassicDepositStatusData({ depositTx, - l1ToL2Msg: l1ToL2Msg as L1ToL2MessageReaderClassic, + l1ToL2Msg: l1ToL2Msg as ParentToChildMessageReaderClassic, isEthDeposit, timestampCreated, l2Provider @@ -76,7 +76,7 @@ export const updateAdditionalDepositData = async ({ // finally, else if the transaction is not ETH ie. it's a ERC20 token deposit return updateTokenDepositStatusData({ depositTx, - l1ToL2Msg: l1ToL2Msg as L1ToL2MessageReader, + l1ToL2Msg: l1ToL2Msg as ParentToChildMessageReader, timestampCreated, l1Provider, l2Provider @@ -101,7 +101,7 @@ const updateETHDepositStatusData = async ({ const status = await ethDepositMessage.status() const isDeposited = status === EthDepositStatus.DEPOSITED - const retryableCreationTxID = ethDepositMessage.l2DepositTxHash + const retryableCreationTxID = ethDepositMessage.chainDepositTxHash const l2BlockNum = isDeposited ? (await l2Provider.getTransaction(retryableCreationTxID)).blockNumber @@ -121,11 +121,11 @@ const updateETHDepositStatusData = async ({ : undefined, l1ToL2MsgData: { status: isDeposited - ? L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2 - : L1ToL2MessageStatus.NOT_YET_CREATED, + ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + : ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID, // Only show `l2TxID` after the deposit is confirmed - l2TxID: isDeposited ? ethDepositMessage.l2DepositTxHash : undefined, + l2TxID: isDeposited ? ethDepositMessage.chainDepositTxHash : undefined, fetchingUpdate: false } } @@ -144,7 +144,7 @@ const updateTokenDepositStatusData = async ({ timestampCreated: string l1Provider: Provider l2Provider: Provider - l1ToL2Msg: L1ToL2MessageReader + l1ToL2Msg: ParentToChildMessageReader }): Promise => { const updatedDepositTx = { ...depositTx, @@ -167,8 +167,8 @@ const updateTokenDepositStatusData = async ({ const res = await l1ToL2Msg.getSuccessfulRedeem() const l2TxID = - res.status === L1ToL2MessageStatus.REDEEMED - ? res.l2TxReceipt.transactionHash + res.status === ParentToChildMessageStatus.REDEEMED + ? res.chainTxReceipt.transactionHash : undefined const l1ToL2MsgData = { @@ -178,7 +178,8 @@ const updateTokenDepositStatusData = async ({ retryableCreationTxID: l1ToL2Msg.retryableCreationId } - const isDeposited = l1ToL2MsgData.status === L1ToL2MessageStatus.REDEEMED + const isDeposited = + l1ToL2MsgData.status === ParentToChildMessageStatus.REDEEMED const l2BlockNum = isDeposited ? (await l2Provider.getTransaction(l1ToL2Msg.retryableCreationId)) @@ -213,7 +214,7 @@ const updateClassicDepositStatusData = async ({ timestampCreated: string l2Provider: Provider isEthDeposit: boolean - l1ToL2Msg: L1ToL2MessageReaderClassic + l1ToL2Msg: ParentToChildMessageReaderClassic }): Promise => { const updatedDepositTx = { ...depositTx, @@ -223,15 +224,16 @@ const updateClassicDepositStatusData = async ({ const status = await l1ToL2Msg.status() const isCompletedEthDeposit = - isEthDeposit && status >= L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2 + isEthDeposit && + status >= ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN const l2TxID = (() => { if (isCompletedEthDeposit) { return l1ToL2Msg.retryableCreationId } - if (status === L1ToL2MessageStatus.REDEEMED) { - return l1ToL2Msg.l2TxHash + if (status === ParentToChildMessageStatus.REDEEMED) { + return l1ToL2Msg.chainTxHash } return undefined @@ -280,9 +282,9 @@ export const getL1ToL2MessageDataFromL1TxHash = async ({ }): Promise<{ isClassic?: boolean l1ToL2Msg?: - | L1ToL2MessageReaderClassic + | ParentToChildMessageReaderClassic | EthDepositMessage - | L1ToL2MessageReader + | ParentToChildMessageReader }> => { // fetch L1 transaction receipt const depositTxReceipt = await l1Provider.getTransactionReceipt(depositTxId) @@ -292,10 +294,12 @@ export const getL1ToL2MessageDataFromL1TxHash = async ({ return {} } - const l1TxReceipt = new L1TransactionReceipt(depositTxReceipt) + const l1TxReceipt = new ParentTransactionReceipt(depositTxReceipt) const getClassicDepositMessage = async () => { - const [l1ToL2Msg] = await l1TxReceipt.getL1ToL2MessagesClassic(l2Provider) + const [l1ToL2Msg] = await l1TxReceipt.getParentToChildMessagesClassic( + l2Provider + ) return { isClassic: true, l1ToL2Msg: l1ToL2Msg @@ -314,7 +318,7 @@ export const getL1ToL2MessageDataFromL1TxHash = async ({ } // Else, nitro token deposit - const [l1ToL2Msg] = await l1TxReceipt.getL1ToL2Messages(l2Provider) + const [l1ToL2Msg] = await l1TxReceipt.getParentToChildMessages(l2Provider) return { isClassic: false, l1ToL2Msg diff --git a/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts b/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts index 5318855efd..e648245df1 100644 --- a/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts +++ b/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts @@ -1,5 +1,5 @@ import { Provider } from '@ethersproject/providers' -import { getL2Network } from '@arbitrum/sdk' +import { getArbitrumNetwork } from '@arbitrum/sdk' import { l2ArbReverseGatewayAddresses, @@ -15,17 +15,17 @@ import { * @param l2Provider Provider for the L2 network */ export async function fetchL2Gateways(l2Provider: Provider) { - const l2Network = await getL2Network(l2Provider) + const l2Network = await getArbitrumNetwork(l2Provider) /* configure gateway addresses for fetching withdrawals */ const { l2ERC20Gateway, l2CustomGateway, l2WethGateway } = l2Network.tokenBridge const gatewaysToUse = [l2ERC20Gateway, l2CustomGateway, l2WethGateway] - const l2ArbReverseGateway = l2ArbReverseGatewayAddresses[l2Network.chainID] - const l2DaiGateway = l2DaiGatewayAddresses[l2Network.chainID] - const l2wstETHGateway = l2wstETHGatewayAddresses[l2Network.chainID] - const l2LptGateway = l2LptGatewayAddresses[l2Network.chainID] - const l2MoonGateway = l2MoonGatewayAddresses[l2Network.chainID] + const l2ArbReverseGateway = l2ArbReverseGatewayAddresses[l2Network.chainId] + const l2DaiGateway = l2DaiGatewayAddresses[l2Network.chainId] + const l2wstETHGateway = l2wstETHGatewayAddresses[l2Network.chainId] + const l2LptGateway = l2LptGatewayAddresses[l2Network.chainId] + const l2MoonGateway = l2MoonGatewayAddresses[l2Network.chainId] if (l2ArbReverseGateway) { gatewaysToUse.push(l2ArbReverseGateway) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 90ebd3e7da..f78b105eb6 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -1,69 +1,116 @@ +import { ArbitrumNetwork, addCustomArbitrumNetwork } from '@arbitrum/sdk' import { - L1Network, - L2Network, - addCustomNetwork, - constants -} from '@arbitrum/sdk' -import { networks as arbitrumSdkChains } from '@arbitrum/sdk/dist/lib/dataEntities/networks' + networks as arbitrumNetworks, + getChildrenForNetwork +} from '@arbitrum/sdk/dist/lib/dataEntities/networks' import { loadEnvironmentVariableWithFallback } from './index' import { getBridgeUiConfigForChain } from './bridgeUiConfig' import { orbitMainnets, orbitTestnets } from './orbitChainsList' import { chainIdToInfuraUrl } from './infura' +export enum ChainId { + // L1 + Ethereum = 1, + // L1 Testnets + Local = 1337, + Sepolia = 11155111, + Holesky = 17000, + // L2 + ArbitrumOne = 42161, + ArbitrumNova = 42170, + // L2 Testnets + ArbitrumSepolia = 421614, + ArbitrumLocal = 412346, + // Orbit + StylusTestnet = 23011913 +} + +type L1Network = { + isArbitrum: false + chainId: ChainId + blockTime: number +} + +const l1Networks: { [chainId: number]: L1Network } = { + [ChainId.Ethereum]: { + isArbitrum: false, + chainId: ChainId.Ethereum, + blockTime: 10 + }, + [ChainId.Sepolia]: { + isArbitrum: false, + chainId: ChainId.Sepolia, + blockTime: 10 + }, + [ChainId.Holesky]: { + isArbitrum: false, + chainId: ChainId.Holesky, + blockTime: 10 + }, + [ChainId.Local]: { + isArbitrum: false, + chainId: ChainId.Local, + blockTime: 10 + } +} + export const getChains = () => { - const chains = Object.values(arbitrumSdkChains) + const chains = Object.values({ ...l1Networks, ...arbitrumNetworks }) as ( + | L1Network + | ArbitrumNetwork + )[] + return chains.filter(chain => { - // exclude devnet - if (chain.chainID === 1338) { - return false - } // exclude L1 chains with no child chains - if (isL1Chain(chain) && chain.partnerChainIDs.length === 0) { + if (isL1Chain(chain) && getChildrenForNetwork(chain.chainId).length === 0) { return false } return true }) } +function getChainByChainId(chainId: number) { + return getChains().find(c => c.chainId === chainId) +} + export const customChainLocalStorageKey = 'arbitrum:custom:chains' -export type ChainWithRpcUrl = L2Network & { +export type ChainWithRpcUrl = ArbitrumNetwork & { rpcUrl: string + explorerUrl: string slug?: string } -function getParentChain(chain: L2Network): L1Network | L2Network { - const parentChain = arbitrumSdkChains[chain.partnerChainID] - - if (typeof parentChain === 'undefined') { - throw new Error( - `[getParentChain] parent chain ${chain.partnerChainID} not found for ${chain.chainID}` - ) - } - - return parentChain -} - export function getBaseChainIdByChainId({ chainId }: { chainId: number }): number { - const chain = arbitrumSdkChains[chainId] + const chain = arbitrumNetworks[chainId] // the chain provided is an L1 chain, so we can return early if (!chain || isL1Chain(chain)) { return chainId } - let currentParentChain = getParentChain(chain) + let currentParentChain: L1Network | ArbitrumNetwork = chain // keep following the parent chains until we find the L1 chain - while (!isL1Chain(currentParentChain)) { - currentParentChain = getParentChain(currentParentChain) - } + while (true) { + if (isL1Chain(currentParentChain)) { + return currentParentChain.chainId + } - return currentParentChain.chainID + const newParentChain = getChains().find( + c => c.chainId === (currentParentChain as ArbitrumNetwork).parentChainId + ) + + if (!newParentChain) { + return currentParentChain.chainId + } + + currentParentChain = newParentChain + } } export function getCustomChainsFromLocalStorage(): ChainWithRpcUrl[] { @@ -78,13 +125,17 @@ export function getCustomChainsFromLocalStorage(): ChainWithRpcUrl[] { return (JSON.parse(customChainsFromLocalStorage) as ChainWithRpcUrl[]) .filter( // filter again in case local storage is compromised - chain => !supportedCustomOrbitParentChains.includes(Number(chain.chainID)) + chain => !supportedCustomOrbitParentChains.includes(Number(chain.chainId)) ) .map(chain => { + // chainID is used in previously stored custom orbit chains + // if we don't make it backwards compatible then the app will hang on load if at least one old chain is present + const _chain = chain as ChainWithRpcUrl & { chainID?: string } + return { - ...chain, - // make sure chainID is numeric - chainID: Number(chain.chainID) + ..._chain, + // make sure chainId is numeric + chainId: Number(_chain.chainId ?? _chain.chainID) } }) } @@ -96,14 +147,14 @@ export function getCustomChainFromLocalStorageById(chainId: ChainId) { return undefined } - return customChains.find(chain => chain.chainID === chainId) + return customChains.find(chain => chain.chainId === chainId) } export function saveCustomChainToLocalStorage(newCustomChain: ChainWithRpcUrl) { const customChains = getCustomChainsFromLocalStorage() if ( - customChains.findIndex(chain => chain.chainID === newCustomChain.chainID) > + customChains.findIndex(chain => chain.chainId === newCustomChain.chainId) > -1 ) { // chain already exists @@ -119,7 +170,7 @@ export function saveCustomChainToLocalStorage(newCustomChain: ChainWithRpcUrl) { export function removeCustomChainFromLocalStorage(chainId: number) { const newCustomChains = getCustomChainsFromLocalStorage().filter( - chain => chain.chainID !== chainId + chain => chain.chainId !== chainId ) localStorage.setItem( customChainLocalStorageKey, @@ -127,23 +178,6 @@ export function removeCustomChainFromLocalStorage(chainId: number) { ) } -export enum ChainId { - // L1 - Ethereum = 1, - // L1 Testnets - Local = 1337, - Sepolia = 11155111, - Holesky = 17000, - // L2 - ArbitrumOne = 42161, - ArbitrumNova = 42170, - // L2 Testnets - ArbitrumSepolia = 421614, - ArbitrumLocal = 412346, - // Orbit - StylusTestnet = 23011913 -} - export const supportedCustomOrbitParentChains = [ ChainId.Sepolia, ChainId.Holesky, @@ -197,16 +231,18 @@ export const getExplorerUrl = (chainId: ChainId) => { return explorerUrls[chainId] ?? explorerUrls[ChainId.Ethereum]! //defaults to etherscan, can never be null } -export const getBlockTime = (chainId: ChainId) => { - const network = arbitrumSdkChains[chainId] - if (!network) { +export const getL1BlockTime = (chainId: number) => { + const chain = getChainByChainId(getBaseChainIdByChainId({ chainId })) + + if (!chain || !isL1Chain(chain)) { throw new Error(`Couldn't get block time. Unexpected chain ID: ${chainId}`) } - return network.blockTime + + return chain.blockTime } export const getConfirmPeriodBlocks = (chainId: ChainId) => { - const network = arbitrumSdkChains[chainId] + const network = arbitrumNetworks[chainId] if (!network || !isArbitrumChain(network)) { throw new Error( `Couldn't get confirm period blocks. Unexpected chain ID: ${chainId}` @@ -239,19 +275,13 @@ export const l2MoonGatewayAddresses: { [chainId: number]: string } = { const defaultL1Network: L1Network = { blockTime: 10, - chainID: 1337, - explorerUrl: '', - isCustom: true, - name: 'Ethereum Local', - partnerChainIDs: [412346], + chainId: 1337, isArbitrum: false } -const defaultL2Network: L2Network = { - chainID: 412346, - partnerChainIDs: [ - // Orbit chains will go here - ], +const defaultL2Network: ArbitrumNetwork = { + chainId: 412346, + parentChainId: ChainId.Local, confirmPeriodBlocks: 20, ethBridge: { bridge: '0x2b360a9881f21c3d7aa0ea6ca0de2a3341d4ef3c', @@ -260,16 +290,9 @@ const defaultL2Network: L2Network = { rollup: '0x65a59d67da8e710ef9a01eca37f83f84aedec416', sequencerInbox: '0xe7362d0787b51d8c72d504803e5b1d6dcda89540' }, - explorerUrl: '', - isArbitrum: true, isCustom: true, name: 'Arbitrum Local', - partnerChainID: 1337, retryableLifetimeSeconds: 604800, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, tokenBridge: { l1CustomGateway: '0x75E0E92A79880Bd81A69F72983D03c75e2B33dC8', l1ERC20Gateway: '0x4Af567288e68caD4aA93A272fe6139Ca53859C70', @@ -288,16 +311,6 @@ const defaultL2Network: L2Network = { } } -export type RegisterLocalNetworkParams = { - l1Network: L1Network - l2Network: L2Network -} - -const registerLocalNetworkDefaultParams: RegisterLocalNetworkParams = { - l1Network: defaultL1Network, - l2Network: defaultL2Network -} - export const localL1NetworkRpcUrl = loadEnvironmentVariableWithFallback({ env: process.env.NEXT_PUBLIC_LOCAL_ETHEREUM_RPC_URL, fallback: 'http://localhost:8545' @@ -307,16 +320,12 @@ export const localL2NetworkRpcUrl = loadEnvironmentVariableWithFallback({ fallback: 'http://localhost:8547' }) -export function registerLocalNetwork( - params: RegisterLocalNetworkParams = registerLocalNetworkDefaultParams -) { - const { l1Network, l2Network } = params - +export function registerLocalNetwork() { try { - rpcURLs[l1Network.chainID] = localL1NetworkRpcUrl - rpcURLs[l2Network.chainID] = localL2NetworkRpcUrl + rpcURLs[defaultL1Network.chainId] = localL1NetworkRpcUrl + rpcURLs[defaultL2Network.chainId] = localL2NetworkRpcUrl - addCustomNetwork({ customL1Network: l1Network, customL2Network: l2Network }) + addCustomArbitrumNetwork(defaultL2Network) } catch (error: any) { console.error(`Failed to register local network: ${error.message}`) } @@ -346,7 +355,7 @@ export function isNetwork(chainId: ChainId) { const isArbitrum = isArbitrumOne || isArbitrumNova || isArbitrumLocal || isArbitrumSepolia - const customChainIds = customChains.map(chain => chain.chainID) + const customChainIds = customChains.map(chain => chain.chainId) const isCustomOrbitChain = customChainIds.includes(chainId) const isCoreChain = isEthereumMainnetOrTestnet || isArbitrum @@ -407,7 +416,7 @@ export function getSupportedChainIds({ includeTestnets?: boolean }): ChainId[] { return getChains() - .map(chain => chain.chainID) + .map(chain => chain.chainId) .filter(chainId => { const { isTestnet } = isNetwork(chainId) if (includeMainnets && !includeTestnets) { @@ -427,33 +436,33 @@ export function mapCustomChainToNetworkData(chain: ChainWithRpcUrl) { // custom chain details need to be added to various objects to make it work with the UI // // add RPC - rpcURLs[chain.chainID] = chain.rpcUrl + rpcURLs[chain.chainId] = chain.rpcUrl // explorer URL - explorerUrls[chain.chainID] = chain.explorerUrl + explorerUrls[chain.chainId] = chain.explorerUrl } -function isL1Chain(chain: L1Network | L2Network): chain is L1Network { - return !chain.isArbitrum +function isL1Chain(chain: L1Network | ArbitrumNetwork): chain is L1Network { + return typeof l1Networks[chain.chainId] !== 'undefined' } -function isArbitrumChain(chain: L1Network | L2Network): chain is L2Network { - return chain.isArbitrum +function isArbitrumChain( + chain: L1Network | ArbitrumNetwork +): chain is ArbitrumNetwork { + return typeof (chain as ArbitrumNetwork).parentChainId !== 'undefined' } export function getDestinationChainIds(chainId: ChainId): ChainId[] { - const chains = getChains() - const arbitrumSdkChain = chains.find(chain => chain.chainID === chainId) + const chain = getChainByChainId(chainId) - if (!arbitrumSdkChain) { + if (!chain) { return [] } - const parentChainId = isArbitrumChain(arbitrumSdkChain) - ? arbitrumSdkChain.partnerChainID - : undefined + const parentChainId = isArbitrumChain(chain) ? chain.parentChainId : undefined - const validDestinationChainIds = - chains.find(chain => chain.chainID === chainId)?.partnerChainIDs || [] + const validDestinationChainIds = getChildrenForNetwork(chain.chainId).map( + chain => chain.chainId + ) if (parentChainId) { // always make parent chain the first element diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index 3e56ef2600..c024402dcf 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -1,4 +1,3 @@ -import { constants } from '@arbitrum/sdk' import { NativeCurrencyBase } from '../hooks/useNativeCurrency' import { ChainWithRpcUrl } from './networks' @@ -25,7 +24,7 @@ export const orbitMainnets: { [key: number]: OrbitChainConfig } = { 660279: { - chainID: 660279, + chainId: 660279, confirmPeriodBlocks: 45818, ethBridge: { bridge: '0x7dd8A76bdAeBE3BBBaCD7Aa87f1D4FDa1E60f94f', @@ -37,12 +36,10 @@ export const orbitMainnets: { nativeToken: '0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66', explorerUrl: 'https://explorer.xai-chain.net', rpcUrl: 'https://xai-chain.net/rpc', - isArbitrum: true, isCustom: true, name: 'Xai', slug: 'xai', - partnerChainID: 42161, - partnerChainIDs: [], + parentChainId: 42161, retryableLifetimeSeconds: 604800, tokenBridge: { l1CustomGateway: '0xb15A0826d65bE4c2fDd961b72636168ee70Af030', @@ -60,10 +57,6 @@ export const orbitMainnets: { l2Weth: '0x0000000000000000000000000000000000000000', l2WethGateway: '0x0000000000000000000000000000000000000000' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#F30019', network: { @@ -81,7 +74,7 @@ export const orbitMainnets: { } }, 1380012617: { - chainID: 1380012617, + chainId: 1380012617, confirmPeriodBlocks: 45818, ethBridge: { bridge: '0x255f80Ef2F09FCE0944faBb292b8510F01316Cf0', @@ -92,12 +85,10 @@ export const orbitMainnets: { }, explorerUrl: 'https://mainnet.explorer.rarichain.org', rpcUrl: 'https://mainnet.rpc.rarichain.org/http', - isArbitrum: true, isCustom: true, name: 'RARI Mainnet', slug: 'rari-mainnet', - partnerChainID: 42161, - partnerChainIDs: [], + parentChainId: 42161, retryableLifetimeSeconds: 604800, tokenBridge: { l1CustomGateway: '0x8bE956aB42274056ef4471BEb211b33e258b7324', @@ -115,10 +106,6 @@ export const orbitMainnets: { l2Weth: '0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0', l2WethGateway: '0xd0C21F7960ea9835E7B2E636548f4deDD9E2309C' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#B16EFF', network: { @@ -130,7 +117,8 @@ export const orbitMainnets: { } }, 4078: { - chainID: 4078, + chainId: 4078, + parentChainId: 0, confirmPeriodBlocks: 7200, ethBridge: { bridge: '0xB0EC3C1368AF7d9C2CAE6B7f8E022Cc14d59D2b1', @@ -141,13 +129,10 @@ export const orbitMainnets: { }, explorerUrl: 'https://muster-explorer.alt.technology', rpcUrl: 'https://muster.alt.technology', - isArbitrum: true, - isCustom: true, name: 'Muster', slug: 'muster', - partnerChainID: 42161, - partnerChainIDs: [], retryableLifetimeSeconds: 604800, + isCustom: true, tokenBridge: { l1CustomGateway: '0x6085B32d97be137cC2D6447DcB3BF684C0835D2F', l1ERC20Gateway: '0x6551eF99126253B7a838Cf46340030C8eD5342c2', @@ -164,10 +149,6 @@ export const orbitMainnets: { l2Weth: '0x869Bf8814d77106323745758135b999D34C79a87', l2WethGateway: '0xB6145BFd3fA9D270871037238003c66B984787f4' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#DF62DD', network: { @@ -178,7 +159,7 @@ export const orbitMainnets: { } }, 70700: { - chainID: 70700, + chainId: 70700, confirmPeriodBlocks: 40320, ethBridge: { bridge: '0x074fFD20C6D8865752C997f4980Cf70F2a3Fbac6', @@ -189,13 +170,10 @@ export const orbitMainnets: { }, explorerUrl: 'https://explorer.apex.proofofplay.com', rpcUrl: 'https://rpc.apex.proofofplay.com', - isArbitrum: true, - isCustom: true, name: 'Proof of Play Apex', slug: 'pop-apex', - partnerChainID: 42161, - partnerChainIDs: [], - retryableLifetimeSeconds: 604800, + parentChainId: 42161, + isCustom: true, tokenBridge: { l1CustomGateway: '0x653f8D34a86207569069164d45a031eE552A4729', l1ERC20Gateway: '0x298eb8d9f2F046AC60c01535fad40320CCdeB7c0', @@ -212,10 +190,6 @@ export const orbitMainnets: { l2Weth: '0x77684A04145a5924eFCE0D92A7c4a2A2E8C359de', l2WethGateway: '0x6e965dd667cb08f09DE8285317f012Ac889507b4' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#3E63DD', network: { @@ -227,7 +201,7 @@ export const orbitMainnets: { } }, 42001: { - chainID: 42001, + chainId: 42001, confirmPeriodBlocks: 7200, ethBridge: { bridge: '0x10B25719f4c0fA1BFF22431438E6b6315059548A', @@ -239,13 +213,10 @@ export const orbitMainnets: { nativeToken: '0xBC9B77acA82f6BE43927076D71cd453b625165B8', explorerUrl: 'https://explorer.pmon.xyz', rpcUrl: 'https://rpc.pmon.xyz', - isArbitrum: true, - isCustom: true, name: 'PMON Chain', slug: 'pmon-chain', - partnerChainID: 42161, - partnerChainIDs: [], - retryableLifetimeSeconds: 604800, + parentChainId: 42161, + isCustom: true, tokenBridge: { l1CustomGateway: '0x38727FfD8aFAdaeF60687D1E623Fd28B58A2B8a8', l1ERC20Gateway: '0x341F7f035f1CBA1E879Df40117f797F88aC703ea', @@ -262,10 +233,6 @@ export const orbitMainnets: { l2Weth: '0x0000000000000000000000000000000000000000', l2WethGateway: '0x0000000000000000000000000000000000000000' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#FF3369', network: { @@ -286,7 +253,7 @@ export const orbitMainnets: { export const orbitTestnets: { [key in number]: OrbitChainConfig } = { 37714555429: { - chainID: 37714555429, + chainId: 37714555429, confirmPeriodBlocks: 150, ethBridge: { bridge: '0x6c7FAC4edC72E86B3388B48979eF37Ecca5027e6', @@ -298,13 +265,11 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { nativeToken: '0x4e6f41acbfa8eb4a3b25e151834d9a14b49b69d2', explorerUrl: 'https://testnet-explorer-v2.xai-chain.net', rpcUrl: 'https://testnet-v2.xai-chain.net/rpc', - isArbitrum: true, - isCustom: true, name: 'Xai Testnet', slug: 'xai-testnet', - partnerChainID: 421614, - partnerChainIDs: [], + parentChainId: 421614, retryableLifetimeSeconds: 604800, + isCustom: true, tokenBridge: { l1CustomGateway: '0x04e14E04949D49ae9c551ca8Cc3192310Ce65D88', l1ERC20Gateway: '0xCcB451C4Df22addCFe1447c58bC6b2f264Bb1256', @@ -321,10 +286,6 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { l2Weth: '0x0000000000000000000000000000000000000000', l2WethGateway: '0x0000000000000000000000000000000000000000' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#F30019', network: { @@ -341,7 +302,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { } }, 53457: { - chainID: 53457, + chainId: 53457, confirmPeriodBlocks: 150, ethBridge: { bridge: '0x154c820EBaA49D169c33252ECc735623f9d49F82', @@ -353,12 +314,10 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { nativeToken: '0x87cC76c08eF625d46eeC9183bA2977B34E16CDfe', explorerUrl: 'https://dodochain-testnet-explorer.alt.technology', rpcUrl: 'https://dodochain-testnet.alt.technology', - isArbitrum: true, isCustom: true, name: 'DODOchain Testnet', slug: 'dodochain-testnet', - partnerChainID: 421614, - partnerChainIDs: [], + parentChainId: 421614, retryableLifetimeSeconds: 604800, tokenBridge: { l1CustomGateway: '0x7Db96d1E021EBd86753318e52407E5be60D8Ea40', @@ -376,10 +335,6 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { l2Weth: '0x0000000000000000000000000000000000000000', l2WethGateway: '0x0000000000000000000000000000000000000000' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#B88B1E', network: { diff --git a/packages/arb-token-bridge-ui/src/util/wagmi/setup.ts b/packages/arb-token-bridge-ui/src/util/wagmi/setup.ts index 32d7eafe38..8ede148897 100644 --- a/packages/arb-token-bridge-ui/src/util/wagmi/setup.ts +++ b/packages/arb-token-bridge-ui/src/util/wagmi/setup.ts @@ -19,10 +19,10 @@ import { getWagmiChain } from './getWagmiChain' import { customInfuraProvider } from '../infura' const customChains = getCustomChainsFromLocalStorage().map(chain => - getWagmiChain(chain.chainID) + getWagmiChain(chain.chainId) ) const wagmiOrbitChains = getOrbitChains().map(chain => - getWagmiChain(chain.chainID) + getWagmiChain(chain.chainId) ) const chainList = isTestingEnvironment diff --git a/packages/arb-token-bridge-ui/src/util/wagmi/wagmiAdditionalNetworks.ts b/packages/arb-token-bridge-ui/src/util/wagmi/wagmiAdditionalNetworks.ts index 4af8ce413d..aa0b7de6d8 100644 --- a/packages/arb-token-bridge-ui/src/util/wagmi/wagmiAdditionalNetworks.ts +++ b/packages/arb-token-bridge-ui/src/util/wagmi/wagmiAdditionalNetworks.ts @@ -5,10 +5,10 @@ import { ChainId, ChainWithRpcUrl, explorerUrls, rpcURLs } from '../networks' import { getBridgeUiConfigForChain } from '../bridgeUiConfig' export function chainToWagmiChain(chain: ChainWithRpcUrl): Chain { - const { nativeTokenData } = getBridgeUiConfigForChain(chain.chainID) + const { nativeTokenData } = getBridgeUiConfigForChain(chain.chainId) return { - id: chain.chainID, + id: chain.chainId, name: chain.name, network: chain.name.toLowerCase().split(' ').join('-'), nativeCurrency: nativeTokenData ?? ether, diff --git a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchETHWithdrawalsFromEventLogs.ts b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchETHWithdrawalsFromEventLogs.ts index ad8dff4bd0..a9955e6dc8 100644 --- a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchETHWithdrawalsFromEventLogs.ts +++ b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchETHWithdrawalsFromEventLogs.ts @@ -1,5 +1,5 @@ import { Provider, BlockTag } from '@ethersproject/providers' -import { L2ToL1MessageReader } from '@arbitrum/sdk' +import { ChildToParentMessageReader } from '@arbitrum/sdk' /** * Fetches initiated ETH withdrawals from event logs in range of [fromBlock, toBlock]. @@ -25,7 +25,7 @@ export function fetchETHWithdrawalsFromEventLogs({ return [] } // funds sent by this address - return L2ToL1MessageReader.getL2ToL1Events( + return ChildToParentMessageReader.getChildToParentEvents( l2Provider, { fromBlock, toBlock }, undefined, diff --git a/packages/arb-token-bridge-ui/src/util/withdrawals/helpers.ts b/packages/arb-token-bridge-ui/src/util/withdrawals/helpers.ts index cf96d5827e..82e7706695 100644 --- a/packages/arb-token-bridge-ui/src/util/withdrawals/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/withdrawals/helpers.ts @@ -1,7 +1,10 @@ import { utils } from 'ethers' import { Provider } from '@ethersproject/providers' import { BigNumber } from '@ethersproject/bignumber' -import { L2ToL1MessageReader, L2TransactionReceipt } from '@arbitrum/sdk' +import { + ChildToParentMessageReader, + ChildTransactionReceipt +} from '@arbitrum/sdk' import { FetchWithdrawalsFromSubgraphResult } from './fetchWithdrawalsFromSubgraph' import { fetchErc20Data } from '../TokenUtils' import { @@ -51,8 +54,8 @@ export async function attachTimestampToTokenWithdrawal({ l2Provider: Provider }) { const txReceipt = await l2Provider.getTransactionReceipt(withdrawal.txHash) - const l2TxReceipt = new L2TransactionReceipt(txReceipt) - const [event] = l2TxReceipt.getL2ToL1Events() + const l2TxReceipt = new ChildTransactionReceipt(txReceipt) + const [event] = l2TxReceipt.getChildToParentEvents() return { ...withdrawal, @@ -112,7 +115,7 @@ export async function getOutgoingMessageState( return OutgoingMessageState.EXECUTED } - const messageReader = new L2ToL1MessageReader(l1Provider, event) + const messageReader = new ChildToParentMessageReader(l1Provider, event) try { return await messageReader.status(l2Provider) @@ -133,7 +136,7 @@ export async function attachNodeBlockDeadlineToEvent( return event } - const messageReader = L2ToL1MessageReader.fromEvent(l1Provider, event) + const messageReader = ChildToParentMessageReader.fromEvent(l1Provider, event) try { const firstExecutableBlock = await messageReader.getFirstExecutableBlock( @@ -191,10 +194,10 @@ export async function mapTokenWithdrawalFromEventLogsToL2ToL1EventResult({ }) const txReceipt = await l2Provider.getTransactionReceipt(result.txHash) - const l2TxReceipt = new L2TransactionReceipt(txReceipt) + const l2TxReceipt = new ChildTransactionReceipt(txReceipt) // TODO: length != 1 - const [event] = l2TxReceipt.getL2ToL1Events() + const [event] = l2TxReceipt.getChildToParentEvents() if (!event) { return undefined @@ -264,10 +267,10 @@ export async function mapWithdrawalToL2ToL1EventResult({ }): Promise { // get transaction receipt const txReceipt = await l2Provider.getTransactionReceipt(withdrawal.l2TxHash) - const l2TxReceipt = new L2TransactionReceipt(txReceipt) + const l2TxReceipt = new ChildTransactionReceipt(txReceipt) // TODO: length != 1 - const [event] = l2TxReceipt.getL2ToL1Events() + const [event] = l2TxReceipt.getChildToParentEvents() if (!event) { return undefined diff --git a/yarn.lock b/yarn.lock index 0a9ea7d8c1..e3d7d065c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@^3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.3.3.tgz#9a49e753b9deeee6336f6a43acb0669961b91128" - integrity sha512-Fe/+h2gs78Efl94U7yXkYAN+FQLLAxDGj+kv6+CXbnUytso+PBvKgNj1e4YPwgtWLlDomdcOXFt/yaP4VKsrBQ== +"@arbitrum/sdk@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.0.tgz#91615a56d0eb91cbecaf017bb82ba26c12e7a5f6" + integrity sha512-SlGKfdP4r/S0xZXmF9L+FR3f73EoB6UwPzVqBNyC0gTVhht1qCEMuQTy3gTtCcawrompH2RMKiOUmbdIKOf89w== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1" @@ -1291,6 +1291,11 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@ledgerhq/connect-kit-loader@^1.0.1": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.8.tgz#6cc32191660dd9d6e8f89047af09b0f201e30190" + integrity sha512-mDJsOucVW8m3Lk2fdQst+P74SgiKebvq1iBk4sXLbADQOwhL9bWGaArvO+tW7jPJZwEfSPWBdHcHoYi11XAwZw== + "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" From 093e0413aa1333c2fc069c27ff30c8f96d01ac90 Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 11:15:04 +0200 Subject: [PATCH 02/32] synpress --- packages/arb-token-bridge-ui/synpress.config.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/arb-token-bridge-ui/synpress.config.ts b/packages/arb-token-bridge-ui/synpress.config.ts index 7f630df5f6..e8713c9667 100644 --- a/packages/arb-token-bridge-ui/synpress.config.ts +++ b/packages/arb-token-bridge-ui/synpress.config.ts @@ -184,9 +184,9 @@ async function deployERC20ToL2(erc20L1Address: string) { const bridger = await Erc20Bridger.fromProvider(arbProvider) const deploy = await bridger.deposit({ amount: BigNumber.from(0), - erc20L1Address, - l1Signer: localWallet.connect(ethProvider), - l2Provider: arbProvider + erc20ParentAddress: erc20L1Address, + parentSigner: localWallet.connect(ethProvider), + childProvider: arbProvider }) await deploy.wait() } @@ -253,10 +253,10 @@ async function generateTestTxForRedeemRetryable() { const amount = utils.parseUnits('0.001', erc20Token.decimals) const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) const depositRequest = await erc20Bridger.getDepositRequest({ - l1Provider, - l2Provider, + parentProvider: l1Provider, + childProvider: l2Provider, from: walletAddress, - erc20L1Address: erc20Token.address, + erc20ParentAddress: erc20Token.address, amount, retryableGasOverrides: { gasLimit: { base: BigNumber.from(0) } @@ -264,7 +264,7 @@ async function generateTestTxForRedeemRetryable() { }) const tx = await erc20Bridger.deposit({ ...depositRequest, - l1Signer: userWallet.connect(ethProvider), + parentSigner: userWallet.connect(ethProvider), retryableGasOverrides: { gasLimit: { base: BigNumber.from(0) From 40406993a9530951c5dfbc2120ff3690b4f11ee5 Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 11:27:51 +0200 Subject: [PATCH 03/32] fix yarnlock --- yarn.lock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index e3d7d065c5..508d4fc476 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1291,11 +1291,6 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@ledgerhq/connect-kit-loader@^1.0.1": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.8.tgz#6cc32191660dd9d6e8f89047af09b0f201e30190" - integrity sha512-mDJsOucVW8m3Lk2fdQst+P74SgiKebvq1iBk4sXLbADQOwhL9bWGaArvO+tW7jPJZwEfSPWBdHcHoYi11XAwZw== - "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" From b53420d0ae37d1a3a867b50f9fcb807855cd5daf Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 13:44:28 +0200 Subject: [PATCH 04/32] fix tests --- .../hooks/__tests__/useArbQueryParams.test.ts | 4 +- .../src/hooks/__tests__/useNetworks.test.ts | 8 +- .../src/util/__tests__/networks.test.ts | 82 +++++++------------ 3 files changed, 36 insertions(+), 58 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts b/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts index eb605433c7..81f39f8b81 100644 --- a/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts +++ b/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { addCustomNetwork } from '@arbitrum/sdk' +import { addCustomArbitrumNetwork } from '@arbitrum/sdk' import { ChainId, customChainLocalStorageKey } from '../../util/networks' import { AmountQueryParam, ChainParam } from '../useArbQueryParams' import { createMockOrbitChain } from './helpers' @@ -224,7 +224,7 @@ describe('ChainParam custom encoder and decoder', () => { chainId: 222222, parentChainId: 1 }) - addCustomNetwork({ customL2Network: customChain }) + addCustomArbitrumNetwork(customChain) expect(ChainParam.decode('222222')).toEqual(222222) }) }) diff --git a/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts b/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts index bd3f1ba97c..e0199b2907 100644 --- a/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts +++ b/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { addCustomNetwork } from '@arbitrum/sdk' +import { addCustomArbitrumNetwork } from '@arbitrum/sdk' import { ChainId, customChainLocalStorageKey } from '../../util/networks' import { sanitizeQueryParams } from '../useNetworks' import { createMockOrbitChain } from './helpers' @@ -35,9 +35,9 @@ describe('sanitizeQueryParams', () => { return null } ) - addCustomNetwork({ customL2Network: mockedOrbitChain_1 }) - addCustomNetwork({ customL2Network: mockedOrbitChain_2 }) - addCustomNetwork({ customL2Network: mockedOrbitChain_3 }) + addCustomArbitrumNetwork(mockedOrbitChain_1) + addCustomArbitrumNetwork(mockedOrbitChain_2) + addCustomArbitrumNetwork(mockedOrbitChain_3) }) afterAll(() => { diff --git a/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts b/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts index a81d95c429..2c2838196e 100644 --- a/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts +++ b/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts @@ -1,4 +1,4 @@ -import { constants, addCustomNetwork } from '@arbitrum/sdk' +import { addCustomArbitrumNetwork } from '@arbitrum/sdk' import { ChainId, @@ -17,61 +17,39 @@ beforeAll(() => { } // add local - addCustomNetwork({ - customL1Network: { - blockTime: 10, - chainID: 1337, - explorerUrl: '', - isCustom: true, - name: 'Ethereum Local', - partnerChainIDs: [412346], - isArbitrum: false + addCustomArbitrumNetwork({ + chainId: 412346, + confirmPeriodBlocks: 20, + ethBridge: { + bridge: '0x2b360a9881f21c3d7aa0ea6ca0de2a3341d4ef3c', + inbox: '0xff4a24b22f94979e9ba5f3eb35838aa814bad6f1', + outbox: '0x49940929c7cA9b50Ff57a01d3a92817A414E6B9B', + rollup: '0x65a59d67da8e710ef9a01eca37f83f84aedec416', + sequencerInbox: '0xe7362d0787b51d8c72d504803e5b1d6dcda89540' }, - customL2Network: { - chainID: 412346, - partnerChainIDs: [ - // Orbit chains will go here - ], - confirmPeriodBlocks: 20, - ethBridge: { - bridge: '0x2b360a9881f21c3d7aa0ea6ca0de2a3341d4ef3c', - inbox: '0xff4a24b22f94979e9ba5f3eb35838aa814bad6f1', - outbox: '0x49940929c7cA9b50Ff57a01d3a92817A414E6B9B', - rollup: '0x65a59d67da8e710ef9a01eca37f83f84aedec416', - sequencerInbox: '0xe7362d0787b51d8c72d504803e5b1d6dcda89540' - }, - explorerUrl: '', - isArbitrum: true, - isCustom: true, - name: 'Arbitrum Local', - partnerChainID: 1337, - retryableLifetimeSeconds: 604800, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, - tokenBridge: { - l1CustomGateway: '0x75E0E92A79880Bd81A69F72983D03c75e2B33dC8', - l1ERC20Gateway: '0x4Af567288e68caD4aA93A272fe6139Ca53859C70', - l1GatewayRouter: '0x85D9a8a4bd77b9b5559c1B7FCb8eC9635922Ed49', - l1MultiCall: '0xA39FFA43ebA037D67a0f4fe91956038ABA0CA386', - l1ProxyAdmin: '0x7E32b54800705876d3b5cFbc7d9c226a211F7C1a', - l1Weth: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', - l1WethGateway: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', - l2CustomGateway: '0x525c2aBA45F66987217323E8a05EA400C65D06DC', - l2ERC20Gateway: '0xe1080224B632A93951A7CFA33EeEa9Fd81558b5e', - l2GatewayRouter: '0x1294b86822ff4976BfE136cB06CF43eC7FCF2574', - l2Multicall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', - l2ProxyAdmin: '0xda52b25ddB0e3B9CC393b0690Ac62245Ac772527', - l2Weth: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', - l2WethGateway: '0x4A2bA922052bA54e29c5417bC979Daaf7D5Fe4f4' - } + isCustom: true, + name: 'Arbitrum Local', + parentChainId: 1337, + retryableLifetimeSeconds: 604800, + tokenBridge: { + l1CustomGateway: '0x75E0E92A79880Bd81A69F72983D03c75e2B33dC8', + l1ERC20Gateway: '0x4Af567288e68caD4aA93A272fe6139Ca53859C70', + l1GatewayRouter: '0x85D9a8a4bd77b9b5559c1B7FCb8eC9635922Ed49', + l1MultiCall: '0xA39FFA43ebA037D67a0f4fe91956038ABA0CA386', + l1ProxyAdmin: '0x7E32b54800705876d3b5cFbc7d9c226a211F7C1a', + l1Weth: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', + l1WethGateway: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', + l2CustomGateway: '0x525c2aBA45F66987217323E8a05EA400C65D06DC', + l2ERC20Gateway: '0xe1080224B632A93951A7CFA33EeEa9Fd81558b5e', + l2GatewayRouter: '0x1294b86822ff4976BfE136cB06CF43eC7FCF2574', + l2Multicall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', + l2ProxyAdmin: '0xda52b25ddB0e3B9CC393b0690Ac62245Ac772527', + l2Weth: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', + l2WethGateway: '0x4A2bA922052bA54e29c5417bC979Daaf7D5Fe4f4' } }) - addCustomNetwork({ - customL2Network: xaiTestnet - }) + addCustomArbitrumNetwork(xaiTestnet) }) describe('getBaseChainIdByChainId', () => { From 5e060534fa1fd24d0d67a61292a65934a63b8c61 Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 14:09:56 +0200 Subject: [PATCH 05/32] fixes --- .../src/hooks/__tests__/helpers.ts | 14 +++----------- .../src/util/deposits/helpers.ts | 8 +++----- packages/arb-token-bridge-ui/src/util/networks.ts | 7 ++++--- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts b/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts index 4749be24fa..6cc57acbbd 100644 --- a/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts +++ b/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts @@ -1,5 +1,3 @@ -import { constants } from '@arbitrum/sdk' - import { ChainWithRpcUrl } from '../../util/networks' export function createMockOrbitChain({ @@ -10,7 +8,7 @@ export function createMockOrbitChain({ parentChainId: number }): ChainWithRpcUrl { return { - chainID: chainId, + chainId: chainId, confirmPeriodBlocks: 45818, ethBridge: { bridge: '', @@ -22,12 +20,10 @@ export function createMockOrbitChain({ nativeToken: '', explorerUrl: '', rpcUrl: '', - isArbitrum: true, isCustom: true, name: `Mocked Orbit Chain ${chainId}`, slug: `mocked-orbit-chain-${chainId}`, - partnerChainID: parentChainId, - partnerChainIDs: [], + parentChainId, retryableLifetimeSeconds: 604800, tokenBridge: { l1CustomGateway: '', @@ -44,10 +40,6 @@ export function createMockOrbitChain({ l2ProxyAdmin: '', l2Weth: '', l2WethGateway: '' - }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS + } } } diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index 0177bc420e..9b9f2fcf72 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -1,13 +1,11 @@ import { ParentTransactionReceipt, ParentToChildMessageStatus, - EthDepositStatus -} from '@arbitrum/sdk' -import { - EthDepositMessage, + EthDepositStatus, ParentToChildMessageReader, ParentToChildMessageReaderClassic -} from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' +} from '@arbitrum/sdk' +import { EthDepositMessage } from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' import { Provider } from '@ethersproject/providers' import { AssetType } from '../../hooks/arbTokenBridge.types' import { Transaction } from '../../hooks/useTransactions' diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index f78b105eb6..0211abfb39 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -1,8 +1,9 @@ -import { ArbitrumNetwork, addCustomArbitrumNetwork } from '@arbitrum/sdk' import { - networks as arbitrumNetworks, + ArbitrumNetwork, + addCustomArbitrumNetwork, getChildrenForNetwork -} from '@arbitrum/sdk/dist/lib/dataEntities/networks' +} from '@arbitrum/sdk' +import { networks as arbitrumNetworks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' import { loadEnvironmentVariableWithFallback } from './index' import { getBridgeUiConfigForChain } from './bridgeUiConfig' From 3583fe40389c87aaf7e8d3146e4b1a568e2cd87d Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 14:22:50 +0200 Subject: [PATCH 06/32] fixes --- .../src/components/TransactionHistory/helpers.ts | 7 ++++--- packages/arb-token-bridge-ui/src/util/networks.ts | 14 ++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index be34076da5..e1f7e69327 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -3,11 +3,12 @@ import { StaticJsonRpcProvider, TransactionReceipt } from '@ethersproject/providers' -import { EthDepositStatus, ParentToChildMessageStatus } from '@arbitrum/sdk' import { - EthDepositMessage, + EthDepositStatus, + ParentToChildMessageStatus, ParentToChildMessageReader -} from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' +} from '@arbitrum/sdk' +import { EthDepositMessage } from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' import { DepositStatus, diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 0211abfb39..02a8f2ddf0 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -28,29 +28,24 @@ export enum ChainId { } type L1Network = { - isArbitrum: false chainId: ChainId blockTime: number } const l1Networks: { [chainId: number]: L1Network } = { [ChainId.Ethereum]: { - isArbitrum: false, chainId: ChainId.Ethereum, - blockTime: 10 + blockTime: 14 }, [ChainId.Sepolia]: { - isArbitrum: false, chainId: ChainId.Sepolia, - blockTime: 10 + blockTime: 12 }, [ChainId.Holesky]: { - isArbitrum: false, chainId: ChainId.Holesky, - blockTime: 10 + blockTime: 12 }, [ChainId.Local]: { - isArbitrum: false, chainId: ChainId.Local, blockTime: 10 } @@ -276,8 +271,7 @@ export const l2MoonGatewayAddresses: { [chainId: number]: string } = { const defaultL1Network: L1Network = { blockTime: 10, - chainId: 1337, - isArbitrum: false + chainId: 1337 } const defaultL2Network: ArbitrumNetwork = { From 1e51d1b789eaa6ce221042abdad20169df365394 Mon Sep 17 00:00:00 2001 From: Bartek Date: Thu, 25 Apr 2024 16:31:14 +0200 Subject: [PATCH 07/32] fix tests --- .../arb-token-bridge-ui/src/hooks/useTransactionHistory.ts | 1 - .../tests/e2e/specs/readClassicDeposits.cy.ts | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts b/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts index f9fcb86ce9..9096c10c13 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts @@ -96,7 +96,6 @@ function sortByTimestampDescending(a: Transfer, b: Transfer) { } function getMultiChainFetchList(): ChainPair[] { - console.log('chains: ', getChains()) return getChains().flatMap(chain => { // We only grab child chains because we don't want duplicates and we need the parent chain // Although the type is correct here we default to an empty array for custom networks backwards compatibility diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/readClassicDeposits.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/readClassicDeposits.cy.ts index c7680fa938..b39e7a06b7 100644 --- a/packages/arb-token-bridge-ui/tests/e2e/specs/readClassicDeposits.cy.ts +++ b/packages/arb-token-bridge-ui/tests/e2e/specs/readClassicDeposits.cy.ts @@ -1,6 +1,5 @@ -import { L1ToL2MessageStatus } from '@arbitrum/sdk' +import { ParentToChildMessageStatus } from '@arbitrum/sdk' -import { shortenTxHash } from '../../../src/util/CommonUtils' import { Transaction } from '../../../src/hooks/useTransactions' import { AssetType } from '../../../src/hooks/arbTokenBridge.types' @@ -32,7 +31,7 @@ function mockClassicDepositTransaction( timestampResolved: dateYearAgo.toISOString(), l1ToL2MsgData: { fetchingUpdate: false, - status: L1ToL2MessageStatus.NOT_YET_CREATED, + status: ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID: undefined, l2TxID: undefined }, From c93b06028b0856a96c0d300d763479c86dd514c3 Mon Sep 17 00:00:00 2001 From: Bartek Date: Fri, 26 Apr 2024 17:24:57 +0200 Subject: [PATCH 08/32] fix redeem retryable test --- packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts index a66b273f54..51f3a73e75 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts @@ -57,13 +57,13 @@ export function useRedeemRetryable( const redeemReceipt = (await retryableTicket.getSuccessfulRedeem()) as unknown as { status: ParentToChildMessageStatus.REDEEMED - l2TxReceipt: TransactionReceipt + chainTxReceipt: TransactionReceipt } updatePendingTransaction({ ...tx, l1ToL2MsgData: { - l2TxID: redeemReceipt.l2TxReceipt.transactionHash, + l2TxID: redeemReceipt.chainTxReceipt.transactionHash, status, retryableCreationTxID: retryableTicket.retryableCreationId, fetchingUpdate: false From 8248aad07a01e69ae0ec37f5d3454cf6df1a3d4c Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 18 Jun 2024 19:35:14 +0200 Subject: [PATCH 09/32] migrate more methods --- packages/arb-token-bridge-ui/package.json | 2 +- .../components/TransactionHistory/helpers.ts | 10 +- .../src/components/common/AddCustomChain.tsx | 35 +- .../src/util/RetryableUtils.ts | 28 +- .../src/util/TokenUtils.ts | 12 +- .../src/util/orbitChainsList.ts | 354 ++++++++---------- yarn.lock | 8 +- 7 files changed, 212 insertions(+), 237 deletions(-) diff --git a/packages/arb-token-bridge-ui/package.json b/packages/arb-token-bridge-ui/package.json index 40976dcb4c..6525660c5e 100644 --- a/packages/arb-token-bridge-ui/package.json +++ b/packages/arb-token-bridge-ui/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@apollo/client": "^3.7.11", - "@arbitrum/sdk": "3.5.1-teleporter.0", + "@arbitrum/sdk": "4.0.0-alpha.4", "@ethersproject/providers": "^5.7.0", "@headlessui/react": "^1.7.8", "@headlessui/tailwindcss": "^0.1.2", diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index 19fdab94da..d14cfbcb6b 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -4,7 +4,7 @@ import { TransactionReceipt } from '@ethersproject/providers' import { - EthDepositStatus, + EthDepositMessageStatus, ParentToChildMessageStatus, ParentToChildMessageReader } from '@arbitrum/sdk' @@ -291,7 +291,7 @@ export async function getUpdatedEthDeposit( } const status = await l1ToL2Msg?.status() - const isDeposited = status === EthDepositStatus.DEPOSITED + const isDeposited = status === EthDepositMessageStatus.DEPOSITED const newDeposit: MergedTransaction = { ...tx, @@ -303,10 +303,10 @@ export async function getUpdatedEthDeposit( ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN : ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID: (l1ToL2Msg as EthDepositMessage) - .chainDepositTxHash, + .childDepositTxHash, // Only show `l2TxID` after the deposit is confirmed l2TxID: isDeposited - ? (l1ToL2Msg as EthDepositMessage).chainDepositTxHash + ? (l1ToL2Msg as EthDepositMessage).childDepositTxHash : undefined } } @@ -353,7 +353,7 @@ export async function getUpdatedTokenDeposit( const l2TxID = (() => { if (res.status === ParentToChildMessageStatus.REDEEMED) { - return res.chainTxReceipt.transactionHash + return res.txReceipt.transactionHash } else { return undefined } diff --git a/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx b/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx index b9f894f8b4..00c426268c 100644 --- a/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx +++ b/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx @@ -1,10 +1,7 @@ import { useState } from 'react' import { isAddress } from 'ethers/lib/utils.js' import { Popover } from '@headlessui/react' -import { - addCustomArbitrumNetwork, - constants as arbitrumSdkConstants -} from '@arbitrum/sdk' +import { registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { StaticJsonRpcProvider } from '@ethersproject/providers' import { EllipsisHorizontalIcon, XMarkIcon } from '@heroicons/react/24/outline' import { constants } from 'ethers' @@ -198,20 +195,20 @@ async function mapOrbitConfigToOrbitChain( retryableLifetimeSeconds: 604800, nativeToken: data.chainInfo.nativeToken, tokenBridge: { - l1CustomGateway: data.tokenBridgeContracts.l2Contracts.customGateway, - l1ERC20Gateway: data.tokenBridgeContracts.l2Contracts.standardGateway, - l1GatewayRouter: data.tokenBridgeContracts.l2Contracts.router, - l1MultiCall: data.tokenBridgeContracts.l2Contracts.multicall, - l1ProxyAdmin: data.tokenBridgeContracts.l2Contracts.proxyAdmin, - l1Weth: data.tokenBridgeContracts.l2Contracts.weth, - l1WethGateway: data.tokenBridgeContracts.l2Contracts.wethGateway, - l2CustomGateway: data.tokenBridgeContracts.l3Contracts.customGateway, - l2ERC20Gateway: data.tokenBridgeContracts.l3Contracts.standardGateway, - l2GatewayRouter: data.tokenBridgeContracts.l3Contracts.router, - l2Multicall: data.tokenBridgeContracts.l3Contracts.multicall, - l2ProxyAdmin: data.tokenBridgeContracts.l3Contracts.proxyAdmin, - l2Weth: data.tokenBridgeContracts.l3Contracts.weth, - l2WethGateway: data.tokenBridgeContracts.l3Contracts.wethGateway + parentCustomGateway: data.tokenBridgeContracts.l2Contracts.customGateway, + parentErc20Gateway: data.tokenBridgeContracts.l2Contracts.standardGateway, + parentGatewayRouter: data.tokenBridgeContracts.l2Contracts.router, + parentMultiCall: data.tokenBridgeContracts.l2Contracts.multicall, + parentProxyAdmin: data.tokenBridgeContracts.l2Contracts.proxyAdmin, + parentWeth: data.tokenBridgeContracts.l2Contracts.weth, + parentWethGateway: data.tokenBridgeContracts.l2Contracts.wethGateway, + childCustomGateway: data.tokenBridgeContracts.l3Contracts.customGateway, + childErc20Gateway: data.tokenBridgeContracts.l3Contracts.standardGateway, + childGatewayRouter: data.tokenBridgeContracts.l3Contracts.router, + childMulticall: data.tokenBridgeContracts.l3Contracts.multicall, + childProxyAdmin: data.tokenBridgeContracts.l3Contracts.proxyAdmin, + childWeth: data.tokenBridgeContracts.l3Contracts.weth, + childWethGateway: data.tokenBridgeContracts.l3Contracts.wethGateway } } } @@ -265,7 +262,7 @@ export const AddCustomChain = () => { const nativeToken = await fetchNativeToken(data) // Orbit config has been validated and will be added to the custom list after page refreshes // let's still try to add it here to handle eventual errors - addCustomArbitrumNetwork(customChain) + registerCustomArbitrumNetwork(customChain) saveCustomChainToLocalStorage({ ...customChain, ...nativeToken }) saveOrbitConfigToLocalStorage(data) // reload to apply changes diff --git a/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts b/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts index 89d5a1b837..e8151925f4 100644 --- a/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts @@ -1,8 +1,7 @@ import { - ParentToChildMessageWriter as IParentToChildMessageWriter - L1TransactionReceipt, - L1ToL2MessageWriter as IL1ToL2MessageWriter, - L1ToL2MessageStatus + ParentTransactionReceipt, + ParentToChildMessageWriter as IParentToChildMessageWriter, + ParentToChildMessageStatus } from '@arbitrum/sdk' import { Signer } from '@ethersproject/abstract-signer' import { Provider } from '@ethersproject/abstract-provider' @@ -37,17 +36,17 @@ export async function getRetryableTicket({ retryableCreationId, parentChainProvider, childChainSigner -}: GetRetryableTicketParams): Promise { +}: GetRetryableTicketParams): Promise { if (!retryableCreationId) { throw new Error("Error: Couldn't find retryable ticket creation id") } - const parentChainTxReceipt = new L1TransactionReceipt( + const parentChainTxReceipt = new ParentTransactionReceipt( await parentChainProvider.getTransactionReceipt(parentChainTxHash) ) const retryableTicket = ( - await parentChainTxReceipt.getL1ToL2Messages(childChainSigner) + await parentChainTxReceipt.getParentToChildMessages(childChainSigner) ) // Find message with the matching id .find(m => m.retryableCreationId === retryableCreationId) @@ -75,10 +74,9 @@ export const getRetryableTicketExpiration = async ({ const depositTxReceipt = await parentChainProvider.getTransactionReceipt( parentChainTxHash ) - const parentChainTxReceipt = new L1TransactionReceipt(depositTxReceipt) - const [parentToChildMsg] = await parentChainTxReceipt.getL1ToL2Messages( - childChainProvider - ) + const parentChainTxReceipt = new ParentTransactionReceipt(depositTxReceipt) + const [parentToChildMsg] = + await parentChainTxReceipt.getParentToChildMessages(childChainProvider) const now = dayjs() @@ -108,7 +106,10 @@ export const getRetryableTicketExpiration = async ({ // utilities for teleporter transactions export const l1L2RetryableRequiresRedeem = (tx: MergedTransaction) => { - return tx.l1ToL2MsgData?.status === L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2 + return ( + tx.l1ToL2MsgData?.status === + ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + ) } export const l2ForwarderRetryableRequiresRedeem = (tx: MergedTransaction) => { @@ -126,7 +127,8 @@ export const secondRetryableLegForTeleportRequiresRedeem = ( ) => { return ( !l2ForwarderRetryableRequiresRedeem(tx) && - tx.l2ToL3MsgData?.status === L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2 + tx.l2ToL3MsgData?.status === + ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN ) } diff --git a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts index 498de28b64..675c0c37bc 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts @@ -6,7 +6,7 @@ import { EthBridger, EthL1L3Bridger, MultiCaller, - getL2Network + getArbitrumNetwork } from '@arbitrum/sdk' import { ERC20__factory } from '@arbitrum/sdk/dist/lib/abi/factories/ERC20__factory' import * as Sentry from '@sentry/react' @@ -232,7 +232,7 @@ export async function getL1ERC20Address({ }): Promise { try { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - return await erc20Bridger.getParentERC20Address(erc20L2Address, l2Provider) + return await erc20Bridger.getParentErc20Address(erc20L2Address, l2Provider) } catch (error) { return null } @@ -251,7 +251,7 @@ export async function fetchErc20ParentChainGatewayAddress({ childChainProvider: Provider }): Promise { const erc20Bridger = await Erc20Bridger.fromProvider(childChainProvider) - return erc20Bridger.getL1GatewayAddress( + return erc20Bridger.getParentGatewayAddress( erc20ParentChainAddress, parentChainProvider ) @@ -268,7 +268,7 @@ export async function fetchErc20L2GatewayAddress({ l2Provider: Provider }): Promise { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - return erc20Bridger.getL2GatewayAddress(erc20L1Address, l2Provider) + return erc20Bridger.getChildGatewayAddress(erc20L1Address, l2Provider) } /* @@ -284,7 +284,7 @@ export async function getL2ERC20Address({ l2Provider: Provider }): Promise { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - return await erc20Bridger.getChildERC20Address(erc20L1Address, l1Provider) + return await erc20Bridger.getChildErc20Address(erc20L1Address, l1Provider) } // Given an L1 token address, derive it's L3 counterpart address @@ -298,7 +298,7 @@ export async function getL3ERC20Address({ l1Provider: Provider l3Provider: Provider }): Promise { - const l3Network = await getL2Network(l3Provider) + const l3Network = await getArbitrumNetwork(l3Provider) const l1l3Bridger = new Erc20L1L3Bridger(l3Network) const { l2Provider } = await getL2ConfigForTeleport({ diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index 4198668c04..54b321b830 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -44,20 +44,20 @@ export const orbitMainnets: { parentChainId: 42161, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0xb15A0826d65bE4c2fDd961b72636168ee70Af030', - l1ERC20Gateway: '0xb591cE747CF19cF30e11d656EB94134F523A9e77', - l1GatewayRouter: '0x22CCA5Dc96a4Ac1EC32c9c7C5ad4D66254a24C35', - l1MultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', - l1ProxyAdmin: '0x041f85dd87c46b941dc9b15c6628b19ee5358485', - l1Weth: '0x0000000000000000000000000000000000000000', - l1WethGateway: '0x0000000000000000000000000000000000000000', - l2CustomGateway: '0x96551194230725c72ACF8E9573B1382CCBC70635', - l2ERC20Gateway: '0x0c71417917D24F4A6A6A55559B98c5cCEcb33F7a', - l2GatewayRouter: '0xd096e8dE90D34de758B0E0bA4a796eA2e1e272cF', - l2Multicall: '0xEEC168551A85911Ec3A905e0561b656979f3ea67', - l2ProxyAdmin: '0x56800fDCFbE19Ea3EE9d115dAC30d95d6459c44E', - l2Weth: '0x0000000000000000000000000000000000000000', - l2WethGateway: '0x0000000000000000000000000000000000000000' + parentCustomGateway: '0xb15A0826d65bE4c2fDd961b72636168ee70Af030', + parentErc20Gateway: '0xb591cE747CF19cF30e11d656EB94134F523A9e77', + parentGatewayRouter: '0x22CCA5Dc96a4Ac1EC32c9c7C5ad4D66254a24C35', + parentMultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', + parentProxyAdmin: '0x041f85dd87c46b941dc9b15c6628b19ee5358485', + parentWeth: '0x0000000000000000000000000000000000000000', + parentWethGateway: '0x0000000000000000000000000000000000000000', + childCustomGateway: '0x96551194230725c72ACF8E9573B1382CCBC70635', + childErc20Gateway: '0x0c71417917D24F4A6A6A55559B98c5cCEcb33F7a', + childGatewayRouter: '0xd096e8dE90D34de758B0E0bA4a796eA2e1e272cF', + childMulticall: '0xEEC168551A85911Ec3A905e0561b656979f3ea67', + childProxyAdmin: '0x56800fDCFbE19Ea3EE9d115dAC30d95d6459c44E', + childWeth: '0x0000000000000000000000000000000000000000', + childWethGateway: '0x0000000000000000000000000000000000000000' }, bridgeUiConfig: { color: '#F30019', @@ -93,20 +93,20 @@ export const orbitMainnets: { parentChainId: 42161, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0x8bE956aB42274056ef4471BEb211b33e258b7324', - l1ERC20Gateway: '0x46406c88285AD9BE2fB23D9aD96Cb578d824cAb6', - l1GatewayRouter: '0x2623C144B4d167f70893f6A8968B98c89a6C5F97', - l1MultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', - l1ProxyAdmin: '0x003e70b041abb993006c03e56c8515622a02928c', - l1Weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', - l1WethGateway: '0x8DF47DAe3313663C80f5E94A893190710A719224', - l2CustomGateway: '0x90E43f5d772e50B01B3F9596f65AD5653467d010', - l2ERC20Gateway: '0x0CA4c24079a191e08F659699292e5C75274EF253', - l2GatewayRouter: '0x9a2859B2a83148b8DE25d26643B5407555D219E1', - l2Multicall: '0x4c753F58Ee9E83B38170abAbBEa8B47976C7ee1b', - l2ProxyAdmin: '0x18AB1fE7CBeB5F40d2eAf8A3906A966d59E79767', - l2Weth: '0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0', - l2WethGateway: '0xd0C21F7960ea9835E7B2E636548f4deDD9E2309C' + parentCustomGateway: '0x8bE956aB42274056ef4471BEb211b33e258b7324', + parentErc20Gateway: '0x46406c88285AD9BE2fB23D9aD96Cb578d824cAb6', + parentGatewayRouter: '0x2623C144B4d167f70893f6A8968B98c89a6C5F97', + parentMultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', + parentProxyAdmin: '0x003e70b041abb993006c03e56c8515622a02928c', + parentWeth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + parentWethGateway: '0x8DF47DAe3313663C80f5E94A893190710A719224', + childCustomGateway: '0x90E43f5d772e50B01B3F9596f65AD5653467d010', + childErc20Gateway: '0x0CA4c24079a191e08F659699292e5C75274EF253', + childGatewayRouter: '0x9a2859B2a83148b8DE25d26643B5407555D219E1', + childMulticall: '0x4c753F58Ee9E83B38170abAbBEa8B47976C7ee1b', + childProxyAdmin: '0x18AB1fE7CBeB5F40d2eAf8A3906A966d59E79767', + childWeth: '0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0', + childWethGateway: '0xd0C21F7960ea9835E7B2E636548f4deDD9E2309C' }, bridgeUiConfig: { color: '#B16EFF', @@ -136,20 +136,20 @@ export const orbitMainnets: { retryableLifetimeSeconds: 604800, isCustom: true, tokenBridge: { - l1CustomGateway: '0x6085B32d97be137cC2D6447DcB3BF684C0835D2F', - l1ERC20Gateway: '0x6551eF99126253B7a838Cf46340030C8eD5342c2', - l1GatewayRouter: '0x5040981c42fD61219cc567e255129166A840938e', - l1MultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', - l1ProxyAdmin: '0x37119EAcFBc1c83DDAf80F6705b6B19630C101C4', - l1Weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', - l1WethGateway: '0x5e833dd255e2aafFcfB32E874F5e2dFA17A109Ee', - l2CustomGateway: '0x9FcC7aC2c40eFD0443D8B641e482F04310F113f6', - l2ERC20Gateway: '0xFdEb5b89bb8FCA61BF77f205B9F89aC3C5fA5dB8', - l2GatewayRouter: '0xDcF4964Dbb526e91CD6354ac3d1247Ce93C21fc4', - l2Multicall: '0xaA6669a609862871ce72c91a93E70F1ef7590271', - l2ProxyAdmin: '0xf10D50B24eDd74ECF3B6Bc22aE74b7F9843e0fDD', - l2Weth: '0x869Bf8814d77106323745758135b999D34C79a87', - l2WethGateway: '0xB6145BFd3fA9D270871037238003c66B984787f4' + parentCustomGateway: '0x6085B32d97be137cC2D6447DcB3BF684C0835D2F', + parentErc20Gateway: '0x6551eF99126253B7a838Cf46340030C8eD5342c2', + parentGatewayRouter: '0x5040981c42fD61219cc567e255129166A840938e', + parentMultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', + parentProxyAdmin: '0x37119EAcFBc1c83DDAf80F6705b6B19630C101C4', + parentWeth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + parentWethGateway: '0x5e833dd255e2aafFcfB32E874F5e2dFA17A109Ee', + childCustomGateway: '0x9FcC7aC2c40eFD0443D8B641e482F04310F113f6', + childErc20Gateway: '0xFdEb5b89bb8FCA61BF77f205B9F89aC3C5fA5dB8', + childGatewayRouter: '0xDcF4964Dbb526e91CD6354ac3d1247Ce93C21fc4', + childMulticall: '0xaA6669a609862871ce72c91a93E70F1ef7590271', + childProxyAdmin: '0xf10D50B24eDd74ECF3B6Bc22aE74b7F9843e0fDD', + childWeth: '0x869Bf8814d77106323745758135b999D34C79a87', + childWethGateway: '0xB6145BFd3fA9D270871037238003c66B984787f4' }, bridgeUiConfig: { color: '#DF62DD', @@ -177,20 +177,20 @@ export const orbitMainnets: { parentChainId: 42161, isCustom: true, tokenBridge: { - l1CustomGateway: '0x653f8D34a86207569069164d45a031eE552A4729', - l1ERC20Gateway: '0x298eb8d9f2F046AC60c01535fad40320CCdeB7c0', - l1GatewayRouter: '0x2f883c5997Cf60B4d52a2fD4039918E1f9D1147c', - l1MultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', - l1ProxyAdmin: '0xCC6f49cff395c4d160C61112522700dcB007c41d', - l1Weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', - l1WethGateway: '0xEB2Ae03709f63CEa9E5eC6ab25C1838c4A5634BA', - l2CustomGateway: '0x1a4ba648Ddc0E726085A847178eBff204411EB1A', - l2ERC20Gateway: '0x7aEdD5a2F3bBd4841711D017Edf90d611aD96a9e', - l2GatewayRouter: '0x33e59640CD7E5C5E8D43fd46d995efDdDd0Fc930', - l2Multicall: '0xEB4150a4F26Cf3563B3a86965E269C8873D48527', - l2ProxyAdmin: '0x518e5FA773118b779a6231303f5593A10D3B3c84', - l2Weth: '0x77684A04145a5924eFCE0D92A7c4a2A2E8C359de', - l2WethGateway: '0x6e965dd667cb08f09DE8285317f012Ac889507b4' + parentCustomGateway: '0x653f8D34a86207569069164d45a031eE552A4729', + parentErc20Gateway: '0x298eb8d9f2F046AC60c01535fad40320CCdeB7c0', + parentGatewayRouter: '0x2f883c5997Cf60B4d52a2fD4039918E1f9D1147c', + parentMultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', + parentProxyAdmin: '0xCC6f49cff395c4d160C61112522700dcB007c41d', + parentWeth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + parentWethGateway: '0xEB2Ae03709f63CEa9E5eC6ab25C1838c4A5634BA', + childCustomGateway: '0x1a4ba648Ddc0E726085A847178eBff204411EB1A', + childErc20Gateway: '0x7aEdD5a2F3bBd4841711D017Edf90d611aD96a9e', + childGatewayRouter: '0x33e59640CD7E5C5E8D43fd46d995efDdDd0Fc930', + childMulticall: '0xEB4150a4F26Cf3563B3a86965E269C8873D48527', + childProxyAdmin: '0x518e5FA773118b779a6231303f5593A10D3B3c84', + childWeth: '0x77684A04145a5924eFCE0D92A7c4a2A2E8C359de', + childWethGateway: '0x6e965dd667cb08f09DE8285317f012Ac889507b4' }, bridgeUiConfig: { color: '#3E63DD', @@ -220,20 +220,20 @@ export const orbitMainnets: { parentChainId: 42161, isCustom: true, tokenBridge: { - l1CustomGateway: '0x38727FfD8aFAdaeF60687D1E623Fd28B58A2B8a8', - l1ERC20Gateway: '0x341F7f035f1CBA1E879Df40117f797F88aC703ea', - l1GatewayRouter: '0xAE4BAD578fff3377FC5Ebfd4d52d3fdd7FAB3017', - l1MultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', - l1ProxyAdmin: '0x50AD12758e5e6320d658B358C731AF6C7FE2b853', - l1Weth: '0x0000000000000000000000000000000000000000', - l1WethGateway: '0x0000000000000000000000000000000000000000', - l2CustomGateway: '0xed609532adB4B24cd580d042A05ef15d914Bb7b0', - l2ERC20Gateway: '0x8624C8046AA1E619528adA4Fa894E431b7CCE139', - l2GatewayRouter: '0x1d55e424757817CBd27caD7169FE462d6703c57d', - l2Multicall: '0xB019E8B9448138251a9C58af34FcCd276cE733f6', - l2ProxyAdmin: '0x8699E41Ed6246708035f7B2E1bf194D9C6Fb7d32', - l2Weth: '0x0000000000000000000000000000000000000000', - l2WethGateway: '0x0000000000000000000000000000000000000000' + parentCustomGateway: '0x38727FfD8aFAdaeF60687D1E623Fd28B58A2B8a8', + parentErc20Gateway: '0x341F7f035f1CBA1E879Df40117f797F88aC703ea', + parentGatewayRouter: '0xAE4BAD578fff3377FC5Ebfd4d52d3fdd7FAB3017', + parentMultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', + parentProxyAdmin: '0x50AD12758e5e6320d658B358C731AF6C7FE2b853', + parentWeth: '0x0000000000000000000000000000000000000000', + parentWethGateway: '0x0000000000000000000000000000000000000000', + childCustomGateway: '0xed609532adB4B24cd580d042A05ef15d914Bb7b0', + childErc20Gateway: '0x8624C8046AA1E619528adA4Fa894E431b7CCE139', + childGatewayRouter: '0x1d55e424757817CBd27caD7169FE462d6703c57d', + childMulticall: '0xB019E8B9448138251a9C58af34FcCd276cE733f6', + childProxyAdmin: '0x8699E41Ed6246708035f7B2E1bf194D9C6Fb7d32', + childWeth: '0x0000000000000000000000000000000000000000', + childWethGateway: '0x0000000000000000000000000000000000000000' }, bridgeUiConfig: { color: '#FF3369', @@ -252,7 +252,7 @@ export const orbitMainnets: { } }, 12324: { - chainID: 12324, + chainId: 12324, confirmPeriodBlocks: 7200, ethBridge: { bridge: '0x59E088d827CB7983Cd0CC64312E472D7cc8a4F44', @@ -263,33 +263,27 @@ export const orbitMainnets: { }, explorerUrl: 'https://explorer.l3x.com', rpcUrl: 'https://rpc-mainnet.l3x.com', - isArbitrum: true, - isCustom: true, name: 'L3X Network', slug: 'l3x-network', - partnerChainID: 42161, - partnerChainIDs: [], + parentChainId: 42161, retryableLifetimeSeconds: 604800, + isCustom: true, tokenBridge: { - l1CustomGateway: '0xec80A45ebadD945379f69e9A8929973BCb3E297D', - l1ERC20Gateway: '0x4fF3E70f30f0394Ad62428751Fe3858740595908', - l1GatewayRouter: '0x817C8Da480bC6b42a5FA88A26e9eD8c0c03968Cf', - l1MultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', - l1ProxyAdmin: '0x0000000000000000000000000000000000000000', - l1Weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', - l1WethGateway: '0x9bd7C6d040665E95a4FE70b61718abca2E3A62CD', - l2CustomGateway: '0x1AE90d0FBf03d1bb0685D4bAc5BCe4F4071cB0dc', - l2ERC20Gateway: '0x76df9F5004F38aC74D0cE664027a1E718AA45E97', - l2GatewayRouter: '0x460E0a28a1DcE5a15811C3F5775D1e8fd0a08278', - l2Multicall: '0xA9cfB51510b18300cf056d7e0b96925a1D11f424', - l2ProxyAdmin: '0xFB027dBD2FBb343FD16D66a63a690B29D51D23AA', - l2Weth: '0xD3f8b9D33b159E8f5141d28880b216d31B00ee63', - l2WethGateway: '0x0fEf8843450b7c6a416C30D1E00cbc535Bb905b6' + parentCustomGateway: '0xec80A45ebadD945379f69e9A8929973BCb3E297D', + parentErc20Gateway: '0x4fF3E70f30f0394Ad62428751Fe3858740595908', + parentGatewayRouter: '0x817C8Da480bC6b42a5FA88A26e9eD8c0c03968Cf', + parentMultiCall: '0x90B02D9F861017844F30dFbdF725b6aa84E63822', + parentProxyAdmin: '0x0000000000000000000000000000000000000000', + parentWeth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + parentWethGateway: '0x9bd7C6d040665E95a4FE70b61718abca2E3A62CD', + childCustomGateway: '0x1AE90d0FBf03d1bb0685D4bAc5BCe4F4071cB0dc', + childErc20Gateway: '0x76df9F5004F38aC74D0cE664027a1E718AA45E97', + childGatewayRouter: '0x460E0a28a1DcE5a15811C3F5775D1e8fd0a08278', + childMulticall: '0xA9cfB51510b18300cf056d7e0b96925a1D11f424', + childProxyAdmin: '0xFB027dBD2FBb343FD16D66a63a690B29D51D23AA', + childWeth: '0xD3f8b9D33b159E8f5141d28880b216d31B00ee63', + childWethGateway: '0x0fEf8843450b7c6a416C30D1E00cbc535Bb905b6' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#3ABE7B', network: { @@ -301,7 +295,7 @@ export const orbitMainnets: { } }, 94524: { - chainID: 94524, + chainId: 94524, confirmPeriodBlocks: 40320, ethBridge: { bridge: '0x2Be65c5b58F78B02AB5c0e798A9ffC181703D3C1', @@ -312,33 +306,27 @@ export const orbitMainnets: { }, explorerUrl: 'https://xchain-explorer.idex.io', rpcUrl: 'https://xchain-rpc.idex.io', - isArbitrum: true, isCustom: true, name: 'XCHAIN', slug: 'xchain', - partnerChainID: 1, - partnerChainIDs: [], + parentChainId: 1, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0xEFb1F8ae759c595907782e9bD45F119c9814b308', - l1ERC20Gateway: '0xFFb821ca61e823a884D79226B0fcD7a99A4d48aa', - l1GatewayRouter: '0xe0a99350288971456EE4BAc4568495352929B769', - l1MultiCall: '0x7cdCB0Cc61f47B8Dd8f47C5A29edaDd84a1BDf5e', - l1ProxyAdmin: '0x22010F5C4c106dfBaffec780196d2F691860Ff62', - l1Weth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', - l1WethGateway: '0xCAde60b1331f1cF714ECb01f08117780887A0AF4', - l2CustomGateway: '0x642e40E3F9948F11E18973f79E910f0953dd0C80', - l2ERC20Gateway: '0xBF14b5F058AE33469eC2D20c9Ee712Cb7eC68A8b', - l2GatewayRouter: '0xe95788E89383447177312846DB45E6bffc32DD3b', - l2Multicall: '0x9eE16369804735D75944AA3B025B063C31862786', - l2ProxyAdmin: '0xc5A8e16EADC3276B3DdB9F122e2c824Dc8a87BfD', - l2Weth: '0x594Ee2FA451dC7aCFC6785c0d746695f79A4daeE', - l2WethGateway: '0x377880CbbA57EB9ACb7120028f21Ce043266A431' + parentCustomGateway: '0xEFb1F8ae759c595907782e9bD45F119c9814b308', + parentErc20Gateway: '0xFFb821ca61e823a884D79226B0fcD7a99A4d48aa', + parentGatewayRouter: '0xe0a99350288971456EE4BAc4568495352929B769', + parentMultiCall: '0x7cdCB0Cc61f47B8Dd8f47C5A29edaDd84a1BDf5e', + parentProxyAdmin: '0x22010F5C4c106dfBaffec780196d2F691860Ff62', + parentWeth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', + parentWethGateway: '0xCAde60b1331f1cF714ECb01f08117780887A0AF4', + childCustomGateway: '0x642e40E3F9948F11E18973f79E910f0953dd0C80', + childErc20Gateway: '0xBF14b5F058AE33469eC2D20c9Ee712Cb7eC68A8b', + childGatewayRouter: '0xe95788E89383447177312846DB45E6bffc32DD3b', + childMulticall: '0x9eE16369804735D75944AA3B025B063C31862786', + childProxyAdmin: '0xc5A8e16EADC3276B3DdB9F122e2c824Dc8a87BfD', + childWeth: '0x594Ee2FA451dC7aCFC6785c0d746695f79A4daeE', + childWethGateway: '0x377880CbbA57EB9ACb7120028f21Ce043266A431' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#FD0598', network: { @@ -371,20 +359,20 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { retryableLifetimeSeconds: 604800, isCustom: true, tokenBridge: { - l1CustomGateway: '0x04e14E04949D49ae9c551ca8Cc3192310Ce65D88', - l1ERC20Gateway: '0xCcB451C4Df22addCFe1447c58bC6b2f264Bb1256', - l1GatewayRouter: '0x185b868DBBF41554465fcb99C6FAb9383E15f47A', - l1MultiCall: '0xA115146782b7143fAdB3065D86eACB54c169d092', - l1ProxyAdmin: '0x022c515aEAb29aaFf82e86A10950cE14eA89C9c5', - l1Weth: '0x0000000000000000000000000000000000000000', - l1WethGateway: '0x0000000000000000000000000000000000000000', - l2CustomGateway: '0xea1ce1CC75C948488515A3058E10aa82da40cE8F', - l2ERC20Gateway: '0xD840761a09609394FaFA3404bEEAb312059AC558', - l2GatewayRouter: '0x3B8ba769a43f34cdD67a20aF60d08D54C9C8f1AD', - l2Multicall: '0x5CBd60Ae5Af80A42FA8b0F20ADF95A8879844984', - l2ProxyAdmin: '0x7C1BA251d812fb34aF5C2566040C3C30585aFed9', - l2Weth: '0x0000000000000000000000000000000000000000', - l2WethGateway: '0x0000000000000000000000000000000000000000' + parentCustomGateway: '0x04e14E04949D49ae9c551ca8Cc3192310Ce65D88', + parentErc20Gateway: '0xCcB451C4Df22addCFe1447c58bC6b2f264Bb1256', + parentGatewayRouter: '0x185b868DBBF41554465fcb99C6FAb9383E15f47A', + parentMultiCall: '0xA115146782b7143fAdB3065D86eACB54c169d092', + parentProxyAdmin: '0x022c515aEAb29aaFf82e86A10950cE14eA89C9c5', + parentWeth: '0x0000000000000000000000000000000000000000', + parentWethGateway: '0x0000000000000000000000000000000000000000', + childCustomGateway: '0xea1ce1CC75C948488515A3058E10aa82da40cE8F', + childErc20Gateway: '0xD840761a09609394FaFA3404bEEAb312059AC558', + childGatewayRouter: '0x3B8ba769a43f34cdD67a20aF60d08D54C9C8f1AD', + childMulticall: '0x5CBd60Ae5Af80A42FA8b0F20ADF95A8879844984', + childProxyAdmin: '0x7C1BA251d812fb34aF5C2566040C3C30585aFed9', + childWeth: '0x0000000000000000000000000000000000000000', + childWethGateway: '0x0000000000000000000000000000000000000000' }, bridgeUiConfig: { color: '#F30019', @@ -420,20 +408,20 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { parentChainId: 421614, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0xeCa856BE0041184eeda8F2c98896AC4693b168EA', - l1ERC20Gateway: '0xf57F874845CD652e69f69f020A4d46F4e427bb43', - l1GatewayRouter: '0xE3661c8313B35BA310Ad89e113561F3C983dC761', - l1MultiCall: '0xce1CAd780c529e66e3aa6D952a1ED9A6447791c1', - l1ProxyAdmin: '0x0000000000000000000000000000000000000000', - l1Weth: '0x0000000000000000000000000000000000000000', - l1WethGateway: '0x0000000000000000000000000000000000000000', - l2CustomGateway: '0x6B8C4aD57806fB4563031B79348bcC4CC3bBa7D5', - l2ERC20Gateway: '0xBb94635f882f03f7641B742F5e3070e6B5108b71', - l2GatewayRouter: '0x14De2d9c4C7F5ad2d134Eb746207653797693C0D', - l2Multicall: '0xF6Fd6C87C4cac9A4BF4b6fF4efa4B06bdbbe5D51', - l2ProxyAdmin: '0x80C5A0C4004B4130b823AfE8D97aAeA3fBFf3fCc', - l2Weth: '0x0000000000000000000000000000000000000000', - l2WethGateway: '0x0000000000000000000000000000000000000000' + parentCustomGateway: '0xeCa856BE0041184eeda8F2c98896AC4693b168EA', + parentErc20Gateway: '0xf57F874845CD652e69f69f020A4d46F4e427bb43', + parentGatewayRouter: '0xE3661c8313B35BA310Ad89e113561F3C983dC761', + parentMultiCall: '0xce1CAd780c529e66e3aa6D952a1ED9A6447791c1', + parentProxyAdmin: '0x0000000000000000000000000000000000000000', + parentWeth: '0x0000000000000000000000000000000000000000', + parentWethGateway: '0x0000000000000000000000000000000000000000', + childCustomGateway: '0x6B8C4aD57806fB4563031B79348bcC4CC3bBa7D5', + childErc20Gateway: '0xBb94635f882f03f7641B742F5e3070e6B5108b71', + childGatewayRouter: '0x14De2d9c4C7F5ad2d134Eb746207653797693C0D', + childMulticall: '0xF6Fd6C87C4cac9A4BF4b6fF4efa4B06bdbbe5D51', + childProxyAdmin: '0x80C5A0C4004B4130b823AfE8D97aAeA3fBFf3fCc', + childWeth: '0x0000000000000000000000000000000000000000', + childWethGateway: '0x0000000000000000000000000000000000000000' }, bridgeUiConfig: { color: '#B88B1E', @@ -451,7 +439,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { } }, 12325: { - chainID: 12325, + chainId: 12325, confirmPeriodBlocks: 150, ethBridge: { bridge: '0x98DBc5f9d4BB16A7c8C21e36789E673b6E0FDf37', @@ -462,33 +450,27 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { }, explorerUrl: 'https://explorer-testnet.l3x.com', rpcUrl: 'https://rpc-testnet.l3x.com', - isArbitrum: true, isCustom: true, name: 'L3X Network Testnet', slug: 'l3x-network-testnet', - partnerChainID: 421614, - partnerChainIDs: [], + parentChainId: 421614, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0x00eE97A18A85a58fbfddA2CCa2Bdb3B88d1068b3', - l1ERC20Gateway: '0xD2e9EA14CE4C61630a87bC652f5cD51deA7C66bA', - l1GatewayRouter: '0x8D684F7fA0aE2a13e0a1FAa60699ee2db46505a8', - l1MultiCall: '0xce1CAd780c529e66e3aa6D952a1ED9A6447791c1', - l1ProxyAdmin: '0x0000000000000000000000000000000000000000', - l1Weth: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', - l1WethGateway: '0xB001D0E3a43EbB820E82720a2Bd74f4C03a5b424', - l2CustomGateway: '0xcc3fa38D4a18474DF92107d328bF4A6F7C9fA29A', - l2ERC20Gateway: '0x7aeD67245Db9b4E6bB26791b48E20aBbA9411EdD', - l2GatewayRouter: '0xF40E36d3043373Ce6F89abe3914d631135342C28', - l2Multicall: '0xa8D4b59f0FB23CB785d360E73C7364dDB3e34A62', - l2ProxyAdmin: '0xC381Ff423f37d42b0b9B84195D9C9C31eDc26e73', - l2Weth: '0x6793D074d3A410C803B8C2086E569883D6e928F1', - l2WethGateway: '0x4F24D0244B29d76ED1FBD3c8a9967b72b78B9DBd' + parentCustomGateway: '0x00eE97A18A85a58fbfddA2CCa2Bdb3B88d1068b3', + parentErc20Gateway: '0xD2e9EA14CE4C61630a87bC652f5cD51deA7C66bA', + parentGatewayRouter: '0x8D684F7fA0aE2a13e0a1FAa60699ee2db46505a8', + parentMultiCall: '0xce1CAd780c529e66e3aa6D952a1ED9A6447791c1', + parentProxyAdmin: '0x0000000000000000000000000000000000000000', + parentWeth: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', + parentWethGateway: '0xB001D0E3a43EbB820E82720a2Bd74f4C03a5b424', + childCustomGateway: '0xcc3fa38D4a18474DF92107d328bF4A6F7C9fA29A', + childErc20Gateway: '0x7aeD67245Db9b4E6bB26791b48E20aBbA9411EdD', + childGatewayRouter: '0xF40E36d3043373Ce6F89abe3914d631135342C28', + childMulticall: '0xa8D4b59f0FB23CB785d360E73C7364dDB3e34A62', + childProxyAdmin: '0xC381Ff423f37d42b0b9B84195D9C9C31eDc26e73', + childWeth: '0x6793D074d3A410C803B8C2086E569883D6e928F1', + childWethGateway: '0x4F24D0244B29d76ED1FBD3c8a9967b72b78B9DBd' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#3ABE7B', network: { @@ -500,7 +482,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { } }, 1918988905: { - chainID: 1918988905, + chainId: 1918988905, confirmPeriodBlocks: 64, ethBridge: { bridge: '0x55f0a866E9A5B59Eab0269D62d121BC0978a4346', @@ -511,33 +493,27 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { }, explorerUrl: 'https://testnet.explorer.rarichain.org', rpcUrl: 'https://testnet.rpc.rarichain.org/http', - isArbitrum: true, isCustom: true, name: 'RARI Testnet', slug: 'rari-testnet', - partnerChainID: 421614, - partnerChainIDs: [], + parentChainId: 421614, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0x7EDA0d4c14Af6B0920F4e3C0F0cA18d18212fB0A', - l1ERC20Gateway: '0x2c9Dd2b2cd55266e3b5c3C95840F3c037fbCb856', - l1GatewayRouter: '0xece5902AD6Bbf4689EA8aD4B95237fAf5B65FB26', - l1MultiCall: '0x6550ef0Ff640fDD871C9321D2483801c891D7d54', - l1ProxyAdmin: '0x311C5Fe27874FBc8ea9D06BeDA2ff316E37c3E2f', - l1Weth: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', - l1WethGateway: '0x1A0d79b35953fDA4F2b7A3B0BC893C767AAe44aE', - l2CustomGateway: '0x311C5Fe27874FBc8ea9D06BeDA2ff316E37c3E2f', - l2ERC20Gateway: '0x68b350501592a1501ffc2C8f1B28Ca896253fFe8', - l2GatewayRouter: '0x52d17dcd26F9B19A2672dC79686f1279391Aa449', - l2Multicall: '0x1A0d79b35953fDA4F2b7A3B0BC893C767AAe44aE', - l2ProxyAdmin: '0x25Da52b43f252Bc52Ce038a7541eCC62b9347229', - l2Weth: '0x2c9Dd2b2cd55266e3b5c3C95840F3c037fbCb856', - l2WethGateway: '0xece5902AD6Bbf4689EA8aD4B95237fAf5B65FB26' + parentCustomGateway: '0x7EDA0d4c14Af6B0920F4e3C0F0cA18d18212fB0A', + parentErc20Gateway: '0x2c9Dd2b2cd55266e3b5c3C95840F3c037fbCb856', + parentGatewayRouter: '0xece5902AD6Bbf4689EA8aD4B95237fAf5B65FB26', + parentMultiCall: '0x6550ef0Ff640fDD871C9321D2483801c891D7d54', + parentProxyAdmin: '0x311C5Fe27874FBc8ea9D06BeDA2ff316E37c3E2f', + parentWeth: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', + parentWethGateway: '0x1A0d79b35953fDA4F2b7A3B0BC893C767AAe44aE', + childCustomGateway: '0x311C5Fe27874FBc8ea9D06BeDA2ff316E37c3E2f', + childErc20Gateway: '0x68b350501592a1501ffc2C8f1B28Ca896253fFe8', + childGatewayRouter: '0x52d17dcd26F9B19A2672dC79686f1279391Aa449', + childMulticall: '0x1A0d79b35953fDA4F2b7A3B0BC893C767AAe44aE', + childProxyAdmin: '0x25Da52b43f252Bc52Ce038a7541eCC62b9347229', + childWeth: '0x2c9Dd2b2cd55266e3b5c3C95840F3c037fbCb856', + childWethGateway: '0xece5902AD6Bbf4689EA8aD4B95237fAf5B65FB26' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#B16EFF', network: { @@ -570,12 +546,12 @@ export function getOrbitChains( export function getInboxAddressFromOrbitChainId(chainId: number) { return ( l2Networks[chainId]?.ethBridge.inbox ?? // for stylus testnet v2 - getOrbitChains().find(chain => chain.chainID === chainId)?.ethBridge.inbox // for other custom orbit chains + getOrbitChains().find(chain => chain.chainId === chainId)?.ethBridge.inbox // for other custom orbit chains ) } export function getChainIdFromInboxAddress(inboxAddress: string) { return getOrbitChains().find( chain => chain.ethBridge.inbox.toLowerCase() === inboxAddress.toLowerCase() - )?.chainID + )?.chainId } diff --git a/yarn.lock b/yarn.lock index a8e6b1f925..15385429a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@3.5.1-teleporter.0": - version "3.5.1-teleporter.0" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.5.1-teleporter.0.tgz#68e2612cdaec43b173ee4dbb928871cca067c50f" - integrity sha512-0lJrUgQr/nTEbMzOKgl70m/1vnvVWE8WTOG+UFBN3iSMugcxGsJcNHh96xQV3qyYbo4XcWLwrRkwGg2WVuN25w== +"@arbitrum/sdk@4.0.0-alpha.4": + version "4.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.4.tgz#d0e64c55d5033c22c0076ba028482eb7d6ed3621" + integrity sha512-hhZkTmFHIrnmrJQ7kKAmMP+YPWwC0j8JGo2UjFQqGfLilhMm1ihNlS29yvShkOjujEIgJYnHBVUt57ffXknlEw== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1" From 98e140360310b3fb0188f49820bb3413078d8f54 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Tue, 9 Jul 2024 12:12:07 +0200 Subject: [PATCH 10/32] bump --- packages/arb-token-bridge-ui/package.json | 2 +- yarn.lock | 336 +++++++++------------- 2 files changed, 132 insertions(+), 206 deletions(-) diff --git a/packages/arb-token-bridge-ui/package.json b/packages/arb-token-bridge-ui/package.json index 6525660c5e..3ffc13c6cf 100644 --- a/packages/arb-token-bridge-ui/package.json +++ b/packages/arb-token-bridge-ui/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@apollo/client": "^3.7.11", - "@arbitrum/sdk": "4.0.0-alpha.4", + "@arbitrum/sdk": "^4.0.0-alpha.6", "@ethersproject/providers": "^5.7.0", "@headlessui/react": "^1.7.8", "@headlessui/tailwindcss": "^0.1.2", diff --git a/yarn.lock b/yarn.lock index 15385429a0..78e11cd72a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@4.0.0-alpha.4": - version "4.0.0-alpha.4" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.4.tgz#d0e64c55d5033c22c0076ba028482eb7d6ed3621" - integrity sha512-hhZkTmFHIrnmrJQ7kKAmMP+YPWwC0j8JGo2UjFQqGfLilhMm1ihNlS29yvShkOjujEIgJYnHBVUt57ffXknlEw== +"@arbitrum/sdk@^4.0.0-alpha.6": + version "4.0.0-alpha.6" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.6.tgz#7999240904fb0a2847873faa203bcd3b02f709a2" + integrity sha512-o8fpj0pHNNGMM5VLohRK92km/YPGBXtSwgb312qgEtic4Tb6ga90fHlA8UOdkGSDeqy4JIFKOlH3y+gqIW+Vkw== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1" @@ -1910,7 +1910,7 @@ "@stablelib/constant-time" "^1.0.1" "@stablelib/wipe" "^1.0.1" -"@stablelib/random@1.0.2", "@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": +"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== @@ -1941,7 +1941,7 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@1.0.3": +"@stablelib/x25519@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== @@ -2763,28 +2763,27 @@ eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.1.tgz#a59646e39a5beaa3f3551d129af43cd404cf4faf" - integrity sha512-h0MSYKJu9i1VEs5koCTT7c5YeQ1Kj0ncTFiMqANbDnB1r3mBulXn+FKtZ2fCmf1j7KDpgluuUzpSs+sQfPcv4Q== +"@walletconnect/core@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.4.tgz#fc207c8fa35a53e30012b0c85b6ca933cec7d955" + integrity sha512-3CQHud4As0kPRvlW1w/wSWS2F3yXlAo5kSEJyRWLRPqXG+aSCVWM8cVM8ch5yoeyNIfOHhEINdsYMuJG1+yIJQ== dependencies: - "@walletconnect/heartbeat" "1.2.2" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "1.0.3" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "1.0.14" - "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/logger" "2.1.2" - "@walletconnect/relay-api" "1.0.10" - "@walletconnect/relay-auth" "1.0.4" - "@walletconnect/safe-json" "1.0.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" - isomorphic-unfetch "3.1.0" + "@walletconnect/jsonrpc-ws-connection" "^1.0.11" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" lodash.isequal "4.5.0" - uint8arrays "3.1.0" + uint8arrays "^3.1.0" "@walletconnect/crypto@^1.0.3": version "1.0.3" @@ -2814,23 +2813,22 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.13.1", "@walletconnect/ethereum-provider@2.8.4": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.1.tgz#a9bdb8f9da303088b7b724fa98f4b5ca0d46a36d" - integrity sha512-bHJVqb++GrrMGlapsbSvvIyBlwulMGZEx6N5xwAl6ImPVzbDN0g0XmibNkjzJXVsi/+/d0R/HmKS1WyJQSNx3w== +"@walletconnect/ethereum-provider@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.4.tgz#c627c237b479194efc542b8475596bae12fde52d" + integrity sha512-z7Yz4w8t3eEFv8vQ8DLCgDWPah2aIIyC0iQdwhXgJenQTVuz7JJZRrJUUntzudipHK/owA394c1qTPF0rsMSeQ== dependencies: - "@walletconnect/jsonrpc-http-connection" "1.0.8" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/modal" "2.6.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/universal-provider" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" - -"@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "^1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/sign-client" "2.8.4" + "@walletconnect/types" "2.8.4" + "@walletconnect/universal-provider" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" + +"@walletconnect/events@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== @@ -2838,24 +2836,14 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/heartbeat@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz#e8dc5179db7769950c6f9cf59b23516d9b95227d" - integrity sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw== +"@walletconnect/heartbeat@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" + integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/time" "^1.0.2" - events "^3.3.0" - -"@walletconnect/jsonrpc-http-connection@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" - integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== - dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.6" - "@walletconnect/safe-json" "^1.0.1" - cross-fetch "^3.1.4" - events "^3.3.0" + tslib "1.14.1" "@walletconnect/jsonrpc-http-connection@^1.0.4": version "1.0.7" @@ -2867,16 +2855,17 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" - integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== +"@walletconnect/jsonrpc-http-connection@^1.0.7": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" + integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" events "^3.3.0" -"@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -2885,15 +2874,16 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-types@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" - integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== +"@walletconnect/jsonrpc-provider@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" + integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" - keyvaluestorage-interface "^1.0.0" -"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": +"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== @@ -2901,7 +2891,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -2910,7 +2900,7 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@1.0.14": +"@walletconnect/jsonrpc-ws-connection@^1.0.11": version "1.0.14" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== @@ -2920,7 +2910,7 @@ events "^3.3.0" ws "^7.5.1" -"@walletconnect/keyvaluestorage@1.1.1": +"@walletconnect/keyvaluestorage@^1.0.2": version "1.1.1" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== @@ -2989,7 +2979,7 @@ detect-browser "^5.3.0" query-string "^6.13.5" -"@walletconnect/logger@2.1.2": +"@walletconnect/logger@^2.0.1": version "2.1.2" resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== @@ -3005,13 +2995,6 @@ buffer "6.0.3" valtio "1.10.6" -"@walletconnect/modal-core@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" - integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== - dependencies: - valtio "1.11.2" - "@walletconnect/modal-ui@2.5.5": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.5.5.tgz#f2ab96ab72f0f1325252224560ec610b73d1684c" @@ -3022,24 +3005,6 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal-ui@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" - integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - lit "2.8.0" - motion "10.16.2" - qrcode "1.5.3" - -"@walletconnect/modal@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" - integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - "@walletconnect/modal-ui" "2.6.2" - "@walletconnect/modal@^2.5.4": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.5.5.tgz#703eb076af4442dcd14a3b0b87863f17283f6514" @@ -3058,14 +3023,14 @@ randombytes "^2.1.0" tslib "1.14.1" -"@walletconnect/relay-api@1.0.10": +"@walletconnect/relay-api@^1.0.9": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== dependencies: "@walletconnect/jsonrpc-types" "^1.0.2" -"@walletconnect/relay-auth@1.0.4": +"@walletconnect/relay-auth@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== @@ -3077,90 +3042,90 @@ tslib "1.14.1" uint8arrays "^3.0.0" -"@walletconnect/safe-json@1.0.2", "@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": +"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.1.tgz#7bdc9226218fd33caf3aef69dff0b4140abc7fa8" - integrity sha512-e+dcqcLsedB4ZjnePFM5Cy8oxu0dyz5iZfhfKH/MOrQV/hyhZ+hJwh4MmkO2QyEu2PERKs9o2Uc6x8RZdi0UAQ== +"@walletconnect/sign-client@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.4.tgz#35e7cfe9442c65d7f667a7c20f1a5ee7e2a6e576" + integrity sha512-eRvWtKBAgzo/rbIkw+rkKco2ulSW8Wor/58UsOBsl9DKr1rIazZd4ZcUdaTjg9q8AT1476IQakCAIuv+1FvJwQ== dependencies: - "@walletconnect/core" "2.13.1" - "@walletconnect/events" "1.0.1" - "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/core" "2.8.4" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "2.1.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" -"@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": +"@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== dependencies: tslib "1.14.1" -"@walletconnect/types@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.1.tgz#393e3bd4d60a755f3a70cbe769b58cf153450310" - integrity sha512-CIrdt66d38xdunGCy5peOOP17EQkCEGKweXc3+Gn/RWeSiRU35I7wjC/Bp4iWcgAQ6iBTZv4jGGST5XyrOp+Pg== +"@walletconnect/types@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.4.tgz#23fad8593b094c7564d72f179e33b1cac9324a88" + integrity sha512-Fgqe87R7rjMOGSvx28YPLTtXM6jj+oUOorx8cE+jEw2PfpWp5myF21aCdaMBR39h0QHij5H1Z0/W9e7gm4oC1Q== dependencies: - "@walletconnect/events" "1.0.1" - "@walletconnect/heartbeat" "1.2.2" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/logger" "2.1.2" - events "3.3.0" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + events "^3.3.0" -"@walletconnect/universal-provider@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.13.1.tgz#e007c4963ca73fea7c29dc3ca4ca57e2607daafc" - integrity sha512-A/6WysrvzXWtYD933PKjJlj7PGtOWdkwKeRDiD6JEVk5fQ+DQ1x0p5qcUhaa57r3S0p559YvRNvHFFjx+PpMqA== +"@walletconnect/universal-provider@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.4.tgz#7b62a76a7d99ea41c67374da54aaa4f1b4bc1d03" + integrity sha512-JRpOXKIciRMzd03zZxM1WDsYHo/ZS86zZrZ1aCHW1d45ZLP7SbGPRHzZgBY3xrST26yTvWIlRfTUEYn50fzB1g== dependencies: - "@walletconnect/jsonrpc-http-connection" "1.0.8" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/sign-client" "2.8.4" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" -"@walletconnect/utils@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.1.tgz#f44e81028754c6e056dba588ad9b9fa5ad047645" - integrity sha512-EcooXXlqy5hk9hy/nK2wBF/qxe7HjH0K8ZHzjKkXRkwAE5pCvy0IGXIXWmUR9sw8LFJEqZyd8rZdWLKNUe8hqA== +"@walletconnect/utils@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.4.tgz#8dbd3beaef39388be2398145a5f9a061a0317518" + integrity sha512-NGw6BINYNeT9JrQrnxldAPheO2ymRrwGrgfExZMyrkb1MShnIX4nzo4KirKInM4LtrY6AA/v0Lu3ooUdfO+xIg== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" - "@stablelib/random" "1.0.2" + "@stablelib/random" "^1.0.2" "@stablelib/sha256" "1.0.1" - "@stablelib/x25519" "1.0.3" - "@walletconnect/relay-api" "1.0.10" - "@walletconnect/safe-json" "1.0.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/window-getters" "1.0.1" - "@walletconnect/window-metadata" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" query-string "7.1.3" - uint8arrays "3.1.0" + uint8arrays "^3.1.0" -"@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": +"@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== dependencies: tslib "1.14.1" -"@walletconnect/window-metadata@1.0.1", "@walletconnect/window-metadata@^1.0.1": +"@walletconnect/window-metadata@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== @@ -6237,7 +6202,7 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@3.3.0, events@^3.3.0: +events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -7993,14 +7958,6 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -isomorphic-unfetch@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" - integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== - dependencies: - node-fetch "^2.6.1" - unfetch "^4.2.0" - isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -8876,13 +8833,6 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" -lit-html@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" - integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== - dependencies: - "@types/trusted-types" "^2.0.2" - lit@2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" @@ -8892,15 +8842,6 @@ lit@2.7.5: lit-element "^3.3.0" lit-html "^2.7.0" -lit@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" - integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== - dependencies: - "@lit/reactive-element" "^1.6.0" - lit-element "^3.3.0" - lit-html "^2.8.0" - loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" @@ -12358,14 +12299,7 @@ ufo@^1.4.0, ufo@^1.5.3: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== -uint8arrays@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" - integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== - dependencies: - multiformats "^9.4.2" - -uint8arrays@^3.0.0: +uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== @@ -12406,11 +12340,6 @@ unenv@^1.9.0: node-fetch-native "^1.6.1" pathe "^1.1.1" -unfetch@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" - integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -12608,14 +12537,6 @@ valtio@1.10.6: proxy-compare "2.5.1" use-sync-external-store "1.2.0" -valtio@1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" - integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== - dependencies: - proxy-compare "2.5.1" - use-sync-external-store "1.2.0" - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -12914,21 +12835,26 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@7.4.6, ws@7.5.10, ws@^7.4.5, ws@^7.5.1: +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + +ws@^7.4.5, ws@^7.5.1: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@8.17.1, ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: +ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" From 5ed9746bb8c8e0b54c9ebe63dbe0b42e10b6aebd Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 9 Jul 2024 13:46:34 +0200 Subject: [PATCH 11/32] teleporter changes for v4 --- .../hooks/__tests__/useArbQueryParams.test.ts | 4 +- .../src/hooks/__tests__/useNetworks.test.ts | 8 +- .../src/hooks/useRedeemTeleporter.ts | 19 +++-- .../src/hooks/useTransactions.ts | 2 +- .../arb-token-bridge-ui/src/pages/index.tsx | 4 +- .../src/state/app/utils.ts | 14 ++-- .../token-bridge-sdk/Erc20DepositStarter.ts | 1 + .../token-bridge-sdk/Erc20TeleportStarter.ts | 4 +- .../token-bridge-sdk/EthTeleportStarter.ts | 4 +- .../src/token-bridge-sdk/teleport.ts | 14 ++-- .../src/token-bridge-sdk/utils.ts | 4 +- .../src/util/TokenDepositUtils.ts | 6 +- .../src/util/TokenUtils.ts | 16 +++- .../src/util/__tests__/networks.test.ts | 34 ++++----- .../src/util/deposits/helpers.ts | 32 ++++---- .../src/util/fetchL2Gateways.ts | 12 ++- .../src/util/orbitChainsList.ts | 76 ++++++++----------- .../fetchTokenWithdrawalsFromEventLogs.ts | 6 +- 18 files changed, 136 insertions(+), 124 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts b/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts index 81f39f8b81..e31ac3dd95 100644 --- a/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts +++ b/packages/arb-token-bridge-ui/src/hooks/__tests__/useArbQueryParams.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { addCustomArbitrumNetwork } from '@arbitrum/sdk' +import { registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { ChainId, customChainLocalStorageKey } from '../../util/networks' import { AmountQueryParam, ChainParam } from '../useArbQueryParams' import { createMockOrbitChain } from './helpers' @@ -224,7 +224,7 @@ describe('ChainParam custom encoder and decoder', () => { chainId: 222222, parentChainId: 1 }) - addCustomArbitrumNetwork(customChain) + registerCustomArbitrumNetwork(customChain) expect(ChainParam.decode('222222')).toEqual(222222) }) }) diff --git a/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts b/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts index e0199b2907..80bf5705ee 100644 --- a/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts +++ b/packages/arb-token-bridge-ui/src/hooks/__tests__/useNetworks.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { addCustomArbitrumNetwork } from '@arbitrum/sdk' +import { registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { ChainId, customChainLocalStorageKey } from '../../util/networks' import { sanitizeQueryParams } from '../useNetworks' import { createMockOrbitChain } from './helpers' @@ -35,9 +35,9 @@ describe('sanitizeQueryParams', () => { return null } ) - addCustomArbitrumNetwork(mockedOrbitChain_1) - addCustomArbitrumNetwork(mockedOrbitChain_2) - addCustomArbitrumNetwork(mockedOrbitChain_3) + registerCustomArbitrumNetwork(mockedOrbitChain_1) + registerCustomArbitrumNetwork(mockedOrbitChain_2) + registerCustomArbitrumNetwork(mockedOrbitChain_3) }) afterAll(() => { diff --git a/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts b/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts index b86104161d..fc9048df29 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts @@ -1,6 +1,9 @@ import { useCallback, useState } from 'react' import { Signer } from 'ethers' -import { L1ToL2MessageStatus, L1ToL2MessageWriter } from '@arbitrum/sdk' +import { + ParentToChildMessageStatus, + ParentToChildMessageWriter +} from '@arbitrum/sdk' import { useSigner } from 'wagmi' import dayjs from 'dayjs' import { TransactionReceipt } from '@ethersproject/providers' @@ -26,12 +29,12 @@ import { UseRedeemRetryableResult } from './useRedeemRetryable' import { getUpdatedTeleportTransfer } from '../components/TransactionHistory/helpers' // common handling for redeeming all 3 retryables for teleporter -const redeemRetryable = async (retryable: L1ToL2MessageWriter) => { +const redeemRetryable = async (retryable: ParentToChildMessageWriter) => { const redeemTx = await retryable.redeem({ gasLimit: 40_000_000 }) // after a few trials, this gas limit seems to be working fine await redeemTx.wait() const status = await retryable.status() - const isSuccess = status === L1ToL2MessageStatus.REDEEMED + const isSuccess = status === ParentToChildMessageStatus.REDEEMED if (!isSuccess) { console.error('Redemption failed; status is not REDEEMED', redeemTx) @@ -40,9 +43,9 @@ const redeemRetryable = async (retryable: L1ToL2MessageWriter) => { ) } - const redeemReceipt = (await retryable.getSuccessfulRedeem()) as { - status: L1ToL2MessageStatus.REDEEMED - l2TxReceipt: TransactionReceipt + const redeemReceipt = (await retryable.getSuccessfulRedeem()) as unknown as { + status: ParentToChildMessageStatus.REDEEMED + txReceipt: TransactionReceipt } return redeemReceipt @@ -129,8 +132,8 @@ const redeemTeleporterSecondLeg = async ({ // update the teleport tx in the UI const l2ToL3MsgData: L2ToL3MessageData = { ...tx.l2ToL3MsgData, - l3TxID: redemptionReceipt.l2TxReceipt.transactionHash, - status: L1ToL2MessageStatus.REDEEMED, + l3TxID: redemptionReceipt.txReceipt.transactionHash, + status: ParentToChildMessageStatus.REDEEMED, retryableCreationTxID: l2L3Retryable.retryableCreationId } const updatedTeleporterTx = await getUpdatedTeleportTransfer({ diff --git a/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts b/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts index 6acda33810..b51ed6069c 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useTransactions.ts @@ -70,7 +70,7 @@ export interface L1ToL2MessageData { } export interface L2ToL3MessageData { - status: L1ToL2MessageStatus + status: ParentToChildMessageStatus retryableCreationTxID?: string l2ForwarderRetryableTxID?: string l3TxID?: string diff --git a/packages/arb-token-bridge-ui/src/pages/index.tsx b/packages/arb-token-bridge-ui/src/pages/index.tsx index 8b07bd96d0..0b7d279b2c 100644 --- a/packages/arb-token-bridge-ui/src/pages/index.tsx +++ b/packages/arb-token-bridge-ui/src/pages/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react' import dynamic from 'next/dynamic' -import { addCustomArbitrumNetwork } from '@arbitrum/sdk' +import { registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { Loader } from '../components/common/atoms/Loader' import { @@ -26,7 +26,7 @@ export default function Index() { ;[...getOrbitChains(), ...getCustomChainsFromLocalStorage()].forEach( chain => { try { - addCustomArbitrumNetwork(chain) + registerCustomArbitrumNetwork(chain) mapCustomChainToNetworkData(chain) } catch (_) { // already added diff --git a/packages/arb-token-bridge-ui/src/state/app/utils.ts b/packages/arb-token-bridge-ui/src/state/app/utils.ts index 0093b45144..654cd2e3b5 100644 --- a/packages/arb-token-bridge-ui/src/state/app/utils.ts +++ b/packages/arb-token-bridge-ui/src/state/app/utils.ts @@ -82,7 +82,7 @@ export const getDepositStatus = (tx: Transaction | MergedTransaction) => { return secondLegDepositStatus } switch (l1ToL2MsgData.status) { - case L1ToL2MessageStatus.REDEEMED: + case ParentToChildMessageStatus.REDEEMED: return DepositStatus.L2_PENDING // tx is still pending if `l1ToL2MsgData` is redeemed (but l2ToL3MsgData is not) default: return getDepositStatusFromL1ToL2MessageStatus(l1ToL2MsgData.status) @@ -113,18 +113,18 @@ export const getDepositStatus = (tx: Transaction | MergedTransaction) => { } function getDepositStatusFromL1ToL2MessageStatus( - status: L1ToL2MessageStatus + status: ParentToChildMessageStatus ): DepositStatus | undefined { switch (status) { - case L1ToL2MessageStatus.NOT_YET_CREATED: + case ParentToChildMessageStatus.NOT_YET_CREATED: return DepositStatus.L2_PENDING - case L1ToL2MessageStatus.CREATION_FAILED: + case ParentToChildMessageStatus.CREATION_FAILED: return DepositStatus.CREATION_FAILED - case L1ToL2MessageStatus.EXPIRED: + case ParentToChildMessageStatus.EXPIRED: return DepositStatus.EXPIRED - case L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2: + case ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN: return DepositStatus.L2_FAILURE - case L1ToL2MessageStatus.REDEEMED: + case ParentToChildMessageStatus.REDEEMED: return DepositStatus.L2_SUCCESS } } diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts index 8b4b8a6db2..2b8f353442 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts @@ -302,6 +302,7 @@ export class Erc20DepositStarter extends BridgeTransferStarter { const sourceChainTransaction = await erc20Bridger.deposit({ ...depositRequest, parentSigner: signer, + childProvider: this.destinationChainProvider, overrides: { gasLimit: percentIncrease(gasLimit, BigNumber.from(5)) } }) diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20TeleportStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20TeleportStarter.ts index af0ed725d5..f4fee31dbb 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20TeleportStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20TeleportStarter.ts @@ -1,4 +1,4 @@ -import { Erc20L1L3Bridger, getL2Network } from '@arbitrum/sdk' +import { Erc20L1L3Bridger, getArbitrumNetwork } from '@arbitrum/sdk' import { ERC20__factory } from '@arbitrum/sdk/dist/lib/abi/factories/ERC20__factory' import { BigNumber, constants } from 'ethers' import { StaticJsonRpcProvider } from '@ethersproject/providers' @@ -34,7 +34,7 @@ export class Erc20TeleportStarter extends BridgeTransferStarter { return this.l1l3Bridger } - const l3Network = await getL2Network(this.destinationChainProvider) + const l3Network = await getArbitrumNetwork(this.destinationChainProvider) this.l1l3Bridger = new Erc20L1L3Bridger(l3Network) return this.l1l3Bridger diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthTeleportStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthTeleportStarter.ts index df7b09e2f2..57cf90756e 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthTeleportStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthTeleportStarter.ts @@ -1,4 +1,4 @@ -import { EthL1L3Bridger, getL2Network } from '@arbitrum/sdk' +import { EthL1L3Bridger, getArbitrumNetwork } from '@arbitrum/sdk' import { BigNumber, constants } from 'ethers' import { StaticJsonRpcProvider } from '@ethersproject/providers' import { @@ -25,7 +25,7 @@ export class EthTeleportStarter extends BridgeTransferStarter { return this.l1l3Bridger } - const l3Network = await getL2Network(this.destinationChainProvider) + const l3Network = await getArbitrumNetwork(this.destinationChainProvider) this.l1l3Bridger = new EthL1L3Bridger(l3Network) return this.l1l3Bridger diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/teleport.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/teleport.ts index f7e775e761..83599b6e6c 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/teleport.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/teleport.ts @@ -1,7 +1,11 @@ // utils for teleport type transactions import { Provider } from '@ethersproject/providers' -import { Erc20L1L3Bridger, EthL1L3Bridger, getL2Network } from '@arbitrum/sdk' +import { + Erc20L1L3Bridger, + EthL1L3Bridger, + getArbitrumNetwork +} from '@arbitrum/sdk' import { L1GatewayRouter__factory } from '@arbitrum/sdk/dist/lib/abi/factories/L1GatewayRouter__factory' import { IInbox__factory } from '@arbitrum/sdk/dist/lib/abi/factories/IInbox__factory' import { IBridge__factory } from '@arbitrum/sdk/dist/lib/abi/factories/IBridge__factory' @@ -25,8 +29,8 @@ export const getL2ConfigForTeleport = async ({ }: { destinationChainProvider: Provider }) => { - const l3Network = await getL2Network(destinationChainProvider) - const l2ChainId = l3Network.partnerChainID + const l3Network = await getArbitrumNetwork(destinationChainProvider) + const l2ChainId = l3Network.parentChainId const l2Provider = getProviderForChainId(l2ChainId) return { l2ChainId, l2Provider } } @@ -46,7 +50,7 @@ export const fetchTeleportStatusFromTxId = async ({ const { l2Provider } = await getL2ConfigForTeleport({ destinationChainProvider }) - const l3Network = await getL2Network(destinationChainProvider) + const l3Network = await getArbitrumNetwork(destinationChainProvider) // just the type of bridger changes in case of Eth vs Erc20 teleport const l1l3Bridger = isNativeCurrencyTransfer @@ -154,7 +158,7 @@ export const fetchTeleportInputParametersFromTxId = async ({ destinationChainProvider: Provider isNativeCurrencyTransfer: boolean }) => { - const l3Network = await getL2Network(destinationChainProvider) + const l3Network = await getArbitrumNetwork(destinationChainProvider) // get Eth deposit request if (isNativeCurrencyTransfer) { diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/utils.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/utils.ts index 1c55eef6bc..480d2cf627 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/utils.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/utils.ts @@ -9,7 +9,7 @@ import { Erc20L1L3Bridger, EthBridger, EthL1L3Bridger, - getL2Network + getArbitrumNetwork } from '@arbitrum/sdk' export const getAddressFromSigner = async (signer: Signer) => { @@ -84,7 +84,7 @@ export const getBridger = async ({ const destinationChainProvider = getProviderForChainId(destinationChainId) if (isTeleportTransfer({ sourceChainId, destinationChainId })) { - const l3Network = await getL2Network(destinationChainId) + const l3Network = await getArbitrumNetwork(destinationChainId) return isNativeCurrencyTransfer ? new EthL1L3Bridger(l3Network) diff --git a/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts index 829e5b7014..5889c84025 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts @@ -1,4 +1,4 @@ -import { Erc20Bridger, getL2Network } from '@arbitrum/sdk' +import { Erc20Bridger, getArbitrumNetwork } from '@arbitrum/sdk' import { Inbox__factory } from '@arbitrum/sdk/dist/lib/abi/factories/Inbox__factory' import { Provider } from '@ethersproject/providers' import { BigNumber } from 'ethers' @@ -207,9 +207,9 @@ async function addressIsCustomGatewayToken({ parentChainProvider, childChainProvider }) - const childChainNetwork = await getL2Network(childChainProvider) + const childChainNetwork = await getArbitrumNetwork(childChainProvider) return ( parentChainGatewayAddress.toLowerCase() === - childChainNetwork.tokenBridge.l1CustomGateway.toLowerCase() + childChainNetwork.tokenBridge?.parentCustomGateway.toLowerCase() ) } diff --git a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts index 675c0c37bc..442d9ce78d 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts @@ -311,6 +311,12 @@ export async function getL3ERC20Address({ ) } +function isErc20Bridger( + bridger: Erc20Bridger | Erc20L1L3Bridger +): bridger is Erc20Bridger { + return typeof (bridger as Erc20Bridger).isDepositDisabled !== 'undefined' +} + /* Retrieves data about whether an ERC-20 token is disabled on the router. */ @@ -336,7 +342,9 @@ export async function l1TokenIsDisabled({ return false } - return erc20Bridger.l1TokenIsDisabled(erc20L1Address, l1Provider) + return isErc20Bridger(erc20Bridger) + ? erc20Bridger.isDepositDisabled(erc20L1Address, l1Provider) + : erc20Bridger.l1TokenIsDisabled(erc20L1Address, l1Provider) } type SanitizeTokenOptions = { @@ -475,8 +483,8 @@ export async function isGatewayRegistered({ const erc20Bridger = await Erc20Bridger.fromProvider(childChainProvider) return erc20Bridger.isRegistered({ - erc20L1Address: erc20ParentChainAddress, - l1Provider: parentChainProvider, - l2Provider: childChainProvider + erc20ParentAddress: erc20ParentChainAddress, + parentProvider: parentChainProvider, + childProvider: childChainProvider }) } diff --git a/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts b/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts index 91087bc918..aecc39bec1 100644 --- a/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts +++ b/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts @@ -1,4 +1,4 @@ -import { addCustomArbitrumNetwork } from '@arbitrum/sdk' +import { registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { ChainId, @@ -17,7 +17,7 @@ beforeAll(() => { } // add local - addCustomArbitrumNetwork({ + registerCustomArbitrumNetwork({ chainId: 412346, confirmPeriodBlocks: 20, ethBridge: { @@ -32,24 +32,24 @@ beforeAll(() => { parentChainId: 1337, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0x75E0E92A79880Bd81A69F72983D03c75e2B33dC8', - l1ERC20Gateway: '0x4Af567288e68caD4aA93A272fe6139Ca53859C70', - l1GatewayRouter: '0x85D9a8a4bd77b9b5559c1B7FCb8eC9635922Ed49', - l1MultiCall: '0xA39FFA43ebA037D67a0f4fe91956038ABA0CA386', - l1ProxyAdmin: '0x7E32b54800705876d3b5cFbc7d9c226a211F7C1a', - l1Weth: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', - l1WethGateway: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', - l2CustomGateway: '0x525c2aBA45F66987217323E8a05EA400C65D06DC', - l2ERC20Gateway: '0xe1080224B632A93951A7CFA33EeEa9Fd81558b5e', - l2GatewayRouter: '0x1294b86822ff4976BfE136cB06CF43eC7FCF2574', - l2Multicall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', - l2ProxyAdmin: '0xda52b25ddB0e3B9CC393b0690Ac62245Ac772527', - l2Weth: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', - l2WethGateway: '0x4A2bA922052bA54e29c5417bC979Daaf7D5Fe4f4' + parentCustomGateway: '0x75E0E92A79880Bd81A69F72983D03c75e2B33dC8', + parentErc20Gateway: '0x4Af567288e68caD4aA93A272fe6139Ca53859C70', + parentGatewayRouter: '0x85D9a8a4bd77b9b5559c1B7FCb8eC9635922Ed49', + parentMultiCall: '0xA39FFA43ebA037D67a0f4fe91956038ABA0CA386', + parentProxyAdmin: '0x7E32b54800705876d3b5cFbc7d9c226a211F7C1a', + parentWeth: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', + parentWethGateway: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', + childCustomGateway: '0x525c2aBA45F66987217323E8a05EA400C65D06DC', + childErc20Gateway: '0xe1080224B632A93951A7CFA33EeEa9Fd81558b5e', + childGatewayRouter: '0x1294b86822ff4976BfE136cB06CF43eC7FCF2574', + childMulticall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', + childProxyAdmin: '0xda52b25ddB0e3B9CC393b0690Ac62245Ac772527', + childWeth: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', + childWethGateway: '0x4A2bA922052bA54e29c5417bC979Daaf7D5Fe4f4' } }) - addCustomArbitrumNetwork(xaiTestnet) + registerCustomArbitrumNetwork(xaiTestnet) }) describe('getBaseChainIdByChainId', () => { diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index ab6d1b8330..3bf7448fe5 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -1,7 +1,7 @@ import { ParentTransactionReceipt, ParentToChildMessageStatus, - EthDepositStatus, + EthDepositMessageStatus, ParentToChildMessageReader, ParentToChildMessageReaderClassic } from '@arbitrum/sdk' @@ -135,9 +135,9 @@ const updateETHDepositStatusData = async ({ if (!ethDepositMessage) return depositTx const status = await ethDepositMessage.status() - const isDeposited = status === EthDepositStatus.DEPOSITED + const isDeposited = status === EthDepositMessageStatus.DEPOSITED - const retryableCreationTxID = ethDepositMessage.chainDepositTxHash + const retryableCreationTxID = ethDepositMessage.childDepositTxHash const l2BlockNum = isDeposited ? (await l2Provider.getTransaction(retryableCreationTxID)).blockNumber @@ -161,7 +161,7 @@ const updateETHDepositStatusData = async ({ : ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID, // Only show `l2TxID` after the deposit is confirmed - l2TxID: isDeposited ? ethDepositMessage.chainDepositTxHash : undefined, + l2TxID: isDeposited ? ethDepositMessage.childDepositTxHash : undefined, fetchingUpdate: false } } @@ -204,7 +204,7 @@ const updateTokenDepositStatusData = async ({ const l2TxID = res.status === ParentToChildMessageStatus.REDEEMED - ? res.chainTxReceipt.transactionHash + ? res.txReceipt.transactionHash : undefined const l1ToL2MsgData = { @@ -269,7 +269,7 @@ const updateClassicDepositStatusData = async ({ } if (status === ParentToChildMessageStatus.REDEEMED) { - return l1ToL2Msg.chainTxHash + return l1ToL2Msg.childTxHash } return undefined @@ -354,7 +354,7 @@ export async function fetchTeleporterDepositStatusData({ isNativeCurrencyTransfer }) const l2ToL3MsgData: L2ToL3MessageData = { - status: L1ToL2MessageStatus.NOT_YET_CREATED, + status: ParentToChildMessageStatus.NOT_YET_CREATED, l2ChainId } const l2Retryable = isEthTeleport(depositStatus) @@ -372,8 +372,8 @@ export async function fetchTeleporterDepositStatusData({ const l1ToL2MsgData: L1ToL2MessageData = { status: await l2Retryable.status(), l2TxID: - l1l2Redeem && l1l2Redeem.status === L1ToL2MessageStatus.REDEEMED - ? l1l2Redeem.l2TxReceipt.transactionHash + l1l2Redeem && l1l2Redeem.status === ParentToChildMessageStatus.REDEEMED + ? l1l2Redeem.txReceipt.transactionHash : undefined, fetchingUpdate: false, retryableCreationTxID: l2Retryable.retryableCreationId @@ -385,7 +385,7 @@ export async function fetchTeleporterDepositStatusData({ !depositStatus.completed && l2ForwarderFactoryRetryable && (await l2ForwarderFactoryRetryable.status()) === - L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2 + ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN ) { return { status: l2Retryable ? 'success' : 'failure', @@ -393,7 +393,7 @@ export async function fetchTeleporterDepositStatusData({ l1ToL2MsgData, l2ToL3MsgData: { ...l2ToL3MsgData, - status: L1ToL2MessageStatus.FUNDS_DEPOSITED_ON_L2, + status: ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN, l2ForwarderRetryableTxID: l2ForwarderFactoryRetryable.retryableCreationId } @@ -402,8 +402,8 @@ export async function fetchTeleporterDepositStatusData({ // extract the l3 transaction details, if any const l2L3Redeem = await l3Retryable.getSuccessfulRedeem() const l3TxID = - l2L3Redeem && l2L3Redeem.status === L1ToL2MessageStatus.REDEEMED - ? l2L3Redeem.l2TxReceipt.transactionHash + l2L3Redeem && l2L3Redeem.status === ParentToChildMessageStatus.REDEEMED + ? l2L3Redeem.txReceipt.transactionHash : undefined const timestampResolved = await getTimestampResolved( destinationChainProvider, @@ -415,13 +415,13 @@ export async function fetchTeleporterDepositStatusData({ if (l2ForwarderFactoryRetryable) { const l2ForwarderRedeem = await l2ForwarderFactoryRetryable.getSuccessfulRedeem() - if (l2ForwarderRedeem.status === L1ToL2MessageStatus.REDEEMED) { + if (l2ForwarderRedeem.status === ParentToChildMessageStatus.REDEEMED) { return { status: l2Retryable ? 'success' : 'failure', timestampResolved, l1ToL2MsgData: { ...l1ToL2MsgData, - l2TxID: l2ForwarderRedeem.l2TxReceipt.transactionHash + l2TxID: l2ForwarderRedeem.txReceipt.transactionHash }, l2ToL3MsgData: { ...l2ToL3MsgData, @@ -458,7 +458,7 @@ export async function fetchTeleporterDepositStatusData({ return { status: 'pending', l2ToL3MsgData: { - status: L1ToL2MessageStatus.NOT_YET_CREATED, + status: ParentToChildMessageStatus.NOT_YET_CREATED, l2ChainId } } diff --git a/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts b/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts index e648245df1..64c9407b21 100644 --- a/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts +++ b/packages/arb-token-bridge-ui/src/util/fetchL2Gateways.ts @@ -17,10 +17,18 @@ import { export async function fetchL2Gateways(l2Provider: Provider) { const l2Network = await getArbitrumNetwork(l2Provider) + if (!l2Network.tokenBridge) { + return [] + } + /* configure gateway addresses for fetching withdrawals */ - const { l2ERC20Gateway, l2CustomGateway, l2WethGateway } = + const { childErc20Gateway, childCustomGateway, childWethGateway } = l2Network.tokenBridge - const gatewaysToUse = [l2ERC20Gateway, l2CustomGateway, l2WethGateway] + const gatewaysToUse = [ + childErc20Gateway, + childCustomGateway, + childWethGateway + ] const l2ArbReverseGateway = l2ArbReverseGatewayAddresses[l2Network.chainId] const l2DaiGateway = l2DaiGatewayAddresses[l2Network.chainId] const l2wstETHGateway = l2wstETHGatewayAddresses[l2Network.chainId] diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index 04492f879c..7d49f16f93 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -340,7 +340,7 @@ export const orbitMainnets: { } }, 1996: { - chainID: 1996, + chainId: 1996, confirmPeriodBlocks: 20, ethBridge: { bridge: '0x2f285781B8d58678a3483de52D618198E4d27532', @@ -352,33 +352,27 @@ export const orbitMainnets: { nativeToken: '0x8B0E6f19Ee57089F7649A455D89D7bC6314D04e8', explorerUrl: 'https://explorer.sanko.xyz', rpcUrl: 'https://mainnet.sanko.xyz', - isArbitrum: true, isCustom: true, name: 'Sanko', slug: 'sanko', - partnerChainID: 42161, - partnerChainIDs: [], + parentChainId: 42161, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0x5414Dc7c8DB4BeDbf3c772768aE1F5e984bdf47a', - l1ERC20Gateway: '0xb4951c0C41CFceB0D195A95FE66280457A80a990', - l1GatewayRouter: '0x847186fbeEBf41eEe9c230360D0bF8585c0Db57B', - l1MultiCall: '0x909b042B88F587d745dBF52e2569545376f6eAA4', - l1ProxyAdmin: '0xd18b1C6376633000c85541F7c15c591Ffe5f9556', - l1Weth: '0x0000000000000000000000000000000000000000', - l1WethGateway: '0x0000000000000000000000000000000000000000', - l2CustomGateway: '0x5dd84FB52A27B9D5b760b0373fDeda52D10d3c4a', - l2ERC20Gateway: '0xAf574BbE2139e39F560C4db1A118E1245aC0983d', - l2GatewayRouter: '0x505421b85ae7F906e8807bf59ee3Da62e894CDC3', - l2Multicall: '0x446696a44B13D7B03dBEe837610692d2A71D6232', - l2ProxyAdmin: '0xa2A055fa56b7B4d36F0320c5c65562854873e5B2', - l2Weth: '0x0000000000000000000000000000000000000000', - l2WethGateway: '0x0000000000000000000000000000000000000000' + parentCustomGateway: '0x5414Dc7c8DB4BeDbf3c772768aE1F5e984bdf47a', + parentErc20Gateway: '0xb4951c0C41CFceB0D195A95FE66280457A80a990', + parentGatewayRouter: '0x847186fbeEBf41eEe9c230360D0bF8585c0Db57B', + parentMultiCall: '0x909b042B88F587d745dBF52e2569545376f6eAA4', + parentProxyAdmin: '0xd18b1C6376633000c85541F7c15c591Ffe5f9556', + parentWeth: '0x0000000000000000000000000000000000000000', + parentWethGateway: '0x0000000000000000000000000000000000000000', + childCustomGateway: '0x5dd84FB52A27B9D5b760b0373fDeda52D10d3c4a', + childErc20Gateway: '0xAf574BbE2139e39F560C4db1A118E1245aC0983d', + childGatewayRouter: '0x505421b85ae7F906e8807bf59ee3Da62e894CDC3', + childMulticall: '0x446696a44B13D7B03dBEe837610692d2A71D6232', + childProxyAdmin: '0xa2A055fa56b7B4d36F0320c5c65562854873e5B2', + childWeth: '0x0000000000000000000000000000000000000000', + childWethGateway: '0x0000000000000000000000000000000000000000' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#0367FF', network: { @@ -583,7 +577,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { } }, 1183: { - chainID: 1183, + chainId: 1183, confirmPeriodBlocks: 150, ethBridge: { bridge: '0xCAeCF7c5c2769e250Ef69592dD470D40BC61D1f7', @@ -595,33 +589,27 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { nativeToken: '0x566f8345F7bF45358FaB2802C19c60D691dE04e4', explorerUrl: 'https://testnet.theatlas.tech', rpcUrl: 'https://theatlas.tech', - isArbitrum: true, isCustom: true, name: 'Atlas Testnet', slug: 'atlas-testnet', - partnerChainID: 421614, - partnerChainIDs: [], + parentChainId: 421614, retryableLifetimeSeconds: 604800, tokenBridge: { - l1CustomGateway: '0xE5A8943e36f93491f97A521447772fCF529533B5', - l1ERC20Gateway: '0xBc89C0A2CCA8A0e1583AA6d4e22B36E26661C78E', - l1GatewayRouter: '0xc93fDF8327e04776fd184188bB4EC8521E5E96D7', - l1MultiCall: '0xce1CAd780c529e66e3aa6D952a1ED9A6447791c1', - l1ProxyAdmin: '0x0000000000000000000000000000000000000000', - l1Weth: '0x0000000000000000000000000000000000000000', - l1WethGateway: '0x0000000000000000000000000000000000000000', - l2CustomGateway: '0x2c2Be954C9B79d9cA2CF145d9d6363F3c3784615', - l2ERC20Gateway: '0xDfCD9f6154BEA2E98e8aE493f3Fec2E22De52D6a', - l2GatewayRouter: '0xBc63Ec54dA9Ee3B2b3D4cA5DE3622a3F85e0F219', - l2Multicall: '0x54AFaf5Fd025A99708e73e52c317454bD52B1e77', - l2ProxyAdmin: '0xE1C9a27C47bb9691bA5b4E35eb7617B39F6098B9', - l2Weth: '0x0000000000000000000000000000000000000000', - l2WethGateway: '0x0000000000000000000000000000000000000000' + parentCustomGateway: '0xE5A8943e36f93491f97A521447772fCF529533B5', + parentErc20Gateway: '0xBc89C0A2CCA8A0e1583AA6d4e22B36E26661C78E', + parentGatewayRouter: '0xc93fDF8327e04776fd184188bB4EC8521E5E96D7', + parentMultiCall: '0xce1CAd780c529e66e3aa6D952a1ED9A6447791c1', + parentProxyAdmin: '0x0000000000000000000000000000000000000000', + parentWeth: '0x0000000000000000000000000000000000000000', + parentWethGateway: '0x0000000000000000000000000000000000000000', + childCustomGateway: '0x2c2Be954C9B79d9cA2CF145d9d6363F3c3784615', + childErc20Gateway: '0xDfCD9f6154BEA2E98e8aE493f3Fec2E22De52D6a', + childGatewayRouter: '0xBc63Ec54dA9Ee3B2b3D4cA5DE3622a3F85e0F219', + childMulticall: '0x54AFaf5Fd025A99708e73e52c317454bD52B1e77', + childProxyAdmin: '0xE1C9a27C47bb9691bA5b4E35eb7617B39F6098B9', + childWeth: '0x0000000000000000000000000000000000000000', + childWethGateway: '0x0000000000000000000000000000000000000000' }, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 1800000, - blockTime: constants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, bridgeUiConfig: { color: '#889B6F', network: { diff --git a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts index 0831ed38e2..a64398e5a3 100644 --- a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts +++ b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts @@ -38,13 +38,13 @@ export async function fetchTokenWithdrawalsFromEventLogs({ l2GatewayAddresses?: string[] }) { const erc20Bridger = await Erc20Bridger.fromProvider(l2Provider) - const promises: ReturnType[] = [] + const promises: ReturnType[] = [] l2GatewayAddresses.forEach(gatewayAddress => { // funds sent by this address if (sender) { promises.push( - erc20Bridger.getL2WithdrawalEvents( + erc20Bridger.getWithdrawalEvents( l2Provider, gatewayAddress, { fromBlock, toBlock }, @@ -58,7 +58,7 @@ export async function fetchTokenWithdrawalsFromEventLogs({ // funds received by this address if (receiver) { promises.push( - erc20Bridger.getL2WithdrawalEvents( + erc20Bridger.getWithdrawalEvents( l2Provider, gatewayAddress, { fromBlock, toBlock }, From 42073969de8beb6863ab1321aba3a82351adc183 Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 9 Jul 2024 13:49:46 +0200 Subject: [PATCH 12/32] merge --- yarn.lock | 330 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 202 insertions(+), 128 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4cb2f3f6a6..1422adf857 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,7 +39,7 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@4.0.0-alpha.6": +"@arbitrum/sdk@^4.0.0-alpha.6": version "4.0.0-alpha.6" resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.6.tgz#7999240904fb0a2847873faa203bcd3b02f709a2" integrity sha512-o8fpj0pHNNGMM5VLohRK92km/YPGBXtSwgb312qgEtic4Tb6ga90fHlA8UOdkGSDeqy4JIFKOlH3y+gqIW+Vkw== @@ -1910,7 +1910,7 @@ "@stablelib/constant-time" "^1.0.1" "@stablelib/wipe" "^1.0.1" -"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": +"@stablelib/random@1.0.2", "@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== @@ -1941,7 +1941,7 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@^1.0.3": +"@stablelib/x25519@1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== @@ -2763,27 +2763,28 @@ eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.4.tgz#fc207c8fa35a53e30012b0c85b6ca933cec7d955" - integrity sha512-3CQHud4As0kPRvlW1w/wSWS2F3yXlAo5kSEJyRWLRPqXG+aSCVWM8cVM8ch5yoeyNIfOHhEINdsYMuJG1+yIJQ== +"@walletconnect/core@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.1.tgz#a59646e39a5beaa3f3551d129af43cd404cf4faf" + integrity sha512-h0MSYKJu9i1VEs5koCTT7c5YeQ1Kj0ncTFiMqANbDnB1r3mBulXn+FKtZ2fCmf1j7KDpgluuUzpSs+sQfPcv4Q== dependencies: - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-provider" "1.0.13" - "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "^1.0.11" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/relay-api" "^1.0.9" - "@walletconnect/relay-auth" "^1.0.4" - "@walletconnect/safe-json" "^1.0.2" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + "@walletconnect/relay-api" "1.0.10" + "@walletconnect/relay-auth" "1.0.4" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" + isomorphic-unfetch "3.1.0" lodash.isequal "4.5.0" - uint8arrays "^3.1.0" + uint8arrays "3.1.0" "@walletconnect/crypto@^1.0.3": version "1.0.3" @@ -2813,22 +2814,23 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.4.tgz#c627c237b479194efc542b8475596bae12fde52d" - integrity sha512-z7Yz4w8t3eEFv8vQ8DLCgDWPah2aIIyC0iQdwhXgJenQTVuz7JJZRrJUUntzudipHK/owA394c1qTPF0rsMSeQ== +"@walletconnect/ethereum-provider@2.13.1", "@walletconnect/ethereum-provider@2.8.4": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.1.tgz#a9bdb8f9da303088b7b724fa98f4b5ca0d46a36d" + integrity sha512-bHJVqb++GrrMGlapsbSvvIyBlwulMGZEx6N5xwAl6ImPVzbDN0g0XmibNkjzJXVsi/+/d0R/HmKS1WyJQSNx3w== dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.7" - "@walletconnect/jsonrpc-provider" "^1.0.13" - "@walletconnect/jsonrpc-types" "^1.0.3" - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/sign-client" "2.8.4" - "@walletconnect/types" "2.8.4" - "@walletconnect/universal-provider" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" - -"@walletconnect/events@^1.0.1": + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/modal" "2.6.2" + "@walletconnect/sign-client" "2.13.1" + "@walletconnect/types" "2.13.1" + "@walletconnect/universal-provider" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" + +"@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== @@ -2836,14 +2838,24 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/heartbeat@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" - integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== +"@walletconnect/heartbeat@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz#e8dc5179db7769950c6f9cf59b23516d9b95227d" + integrity sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/time" "^1.0.2" - tslib "1.14.1" + events "^3.3.0" + +"@walletconnect/jsonrpc-http-connection@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" + integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" + events "^3.3.0" "@walletconnect/jsonrpc-http-connection@^1.0.4": version "1.0.7" @@ -2855,17 +2867,16 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-http-connection@^1.0.7": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" - integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== +"@walletconnect/jsonrpc-provider@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" + integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.6" - "@walletconnect/safe-json" "^1.0.1" - cross-fetch "^3.1.4" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" -"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -2874,16 +2885,15 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@^1.0.13": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" - integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== +"@walletconnect/jsonrpc-types@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" + integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" + keyvaluestorage-interface "^1.0.0" -"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": +"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== @@ -2891,7 +2901,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -2900,7 +2910,7 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@^1.0.11": +"@walletconnect/jsonrpc-ws-connection@1.0.14": version "1.0.14" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== @@ -2910,7 +2920,7 @@ events "^3.3.0" ws "^7.5.1" -"@walletconnect/keyvaluestorage@^1.0.2": +"@walletconnect/keyvaluestorage@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== @@ -2979,7 +2989,7 @@ detect-browser "^5.3.0" query-string "^6.13.5" -"@walletconnect/logger@^2.0.1": +"@walletconnect/logger@2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== @@ -2995,6 +3005,13 @@ buffer "6.0.3" valtio "1.10.6" +"@walletconnect/modal-core@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" + integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== + dependencies: + valtio "1.11.2" + "@walletconnect/modal-ui@2.5.5": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.5.5.tgz#f2ab96ab72f0f1325252224560ec610b73d1684c" @@ -3005,6 +3022,24 @@ motion "10.16.2" qrcode "1.5.3" +"@walletconnect/modal-ui@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" + integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== + dependencies: + "@walletconnect/modal-core" "2.6.2" + lit "2.8.0" + motion "10.16.2" + qrcode "1.5.3" + +"@walletconnect/modal@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" + integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== + dependencies: + "@walletconnect/modal-core" "2.6.2" + "@walletconnect/modal-ui" "2.6.2" + "@walletconnect/modal@^2.5.4": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.5.5.tgz#703eb076af4442dcd14a3b0b87863f17283f6514" @@ -3023,14 +3058,14 @@ randombytes "^2.1.0" tslib "1.14.1" -"@walletconnect/relay-api@^1.0.9": +"@walletconnect/relay-api@1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== dependencies: "@walletconnect/jsonrpc-types" "^1.0.2" -"@walletconnect/relay-auth@^1.0.4": +"@walletconnect/relay-auth@1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== @@ -3042,90 +3077,90 @@ tslib "1.14.1" uint8arrays "^3.0.0" -"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": +"@walletconnect/safe-json@1.0.2", "@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.4.tgz#35e7cfe9442c65d7f667a7c20f1a5ee7e2a6e576" - integrity sha512-eRvWtKBAgzo/rbIkw+rkKco2ulSW8Wor/58UsOBsl9DKr1rIazZd4ZcUdaTjg9q8AT1476IQakCAIuv+1FvJwQ== +"@walletconnect/sign-client@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.1.tgz#7bdc9226218fd33caf3aef69dff0b4140abc7fa8" + integrity sha512-e+dcqcLsedB4ZjnePFM5Cy8oxu0dyz5iZfhfKH/MOrQV/hyhZ+hJwh4MmkO2QyEu2PERKs9o2Uc6x8RZdi0UAQ== dependencies: - "@walletconnect/core" "2.8.4" - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/core" "2.13.1" + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" + "@walletconnect/logger" "2.1.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" -"@walletconnect/time@^1.0.2": +"@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== dependencies: tslib "1.14.1" -"@walletconnect/types@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.4.tgz#23fad8593b094c7564d72f179e33b1cac9324a88" - integrity sha512-Fgqe87R7rjMOGSvx28YPLTtXM6jj+oUOorx8cE+jEw2PfpWp5myF21aCdaMBR39h0QHij5H1Z0/W9e7gm4oC1Q== +"@walletconnect/types@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.1.tgz#393e3bd4d60a755f3a70cbe769b58cf153450310" + integrity sha512-CIrdt66d38xdunGCy5peOOP17EQkCEGKweXc3+Gn/RWeSiRU35I7wjC/Bp4iWcgAQ6iBTZv4jGGST5XyrOp+Pg== dependencies: - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-types" "1.0.3" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - events "^3.3.0" + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + events "3.3.0" -"@walletconnect/universal-provider@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.4.tgz#7b62a76a7d99ea41c67374da54aaa4f1b4bc1d03" - integrity sha512-JRpOXKIciRMzd03zZxM1WDsYHo/ZS86zZrZ1aCHW1d45ZLP7SbGPRHzZgBY3xrST26yTvWIlRfTUEYn50fzB1g== +"@walletconnect/universal-provider@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.13.1.tgz#e007c4963ca73fea7c29dc3ca4ca57e2607daafc" + integrity sha512-A/6WysrvzXWtYD933PKjJlj7PGtOWdkwKeRDiD6JEVk5fQ+DQ1x0p5qcUhaa57r3S0p559YvRNvHFFjx+PpMqA== dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.7" - "@walletconnect/jsonrpc-provider" "1.0.13" - "@walletconnect/jsonrpc-types" "^1.0.2" - "@walletconnect/jsonrpc-utils" "^1.0.7" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/sign-client" "2.8.4" - "@walletconnect/types" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "2.1.2" + "@walletconnect/sign-client" "2.13.1" + "@walletconnect/types" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" -"@walletconnect/utils@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.4.tgz#8dbd3beaef39388be2398145a5f9a061a0317518" - integrity sha512-NGw6BINYNeT9JrQrnxldAPheO2ymRrwGrgfExZMyrkb1MShnIX4nzo4KirKInM4LtrY6AA/v0Lu3ooUdfO+xIg== +"@walletconnect/utils@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.1.tgz#f44e81028754c6e056dba588ad9b9fa5ad047645" + integrity sha512-EcooXXlqy5hk9hy/nK2wBF/qxe7HjH0K8ZHzjKkXRkwAE5pCvy0IGXIXWmUR9sw8LFJEqZyd8rZdWLKNUe8hqA== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" - "@stablelib/random" "^1.0.2" + "@stablelib/random" "1.0.2" "@stablelib/sha256" "1.0.1" - "@stablelib/x25519" "^1.0.3" - "@walletconnect/relay-api" "^1.0.9" - "@walletconnect/safe-json" "^1.0.2" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.4" - "@walletconnect/window-getters" "^1.0.1" - "@walletconnect/window-metadata" "^1.0.1" + "@stablelib/x25519" "1.0.3" + "@walletconnect/relay-api" "1.0.10" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.1" + "@walletconnect/window-getters" "1.0.1" + "@walletconnect/window-metadata" "1.0.1" detect-browser "5.3.0" query-string "7.1.3" - uint8arrays "^3.1.0" + uint8arrays "3.1.0" -"@walletconnect/window-getters@^1.0.1": +"@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== dependencies: tslib "1.14.1" -"@walletconnect/window-metadata@^1.0.1": +"@walletconnect/window-metadata@1.0.1", "@walletconnect/window-metadata@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== @@ -6202,7 +6237,7 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^3.3.0: +events@3.3.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -7958,6 +7993,14 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-unfetch@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -8833,6 +8876,13 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" +lit-html@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" + integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== + dependencies: + "@types/trusted-types" "^2.0.2" + lit@2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" @@ -8842,6 +8892,15 @@ lit@2.7.5: lit-element "^3.3.0" lit-html "^2.7.0" +lit@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" + integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== + dependencies: + "@lit/reactive-element" "^1.6.0" + lit-element "^3.3.0" + lit-html "^2.8.0" + loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" @@ -12299,7 +12358,14 @@ ufo@^1.4.0, ufo@^1.5.3: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== -uint8arrays@^3.0.0, uint8arrays@^3.1.0: +uint8arrays@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" + integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== + dependencies: + multiformats "^9.4.2" + +uint8arrays@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== @@ -12340,6 +12406,11 @@ unenv@^1.9.0: node-fetch-native "^1.6.1" pathe "^1.1.1" +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -12537,6 +12608,14 @@ valtio@1.10.6: proxy-compare "2.5.1" use-sync-external-store "1.2.0" +valtio@1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" + integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== + dependencies: + proxy-compare "2.5.1" + use-sync-external-store "1.2.0" + vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -12835,26 +12914,21 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@7.4.6: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - -ws@^7.4.5, ws@^7.5.1: +ws@7.4.6, ws@7.5.10, ws@^7.4.5, ws@^7.5.1: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: +ws@8.17.1, ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" From 2b130959c5636443d6d506e7f0d80862bbb48a06 Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 9 Jul 2024 16:38:17 +0200 Subject: [PATCH 13/32] fixes and logs --- .../scripts/generateDenylist.ts | 15 ++++++++------- packages/arb-token-bridge-ui/src/util/networks.ts | 5 ++++- .../src/util/orbitChainsList.ts | 5 ++--- packages/arb-token-bridge-ui/synpress.config.ts | 10 ++++++++++ 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/packages/arb-token-bridge-ui/scripts/generateDenylist.ts b/packages/arb-token-bridge-ui/scripts/generateDenylist.ts index 4221017b9b..dcd4a20530 100644 --- a/packages/arb-token-bridge-ui/scripts/generateDenylist.ts +++ b/packages/arb-token-bridge-ui/scripts/generateDenylist.ts @@ -1,7 +1,7 @@ import fs from 'fs' import axios from 'axios' import { TokenList } from '@uniswap/token-lists' -import { l2Networks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' +import { networks as arbitrumNetworks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' const tokenListsUrls = [ 'https://tokenlist.arbitrum.io/ArbTokenLists/arbitrum_token_token_list.json', @@ -123,8 +123,8 @@ async function main() { ...allTokenAddresses ] - Object.keys(l2Networks).map(chainId => { - const networkObject = l2Networks[chainId] + Object.keys(arbitrumNetworks).map(chainId => { + const networkObject = arbitrumNetworks[chainId] const { ethBridge, tokenBridge } = networkObject const { classicOutboxes } = ethBridge @@ -134,10 +134,11 @@ async function main() { } delete ethBridge.classicOutboxes - denylistedAddresses.push( - ...Object.values(ethBridge), - ...Object.values(tokenBridge) - ) + denylistedAddresses.push(...Object.values(ethBridge)) + + if (tokenBridge) { + denylistedAddresses.push(...Object.values(tokenBridge)) + } }) const resultJson = diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index f7b44ce923..bf6cab5f1f 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -24,7 +24,6 @@ export enum ChainId { ArbitrumSepolia = 421614, ArbitrumLocal = 412346, // Orbit - StylusTestnet = 23011913, StylusTestnetV2 = 13331371 } @@ -63,6 +62,10 @@ export const getChains = () => { if (isL1Chain(chain) && getChildrenForNetwork(chain.chainId).length === 0) { return false } + // TODO: REMOVE! + if (chain.chainId === 23011913) { + return false + } return true }) } diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index 7d49f16f93..75e0a9d220 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -1,7 +1,6 @@ -import { constants } from '@arbitrum/sdk' -import { l2Networks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' import { NativeCurrencyBase } from '../hooks/useNativeCurrency' import { ChainWithRpcUrl } from './networks' +import { networks as arbitrumNetworks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' export type NetworkType = | 'Ethereum' @@ -647,7 +646,7 @@ export function getOrbitChains( export function getInboxAddressFromOrbitChainId(chainId: number) { return ( - l2Networks[chainId]?.ethBridge.inbox ?? // for stylus testnet v2 + arbitrumNetworks[chainId]?.ethBridge.inbox ?? // for stylus testnet v2 getOrbitChains().find(chain => chain.chainId === chainId)?.ethBridge.inbox // for other custom orbit chains ) } diff --git a/packages/arb-token-bridge-ui/synpress.config.ts b/packages/arb-token-bridge-ui/synpress.config.ts index e8713c9667..c87d2383e6 100644 --- a/packages/arb-token-bridge-ui/synpress.config.ts +++ b/packages/arb-token-bridge-ui/synpress.config.ts @@ -182,6 +182,16 @@ async function deployERC20ToL1() { async function deployERC20ToL2(erc20L1Address: string) { console.log('Deploying ERC20 to L2...') const bridger = await Erc20Bridger.fromProvider(arbProvider) + + const parentStandardGatewayAddressFromChainConfig = + bridger.childChain.tokenBridge.parentErc20Gateway + + const parentGatewayAddressFromParentGatewayRouter = + await bridger.getParentGatewayAddress(erc20L1Address, ethProvider) + + console.log({ parentStandardGatewayAddressFromChainConfig }) + console.log({ parentGatewayAddressFromParentGatewayRouter }) + const deploy = await bridger.deposit({ amount: BigNumber.from(0), erc20ParentAddress: erc20L1Address, From 9fa4b5912b16d93254343bd4114034e530566493 Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 9 Jul 2024 19:06:44 +0200 Subject: [PATCH 14/32] changes --- packages/arb-token-bridge-ui/package.json | 2 +- .../scripts/generateDenylist.ts | 8 ++--- .../components/TransactionHistory/helpers.ts | 2 +- .../src/components/common/AddCustomChain.tsx | 2 +- .../src/state/app/utils.ts | 4 +-- .../src/util/RetryableUtils.ts | 4 +-- .../src/util/TokenUtils.ts | 2 +- .../src/util/deposits/helpers.ts | 8 ++--- .../arb-token-bridge-ui/src/util/networks.ts | 18 ++++++---- .../src/util/orbitChainsList.ts | 33 ++++++++++--------- yarn.lock | 8 ++--- 11 files changed, 49 insertions(+), 42 deletions(-) diff --git a/packages/arb-token-bridge-ui/package.json b/packages/arb-token-bridge-ui/package.json index f37de5bbde..1b3130531e 100644 --- a/packages/arb-token-bridge-ui/package.json +++ b/packages/arb-token-bridge-ui/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@apollo/client": "^3.7.11", - "@arbitrum/sdk": "^4.0.0-alpha.6", + "@arbitrum/sdk": "^4.0.0-alpha.7", "@ethersproject/providers": "^5.7.0", "@headlessui/react": "^1.7.8", "@headlessui/tailwindcss": "^0.1.2", diff --git a/packages/arb-token-bridge-ui/scripts/generateDenylist.ts b/packages/arb-token-bridge-ui/scripts/generateDenylist.ts index dcd4a20530..22ae50fcdb 100644 --- a/packages/arb-token-bridge-ui/scripts/generateDenylist.ts +++ b/packages/arb-token-bridge-ui/scripts/generateDenylist.ts @@ -1,7 +1,7 @@ import fs from 'fs' import axios from 'axios' import { TokenList } from '@uniswap/token-lists' -import { networks as arbitrumNetworks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' +import { getArbitrumNetworks } from '@arbitrum/sdk' const tokenListsUrls = [ 'https://tokenlist.arbitrum.io/ArbTokenLists/arbitrum_token_token_list.json', @@ -123,10 +123,8 @@ async function main() { ...allTokenAddresses ] - Object.keys(arbitrumNetworks).map(chainId => { - const networkObject = arbitrumNetworks[chainId] - - const { ethBridge, tokenBridge } = networkObject + getArbitrumNetworks().map(arbitrumNetwork => { + const { ethBridge, tokenBridge } = arbitrumNetwork const { classicOutboxes } = ethBridge if (classicOutboxes) { diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index d14cfbcb6b..de702b8006 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -300,7 +300,7 @@ export async function getUpdatedEthDeposit( l1ToL2MsgData: { fetchingUpdate: false, status: isDeposited - ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD : ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID: (l1ToL2Msg as EthDepositMessage) .childDepositTxHash, diff --git a/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx b/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx index 00c426268c..a7aba71cd2 100644 --- a/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx +++ b/packages/arb-token-bridge-ui/src/components/common/AddCustomChain.tsx @@ -205,7 +205,7 @@ async function mapOrbitConfigToOrbitChain( childCustomGateway: data.tokenBridgeContracts.l3Contracts.customGateway, childErc20Gateway: data.tokenBridgeContracts.l3Contracts.standardGateway, childGatewayRouter: data.tokenBridgeContracts.l3Contracts.router, - childMulticall: data.tokenBridgeContracts.l3Contracts.multicall, + childMultiCall: data.tokenBridgeContracts.l3Contracts.multicall, childProxyAdmin: data.tokenBridgeContracts.l3Contracts.proxyAdmin, childWeth: data.tokenBridgeContracts.l3Contracts.weth, childWethGateway: data.tokenBridgeContracts.l3Contracts.wethGateway diff --git a/packages/arb-token-bridge-ui/src/state/app/utils.ts b/packages/arb-token-bridge-ui/src/state/app/utils.ts index 654cd2e3b5..33abb12763 100644 --- a/packages/arb-token-bridge-ui/src/state/app/utils.ts +++ b/packages/arb-token-bridge-ui/src/state/app/utils.ts @@ -102,7 +102,7 @@ export const getDepositStatus = (tx: Transaction | MergedTransaction) => { return tx.assetType === AssetType.ETH ? DepositStatus.L2_SUCCESS : DepositStatus.EXPIRED - case ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN: { + case ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD: { return tx.assetType === AssetType.ETH ? DepositStatus.L2_SUCCESS : DepositStatus.L2_FAILURE @@ -122,7 +122,7 @@ function getDepositStatusFromL1ToL2MessageStatus( return DepositStatus.CREATION_FAILED case ParentToChildMessageStatus.EXPIRED: return DepositStatus.EXPIRED - case ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN: + case ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD: return DepositStatus.L2_FAILURE case ParentToChildMessageStatus.REDEEMED: return DepositStatus.L2_SUCCESS diff --git a/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts b/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts index e8151925f4..99c1f9df24 100644 --- a/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/RetryableUtils.ts @@ -108,7 +108,7 @@ export const getRetryableTicketExpiration = async ({ export const l1L2RetryableRequiresRedeem = (tx: MergedTransaction) => { return ( tx.l1ToL2MsgData?.status === - ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD ) } @@ -128,7 +128,7 @@ export const secondRetryableLegForTeleportRequiresRedeem = ( return ( !l2ForwarderRetryableRequiresRedeem(tx) && tx.l2ToL3MsgData?.status === - ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD ) } diff --git a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts index 442d9ce78d..937f34dfbf 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts @@ -304,7 +304,7 @@ export async function getL3ERC20Address({ const { l2Provider } = await getL2ConfigForTeleport({ destinationChainProvider: l3Provider }) - return await l1l3Bridger.getL3ERC20Address( + return await l1l3Bridger.getL3Erc20Address( erc20L1Address, l1Provider, l2Provider // this is the actual l2 provider diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index 3bf7448fe5..db579d739a 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -157,7 +157,7 @@ const updateETHDepositStatusData = async ({ : undefined, l1ToL2MsgData: { status: isDeposited - ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD : ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID, // Only show `l2TxID` after the deposit is confirmed @@ -261,7 +261,7 @@ const updateClassicDepositStatusData = async ({ const isCompletedEthDeposit = isEthDeposit && - status >= ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + status >= ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD const l2TxID = (() => { if (isCompletedEthDeposit) { @@ -385,7 +385,7 @@ export async function fetchTeleporterDepositStatusData({ !depositStatus.completed && l2ForwarderFactoryRetryable && (await l2ForwarderFactoryRetryable.status()) === - ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN + ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD ) { return { status: l2Retryable ? 'success' : 'failure', @@ -393,7 +393,7 @@ export async function fetchTeleporterDepositStatusData({ l1ToL2MsgData, l2ToL3MsgData: { ...l2ToL3MsgData, - status: ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHAIN, + status: ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD, l2ForwarderRetryableTxID: l2ForwarderFactoryRetryable.retryableCreationId } diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index bf6cab5f1f..0fb0397922 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -1,9 +1,9 @@ import { ArbitrumNetwork, addDefaultLocalNetwork, - getChildrenForNetwork + getChildrenForNetwork, + getArbitrumNetworks } from '@arbitrum/sdk' -import { networks as arbitrumNetworks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' import { loadEnvironmentVariableWithFallback } from './index' import { getBridgeUiConfigForChain } from './bridgeUiConfig' @@ -52,7 +52,7 @@ const l1Networks: { [chainId: number]: L1Network } = { } export const getChains = () => { - const chains = Object.values({ ...l1Networks, ...arbitrumNetworks }) as ( + const chains = [...Object.values(l1Networks), ...getArbitrumNetworks()] as ( | L1Network | ArbitrumNetwork )[] @@ -87,7 +87,10 @@ export function getBaseChainIdByChainId({ }: { chainId: number }): number { - const chain = arbitrumNetworks[chainId] + // TODO: Change to synchronous getArbitrumNetwork + const chain = getArbitrumNetworks().find( + arbitrumNetwork => arbitrumNetwork.chainId === chainId + ) // the chain provided is an L1 chain, so we can return early if (!chain || isL1Chain(chain)) { @@ -244,7 +247,10 @@ export const getL1BlockTime = (chainId: number) => { } export const getConfirmPeriodBlocks = (chainId: ChainId) => { - const network = arbitrumNetworks[chainId] + // TODO: Change to synchronous getArbitrumNetwork + const network = getArbitrumNetworks().find( + network => network.chainId === chainId + ) if (!network || !isArbitrumChain(network)) { throw new Error( `Couldn't get confirm period blocks. Unexpected chain ID: ${chainId}` @@ -305,7 +311,7 @@ const defaultL2Network: ArbitrumNetwork = { childCustomGateway: '0x525c2aBA45F66987217323E8a05EA400C65D06DC', childErc20Gateway: '0xe1080224B632A93951A7CFA33EeEa9Fd81558b5e', childGatewayRouter: '0x1294b86822ff4976BfE136cB06CF43eC7FCF2574', - childMulticall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', + childMultiCall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', childProxyAdmin: '0xda52b25ddB0e3B9CC393b0690Ac62245Ac772527', childWeth: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', childWethGateway: '0x4A2bA922052bA54e29c5417bC979Daaf7D5Fe4f4' diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index 75e0a9d220..f636686abc 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -1,6 +1,6 @@ import { NativeCurrencyBase } from '../hooks/useNativeCurrency' import { ChainWithRpcUrl } from './networks' -import { networks as arbitrumNetworks } from '@arbitrum/sdk/dist/lib/dataEntities/networks' +import { getArbitrumNetworks } from '@arbitrum/sdk' export type NetworkType = | 'Ethereum' @@ -55,7 +55,7 @@ export const orbitMainnets: { childCustomGateway: '0x96551194230725c72ACF8E9573B1382CCBC70635', childErc20Gateway: '0x0c71417917D24F4A6A6A55559B98c5cCEcb33F7a', childGatewayRouter: '0xd096e8dE90D34de758B0E0bA4a796eA2e1e272cF', - childMulticall: '0xEEC168551A85911Ec3A905e0561b656979f3ea67', + childMultiCall: '0xEEC168551A85911Ec3A905e0561b656979f3ea67', childProxyAdmin: '0x56800fDCFbE19Ea3EE9d115dAC30d95d6459c44E', childWeth: '0x0000000000000000000000000000000000000000', childWethGateway: '0x0000000000000000000000000000000000000000' @@ -104,7 +104,7 @@ export const orbitMainnets: { childCustomGateway: '0x90E43f5d772e50B01B3F9596f65AD5653467d010', childErc20Gateway: '0x0CA4c24079a191e08F659699292e5C75274EF253', childGatewayRouter: '0x9a2859B2a83148b8DE25d26643B5407555D219E1', - childMulticall: '0x4c753F58Ee9E83B38170abAbBEa8B47976C7ee1b', + childMultiCall: '0x4c753F58Ee9E83B38170abAbBEa8B47976C7ee1b', childProxyAdmin: '0x18AB1fE7CBeB5F40d2eAf8A3906A966d59E79767', childWeth: '0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0', childWethGateway: '0xd0C21F7960ea9835E7B2E636548f4deDD9E2309C' @@ -147,7 +147,7 @@ export const orbitMainnets: { childCustomGateway: '0x9FcC7aC2c40eFD0443D8B641e482F04310F113f6', childErc20Gateway: '0xFdEb5b89bb8FCA61BF77f205B9F89aC3C5fA5dB8', childGatewayRouter: '0xDcF4964Dbb526e91CD6354ac3d1247Ce93C21fc4', - childMulticall: '0xaA6669a609862871ce72c91a93E70F1ef7590271', + childMultiCall: '0xaA6669a609862871ce72c91a93E70F1ef7590271', childProxyAdmin: '0xf10D50B24eDd74ECF3B6Bc22aE74b7F9843e0fDD', childWeth: '0x869Bf8814d77106323745758135b999D34C79a87', childWethGateway: '0xB6145BFd3fA9D270871037238003c66B984787f4' @@ -188,7 +188,7 @@ export const orbitMainnets: { childCustomGateway: '0x1a4ba648Ddc0E726085A847178eBff204411EB1A', childErc20Gateway: '0x7aEdD5a2F3bBd4841711D017Edf90d611aD96a9e', childGatewayRouter: '0x33e59640CD7E5C5E8D43fd46d995efDdDd0Fc930', - childMulticall: '0xEB4150a4F26Cf3563B3a86965E269C8873D48527', + childMultiCall: '0xEB4150a4F26Cf3563B3a86965E269C8873D48527', childProxyAdmin: '0x518e5FA773118b779a6231303f5593A10D3B3c84', childWeth: '0x77684A04145a5924eFCE0D92A7c4a2A2E8C359de', childWethGateway: '0x6e965dd667cb08f09DE8285317f012Ac889507b4' @@ -231,7 +231,7 @@ export const orbitMainnets: { childCustomGateway: '0xed609532adB4B24cd580d042A05ef15d914Bb7b0', childErc20Gateway: '0x8624C8046AA1E619528adA4Fa894E431b7CCE139', childGatewayRouter: '0x1d55e424757817CBd27caD7169FE462d6703c57d', - childMulticall: '0xB019E8B9448138251a9C58af34FcCd276cE733f6', + childMultiCall: '0xB019E8B9448138251a9C58af34FcCd276cE733f6', childProxyAdmin: '0x8699E41Ed6246708035f7B2E1bf194D9C6Fb7d32', childWeth: '0x0000000000000000000000000000000000000000', childWethGateway: '0x0000000000000000000000000000000000000000' @@ -280,7 +280,7 @@ export const orbitMainnets: { childCustomGateway: '0x1AE90d0FBf03d1bb0685D4bAc5BCe4F4071cB0dc', childErc20Gateway: '0x76df9F5004F38aC74D0cE664027a1E718AA45E97', childGatewayRouter: '0x460E0a28a1DcE5a15811C3F5775D1e8fd0a08278', - childMulticall: '0xA9cfB51510b18300cf056d7e0b96925a1D11f424', + childMultiCall: '0xA9cfB51510b18300cf056d7e0b96925a1D11f424', childProxyAdmin: '0xFB027dBD2FBb343FD16D66a63a690B29D51D23AA', childWeth: '0xD3f8b9D33b159E8f5141d28880b216d31B00ee63', childWethGateway: '0x0fEf8843450b7c6a416C30D1E00cbc535Bb905b6' @@ -323,7 +323,7 @@ export const orbitMainnets: { childCustomGateway: '0x642e40E3F9948F11E18973f79E910f0953dd0C80', childErc20Gateway: '0xBF14b5F058AE33469eC2D20c9Ee712Cb7eC68A8b', childGatewayRouter: '0xe95788E89383447177312846DB45E6bffc32DD3b', - childMulticall: '0x9eE16369804735D75944AA3B025B063C31862786', + childMultiCall: '0x9eE16369804735D75944AA3B025B063C31862786', childProxyAdmin: '0xc5A8e16EADC3276B3DdB9F122e2c824Dc8a87BfD', childWeth: '0x594Ee2FA451dC7aCFC6785c0d746695f79A4daeE', childWethGateway: '0x377880CbbA57EB9ACb7120028f21Ce043266A431' @@ -367,7 +367,7 @@ export const orbitMainnets: { childCustomGateway: '0x5dd84FB52A27B9D5b760b0373fDeda52D10d3c4a', childErc20Gateway: '0xAf574BbE2139e39F560C4db1A118E1245aC0983d', childGatewayRouter: '0x505421b85ae7F906e8807bf59ee3Da62e894CDC3', - childMulticall: '0x446696a44B13D7B03dBEe837610692d2A71D6232', + childMultiCall: '0x446696a44B13D7B03dBEe837610692d2A71D6232', childProxyAdmin: '0xa2A055fa56b7B4d36F0320c5c65562854873e5B2', childWeth: '0x0000000000000000000000000000000000000000', childWethGateway: '0x0000000000000000000000000000000000000000' @@ -420,7 +420,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { childCustomGateway: '0xea1ce1CC75C948488515A3058E10aa82da40cE8F', childErc20Gateway: '0xD840761a09609394FaFA3404bEEAb312059AC558', childGatewayRouter: '0x3B8ba769a43f34cdD67a20aF60d08D54C9C8f1AD', - childMulticall: '0x5CBd60Ae5Af80A42FA8b0F20ADF95A8879844984', + childMultiCall: '0x5CBd60Ae5Af80A42FA8b0F20ADF95A8879844984', childProxyAdmin: '0x7C1BA251d812fb34aF5C2566040C3C30585aFed9', childWeth: '0x0000000000000000000000000000000000000000', childWethGateway: '0x0000000000000000000000000000000000000000' @@ -469,7 +469,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { childCustomGateway: '0x6B8C4aD57806fB4563031B79348bcC4CC3bBa7D5', childErc20Gateway: '0xBb94635f882f03f7641B742F5e3070e6B5108b71', childGatewayRouter: '0x14De2d9c4C7F5ad2d134Eb746207653797693C0D', - childMulticall: '0xF6Fd6C87C4cac9A4BF4b6fF4efa4B06bdbbe5D51', + childMultiCall: '0xF6Fd6C87C4cac9A4BF4b6fF4efa4B06bdbbe5D51', childProxyAdmin: '0x80C5A0C4004B4130b823AfE8D97aAeA3fBFf3fCc', childWeth: '0x0000000000000000000000000000000000000000', childWethGateway: '0x0000000000000000000000000000000000000000' @@ -517,7 +517,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { childCustomGateway: '0xcc3fa38D4a18474DF92107d328bF4A6F7C9fA29A', childErc20Gateway: '0x7aeD67245Db9b4E6bB26791b48E20aBbA9411EdD', childGatewayRouter: '0xF40E36d3043373Ce6F89abe3914d631135342C28', - childMulticall: '0xa8D4b59f0FB23CB785d360E73C7364dDB3e34A62', + childMultiCall: '0xa8D4b59f0FB23CB785d360E73C7364dDB3e34A62', childProxyAdmin: '0xC381Ff423f37d42b0b9B84195D9C9C31eDc26e73', childWeth: '0x6793D074d3A410C803B8C2086E569883D6e928F1', childWethGateway: '0x4F24D0244B29d76ED1FBD3c8a9967b72b78B9DBd' @@ -560,7 +560,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { childCustomGateway: '0x311C5Fe27874FBc8ea9D06BeDA2ff316E37c3E2f', childErc20Gateway: '0x68b350501592a1501ffc2C8f1B28Ca896253fFe8', childGatewayRouter: '0x52d17dcd26F9B19A2672dC79686f1279391Aa449', - childMulticall: '0x1A0d79b35953fDA4F2b7A3B0BC893C767AAe44aE', + childMultiCall: '0x1A0d79b35953fDA4F2b7A3B0BC893C767AAe44aE', childProxyAdmin: '0x25Da52b43f252Bc52Ce038a7541eCC62b9347229', childWeth: '0x2c9Dd2b2cd55266e3b5c3C95840F3c037fbCb856', childWethGateway: '0xece5902AD6Bbf4689EA8aD4B95237fAf5B65FB26' @@ -604,7 +604,7 @@ export const orbitTestnets: { [key in number]: OrbitChainConfig } = { childCustomGateway: '0x2c2Be954C9B79d9cA2CF145d9d6363F3c3784615', childErc20Gateway: '0xDfCD9f6154BEA2E98e8aE493f3Fec2E22De52D6a', childGatewayRouter: '0xBc63Ec54dA9Ee3B2b3D4cA5DE3622a3F85e0F219', - childMulticall: '0x54AFaf5Fd025A99708e73e52c317454bD52B1e77', + childMultiCall: '0x54AFaf5Fd025A99708e73e52c317454bD52B1e77', childProxyAdmin: '0xE1C9a27C47bb9691bA5b4E35eb7617B39F6098B9', childWeth: '0x0000000000000000000000000000000000000000', childWethGateway: '0x0000000000000000000000000000000000000000' @@ -646,7 +646,10 @@ export function getOrbitChains( export function getInboxAddressFromOrbitChainId(chainId: number) { return ( - arbitrumNetworks[chainId]?.ethBridge.inbox ?? // for stylus testnet v2 + // TODO: Change to synchronous getArbitrumNetwork + getArbitrumNetworks().find( + arbitrumNetwork => arbitrumNetwork.chainId === chainId + )?.ethBridge.inbox ?? // for stylus testnet v2 getOrbitChains().find(chain => chain.chainId === chainId)?.ethBridge.inbox // for other custom orbit chains ) } diff --git a/yarn.lock b/yarn.lock index 1422adf857..e7fc5c7e31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@^4.0.0-alpha.6": - version "4.0.0-alpha.6" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.6.tgz#7999240904fb0a2847873faa203bcd3b02f709a2" - integrity sha512-o8fpj0pHNNGMM5VLohRK92km/YPGBXtSwgb312qgEtic4Tb6ga90fHlA8UOdkGSDeqy4JIFKOlH3y+gqIW+Vkw== +"@arbitrum/sdk@^4.0.0-alpha.7": + version "4.0.0-alpha.7" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.7.tgz#1e212cb09d1f4fddbf0023e13a176ea5fd8046ba" + integrity sha512-HWKjEISyljAqLmXW6jdSr2KCTagbc4vcRR+WqurXy6fjzP6vTkxMY8+p9wIm03hgxCi2idJAKICX8xMw0fW4pA== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1" From 8d5005c3e9f11e8a169d1628f5c7aa88bb410622 Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 9 Jul 2024 23:13:09 +0200 Subject: [PATCH 15/32] fix --- .../arb-token-bridge-ui/src/util/__tests__/networks.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts b/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts index aecc39bec1..059579681c 100644 --- a/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts +++ b/packages/arb-token-bridge-ui/src/util/__tests__/networks.test.ts @@ -42,7 +42,7 @@ beforeAll(() => { childCustomGateway: '0x525c2aBA45F66987217323E8a05EA400C65D06DC', childErc20Gateway: '0xe1080224B632A93951A7CFA33EeEa9Fd81558b5e', childGatewayRouter: '0x1294b86822ff4976BfE136cB06CF43eC7FCF2574', - childMulticall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', + childMultiCall: '0xDB2D15a3EB70C347E0D2C2c7861cAFb946baAb48', childProxyAdmin: '0xda52b25ddB0e3B9CC393b0690Ac62245Ac772527', childWeth: '0x408Da76E87511429485C32E4Ad647DD14823Fdc4', childWethGateway: '0x4A2bA922052bA54e29c5417bC979Daaf7D5Fe4f4' From c004fcf2e58a1f8e81e890d81950bba8137d526a Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 11:58:50 +0200 Subject: [PATCH 16/32] update imports --- .../components/TransactionHistory/helpers.ts | 2 +- .../src/hooks/arbTokenBridge.types.ts | 19 ++++++++----------- .../src/hooks/useArbTokenBridge.ts | 3 +-- .../src/util/WithdrawalUtils.ts | 7 +++++-- .../src/util/deposits/helpers.ts | 3 ++- .../src/util/teleports/helpers.ts | 2 +- .../fetchTokenWithdrawalsFromEventLogs.ts | 3 +-- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index de702b8006..4fb06053ec 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -4,11 +4,11 @@ import { TransactionReceipt } from '@ethersproject/providers' import { + EthDepositMessage, EthDepositMessageStatus, ParentToChildMessageStatus, ParentToChildMessageReader } from '@arbitrum/sdk' -import { EthDepositMessage } from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' import { DepositStatus, diff --git a/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts b/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts index cc98f932f7..380e82e893 100644 --- a/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts +++ b/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts @@ -2,22 +2,19 @@ import { Signer } from '@ethersproject/abstract-signer' import { TransactionReceipt } from '@ethersproject/abstract-provider' import { BigNumber, ContractReceipt, ethers } from 'ethers' import { TokenList } from '@uniswap/token-lists' -import { ChildToParentMessageStatus as OutgoingMessageState } from '@arbitrum/sdk' -import { StandardArbERC20 } from '@arbitrum/sdk/dist/lib/abi/StandardArbERC20' -import { WithdrawalInitiatedEvent } from '@arbitrum/sdk/dist/lib/abi/L2ArbitrumGateway' -import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' -import { EventArgs } from '@arbitrum/sdk/dist/lib/dataEntities/event' - import { + EventArgs, ParentEthDepositTransaction, ParentEthDepositTransactionReceipt, ParentContractCallTransaction, - ParentContractCallTransactionReceipt -} from '@arbitrum/sdk/dist/lib/message/ParentTransaction' -import { + ParentContractCallTransactionReceipt, ChildContractTransaction, - ChildTransactionReceipt -} from '@arbitrum/sdk/dist/lib/message/ChildTransaction' + ChildTransactionReceipt, + ChildToParentMessageStatus as OutgoingMessageState +} from '@arbitrum/sdk' +import { StandardArbERC20 } from '@arbitrum/sdk/dist/lib/abi/StandardArbERC20' +import { WithdrawalInitiatedEvent } from '@arbitrum/sdk/dist/lib/abi/L2ArbitrumGateway' +import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' import { NewTransaction, diff --git a/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts b/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts index 6bc0984e63..484e1f2fee 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts @@ -5,8 +5,7 @@ import { Signer } from '@ethersproject/abstract-signer' import { JsonRpcProvider } from '@ethersproject/providers' import { useLocalStorage } from '@rehooks/local-storage' import { TokenList } from '@uniswap/token-lists' -import { ChildToParentMessage } from '@arbitrum/sdk' -import { EventArgs } from '@arbitrum/sdk/dist/lib/dataEntities/event' +import { EventArgs, ChildToParentMessage } from '@arbitrum/sdk' import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' import { L2ToL1TransactionEvent as ClassicL2ToL1TransactionEvent } from '@arbitrum/sdk/dist/lib/abi/ArbSys' diff --git a/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts b/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts index c4332a1f97..f4aa78e0a5 100644 --- a/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts @@ -1,8 +1,11 @@ -import { Erc20Bridger, EthBridger } from '@arbitrum/sdk' +import { + Erc20Bridger, + EthBridger, + ChildToParentTransactionRequest +} from '@arbitrum/sdk' import { Provider } from '@ethersproject/providers' import { BigNumber } from 'ethers' import * as Sentry from '@sentry/react' -import { ChildToParentTransactionRequest } from '@arbitrum/sdk/dist/lib/dataEntities/transactionRequest' import { GasEstimates } from '../hooks/arbTokenBridge.types' import { Address } from './AddressUtils' diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index db579d739a..46bdf60d92 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -1,11 +1,12 @@ import { ParentTransactionReceipt, ParentToChildMessageStatus, + EthDepositMessage, EthDepositMessageStatus, ParentToChildMessageReader, ParentToChildMessageReaderClassic } from '@arbitrum/sdk' -import { EthDepositMessage } from '@arbitrum/sdk/dist/lib/message/ParentToChildMessage' + import { Provider } from '@ethersproject/providers' import { Erc20DepositStatus as Erc20TeleportStatus, diff --git a/packages/arb-token-bridge-ui/src/util/teleports/helpers.ts b/packages/arb-token-bridge-ui/src/util/teleports/helpers.ts index 7e5feb849d..e3cbe2338d 100644 --- a/packages/arb-token-bridge-ui/src/util/teleports/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/teleports/helpers.ts @@ -1,6 +1,6 @@ import { utils } from 'ethers' import { getProviderForChainId } from '@/token-bridge-sdk/utils' -import { RetryableMessageParams } from '@arbitrum/sdk/dist/lib/dataEntities/message' +import { RetryableMessageParams } from '@arbitrum/sdk' import { fetchTeleportInputParametersFromTxId, getL3ChainIdFromTeleportEvents diff --git a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts index a64398e5a3..0b3d9531e3 100644 --- a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts +++ b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogs.ts @@ -1,6 +1,5 @@ import { Provider, BlockTag } from '@ethersproject/providers' -import { Erc20Bridger } from '@arbitrum/sdk' -import { EventArgs } from '@arbitrum/sdk/dist/lib/dataEntities/event' +import { Erc20Bridger, EventArgs } from '@arbitrum/sdk' import { WithdrawalInitiatedEvent } from '@arbitrum/sdk/dist/lib/abi/L2ArbitrumGateway' function dedupeEvents( From da127c3b5d382bfcce6ab38de140d805d5c0d635 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 13:37:44 +0200 Subject: [PATCH 17/32] bump v --- packages/arb-token-bridge-ui/package.json | 2 +- yarn.lock | 336 +++++++++------------- 2 files changed, 132 insertions(+), 206 deletions(-) diff --git a/packages/arb-token-bridge-ui/package.json b/packages/arb-token-bridge-ui/package.json index 1b3130531e..29daba1206 100644 --- a/packages/arb-token-bridge-ui/package.json +++ b/packages/arb-token-bridge-ui/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@apollo/client": "^3.7.11", - "@arbitrum/sdk": "^4.0.0-alpha.7", + "@arbitrum/sdk": "^4.0.0-alpha.8", "@ethersproject/providers": "^5.7.0", "@headlessui/react": "^1.7.8", "@headlessui/tailwindcss": "^0.1.2", diff --git a/yarn.lock b/yarn.lock index e7fc5c7e31..6a79625bc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@^4.0.0-alpha.7": - version "4.0.0-alpha.7" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.7.tgz#1e212cb09d1f4fddbf0023e13a176ea5fd8046ba" - integrity sha512-HWKjEISyljAqLmXW6jdSr2KCTagbc4vcRR+WqurXy6fjzP6vTkxMY8+p9wIm03hgxCi2idJAKICX8xMw0fW4pA== +"@arbitrum/sdk@^4.0.0-alpha.8": + version "4.0.0-alpha.8" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.8.tgz#64e1899a282499ce395e0b6ed247e2b3483cfca2" + integrity sha512-pd/6j63lLPKAEfuemdqdMwIlfmLFYX+SmFRe0ynwgAtrP3EQ37VZfJ5u8O49lezhxwJLrpKXUuMCTdK2bPcNfw== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1" @@ -1910,7 +1910,7 @@ "@stablelib/constant-time" "^1.0.1" "@stablelib/wipe" "^1.0.1" -"@stablelib/random@1.0.2", "@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": +"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== @@ -1941,7 +1941,7 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@1.0.3": +"@stablelib/x25519@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== @@ -2763,28 +2763,27 @@ eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.1.tgz#a59646e39a5beaa3f3551d129af43cd404cf4faf" - integrity sha512-h0MSYKJu9i1VEs5koCTT7c5YeQ1Kj0ncTFiMqANbDnB1r3mBulXn+FKtZ2fCmf1j7KDpgluuUzpSs+sQfPcv4Q== +"@walletconnect/core@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.4.tgz#fc207c8fa35a53e30012b0c85b6ca933cec7d955" + integrity sha512-3CQHud4As0kPRvlW1w/wSWS2F3yXlAo5kSEJyRWLRPqXG+aSCVWM8cVM8ch5yoeyNIfOHhEINdsYMuJG1+yIJQ== dependencies: - "@walletconnect/heartbeat" "1.2.2" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "1.0.3" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "1.0.14" - "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/logger" "2.1.2" - "@walletconnect/relay-api" "1.0.10" - "@walletconnect/relay-auth" "1.0.4" - "@walletconnect/safe-json" "1.0.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" - isomorphic-unfetch "3.1.0" + "@walletconnect/jsonrpc-ws-connection" "^1.0.11" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" lodash.isequal "4.5.0" - uint8arrays "3.1.0" + uint8arrays "^3.1.0" "@walletconnect/crypto@^1.0.3": version "1.0.3" @@ -2814,23 +2813,22 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.13.1", "@walletconnect/ethereum-provider@2.8.4": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.1.tgz#a9bdb8f9da303088b7b724fa98f4b5ca0d46a36d" - integrity sha512-bHJVqb++GrrMGlapsbSvvIyBlwulMGZEx6N5xwAl6ImPVzbDN0g0XmibNkjzJXVsi/+/d0R/HmKS1WyJQSNx3w== +"@walletconnect/ethereum-provider@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.4.tgz#c627c237b479194efc542b8475596bae12fde52d" + integrity sha512-z7Yz4w8t3eEFv8vQ8DLCgDWPah2aIIyC0iQdwhXgJenQTVuz7JJZRrJUUntzudipHK/owA394c1qTPF0rsMSeQ== dependencies: - "@walletconnect/jsonrpc-http-connection" "1.0.8" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/modal" "2.6.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/universal-provider" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" - -"@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "^1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/sign-client" "2.8.4" + "@walletconnect/types" "2.8.4" + "@walletconnect/universal-provider" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" + +"@walletconnect/events@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== @@ -2838,24 +2836,14 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/heartbeat@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz#e8dc5179db7769950c6f9cf59b23516d9b95227d" - integrity sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw== +"@walletconnect/heartbeat@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" + integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/time" "^1.0.2" - events "^3.3.0" - -"@walletconnect/jsonrpc-http-connection@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" - integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== - dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.6" - "@walletconnect/safe-json" "^1.0.1" - cross-fetch "^3.1.4" - events "^3.3.0" + tslib "1.14.1" "@walletconnect/jsonrpc-http-connection@^1.0.4": version "1.0.7" @@ -2867,16 +2855,17 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" - integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== +"@walletconnect/jsonrpc-http-connection@^1.0.7": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" + integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" events "^3.3.0" -"@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -2885,15 +2874,16 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-types@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" - integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== +"@walletconnect/jsonrpc-provider@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" + integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" - keyvaluestorage-interface "^1.0.0" -"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": +"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== @@ -2901,7 +2891,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -2910,7 +2900,7 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@1.0.14": +"@walletconnect/jsonrpc-ws-connection@^1.0.11": version "1.0.14" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== @@ -2920,7 +2910,7 @@ events "^3.3.0" ws "^7.5.1" -"@walletconnect/keyvaluestorage@1.1.1": +"@walletconnect/keyvaluestorage@^1.0.2": version "1.1.1" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== @@ -2989,7 +2979,7 @@ detect-browser "^5.3.0" query-string "^6.13.5" -"@walletconnect/logger@2.1.2": +"@walletconnect/logger@^2.0.1": version "2.1.2" resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== @@ -3005,13 +2995,6 @@ buffer "6.0.3" valtio "1.10.6" -"@walletconnect/modal-core@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" - integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== - dependencies: - valtio "1.11.2" - "@walletconnect/modal-ui@2.5.5": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.5.5.tgz#f2ab96ab72f0f1325252224560ec610b73d1684c" @@ -3022,24 +3005,6 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal-ui@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" - integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - lit "2.8.0" - motion "10.16.2" - qrcode "1.5.3" - -"@walletconnect/modal@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" - integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - "@walletconnect/modal-ui" "2.6.2" - "@walletconnect/modal@^2.5.4": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.5.5.tgz#703eb076af4442dcd14a3b0b87863f17283f6514" @@ -3058,14 +3023,14 @@ randombytes "^2.1.0" tslib "1.14.1" -"@walletconnect/relay-api@1.0.10": +"@walletconnect/relay-api@^1.0.9": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== dependencies: "@walletconnect/jsonrpc-types" "^1.0.2" -"@walletconnect/relay-auth@1.0.4": +"@walletconnect/relay-auth@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== @@ -3077,90 +3042,90 @@ tslib "1.14.1" uint8arrays "^3.0.0" -"@walletconnect/safe-json@1.0.2", "@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": +"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.1.tgz#7bdc9226218fd33caf3aef69dff0b4140abc7fa8" - integrity sha512-e+dcqcLsedB4ZjnePFM5Cy8oxu0dyz5iZfhfKH/MOrQV/hyhZ+hJwh4MmkO2QyEu2PERKs9o2Uc6x8RZdi0UAQ== +"@walletconnect/sign-client@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.4.tgz#35e7cfe9442c65d7f667a7c20f1a5ee7e2a6e576" + integrity sha512-eRvWtKBAgzo/rbIkw+rkKco2ulSW8Wor/58UsOBsl9DKr1rIazZd4ZcUdaTjg9q8AT1476IQakCAIuv+1FvJwQ== dependencies: - "@walletconnect/core" "2.13.1" - "@walletconnect/events" "1.0.1" - "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/core" "2.8.4" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "2.1.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" -"@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": +"@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== dependencies: tslib "1.14.1" -"@walletconnect/types@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.1.tgz#393e3bd4d60a755f3a70cbe769b58cf153450310" - integrity sha512-CIrdt66d38xdunGCy5peOOP17EQkCEGKweXc3+Gn/RWeSiRU35I7wjC/Bp4iWcgAQ6iBTZv4jGGST5XyrOp+Pg== +"@walletconnect/types@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.4.tgz#23fad8593b094c7564d72f179e33b1cac9324a88" + integrity sha512-Fgqe87R7rjMOGSvx28YPLTtXM6jj+oUOorx8cE+jEw2PfpWp5myF21aCdaMBR39h0QHij5H1Z0/W9e7gm4oC1Q== dependencies: - "@walletconnect/events" "1.0.1" - "@walletconnect/heartbeat" "1.2.2" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/logger" "2.1.2" - events "3.3.0" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + events "^3.3.0" -"@walletconnect/universal-provider@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.13.1.tgz#e007c4963ca73fea7c29dc3ca4ca57e2607daafc" - integrity sha512-A/6WysrvzXWtYD933PKjJlj7PGtOWdkwKeRDiD6JEVk5fQ+DQ1x0p5qcUhaa57r3S0p559YvRNvHFFjx+PpMqA== +"@walletconnect/universal-provider@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.4.tgz#7b62a76a7d99ea41c67374da54aaa4f1b4bc1d03" + integrity sha512-JRpOXKIciRMzd03zZxM1WDsYHo/ZS86zZrZ1aCHW1d45ZLP7SbGPRHzZgBY3xrST26yTvWIlRfTUEYn50fzB1g== dependencies: - "@walletconnect/jsonrpc-http-connection" "1.0.8" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/sign-client" "2.8.4" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" -"@walletconnect/utils@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.1.tgz#f44e81028754c6e056dba588ad9b9fa5ad047645" - integrity sha512-EcooXXlqy5hk9hy/nK2wBF/qxe7HjH0K8ZHzjKkXRkwAE5pCvy0IGXIXWmUR9sw8LFJEqZyd8rZdWLKNUe8hqA== +"@walletconnect/utils@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.4.tgz#8dbd3beaef39388be2398145a5f9a061a0317518" + integrity sha512-NGw6BINYNeT9JrQrnxldAPheO2ymRrwGrgfExZMyrkb1MShnIX4nzo4KirKInM4LtrY6AA/v0Lu3ooUdfO+xIg== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" - "@stablelib/random" "1.0.2" + "@stablelib/random" "^1.0.2" "@stablelib/sha256" "1.0.1" - "@stablelib/x25519" "1.0.3" - "@walletconnect/relay-api" "1.0.10" - "@walletconnect/safe-json" "1.0.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/window-getters" "1.0.1" - "@walletconnect/window-metadata" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" query-string "7.1.3" - uint8arrays "3.1.0" + uint8arrays "^3.1.0" -"@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": +"@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== dependencies: tslib "1.14.1" -"@walletconnect/window-metadata@1.0.1", "@walletconnect/window-metadata@^1.0.1": +"@walletconnect/window-metadata@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== @@ -6237,7 +6202,7 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@3.3.0, events@^3.3.0: +events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -7993,14 +7958,6 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -isomorphic-unfetch@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" - integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== - dependencies: - node-fetch "^2.6.1" - unfetch "^4.2.0" - isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -8876,13 +8833,6 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" -lit-html@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" - integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== - dependencies: - "@types/trusted-types" "^2.0.2" - lit@2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" @@ -8892,15 +8842,6 @@ lit@2.7.5: lit-element "^3.3.0" lit-html "^2.7.0" -lit@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" - integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== - dependencies: - "@lit/reactive-element" "^1.6.0" - lit-element "^3.3.0" - lit-html "^2.8.0" - loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" @@ -12358,14 +12299,7 @@ ufo@^1.4.0, ufo@^1.5.3: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== -uint8arrays@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" - integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== - dependencies: - multiformats "^9.4.2" - -uint8arrays@^3.0.0: +uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== @@ -12406,11 +12340,6 @@ unenv@^1.9.0: node-fetch-native "^1.6.1" pathe "^1.1.1" -unfetch@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" - integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -12608,14 +12537,6 @@ valtio@1.10.6: proxy-compare "2.5.1" use-sync-external-store "1.2.0" -valtio@1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" - integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== - dependencies: - proxy-compare "2.5.1" - use-sync-external-store "1.2.0" - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -12914,21 +12835,26 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@7.4.6, ws@7.5.10, ws@^7.4.5, ws@^7.5.1: +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + +ws@^7.4.5, ws@^7.5.1: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@8.17.1, ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: +ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" From c973172fc1aab95c1ad0d338b0d6d8c690ca6848 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 13:41:44 +0200 Subject: [PATCH 18/32] change things --- .../src/hooks/arbTokenBridge.types.ts | 4 +- .../src/hooks/useArbTokenBridge.ts | 7 +- .../src/util/deposits/helpers.ts | 12 +- yarn.lock | 328 +++++++++++------- 4 files changed, 213 insertions(+), 138 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts b/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts index 380e82e893..516f57e9c9 100644 --- a/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts +++ b/packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts @@ -10,11 +10,11 @@ import { ParentContractCallTransactionReceipt, ChildContractTransaction, ChildTransactionReceipt, - ChildToParentMessageStatus as OutgoingMessageState + ChildToParentMessageStatus as OutgoingMessageState, + ChildToParentTransactionEvent } from '@arbitrum/sdk' import { StandardArbERC20 } from '@arbitrum/sdk/dist/lib/abi/StandardArbERC20' import { WithdrawalInitiatedEvent } from '@arbitrum/sdk/dist/lib/abi/L2ArbitrumGateway' -import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' import { NewTransaction, diff --git a/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts b/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts index 484e1f2fee..de7387aa49 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useArbTokenBridge.ts @@ -5,8 +5,11 @@ import { Signer } from '@ethersproject/abstract-signer' import { JsonRpcProvider } from '@ethersproject/providers' import { useLocalStorage } from '@rehooks/local-storage' import { TokenList } from '@uniswap/token-lists' -import { EventArgs, ChildToParentMessage } from '@arbitrum/sdk' -import { ChildToParentTransactionEvent } from '@arbitrum/sdk/dist/lib/message/ChildToParentMessage' +import { + EventArgs, + ChildToParentMessage, + ChildToParentTransactionEvent +} from '@arbitrum/sdk' import { L2ToL1TransactionEvent as ClassicL2ToL1TransactionEvent } from '@arbitrum/sdk/dist/lib/abi/ArbSys' import useTransactions from './useTransactions' diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index 46bdf60d92..3b2a3bb1dd 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -4,14 +4,12 @@ import { EthDepositMessage, EthDepositMessageStatus, ParentToChildMessageReader, - ParentToChildMessageReaderClassic + ParentToChildMessageReaderClassic, + EthL1L3DepositStatus, + Erc20L1L3DepositStatus } from '@arbitrum/sdk' import { Provider } from '@ethersproject/providers' -import { - Erc20DepositStatus as Erc20TeleportStatus, - EthDepositStatus as EthTeleportStatus -} from '@arbitrum/sdk/dist/lib/assetBridger/l1l3Bridger' import { AssetType } from '../../hooks/arbTokenBridge.types' import { L1ToL2MessageData, @@ -342,8 +340,8 @@ export async function fetchTeleporterDepositStatusData({ }) function isEthTeleport( - status: EthTeleportStatus | Erc20TeleportStatus - ): status is EthTeleportStatus { + status: EthL1L3DepositStatus | Erc20L1L3DepositStatus + ): status is EthL1L3DepositStatus { return isNativeCurrencyTransfer } diff --git a/yarn.lock b/yarn.lock index 6a79625bc5..409b58ceec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1910,7 +1910,7 @@ "@stablelib/constant-time" "^1.0.1" "@stablelib/wipe" "^1.0.1" -"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": +"@stablelib/random@1.0.2", "@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== @@ -1941,7 +1941,7 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@^1.0.3": +"@stablelib/x25519@1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== @@ -2763,27 +2763,28 @@ eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.4.tgz#fc207c8fa35a53e30012b0c85b6ca933cec7d955" - integrity sha512-3CQHud4As0kPRvlW1w/wSWS2F3yXlAo5kSEJyRWLRPqXG+aSCVWM8cVM8ch5yoeyNIfOHhEINdsYMuJG1+yIJQ== +"@walletconnect/core@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.1.tgz#a59646e39a5beaa3f3551d129af43cd404cf4faf" + integrity sha512-h0MSYKJu9i1VEs5koCTT7c5YeQ1Kj0ncTFiMqANbDnB1r3mBulXn+FKtZ2fCmf1j7KDpgluuUzpSs+sQfPcv4Q== dependencies: - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-provider" "1.0.13" - "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "^1.0.11" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/relay-api" "^1.0.9" - "@walletconnect/relay-auth" "^1.0.4" - "@walletconnect/safe-json" "^1.0.2" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + "@walletconnect/relay-api" "1.0.10" + "@walletconnect/relay-auth" "1.0.4" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" + isomorphic-unfetch "3.1.0" lodash.isequal "4.5.0" - uint8arrays "^3.1.0" + uint8arrays "3.1.0" "@walletconnect/crypto@^1.0.3": version "1.0.3" @@ -2813,22 +2814,23 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.4.tgz#c627c237b479194efc542b8475596bae12fde52d" - integrity sha512-z7Yz4w8t3eEFv8vQ8DLCgDWPah2aIIyC0iQdwhXgJenQTVuz7JJZRrJUUntzudipHK/owA394c1qTPF0rsMSeQ== +"@walletconnect/ethereum-provider@2.13.1", "@walletconnect/ethereum-provider@2.8.4": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.1.tgz#a9bdb8f9da303088b7b724fa98f4b5ca0d46a36d" + integrity sha512-bHJVqb++GrrMGlapsbSvvIyBlwulMGZEx6N5xwAl6ImPVzbDN0g0XmibNkjzJXVsi/+/d0R/HmKS1WyJQSNx3w== dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.7" - "@walletconnect/jsonrpc-provider" "^1.0.13" - "@walletconnect/jsonrpc-types" "^1.0.3" - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/sign-client" "2.8.4" - "@walletconnect/types" "2.8.4" - "@walletconnect/universal-provider" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" - -"@walletconnect/events@^1.0.1": + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/modal" "2.6.2" + "@walletconnect/sign-client" "2.13.1" + "@walletconnect/types" "2.13.1" + "@walletconnect/universal-provider" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" + +"@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== @@ -2836,14 +2838,24 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/heartbeat@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" - integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== +"@walletconnect/heartbeat@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz#e8dc5179db7769950c6f9cf59b23516d9b95227d" + integrity sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/time" "^1.0.2" - tslib "1.14.1" + events "^3.3.0" + +"@walletconnect/jsonrpc-http-connection@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" + integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" + events "^3.3.0" "@walletconnect/jsonrpc-http-connection@^1.0.4": version "1.0.7" @@ -2855,17 +2867,16 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-http-connection@^1.0.7": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" - integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== +"@walletconnect/jsonrpc-provider@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" + integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.6" - "@walletconnect/safe-json" "^1.0.1" - cross-fetch "^3.1.4" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" -"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -2874,16 +2885,15 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@^1.0.13": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" - integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== +"@walletconnect/jsonrpc-types@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" + integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" + keyvaluestorage-interface "^1.0.0" -"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": +"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== @@ -2891,7 +2901,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -2900,7 +2910,7 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@^1.0.11": +"@walletconnect/jsonrpc-ws-connection@1.0.14": version "1.0.14" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== @@ -2910,7 +2920,7 @@ events "^3.3.0" ws "^7.5.1" -"@walletconnect/keyvaluestorage@^1.0.2": +"@walletconnect/keyvaluestorage@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== @@ -2979,7 +2989,7 @@ detect-browser "^5.3.0" query-string "^6.13.5" -"@walletconnect/logger@^2.0.1": +"@walletconnect/logger@2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== @@ -2995,6 +3005,13 @@ buffer "6.0.3" valtio "1.10.6" +"@walletconnect/modal-core@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" + integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== + dependencies: + valtio "1.11.2" + "@walletconnect/modal-ui@2.5.5": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.5.5.tgz#f2ab96ab72f0f1325252224560ec610b73d1684c" @@ -3005,6 +3022,24 @@ motion "10.16.2" qrcode "1.5.3" +"@walletconnect/modal-ui@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" + integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== + dependencies: + "@walletconnect/modal-core" "2.6.2" + lit "2.8.0" + motion "10.16.2" + qrcode "1.5.3" + +"@walletconnect/modal@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" + integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== + dependencies: + "@walletconnect/modal-core" "2.6.2" + "@walletconnect/modal-ui" "2.6.2" + "@walletconnect/modal@^2.5.4": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.5.5.tgz#703eb076af4442dcd14a3b0b87863f17283f6514" @@ -3023,14 +3058,14 @@ randombytes "^2.1.0" tslib "1.14.1" -"@walletconnect/relay-api@^1.0.9": +"@walletconnect/relay-api@1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== dependencies: "@walletconnect/jsonrpc-types" "^1.0.2" -"@walletconnect/relay-auth@^1.0.4": +"@walletconnect/relay-auth@1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== @@ -3042,90 +3077,90 @@ tslib "1.14.1" uint8arrays "^3.0.0" -"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": +"@walletconnect/safe-json@1.0.2", "@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.4.tgz#35e7cfe9442c65d7f667a7c20f1a5ee7e2a6e576" - integrity sha512-eRvWtKBAgzo/rbIkw+rkKco2ulSW8Wor/58UsOBsl9DKr1rIazZd4ZcUdaTjg9q8AT1476IQakCAIuv+1FvJwQ== +"@walletconnect/sign-client@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.1.tgz#7bdc9226218fd33caf3aef69dff0b4140abc7fa8" + integrity sha512-e+dcqcLsedB4ZjnePFM5Cy8oxu0dyz5iZfhfKH/MOrQV/hyhZ+hJwh4MmkO2QyEu2PERKs9o2Uc6x8RZdi0UAQ== dependencies: - "@walletconnect/core" "2.8.4" - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/core" "2.13.1" + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" + "@walletconnect/logger" "2.1.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" -"@walletconnect/time@^1.0.2": +"@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== dependencies: tslib "1.14.1" -"@walletconnect/types@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.4.tgz#23fad8593b094c7564d72f179e33b1cac9324a88" - integrity sha512-Fgqe87R7rjMOGSvx28YPLTtXM6jj+oUOorx8cE+jEw2PfpWp5myF21aCdaMBR39h0QHij5H1Z0/W9e7gm4oC1Q== +"@walletconnect/types@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.1.tgz#393e3bd4d60a755f3a70cbe769b58cf153450310" + integrity sha512-CIrdt66d38xdunGCy5peOOP17EQkCEGKweXc3+Gn/RWeSiRU35I7wjC/Bp4iWcgAQ6iBTZv4jGGST5XyrOp+Pg== dependencies: - "@walletconnect/events" "^1.0.1" - "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-types" "1.0.3" - "@walletconnect/keyvaluestorage" "^1.0.2" - "@walletconnect/logger" "^2.0.1" - events "^3.3.0" + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + events "3.3.0" -"@walletconnect/universal-provider@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.4.tgz#7b62a76a7d99ea41c67374da54aaa4f1b4bc1d03" - integrity sha512-JRpOXKIciRMzd03zZxM1WDsYHo/ZS86zZrZ1aCHW1d45ZLP7SbGPRHzZgBY3xrST26yTvWIlRfTUEYn50fzB1g== +"@walletconnect/universal-provider@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.13.1.tgz#e007c4963ca73fea7c29dc3ca4ca57e2607daafc" + integrity sha512-A/6WysrvzXWtYD933PKjJlj7PGtOWdkwKeRDiD6JEVk5fQ+DQ1x0p5qcUhaa57r3S0p559YvRNvHFFjx+PpMqA== dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.7" - "@walletconnect/jsonrpc-provider" "1.0.13" - "@walletconnect/jsonrpc-types" "^1.0.2" - "@walletconnect/jsonrpc-utils" "^1.0.7" - "@walletconnect/logger" "^2.0.1" - "@walletconnect/sign-client" "2.8.4" - "@walletconnect/types" "2.8.4" - "@walletconnect/utils" "2.8.4" - events "^3.3.0" + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "2.1.2" + "@walletconnect/sign-client" "2.13.1" + "@walletconnect/types" "2.13.1" + "@walletconnect/utils" "2.13.1" + events "3.3.0" -"@walletconnect/utils@2.8.4": - version "2.8.4" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.4.tgz#8dbd3beaef39388be2398145a5f9a061a0317518" - integrity sha512-NGw6BINYNeT9JrQrnxldAPheO2ymRrwGrgfExZMyrkb1MShnIX4nzo4KirKInM4LtrY6AA/v0Lu3ooUdfO+xIg== +"@walletconnect/utils@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.1.tgz#f44e81028754c6e056dba588ad9b9fa5ad047645" + integrity sha512-EcooXXlqy5hk9hy/nK2wBF/qxe7HjH0K8ZHzjKkXRkwAE5pCvy0IGXIXWmUR9sw8LFJEqZyd8rZdWLKNUe8hqA== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" - "@stablelib/random" "^1.0.2" + "@stablelib/random" "1.0.2" "@stablelib/sha256" "1.0.1" - "@stablelib/x25519" "^1.0.3" - "@walletconnect/relay-api" "^1.0.9" - "@walletconnect/safe-json" "^1.0.2" - "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.8.4" - "@walletconnect/window-getters" "^1.0.1" - "@walletconnect/window-metadata" "^1.0.1" + "@stablelib/x25519" "1.0.3" + "@walletconnect/relay-api" "1.0.10" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.1" + "@walletconnect/window-getters" "1.0.1" + "@walletconnect/window-metadata" "1.0.1" detect-browser "5.3.0" query-string "7.1.3" - uint8arrays "^3.1.0" + uint8arrays "3.1.0" -"@walletconnect/window-getters@^1.0.1": +"@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== dependencies: tslib "1.14.1" -"@walletconnect/window-metadata@^1.0.1": +"@walletconnect/window-metadata@1.0.1", "@walletconnect/window-metadata@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== @@ -6202,7 +6237,7 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^3.3.0: +events@3.3.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -7958,6 +7993,14 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-unfetch@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -8833,6 +8876,13 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" +lit-html@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" + integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== + dependencies: + "@types/trusted-types" "^2.0.2" + lit@2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" @@ -8842,6 +8892,15 @@ lit@2.7.5: lit-element "^3.3.0" lit-html "^2.7.0" +lit@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" + integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== + dependencies: + "@lit/reactive-element" "^1.6.0" + lit-element "^3.3.0" + lit-html "^2.8.0" + loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" @@ -12299,7 +12358,14 @@ ufo@^1.4.0, ufo@^1.5.3: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== -uint8arrays@^3.0.0, uint8arrays@^3.1.0: +uint8arrays@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" + integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== + dependencies: + multiformats "^9.4.2" + +uint8arrays@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== @@ -12340,6 +12406,11 @@ unenv@^1.9.0: node-fetch-native "^1.6.1" pathe "^1.1.1" +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -12537,6 +12608,14 @@ valtio@1.10.6: proxy-compare "2.5.1" use-sync-external-store "1.2.0" +valtio@1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" + integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== + dependencies: + proxy-compare "2.5.1" + use-sync-external-store "1.2.0" + vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -12835,26 +12914,21 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@7.4.6: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - -ws@^7.4.5, ws@^7.5.1: +ws@7.4.6, ws@7.5.10, ws@^7.4.5, ws@^7.5.1: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: +ws@8.17.1, ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" From 1cb9b1cc431d56d7dec24ce16a3aafb937a6ade4 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 13:46:10 +0200 Subject: [PATCH 19/32] change things --- .../arb-token-bridge-ui/src/util/networks.ts | 19 ++++--------------- .../src/util/orbitChainsList.ts | 8 +++----- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 0fb0397922..7187138b7f 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -2,6 +2,7 @@ import { ArbitrumNetwork, addDefaultLocalNetwork, getChildrenForNetwork, + getArbitrumNetwork, getArbitrumNetworks } from '@arbitrum/sdk' @@ -87,13 +88,10 @@ export function getBaseChainIdByChainId({ }: { chainId: number }): number { - // TODO: Change to synchronous getArbitrumNetwork - const chain = getArbitrumNetworks().find( - arbitrumNetwork => arbitrumNetwork.chainId === chainId - ) + const chain = getArbitrumNetwork(chainId) // the chain provided is an L1 chain, so we can return early - if (!chain || isL1Chain(chain)) { + if (isL1Chain(chain)) { return chainId } @@ -247,16 +245,7 @@ export const getL1BlockTime = (chainId: number) => { } export const getConfirmPeriodBlocks = (chainId: ChainId) => { - // TODO: Change to synchronous getArbitrumNetwork - const network = getArbitrumNetworks().find( - network => network.chainId === chainId - ) - if (!network || !isArbitrumChain(network)) { - throw new Error( - `Couldn't get confirm period blocks. Unexpected chain ID: ${chainId}` - ) - } - return network.confirmPeriodBlocks + return getArbitrumNetwork(chainId).confirmPeriodBlocks } export const l2ArbReverseGatewayAddresses: { [chainId: number]: string } = { diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index f636686abc..d9ad28cb6e 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -646,11 +646,9 @@ export function getOrbitChains( export function getInboxAddressFromOrbitChainId(chainId: number) { return ( - // TODO: Change to synchronous getArbitrumNetwork - getArbitrumNetworks().find( - arbitrumNetwork => arbitrumNetwork.chainId === chainId - )?.ethBridge.inbox ?? // for stylus testnet v2 - getOrbitChains().find(chain => chain.chainId === chainId)?.ethBridge.inbox // for other custom orbit chains + getOrbitChains() + // + .find(chain => chain.chainId === chainId)?.ethBridge.inbox ) } From 8b9870c8fdb5dc36323dd06c028e4de0f69dd3b4 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 16:11:47 +0200 Subject: [PATCH 20/32] fix --- .../src/hooks/__tests__/helpers.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts b/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts index 6cc57acbbd..252315cf83 100644 --- a/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts +++ b/packages/arb-token-bridge-ui/src/hooks/__tests__/helpers.ts @@ -24,22 +24,6 @@ export function createMockOrbitChain({ name: `Mocked Orbit Chain ${chainId}`, slug: `mocked-orbit-chain-${chainId}`, parentChainId, - retryableLifetimeSeconds: 604800, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '' - } + retryableLifetimeSeconds: 604800 } } From 2ae39547696f947376f2f05db382fece7d73c2ba Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 16:30:01 +0200 Subject: [PATCH 21/32] fix --- packages/arb-token-bridge-ui/src/util/networks.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 7a6c20a7dc..78679ecbdf 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -86,13 +86,12 @@ export function getBaseChainIdByChainId({ }: { chainId: number }): number { - const chain = getArbitrumNetwork(chainId) - // the chain provided is an L1 chain, so we can return early - if (isL1Chain(chain)) { + if (isL1Chain({ chainId })) { return chainId } + const chain = getArbitrumNetwork(chainId) let currentParentChain: L1Network | ArbitrumNetwork = chain // keep following the parent chains until we find the L1 chain while (true) { @@ -428,7 +427,7 @@ export function mapCustomChainToNetworkData(chain: ChainWithRpcUrl) { explorerUrls[chain.chainId] = chain.explorerUrl } -function isL1Chain(chain: L1Network | ArbitrumNetwork): chain is L1Network { +function isL1Chain(chain: { chainId: number }): chain is L1Network { return typeof l1Networks[chain.chainId] !== 'undefined' } From 4d860c464720b4bc50c373ef3ab0908bf809eddc Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 16:38:15 +0200 Subject: [PATCH 22/32] fix --- packages/arb-token-bridge-ui/src/util/networks.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 78679ecbdf..288c02ecbe 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -91,8 +91,14 @@ export function getBaseChainIdByChainId({ return chainId } - const chain = getArbitrumNetwork(chainId) - let currentParentChain: L1Network | ArbitrumNetwork = chain + let currentParentChain: L1Network | ArbitrumNetwork + + try { + currentParentChain = getArbitrumNetwork(chainId) + } catch (error) { + return chainId + } + // keep following the parent chains until we find the L1 chain while (true) { if (isL1Chain(currentParentChain)) { From a3fdebcabcafff4f16731a9d41c7154fb3d0b040 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 17:07:32 +0200 Subject: [PATCH 23/32] fix --- packages/arb-token-bridge-ui/src/util/networks.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 288c02ecbe..b6c17a1d10 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -1,9 +1,9 @@ import { ArbitrumNetwork, - addDefaultLocalNetwork, getChildrenForNetwork, getArbitrumNetwork, - getArbitrumNetworks + getArbitrumNetworks, + registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { loadEnvironmentVariableWithFallback } from './index' @@ -320,7 +320,7 @@ export function registerLocalNetwork() { rpcURLs[defaultL1Network.chainId] = localL1NetworkRpcUrl rpcURLs[defaultL2Network.chainId] = localL2NetworkRpcUrl - addDefaultLocalNetwork() + registerCustomArbitrumNetwork(defaultL2Network) } catch (error: any) { console.error(`Failed to register local network: ${error.message}`) } From a47cb10a5b609ff8d3f2237e70766797655f554c Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 17:22:41 +0200 Subject: [PATCH 24/32] fix --- packages/arb-token-bridge-ui/synpress.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/arb-token-bridge-ui/synpress.config.ts b/packages/arb-token-bridge-ui/synpress.config.ts index c87d2383e6..f44535585a 100644 --- a/packages/arb-token-bridge-ui/synpress.config.ts +++ b/packages/arb-token-bridge-ui/synpress.config.ts @@ -275,6 +275,7 @@ async function generateTestTxForRedeemRetryable() { const tx = await erc20Bridger.deposit({ ...depositRequest, parentSigner: userWallet.connect(ethProvider), + childProvider: arbProvider, retryableGasOverrides: { gasLimit: { base: BigNumber.from(0) From b30bf96e9ce8e98d014acfea54655fae2b347ff5 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 17:56:27 +0200 Subject: [PATCH 25/32] fix redeem --- .../src/hooks/useRedeemRetryable.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts index 8bb5e587c0..04c77e9efc 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts @@ -2,7 +2,6 @@ import { useCallback, useState } from 'react' import { ParentToChildMessageStatus } from '@arbitrum/sdk' import { useSigner } from 'wagmi' import dayjs from 'dayjs' -import { TransactionReceipt } from '@ethersproject/providers' import { DepositStatus, MergedTransaction } from '../state/app/state' import { getRetryableTicket } from '../util/RetryableUtils' @@ -53,17 +52,18 @@ export function useRedeemRetryable( const status = await retryableTicket.status() const isSuccess = status === ParentToChildMessageStatus.REDEEMED + const successfulRedeem = await retryableTicket.getSuccessfulRedeem() - const redeemReceipt = - (await retryableTicket.getSuccessfulRedeem()) as unknown as { - status: ParentToChildMessageStatus.REDEEMED - chainTxReceipt: TransactionReceipt - } + if (successfulRedeem.status !== ParentToChildMessageStatus.REDEEMED) { + throw new Error( + `Unexpected status for retryable ticket (parent tx hash ${tx.txId}), expected ${ParentToChildMessageStatus.REDEEMED} but got ${successfulRedeem.status}` + ) + } await updatePendingTransaction({ ...tx, l1ToL2MsgData: { - l2TxID: redeemReceipt.chainTxReceipt.transactionHash, + l2TxID: successfulRedeem.txReceipt.transactionHash, status, retryableCreationTxID: retryableTicket.retryableCreationId, fetchingUpdate: false From 22cb7569c6fd5ce7349926ccd059197fbc641b88 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 18:31:38 +0200 Subject: [PATCH 26/32] remove stuff --- packages/arb-token-bridge-ui/synpress.config.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/arb-token-bridge-ui/synpress.config.ts b/packages/arb-token-bridge-ui/synpress.config.ts index f44535585a..1e2123d8f3 100644 --- a/packages/arb-token-bridge-ui/synpress.config.ts +++ b/packages/arb-token-bridge-ui/synpress.config.ts @@ -182,16 +182,6 @@ async function deployERC20ToL1() { async function deployERC20ToL2(erc20L1Address: string) { console.log('Deploying ERC20 to L2...') const bridger = await Erc20Bridger.fromProvider(arbProvider) - - const parentStandardGatewayAddressFromChainConfig = - bridger.childChain.tokenBridge.parentErc20Gateway - - const parentGatewayAddressFromParentGatewayRouter = - await bridger.getParentGatewayAddress(erc20L1Address, ethProvider) - - console.log({ parentStandardGatewayAddressFromChainConfig }) - console.log({ parentGatewayAddressFromParentGatewayRouter }) - const deploy = await bridger.deposit({ amount: BigNumber.from(0), erc20ParentAddress: erc20L1Address, From e4db674013355b8a89f2f13852db95fced051ed4 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 18:34:10 +0200 Subject: [PATCH 27/32] fix parent chain id --- packages/arb-token-bridge-ui/src/util/orbitChainsList.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts index f8e6e12089..124134107e 100644 --- a/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts +++ b/packages/arb-token-bridge-ui/src/util/orbitChainsList.ts @@ -120,7 +120,7 @@ export const orbitMainnets: { }, 4078: { chainId: 4078, - parentChainId: 0, + parentChainId: 42161, confirmPeriodBlocks: 7200, ethBridge: { bridge: '0xB0EC3C1368AF7d9C2CAE6B7f8E022Cc14d59D2b1', From b04c7548812f7c05ada7e191b505d2dbf7675b94 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 19:31:33 +0200 Subject: [PATCH 28/32] bump --- packages/arb-token-bridge-ui/package.json | 2 +- .../components/TransactionHistory/helpers.ts | 7 +- .../src/hooks/useRedeemRetryable.ts | 2 +- .../src/hooks/useRedeemTeleporter.ts | 13 +- .../token-bridge-sdk/Erc20DepositStarter.ts | 4 +- .../src/token-bridge-sdk/EthDepositStarter.ts | 8 +- .../src/util/TokenDepositUtils.ts | 4 +- .../src/util/deposits/helpers.ts | 4 +- yarn.lock | 336 +++++++----------- 9 files changed, 154 insertions(+), 226 deletions(-) diff --git a/packages/arb-token-bridge-ui/package.json b/packages/arb-token-bridge-ui/package.json index 29daba1206..93649f9481 100644 --- a/packages/arb-token-bridge-ui/package.json +++ b/packages/arb-token-bridge-ui/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "@apollo/client": "^3.7.11", - "@arbitrum/sdk": "^4.0.0-alpha.8", + "@arbitrum/sdk": "^4.0.0-alpha.9", "@ethersproject/providers": "^5.7.0", "@headlessui/react": "^1.7.8", "@headlessui/tailwindcss": "^0.1.2", diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index 4fb06053ec..c19fd96669 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -302,11 +302,10 @@ export async function getUpdatedEthDeposit( status: isDeposited ? ParentToChildMessageStatus.FUNDS_DEPOSITED_ON_CHILD : ParentToChildMessageStatus.NOT_YET_CREATED, - retryableCreationTxID: (l1ToL2Msg as EthDepositMessage) - .childDepositTxHash, + retryableCreationTxID: (l1ToL2Msg as EthDepositMessage).childTxHash, // Only show `l2TxID` after the deposit is confirmed l2TxID: isDeposited - ? (l1ToL2Msg as EthDepositMessage).childDepositTxHash + ? (l1ToL2Msg as EthDepositMessage).childTxHash : undefined } } @@ -353,7 +352,7 @@ export async function getUpdatedTokenDeposit( const l2TxID = (() => { if (res.status === ParentToChildMessageStatus.REDEEMED) { - return res.txReceipt.transactionHash + return res.childTxReceipt.transactionHash } else { return undefined } diff --git a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts index 04c77e9efc..5c6bd83bdf 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useRedeemRetryable.ts @@ -63,7 +63,7 @@ export function useRedeemRetryable( await updatePendingTransaction({ ...tx, l1ToL2MsgData: { - l2TxID: successfulRedeem.txReceipt.transactionHash, + l2TxID: successfulRedeem.childTxReceipt.transactionHash, status, retryableCreationTxID: retryableTicket.retryableCreationId, fetchingUpdate: false diff --git a/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts b/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts index fc9048df29..710fc73067 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useRedeemTeleporter.ts @@ -43,12 +43,15 @@ const redeemRetryable = async (retryable: ParentToChildMessageWriter) => { ) } - const redeemReceipt = (await retryable.getSuccessfulRedeem()) as unknown as { - status: ParentToChildMessageStatus.REDEEMED - txReceipt: TransactionReceipt + const successfulRedeem = await retryable.getSuccessfulRedeem() + + if (successfulRedeem.status !== ParentToChildMessageStatus.REDEEMED) { + throw new Error( + `Unexpected status for retryable ticket (creation id ${retryable.retryableCreationId}), expected ${ParentToChildMessageStatus.REDEEMED} but got ${successfulRedeem.status}` + ) } - return redeemReceipt + return successfulRedeem } // this will try to redeem - 1. L1L2Retryable 2. L2ForwarderRetryable @@ -132,7 +135,7 @@ const redeemTeleporterSecondLeg = async ({ // update the teleport tx in the UI const l2ToL3MsgData: L2ToL3MessageData = { ...tx.l2ToL3MsgData, - l3TxID: redemptionReceipt.txReceipt.transactionHash, + l3TxID: redemptionReceipt.childTxReceipt.transactionHash, status: ParentToChildMessageStatus.REDEEMED, retryableCreationTxID: l2L3Retryable.retryableCreationId } diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts index 2b8f353442..7d90d2b4e9 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/Erc20DepositStarter.ts @@ -84,7 +84,7 @@ export class Erc20DepositStarter extends BridgeTransferStarter { const address = await getAddressFromSigner(signer) const erc20Bridger = await this.getBridger() - const l2Network = erc20Bridger.childChain + const l2Network = erc20Bridger.childNetwork if (typeof l2Network.nativeToken === 'undefined') { return false // native currency doesn't require approval @@ -161,7 +161,7 @@ export class Erc20DepositStarter extends BridgeTransferStarter { const erc20Bridger = await this.getBridger() - const l2Network = erc20Bridger.childChain + const l2Network = erc20Bridger.childNetwork if (typeof l2Network.nativeToken === 'undefined') { throw Error('Network does not have a custom native token') diff --git a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts index 9b48f5aada..13a6480462 100644 --- a/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts +++ b/packages/arb-token-bridge-ui/src/token-bridge-sdk/EthDepositStarter.ts @@ -37,17 +37,17 @@ export class EthDepositStarter extends BridgeTransferStarter { const address = await getAddressFromSigner(signer) const ethBridger = await this.getBridger() - const { childChain } = ethBridger + const { childNetwork } = ethBridger - if (typeof childChain.nativeToken === 'undefined') { + if (typeof childNetwork.nativeToken === 'undefined') { return false // native currency doesn't require approval } const customFeeTokenAllowanceForInbox = await fetchErc20Allowance({ - address: childChain.nativeToken, + address: childNetwork.nativeToken, provider: this.sourceChainProvider, owner: address, - spender: childChain.ethBridge.inbox + spender: childNetwork.ethBridge.inbox }) // We want to bridge a certain amount of the custom fee token, so we have to check if the allowance is enough. diff --git a/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts index 5889c84025..fe587f409d 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenDepositUtils.ts @@ -156,7 +156,7 @@ export async function depositTokenEstimateGas( ) return fetchTokenFallbackGasEstimates({ - inboxAddress: erc20Bridger.childChain.ethBridge.inbox, + inboxAddress: erc20Bridger.childNetwork.ethBridge.inbox, parentChainErc20Address, parentChainProvider, childChainProvider @@ -185,7 +185,7 @@ export async function depositTokenEstimateGas( Sentry.captureException(error) return fetchTokenFallbackGasEstimates({ - inboxAddress: erc20Bridger.childChain.ethBridge.inbox, + inboxAddress: erc20Bridger.childNetwork.ethBridge.inbox, parentChainErc20Address, parentChainProvider, childChainProvider diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index 3b2a3bb1dd..757bb33998 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -136,7 +136,7 @@ const updateETHDepositStatusData = async ({ const status = await ethDepositMessage.status() const isDeposited = status === EthDepositMessageStatus.DEPOSITED - const retryableCreationTxID = ethDepositMessage.childDepositTxHash + const retryableCreationTxID = ethDepositMessage.childTxHash const l2BlockNum = isDeposited ? (await l2Provider.getTransaction(retryableCreationTxID)).blockNumber @@ -160,7 +160,7 @@ const updateETHDepositStatusData = async ({ : ParentToChildMessageStatus.NOT_YET_CREATED, retryableCreationTxID, // Only show `l2TxID` after the deposit is confirmed - l2TxID: isDeposited ? ethDepositMessage.childDepositTxHash : undefined, + l2TxID: isDeposited ? ethDepositMessage.childTxHash : undefined, fetchingUpdate: false } } diff --git a/yarn.lock b/yarn.lock index 409b58ceec..a0809b7fd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@arbitrum/sdk@^4.0.0-alpha.8": - version "4.0.0-alpha.8" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.8.tgz#64e1899a282499ce395e0b6ed247e2b3483cfca2" - integrity sha512-pd/6j63lLPKAEfuemdqdMwIlfmLFYX+SmFRe0ynwgAtrP3EQ37VZfJ5u8O49lezhxwJLrpKXUuMCTdK2bPcNfw== +"@arbitrum/sdk@^4.0.0-alpha.9": + version "4.0.0-alpha.9" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.0-alpha.9.tgz#3751b4dc289e7d77ab2037332ae8010a976a0b13" + integrity sha512-YsI2QQnJdd1L9B7mbWoF532a/mY/bmBHINR8CgFDFVkMjNRoQSC8avvnylmoco97xX4X6UZALNrd8CJN7eGXZQ== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1" @@ -1910,7 +1910,7 @@ "@stablelib/constant-time" "^1.0.1" "@stablelib/wipe" "^1.0.1" -"@stablelib/random@1.0.2", "@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": +"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== @@ -1941,7 +1941,7 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@1.0.3": +"@stablelib/x25519@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== @@ -2763,28 +2763,27 @@ eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.1.tgz#a59646e39a5beaa3f3551d129af43cd404cf4faf" - integrity sha512-h0MSYKJu9i1VEs5koCTT7c5YeQ1Kj0ncTFiMqANbDnB1r3mBulXn+FKtZ2fCmf1j7KDpgluuUzpSs+sQfPcv4Q== +"@walletconnect/core@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.4.tgz#fc207c8fa35a53e30012b0c85b6ca933cec7d955" + integrity sha512-3CQHud4As0kPRvlW1w/wSWS2F3yXlAo5kSEJyRWLRPqXG+aSCVWM8cVM8ch5yoeyNIfOHhEINdsYMuJG1+yIJQ== dependencies: - "@walletconnect/heartbeat" "1.2.2" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "1.0.3" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/jsonrpc-ws-connection" "1.0.14" - "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/logger" "2.1.2" - "@walletconnect/relay-api" "1.0.10" - "@walletconnect/relay-auth" "1.0.4" - "@walletconnect/safe-json" "1.0.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" - isomorphic-unfetch "3.1.0" + "@walletconnect/jsonrpc-ws-connection" "^1.0.11" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" lodash.isequal "4.5.0" - uint8arrays "3.1.0" + uint8arrays "^3.1.0" "@walletconnect/crypto@^1.0.3": version "1.0.3" @@ -2814,23 +2813,22 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.13.1", "@walletconnect/ethereum-provider@2.8.4": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.1.tgz#a9bdb8f9da303088b7b724fa98f4b5ca0d46a36d" - integrity sha512-bHJVqb++GrrMGlapsbSvvIyBlwulMGZEx6N5xwAl6ImPVzbDN0g0XmibNkjzJXVsi/+/d0R/HmKS1WyJQSNx3w== +"@walletconnect/ethereum-provider@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.4.tgz#c627c237b479194efc542b8475596bae12fde52d" + integrity sha512-z7Yz4w8t3eEFv8vQ8DLCgDWPah2aIIyC0iQdwhXgJenQTVuz7JJZRrJUUntzudipHK/owA394c1qTPF0rsMSeQ== dependencies: - "@walletconnect/jsonrpc-http-connection" "1.0.8" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/modal" "2.6.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/universal-provider" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" - -"@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "^1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/sign-client" "2.8.4" + "@walletconnect/types" "2.8.4" + "@walletconnect/universal-provider" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" + +"@walletconnect/events@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== @@ -2838,24 +2836,14 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/heartbeat@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz#e8dc5179db7769950c6f9cf59b23516d9b95227d" - integrity sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw== +"@walletconnect/heartbeat@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" + integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/time" "^1.0.2" - events "^3.3.0" - -"@walletconnect/jsonrpc-http-connection@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" - integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== - dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.6" - "@walletconnect/safe-json" "^1.0.1" - cross-fetch "^3.1.4" - events "^3.3.0" + tslib "1.14.1" "@walletconnect/jsonrpc-http-connection@^1.0.4": version "1.0.7" @@ -2867,16 +2855,17 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" - integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== +"@walletconnect/jsonrpc-http-connection@^1.0.7": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" + integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== dependencies: - "@walletconnect/jsonrpc-utils" "^1.0.8" - "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" events "^3.3.0" -"@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.13" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== @@ -2885,15 +2874,16 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" -"@walletconnect/jsonrpc-types@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" - integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== +"@walletconnect/jsonrpc-provider@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" + integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" events "^3.3.0" - keyvaluestorage-interface "^1.0.0" -"@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": +"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== @@ -2901,7 +2891,7 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" -"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.8": +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== @@ -2910,7 +2900,7 @@ "@walletconnect/jsonrpc-types" "^1.0.3" tslib "1.14.1" -"@walletconnect/jsonrpc-ws-connection@1.0.14": +"@walletconnect/jsonrpc-ws-connection@^1.0.11": version "1.0.14" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== @@ -2920,7 +2910,7 @@ events "^3.3.0" ws "^7.5.1" -"@walletconnect/keyvaluestorage@1.1.1": +"@walletconnect/keyvaluestorage@^1.0.2": version "1.1.1" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== @@ -2989,7 +2979,7 @@ detect-browser "^5.3.0" query-string "^6.13.5" -"@walletconnect/logger@2.1.2": +"@walletconnect/logger@^2.0.1": version "2.1.2" resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== @@ -3005,13 +2995,6 @@ buffer "6.0.3" valtio "1.10.6" -"@walletconnect/modal-core@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" - integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== - dependencies: - valtio "1.11.2" - "@walletconnect/modal-ui@2.5.5": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.5.5.tgz#f2ab96ab72f0f1325252224560ec610b73d1684c" @@ -3022,24 +3005,6 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal-ui@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" - integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - lit "2.8.0" - motion "10.16.2" - qrcode "1.5.3" - -"@walletconnect/modal@2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" - integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== - dependencies: - "@walletconnect/modal-core" "2.6.2" - "@walletconnect/modal-ui" "2.6.2" - "@walletconnect/modal@^2.5.4": version "2.5.5" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.5.5.tgz#703eb076af4442dcd14a3b0b87863f17283f6514" @@ -3058,14 +3023,14 @@ randombytes "^2.1.0" tslib "1.14.1" -"@walletconnect/relay-api@1.0.10": +"@walletconnect/relay-api@^1.0.9": version "1.0.10" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== dependencies: "@walletconnect/jsonrpc-types" "^1.0.2" -"@walletconnect/relay-auth@1.0.4": +"@walletconnect/relay-auth@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== @@ -3077,90 +3042,90 @@ tslib "1.14.1" uint8arrays "^3.0.0" -"@walletconnect/safe-json@1.0.2", "@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": +"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.1.tgz#7bdc9226218fd33caf3aef69dff0b4140abc7fa8" - integrity sha512-e+dcqcLsedB4ZjnePFM5Cy8oxu0dyz5iZfhfKH/MOrQV/hyhZ+hJwh4MmkO2QyEu2PERKs9o2Uc6x8RZdi0UAQ== +"@walletconnect/sign-client@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.4.tgz#35e7cfe9442c65d7f667a7c20f1a5ee7e2a6e576" + integrity sha512-eRvWtKBAgzo/rbIkw+rkKco2ulSW8Wor/58UsOBsl9DKr1rIazZd4ZcUdaTjg9q8AT1476IQakCAIuv+1FvJwQ== dependencies: - "@walletconnect/core" "2.13.1" - "@walletconnect/events" "1.0.1" - "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/core" "2.8.4" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "2.1.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" -"@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": +"@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== dependencies: tslib "1.14.1" -"@walletconnect/types@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.1.tgz#393e3bd4d60a755f3a70cbe769b58cf153450310" - integrity sha512-CIrdt66d38xdunGCy5peOOP17EQkCEGKweXc3+Gn/RWeSiRU35I7wjC/Bp4iWcgAQ6iBTZv4jGGST5XyrOp+Pg== +"@walletconnect/types@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.4.tgz#23fad8593b094c7564d72f179e33b1cac9324a88" + integrity sha512-Fgqe87R7rjMOGSvx28YPLTtXM6jj+oUOorx8cE+jEw2PfpWp5myF21aCdaMBR39h0QHij5H1Z0/W9e7gm4oC1Q== dependencies: - "@walletconnect/events" "1.0.1" - "@walletconnect/heartbeat" "1.2.2" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/logger" "2.1.2" - events "3.3.0" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/keyvaluestorage" "^1.0.2" + "@walletconnect/logger" "^2.0.1" + events "^3.3.0" -"@walletconnect/universal-provider@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.13.1.tgz#e007c4963ca73fea7c29dc3ca4ca57e2607daafc" - integrity sha512-A/6WysrvzXWtYD933PKjJlj7PGtOWdkwKeRDiD6JEVk5fQ+DQ1x0p5qcUhaa57r3S0p559YvRNvHFFjx+PpMqA== +"@walletconnect/universal-provider@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.4.tgz#7b62a76a7d99ea41c67374da54aaa4f1b4bc1d03" + integrity sha512-JRpOXKIciRMzd03zZxM1WDsYHo/ZS86zZrZ1aCHW1d45ZLP7SbGPRHzZgBY3xrST26yTvWIlRfTUEYn50fzB1g== dependencies: - "@walletconnect/jsonrpc-http-connection" "1.0.8" - "@walletconnect/jsonrpc-provider" "1.0.14" - "@walletconnect/jsonrpc-types" "1.0.4" - "@walletconnect/jsonrpc-utils" "1.0.8" - "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.13.1" - "@walletconnect/types" "2.13.1" - "@walletconnect/utils" "2.13.1" - events "3.3.0" + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/sign-client" "2.8.4" + "@walletconnect/types" "2.8.4" + "@walletconnect/utils" "2.8.4" + events "^3.3.0" -"@walletconnect/utils@2.13.1": - version "2.13.1" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.1.tgz#f44e81028754c6e056dba588ad9b9fa5ad047645" - integrity sha512-EcooXXlqy5hk9hy/nK2wBF/qxe7HjH0K8ZHzjKkXRkwAE5pCvy0IGXIXWmUR9sw8LFJEqZyd8rZdWLKNUe8hqA== +"@walletconnect/utils@2.8.4": + version "2.8.4" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.4.tgz#8dbd3beaef39388be2398145a5f9a061a0317518" + integrity sha512-NGw6BINYNeT9JrQrnxldAPheO2ymRrwGrgfExZMyrkb1MShnIX4nzo4KirKInM4LtrY6AA/v0Lu3ooUdfO+xIg== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" - "@stablelib/random" "1.0.2" + "@stablelib/random" "^1.0.2" "@stablelib/sha256" "1.0.1" - "@stablelib/x25519" "1.0.3" - "@walletconnect/relay-api" "1.0.10" - "@walletconnect/safe-json" "1.0.2" - "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.13.1" - "@walletconnect/window-getters" "1.0.1" - "@walletconnect/window-metadata" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.8.4" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" query-string "7.1.3" - uint8arrays "3.1.0" + uint8arrays "^3.1.0" -"@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": +"@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== dependencies: tslib "1.14.1" -"@walletconnect/window-metadata@1.0.1", "@walletconnect/window-metadata@^1.0.1": +"@walletconnect/window-metadata@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== @@ -6237,7 +6202,7 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@3.3.0, events@^3.3.0: +events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -7993,14 +7958,6 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -isomorphic-unfetch@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" - integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== - dependencies: - node-fetch "^2.6.1" - unfetch "^4.2.0" - isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" @@ -8876,13 +8833,6 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" -lit-html@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" - integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== - dependencies: - "@types/trusted-types" "^2.0.2" - lit@2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" @@ -8892,15 +8842,6 @@ lit@2.7.5: lit-element "^3.3.0" lit-html "^2.7.0" -lit@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" - integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== - dependencies: - "@lit/reactive-element" "^1.6.0" - lit-element "^3.3.0" - lit-html "^2.8.0" - loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" @@ -12358,14 +12299,7 @@ ufo@^1.4.0, ufo@^1.5.3: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== -uint8arrays@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" - integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== - dependencies: - multiformats "^9.4.2" - -uint8arrays@^3.0.0: +uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== @@ -12406,11 +12340,6 @@ unenv@^1.9.0: node-fetch-native "^1.6.1" pathe "^1.1.1" -unfetch@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" - integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -12608,14 +12537,6 @@ valtio@1.10.6: proxy-compare "2.5.1" use-sync-external-store "1.2.0" -valtio@1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" - integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== - dependencies: - proxy-compare "2.5.1" - use-sync-external-store "1.2.0" - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -12914,21 +12835,26 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@7.4.6, ws@7.5.10, ws@^7.4.5, ws@^7.5.1: +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + +ws@^7.4.5, ws@^7.5.1: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@8.17.1, ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: +ws@^8.11.0, ws@^8.13.0, ws@^8.5.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" From 89a0bc6f9b09e828138f156936fab4ee349b4967 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 10 Jul 2024 19:33:18 +0200 Subject: [PATCH 29/32] fix --- packages/arb-token-bridge-ui/src/util/deposits/helpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts index 757bb33998..6d40703d6b 100644 --- a/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts +++ b/packages/arb-token-bridge-ui/src/util/deposits/helpers.ts @@ -203,7 +203,7 @@ const updateTokenDepositStatusData = async ({ const l2TxID = res.status === ParentToChildMessageStatus.REDEEMED - ? res.txReceipt.transactionHash + ? res.childTxReceipt.transactionHash : undefined const l1ToL2MsgData = { @@ -372,7 +372,7 @@ export async function fetchTeleporterDepositStatusData({ status: await l2Retryable.status(), l2TxID: l1l2Redeem && l1l2Redeem.status === ParentToChildMessageStatus.REDEEMED - ? l1l2Redeem.txReceipt.transactionHash + ? l1l2Redeem.childTxReceipt.transactionHash : undefined, fetchingUpdate: false, retryableCreationTxID: l2Retryable.retryableCreationId @@ -402,7 +402,7 @@ export async function fetchTeleporterDepositStatusData({ const l2L3Redeem = await l3Retryable.getSuccessfulRedeem() const l3TxID = l2L3Redeem && l2L3Redeem.status === ParentToChildMessageStatus.REDEEMED - ? l2L3Redeem.txReceipt.transactionHash + ? l2L3Redeem.childTxReceipt.transactionHash : undefined const timestampResolved = await getTimestampResolved( destinationChainProvider, @@ -420,7 +420,7 @@ export async function fetchTeleporterDepositStatusData({ timestampResolved, l1ToL2MsgData: { ...l1ToL2MsgData, - l2TxID: l2ForwarderRedeem.txReceipt.transactionHash + l2TxID: l2ForwarderRedeem.childTxReceipt.transactionHash }, l2ToL3MsgData: { ...l2ToL3MsgData, From 611d6ba673922fb23826f73909d0bd23d9f3e0dc Mon Sep 17 00:00:00 2001 From: Bartek Date: Tue, 16 Jul 2024 12:35:46 +0200 Subject: [PATCH 30/32] fix child networks --- packages/arb-token-bridge-ui/src/util/networks.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index b6c17a1d10..3d0f48ccc8 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -448,9 +448,9 @@ export const TELEPORT_ALLOWLIST: { [id: number]: number[] } = { [ChainId.Sepolia]: [1918988905] // RARI Testnet } -export function getChildChainIds(chain: ArbitrumNetwork | L1Network) { +function getChildChainIds(chain: ArbitrumNetwork | L1Network) { const childChainIds = [ - ...getChildrenForNetwork(chain.chainId), + ...getChildrenForNetwork(chain.chainId).map(chain => chain.chainId), ...(TELEPORT_ALLOWLIST[chain.chainId] ?? []) // for considering teleport (L1-L3 transfers) we will get the L3 children of the chain, if present ] return Array.from(new Set(childChainIds)) @@ -465,9 +465,7 @@ export function getDestinationChainIds(chainId: ChainId): ChainId[] { const parentChainId = isArbitrumChain(chain) ? chain.parentChainId : undefined - const validDestinationChainIds = getChildrenForNetwork(chain.chainId).map( - chain => chain.chainId - ) + const validDestinationChainIds = getChildChainIds(chain) if (parentChainId) { // always make parent chain the first element From 06f0de9c0752452bdad8b3fa910ae8e92e71e9d7 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Tue, 16 Jul 2024 15:17:42 +0200 Subject: [PATCH 31/32] clean up --- packages/arb-token-bridge-ui/src/util/networks.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index 3d0f48ccc8..d6f750edec 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -34,7 +34,7 @@ type L1Network = { const l1Networks: { [chainId: number]: L1Network } = { [ChainId.Ethereum]: { chainId: ChainId.Ethereum, - blockTime: 14 + blockTime: 12 }, [ChainId.Sepolia]: { chainId: ChainId.Sepolia, @@ -46,25 +46,19 @@ const l1Networks: { [chainId: number]: L1Network } = { }, [ChainId.Local]: { chainId: ChainId.Local, - blockTime: 10 + blockTime: 12 } } export const getChains = () => { - const chains = [...Object.values(l1Networks), ...getArbitrumNetworks()] as ( - | L1Network - | ArbitrumNetwork - )[] + const chains = [...Object.values(l1Networks), ...getArbitrumNetworks()] return chains.filter(chain => { // exclude L1 chains with no child chains if (isL1Chain(chain) && getChildrenForNetwork(chain.chainId).length === 0) { return false } - // TODO: REMOVE! - if (chain.chainId === 23011913) { - return false - } + return true }) } From cd9440b0af4c0ff2cdfdee2ece61cac2cc94bc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dragi=C5=A1a=20Spasojevi=C4=87?= Date: Tue, 16 Jul 2024 17:08:03 +0200 Subject: [PATCH 32/32] fix --- .../src/hooks/useTransactionHistory.ts | 12 +++++++----- packages/arb-token-bridge-ui/src/util/networks.ts | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts b/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts index af66144ae3..4830324365 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts @@ -2,10 +2,14 @@ import { useAccount, useNetwork } from 'wagmi' import useSWRImmutable from 'swr/immutable' import useSWRInfinite from 'swr/infinite' import { useCallback, useEffect, useMemo, useState } from 'react' -import { getChildrenForNetwork } from '@arbitrum/sdk' import dayjs from 'dayjs' -import { ChainId, getChains, isNetwork } from '../util/networks' +import { + ChainId, + getChains, + getChildChainIds, + isNetwork +} from '../util/networks' import { fetchWithdrawals } from '../util/withdrawals/fetchWithdrawals' import { fetchDeposits } from '../util/deposits/fetchDeposits' import { @@ -116,9 +120,7 @@ function getMultiChainFetchList(): ChainPair[] { return getChains().flatMap(chain => { // We only grab child chains because we don't want duplicates and we need the parent chain // Although the type is correct here we default to an empty array for custom networks backwards compatibility - const childChainIds = getChildrenForNetwork(chain.chainId).map( - childChain => childChain.chainId - ) + const childChainIds = getChildChainIds(chain) const isParentChain = childChainIds.length > 0 diff --git a/packages/arb-token-bridge-ui/src/util/networks.ts b/packages/arb-token-bridge-ui/src/util/networks.ts index d6f750edec..e00ffb29db 100644 --- a/packages/arb-token-bridge-ui/src/util/networks.ts +++ b/packages/arb-token-bridge-ui/src/util/networks.ts @@ -442,7 +442,7 @@ export const TELEPORT_ALLOWLIST: { [id: number]: number[] } = { [ChainId.Sepolia]: [1918988905] // RARI Testnet } -function getChildChainIds(chain: ArbitrumNetwork | L1Network) { +export function getChildChainIds(chain: ArbitrumNetwork | L1Network) { const childChainIds = [ ...getChildrenForNetwork(chain.chainId).map(chain => chain.chainId), ...(TELEPORT_ALLOWLIST[chain.chainId] ?? []) // for considering teleport (L1-L3 transfers) we will get the L3 children of the chain, if present