diff --git a/.gitignore b/.gitignore index 316fffbabf..d2cefd2067 100644 --- a/.gitignore +++ b/.gitignore @@ -115,3 +115,7 @@ __pycache__/ # Ignore .husky for new contributors using lefthook while maintaining # backwards compatibility for past contributors .husky + + +# VSCode +.vscode/launch.json diff --git a/packages/branding/README.md b/packages/branding/README.md index 90b17222ce..4310f3767a 100644 --- a/packages/branding/README.md +++ b/packages/branding/README.md @@ -15,4 +15,3 @@ Look inside of this package for some common files you can use. Otherwise, please ## Colors Our primary hex color is `#E81899`. For the full color palette and further details, please resort to the [Figma](). - diff --git a/packages/bridge-ui-v2/.env.example b/packages/bridge-ui-v2/.env.example index 7a16185a8c..6e35b0ce4e 100644 --- a/packages/bridge-ui-v2/.env.example +++ b/packages/bridge-ui-v2/.env.example @@ -41,6 +41,17 @@ export PUBLIC_L1_TOKEN_VAULT_ADDRESS=0x export PUBLIC_L2_TOKEN_VAULT_ADDRESS=0x export PUBLIC_L3_TOKEN_VAULT_ADDRESS=0x +# ERC721 Token Vault Contract address +export PUBLIC_L1_ERC721_VAULT_ADDRESS= +export PUBLIC_L2_ERC721_VAULT_ADDRESS= +export PUBLIC_L3_ERC721_VAULT_ADDRESS= + + +# ERC1155 Token Vault Contract address +export PUBLIC_L1_ERC1155_VAULT_ADDRESS= +export PUBLIC_L2_ERC1155_VAULT_ADDRESS= +export PUBLIC_L3_ERC1155_VAULT_ADDRESS= + # Bridge Contract address export PUBLIC_L1_BRIDGE_ADDRESS=0x @@ -61,6 +72,9 @@ export PUBLIC_TEST_ERC20=[] # WalletConnect Project ID export PUBLIC_WALLETCONNECT_PROJECT_ID="" +# Enable NFT Bridge ("true" or "false") +export PUBLIC_NFT_BRIDGE_ENABLED="" + # Sentry export PUBLIC_SENTRY_DSN=https:// diff --git a/packages/bridge-ui-v2/package.json b/packages/bridge-ui-v2/package.json index c0249b04ae..899d04e5d0 100644 --- a/packages/bridge-ui-v2/package.json +++ b/packages/bridge-ui-v2/package.json @@ -29,6 +29,7 @@ "@typescript-eslint/parser": "^5.45.0", "@vitest/coverage-v8": "^0.33.0", "@wagmi/cli": "^1.0.1", + "abitype": "^0.8.7", "autoprefixer": "^10.4.14", "daisyui": "3.1.7", "eslint": "^8.28.0", @@ -37,6 +38,7 @@ "eslint-plugin-svelte": "^2.26.0", "ethereum-address": "^0.0.4", "jsdom": "^22.1.0", + "lokijs": "^1.5.12", "postcss": "^8.4.24", "prettier": "^3.0.0", "prettier-plugin-svelte": "^3.0.0", @@ -56,9 +58,11 @@ "@web3modal/ethereum": "^2.6.2", "@web3modal/html": "^2.6.2", "@zerodevx/svelte-toast": "^0.9.5", - "abitype": "^0.8.2", + "axios": "^1.4.0", + "buffer": "^6.0.3", "debug": "^4.3.4", + "events": "^3.3.0", "svelte-i18n": "^3.6.0", - "viem": "^1.2.9" + "viem": "^1.4.1" } } diff --git a/packages/bridge-ui-v2/src/app.config.ts b/packages/bridge-ui-v2/src/app.config.ts index 3cd6c95a50..f848af06fa 100644 --- a/packages/bridge-ui-v2/src/app.config.ts +++ b/packages/bridge-ui-v2/src/app.config.ts @@ -19,3 +19,22 @@ export const bridgeService = { export const pendingTransaction = { waitTimeout: 300_000, }; + +export const storageService = { + bridgeTxPrefix: 'transactions', + customTokenPrefix: 'custom-tokens', +}; + +export const bridgeTransactionPoller = { + interval: 20_000, +}; + +export const statusComponent = { + minimumEthToClaim: 0.0001, +}; + +export const activitiesConfig = { + pageSizeDesktop: 6, + pageSizeMobile: 4, + blurTransitionTime: 300, +}; diff --git a/packages/bridge-ui-v2/src/components/Activities/Activities.svelte b/packages/bridge-ui-v2/src/components/Activities/Activities.svelte index c5549a215e..2096c12826 100644 --- a/packages/bridge-ui-v2/src/components/Activities/Activities.svelte +++ b/packages/bridge-ui-v2/src/components/Activities/Activities.svelte @@ -1,25 +1,185 @@ - -
- - -
- -
+
+ + +
+ {#if isDesktopOrLarger} +
+
+
{$t('activities.header.from')}
+
{$t('activities.header.to')}
+
{$t('activities.header.amount')}
+
+ {$t('activities.header.status')} + +
+
{$t('activities.header.explorer')}
+
+
+ {/if} - - + + + + + + diff --git a/packages/bridge-ui-v2/src/components/Activities/ChainSymbolName.svelte b/packages/bridge-ui-v2/src/components/Activities/ChainSymbolName.svelte new file mode 100644 index 0000000000..1c0627e0a7 --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Activities/ChainSymbolName.svelte @@ -0,0 +1,12 @@ + + +
+ + {chainName} +
diff --git a/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte b/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte deleted file mode 100644 index f664644387..0000000000 --- a/packages/bridge-ui-v2/src/components/Activities/ListWithDetailsView.svelte +++ /dev/null @@ -1,224 +0,0 @@ - - -
- - - - - -
- - - -
- - - - - - - -
- - - - - -
-
-
diff --git a/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte b/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte new file mode 100644 index 0000000000..4b3ad0a5e1 --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Activities/MobileDetailsDialog.svelte @@ -0,0 +1,72 @@ + + + + + + diff --git a/packages/bridge-ui-v2/src/components/Activities/Status.svelte b/packages/bridge-ui-v2/src/components/Activities/Status.svelte new file mode 100644 index 0000000000..b958e59dba --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Activities/Status.svelte @@ -0,0 +1,290 @@ + + +
+ {#if !processable} + + {$t('activities.status.initiated.name')} + {:else if loading} +
+ + {$t(`activities.status.${loading}`)} +
+ {:else if bridgeTxStatus === MessageStatus.NEW} + + {:else if bridgeTxStatus === MessageStatus.RETRIABLE} + + {:else if bridgeTxStatus === MessageStatus.DONE} + + {$t('activities.status.claimed.name')} + {:else if bridgeTxStatus === MessageStatus.FAILED} + + {:else} + + + {$t('activities.status.error.name')} + {/if} +
diff --git a/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte b/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte new file mode 100644 index 0000000000..5164ecde8f --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Activities/StatusInfoDialog.svelte @@ -0,0 +1,80 @@ + + + + + + + + + + + +
+
diff --git a/packages/bridge-ui-v2/src/components/Activities/TableView.svelte b/packages/bridge-ui-v2/src/components/Activities/TableView.svelte deleted file mode 100644 index e4e142ebfe..0000000000 --- a/packages/bridge-ui-v2/src/components/Activities/TableView.svelte +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$t('chain.from')}{$t('chain.to')}{$t('amount_input.label')} -
- {$t('activities.header.status')} - TODO: add description about status here -
-
{$t('activities.header.explorer')}
-
- - - - Sepolia -
-
-
- - - - Taiko -
-
2.5 ETH -
- - {$t('activities.status.initiated')} -
-
- {$t('activities.link.explorer')} -
-
- - - - Taiko -
-
-
- - - - Sepolia -
-
0.342 ETH -
- - {$t('activities.status.pending')} -
-
- {$t('activities.link.explorer')} -
-
- - - - Taiko -
-
-
- - - - Sepolia -
-
7 HORSE -
- -
-
- {$t('activities.link.explorer')} -
-
- - - - Taiko -
-
-
- - - - Sepolia -
-
3 BLL -
- -
-
- {$t('activities.link.explorer')} -
-
- - - - Sepolia -
-
-
- - - - Taiko -
-
3.204 ETH -
- - {$t('activities.status.claimed')} -
-
- {$t('activities.link.explorer')} -
-
- - - - Sepolia -
-
-
- - - - Taiko -
-
2.5 BLL -
- - {$t('activities.status.failed')} -
-
- {$t('activities.link.explorer')} -
-
- - - - Taiko -
-
-
- - - - Sepolia -
-
1.203 HORSE -
- -
-
- {$t('activities.link.explorer')} -
diff --git a/packages/bridge-ui-v2/src/components/Activities/Transaction.svelte b/packages/bridge-ui-v2/src/components/Activities/Transaction.svelte new file mode 100644 index 0000000000..d9691a4ba7 --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Activities/Transaction.svelte @@ -0,0 +1,93 @@ + + + + + +
+ {#if isDesktopOrLarger} +
+ +
+
+ +
+
+ {formatEther(item.amount ? item.amount : BigInt(0))} + {item.symbol} +
+ {:else} +
+
+
+ + + + + +
+
+ {formatEther(item.amount ? item.amount : BigInt(0))} + {item.symbol} +
+
+
+ {/if} + +
+ +
+ +
+ diff --git a/packages/bridge-ui-v2/src/components/Activities/state.ts b/packages/bridge-ui-v2/src/components/Activities/state.ts new file mode 100644 index 0000000000..d4f3192746 --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Activities/state.ts @@ -0,0 +1,5 @@ +import { writable } from 'svelte/store'; + +import type { BridgeTransaction } from '$libs/bridge'; + +export const transactionStore = writable([]); diff --git a/packages/bridge-ui-v2/src/components/Bridge/Actions.svelte b/packages/bridge-ui-v2/src/components/Bridge/Actions.svelte index 5a59a5300c..dd66837d33 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/Actions.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/Actions.svelte @@ -16,6 +16,7 @@ recipientAddress, selectedToken, tokenBalance, + validatingAmount, } from './state'; export let approve: () => Promise; @@ -49,11 +50,11 @@ // Conditions for approve/bridge steps $: isSelectedERC20 = $selectedToken && $selectedToken.type === TokenType.ERC20; - $: isTokenApproved = isSelectedERC20 && $enteredAmount && !$insufficientAllowance; + $: isTokenApproved = isSelectedERC20 && $enteredAmount && !$insufficientAllowance && !$validatingAmount; // Conditions to disable/enable buttons - $: disableApprove = canDoNothing || !$insufficientAllowance || approving; - $: disableBridge = canDoNothing || $insufficientAllowance || $insufficientBalance || bridging; + $: disableApprove = canDoNothing || !$insufficientAllowance || $validatingAmount || approving; + $: disableBridge = canDoNothing || $insufficientAllowance || $insufficientBalance || $validatingAmount || bridging; // General loading state // $: loading = approving || bridging; diff --git a/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte b/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte index 8390e5cf4e..de77ae5522 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte @@ -1,6 +1,5 @@ -
+
- +
{#if $errorComputingBalance} {:else} - {$t('amount_input.balance')}: + {$t('inputs.amount.balance')}: {#if $computingBalance} @@ -234,9 +211,8 @@ id={inputId} type="number" placeholder="0.01" - disabled={$errorComputingBalance} min="0" - loading={computingMaxAmount} + disabled={$errorComputingBalance || computingMaxAmount} error={$insufficientBalance} on:input={inputAmount} bind:this={inputBox} @@ -246,13 +222,13 @@ class="absolute right-6 uppercase hover:font-bold" disabled={!$selectedToken || !$network || computingMaxAmount || $errorComputingBalance} on:click={useMaxAmount}> - {$t('amount_input.button.max')} + {$t('inputs.amount.button.max')}
- {#if $insufficientBalance && $enteredAmount > 0 && !errorComputingBalance} - - {:else if $insufficientAllowance && $enteredAmount > 0 && !errorComputingBalance} - + {#if showInsifficientBalanceAlert} + + {:else if showInsiffucientAllowanceAlert} + {/if}
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte b/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte index 56ad2592da..06fdc67af1 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte @@ -10,9 +10,16 @@ import { OnNetwork } from '$components/OnNetwork'; import { TokenDropdown } from '$components/TokenDropdown'; import { PUBLIC_L1_EXPLORER_URL } from '$env/static/public'; - import { type BridgeArgs, bridges, type ERC20BridgeArgs, type ETHBridgeArgs } from '$libs/bridge'; + import { + type BridgeArgs, + bridges, + type BridgeTransaction, + type ERC20BridgeArgs, + type ETHBridgeArgs, + MessageStatus, + } from '$libs/bridge'; import type { ERC20Bridge } from '$libs/bridge/ERC20Bridge'; - import { chainContractsMap, chains } from '$libs/chain'; + import { chainContractsMap, chains, chainUrlMap } from '$libs/chain'; import { ApproveError, InsufficientAllowanceError, @@ -20,6 +27,7 @@ SendERC20Error, SendMessageError, } from '$libs/error'; + import { bridgeTxService } from '$libs/storage'; import { ETHToken, getAddress, isDeployedCrossChain, tokens, TokenType } from '$libs/token'; import { getConnectedWallet } from '$libs/util/getConnectedWallet'; import { type Account, account } from '$stores/account'; @@ -82,11 +90,13 @@ wallet: walletClient, }); + const { explorerUrl } = chainUrlMap[$network.id]; + infoToast( $t('bridge.actions.approve.tx', { values: { token: $selectedToken.symbol, - url: `${PUBLIC_L1_EXPLORER_URL}/tx/${txHash}`, + url: `${explorerUrl}/tx/${txHash}`, }, }), ); @@ -193,6 +203,7 @@ $t('bridge.actions.bridge.tx', { values: { token: $selectedToken.symbol, + //Todo: must link to the correct explorer, not just L1 url: `${PUBLIC_L1_EXPLORER_URL}/tx/${txHash}`, }, }), @@ -208,6 +219,27 @@ }), ); + // Let's add it to the user's localStorage + const bridgeTx = { + hash: txHash, + from: $account.address, + amount: $enteredAmount, + symbol: $selectedToken.symbol, + decimals: $selectedToken.decimals, + srcChainId: BigInt($network.id), + destChainId: BigInt($destNetwork.id), + tokenType: $selectedToken.type, + status: MessageStatus.NEW, + timestamp: Date.now(), + + // TODO: do we need something else? we can have + // access to the Transaction object: + // TransactionLegacy, TransactionEIP2930 and + // TransactionEIP1559 + } as BridgeTransaction; + + bridgeTxService.addTxByAddress($account.address, bridgeTx); + // Reset the form amountComponent.clearAmount(); recipientComponent.clearRecipient(); diff --git a/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte b/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte index 16707e241c..b5a4b7c149 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte @@ -3,6 +3,7 @@ import { page } from '$app/stores'; import { LinkButton } from '$components/LinkButton'; + import { PUBLIC_NFT_BRIDGE_ENABLED } from '$env/static/public'; import { classNames } from '$libs/util/classNames'; let classes = classNames('space-x-2', $$props.class); @@ -11,12 +12,14 @@ $: isNFTBridge = $page.route.id === '/nft'; -
- - {$t('nav.token')} - +{#if PUBLIC_NFT_BRIDGE_ENABLED === 'true'} +
+ + {$t('nav.token')} + - - {$t('nav.nft')} - -
+ + {$t('nav.nft')} + +
+{/if} diff --git a/packages/bridge-ui-v2/src/components/Bridge/ProcessingFee/ProcessingFee.svelte b/packages/bridge-ui-v2/src/components/Bridge/ProcessingFee/ProcessingFee.svelte index 1bb3f044c2..9a98bfd23e 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/ProcessingFee/ProcessingFee.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/ProcessingFee/ProcessingFee.svelte @@ -142,7 +142,7 @@ {#if !hasEnoughEth} diff --git a/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte b/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte index 0322f1a1ef..85150b1ede 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte @@ -25,7 +25,7 @@ + {/if} + Page + goToPage(currentPage)} /> + of {totalPages} + +
+{/if} + + diff --git a/packages/bridge-ui-v2/src/components/Paginator/index.ts b/packages/bridge-ui-v2/src/components/Paginator/index.ts new file mode 100644 index 0000000000..1cd879cb43 --- /dev/null +++ b/packages/bridge-ui-v2/src/components/Paginator/index.ts @@ -0,0 +1 @@ +export { default as Paginator } from './Paginator.svelte'; diff --git a/packages/bridge-ui-v2/src/components/SideNavigation/SideNavigation.svelte b/packages/bridge-ui-v2/src/components/SideNavigation/SideNavigation.svelte index ebe5f0103e..4577142b21 100644 --- a/packages/bridge-ui-v2/src/components/SideNavigation/SideNavigation.svelte +++ b/packages/bridge-ui-v2/src/components/SideNavigation/SideNavigation.svelte @@ -62,8 +62,7 @@ md:px-4 md:py-8 md:w-[226px] - md:border-r - md:border-r-divider-border"> + "> diff --git a/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte b/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte index e835d2ea25..a459af186f 100644 --- a/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte +++ b/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte @@ -1,10 +1,9 @@ - + {#if PUBLIC_NFT_BRIDGE_ENABLED === 'true'} + + {/if} diff --git a/packages/bridge-ui-v2/src/stores/pendingTransactions.ts b/packages/bridge-ui-v2/src/stores/pendingTransactions.ts index 10989979c7..af2b6ca97a 100644 --- a/packages/bridge-ui-v2/src/stores/pendingTransactions.ts +++ b/packages/bridge-ui-v2/src/stores/pendingTransactions.ts @@ -65,6 +65,7 @@ export const pendingTransactions = { }) .catch((err) => { console.error(err); + deferred.reject(new FailedTransactionError(`transaction with hash "${hash}" failed`, { cause: err })); }); return newPendingTransactions; diff --git a/packages/bridge-ui-v2/src/stores/relayerApi.ts b/packages/bridge-ui-v2/src/stores/relayerApi.ts new file mode 100644 index 0000000000..3bce795cfd --- /dev/null +++ b/packages/bridge-ui-v2/src/stores/relayerApi.ts @@ -0,0 +1,7 @@ +import { writable } from 'svelte/store'; + +import type { PaginationInfo, RelayerBlockInfo } from '$libs/relayer/types'; + +export const paginationInfo = writable(); + +export const relayerBlockInfoMap = writable>(); diff --git a/packages/bridge-ui-v2/src/styles/base.css b/packages/bridge-ui-v2/src/styles/base.css index 326e28d9e7..167d1b327b 100644 --- a/packages/bridge-ui-v2/src/styles/base.css +++ b/packages/bridge-ui-v2/src/styles/base.css @@ -18,4 +18,19 @@ body { height: 100%; } + + body { + /* No grid background by default */ + height: 100%; + background-image: url(/bg/grid.svg), url(/bg/spotlights.svg), linear-gradient(270deg, #1f1f1f 0%, #000000 100%); + background-size: 0, cover, cover; + background-blend-mode: color-dodge, lighten, multiply; + background-attachment: fixed; + } + + @media (min-width: 768px) { + body { + background-size: 700px, cover, cover; + } + } } diff --git a/packages/bridge-ui-v2/src/styles/components.css b/packages/bridge-ui-v2/src/styles/components.css index 839066bb4d..0d26a0f7ba 100644 --- a/packages/bridge-ui-v2/src/styles/components.css +++ b/packages/bridge-ui-v2/src/styles/components.css @@ -75,7 +75,7 @@ /* border */ /* border-primary-border */ - shadow-[0_0_0_1px_#5d636f] + /* shadow-[0_0_0_1px_#5d636f] */ /* hover:border-2 */ /* hover:border-primary-border-hover */ @@ -119,7 +119,19 @@ /* Other components */ .overlay-backdrop { - @apply modal-backdrop bg-overlay-background; + @apply modal-backdrop bg-overlay-background rounded-xl; + } + + .chainselector { + @apply /* background: var(--interactive-dark-tertiary, #444A55); */ + hover:background-color: var(--interactive-dark-tertiary-hover, #5D636F); + } + + .glassy-gradient-card { + /* Trying to be consistent with design */ + /* grey-500/10 => grey-800/20 */ + background: linear-gradient(226deg, rgba(93, 99, 111, 0.1) 1.26%, rgba(25, 30, 40, 0.2) 100%); + backdrop-filter: blur(10px); } /* TODO: add more components here */ diff --git a/packages/bridge-ui-v2/src/styles/utilities.css b/packages/bridge-ui-v2/src/styles/utilities.css index 55a2ebda79..f45da5c551 100644 --- a/packages/bridge-ui-v2/src/styles/utilities.css +++ b/packages/bridge-ui-v2/src/styles/utilities.css @@ -22,7 +22,7 @@ } .glassy-primary-background { - @apply bg-grey-900/60 backdrop-filter backdrop-blur-sm; + @apply bg-grey-900/10 backdrop-filter backdrop-blur-sm; } /* Flex shortcuts */ diff --git a/packages/bridge-ui-v2/src/test/libs/util/mergeTransactions.test.ts b/packages/bridge-ui-v2/src/test/libs/util/mergeTransactions.test.ts new file mode 100644 index 0000000000..c21857eff4 --- /dev/null +++ b/packages/bridge-ui-v2/src/test/libs/util/mergeTransactions.test.ts @@ -0,0 +1,123 @@ +import type { Address, Hex } from 'viem'; + +import { type BridgeTransaction, MessageStatus } from '$libs/bridge'; +import { TokenType } from '$libs/token'; +import { mergeAndCaptureOutdatedTransactions } from '$libs/util/mergeTransactions'; + +describe('mergeUniqueTransactions', () => { + // Given + const localTxs: BridgeTransaction[] = [ + { + hash: 'hash1' as Hex, + from: 'address1' as Address, + amount: BigInt(1000), + symbol: 'symbol1', + decimals: 2, + srcChainId: BigInt(1), + destChainId: BigInt(2), + status: MessageStatus.DONE, + msgHash: 'msg1' as Hex, + receipt: undefined, + tokenType: TokenType.ERC20, + }, + { + hash: 'hash2' as Hex, + from: 'address2' as Address, + amount: BigInt(2000), + symbol: 'symbol2', + decimals: 2, + srcChainId: BigInt(1), + destChainId: BigInt(2), + status: MessageStatus.DONE, + msgHash: 'msg2' as Hex, + receipt: undefined, + tokenType: TokenType.ERC20, + }, + ]; + + const relayerTx: BridgeTransaction[] = [ + { + hash: 'hash3' as Hex, + from: 'address3' as Address, + amount: BigInt(3000), + symbol: 'symbol3', + decimals: 2, + srcChainId: BigInt(1), + destChainId: BigInt(2), + status: MessageStatus.DONE, + msgHash: 'msg3' as Hex, + receipt: undefined, + tokenType: TokenType.ERC20, + }, + { + hash: 'hash4' as Hex, + from: 'address4' as Address, + amount: BigInt(4000), + symbol: 'symbol4', + decimals: 2, + srcChainId: BigInt(1), + destChainId: BigInt(2), + status: MessageStatus.DONE, + msgHash: 'msg4' as Hex, + receipt: undefined, + tokenType: TokenType.ERC20, + }, + ]; + + it('should merge transactions when no outdated local ones', () => { + // When + const result = mergeAndCaptureOutdatedTransactions(localTxs, relayerTx); + + // Then + expect(extractHashes(result.mergedTransactions)).toEqual(extractHashes([...localTxs, ...relayerTx])); + expect(result.outdatedLocalTransactions).toEqual([]); + }); + + it('should identify and capture outdated local transactions', () => { + // Given + const outdatedTx = relayerTx[0]; + const localWithOutdated = [...localTxs, outdatedTx]; + + // When + const result = mergeAndCaptureOutdatedTransactions(localWithOutdated, relayerTx); + + // Then + expect(extractHashes(result.mergedTransactions)).toEqual(extractHashes([...localTxs, ...relayerTx])); + expect(result.outdatedLocalTransactions).toEqual([outdatedTx]); + }); + + it('should merge transactions and capture outdated ones, complex', () => { + // Given + + const localWithOutdated = [ + ...localTxs, + { + hash: 'hash3' as Hex, + from: 'address2' as Address, + amount: BigInt(2000), + symbol: 'symbol2', + decimals: 2, + srcChainId: BigInt(1), + destChainId: BigInt(2), + status: MessageStatus.DONE, + msgHash: 'msg2' as Hex, + receipt: undefined, + tokenType: TokenType.ERC20, + }, + ]; + + const expectedMergedHashes = extractHashes([...localTxs, ...relayerTx]); + const expectedOutdatedHashes = ['hash3' as Hex]; + + // When + const result = mergeAndCaptureOutdatedTransactions(localWithOutdated, relayerTx); + + // Then + expect(extractHashes(result.mergedTransactions)).toEqual(expectedMergedHashes); + expect(extractHashes(result.outdatedLocalTransactions)).toEqual(expectedOutdatedHashes); + }); +}); + +function extractHashes(transactions: BridgeTransaction[]): Hex[] { + return transactions.map((tx) => tx.hash); +} diff --git a/packages/bridge-ui-v2/static/bg-md.svg b/packages/bridge-ui-v2/static/bg-md.svg new file mode 100644 index 0000000000..fd416a9484 --- /dev/null +++ b/packages/bridge-ui-v2/static/bg-md.svg @@ -0,0 +1,3060 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/bridge-ui-v2/static/bg.svg b/packages/bridge-ui-v2/static/bg.svg new file mode 100644 index 0000000000..c51c9f7859 --- /dev/null +++ b/packages/bridge-ui-v2/static/bg.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/bridge-ui-v2/static/bg/grid.svg b/packages/bridge-ui-v2/static/bg/grid.svg new file mode 100644 index 0000000000..e3b5993a3a --- /dev/null +++ b/packages/bridge-ui-v2/static/bg/grid.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/bridge-ui-v2/static/bg/spotlights.svg b/packages/bridge-ui-v2/static/bg/spotlights.svg new file mode 100644 index 0000000000..aba8d48ec2 --- /dev/null +++ b/packages/bridge-ui-v2/static/bg/spotlights.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/bridge-ui-v2/tailwind.config.js b/packages/bridge-ui-v2/tailwind.config.js index bb9345b7ef..33400cbca3 100644 --- a/packages/bridge-ui-v2/tailwind.config.js +++ b/packages/bridge-ui-v2/tailwind.config.js @@ -252,26 +252,77 @@ export default { }, light: { - // TODO: add light theme - 'color-scheme': 'light', '--btn-text-case': 'capitalize', - '--rounded-box': '0.625rem', // 10px + // '--rounded-box': '0.625rem', // 10px + '--primary-brand': '#C8047D', // pink-500 '--primary-content': '#191E28', // grey-800 + '--primary-link': '#C8047D', // pink-500 + '--primary-link-hover': '#E81899', // pink-400 + '--primary-icon': '#5D636F', // grey-500 '--primary-background': '#FAFAFA', // grey-5 + '--primary-interactive': '#C8047D', // pink-500 + '--primary-interactive-accent': '#E81899', // pink-400 + '--primary-border': '#91969F', // grey-300 + '--primary-border-hover': '#FF6FC8', // pink-200 + '--primary-border-accent': '#E81899', // pink-400 + + // TODO: these two are yet to be decided + '--primary-base-background': '#FFFFFF', // grey-0 + '--primary-base-content': '#191E28', // grey-800 + + '--secondary-brand': '#E81899', // pink-400 + '--secondary-content': '#444A55', // grey-600 + '--secondary-icon': '#2B303B', // grey-700 + '--secondary-interactive-hover': '#F3F3F3', // grey-10 + + '--tertiary-content': '#91969F', // grey-300 + + // TODO: these two are missing. Remain the same as dark theme + '--tertiary-interactive-hover': '#444A55', // grey-600 + '--tertiary-interactive-accent': '#5D636F', // grey-500 + + '--positive-sentiment': '#005E36', // green-700 + '--positive-background': '#BFFFE4', // green-50 + + '--negative-sentiment': '#BB1A1B', // red-600 + '--negative-background': '#FFE7E7', // red-10 + + '--warning-sentiment': '#775602', // yellow-700 + '--warning-background': '#FFF6DE', // yellow-10 + + '--elevated-background': '#FAFAFA', // grey-5 + '--neutral-background': '#E7E7E7', // grey-50 + '--overlay-background': 'rgba(12, 17, 28, 0.2)', // grey-900|20% + + '--divider-border': '#CACBCE', // grey-100 // ================================ // + primary: '#C8047D', // pink-500, + 'primary-focus': '#E81899', // pink-400 + 'primary-content': '#F3F3F3', // grey-10 + + secondary: '#E81899', // pink-400 + // 'secondary-focus': '', + 'secondary-content': '#444A55', // grey-600 + + neutral: '#E7E7E7', // grey-50 + 'neutral-focus': '#CACBCE', // grey-100 + 'neutral-content': '#F3F3F3', // grey-10 + 'base-100': '#FAFAFA', // grey-5 + // 'base-200': '', + // 'base-300': '', 'base-content': '#191E28', // grey-800 - success: '#E4FFF4', // green-10 - 'success-content': '#059458', // green-600 + success: '#BFFFE4', // green-50 + 'success-content': '#005E36', // green-700 error: '#FFE7E7', // red-10 - 'error-content': '#CE2C2D', // red-500 + 'error-content': '#BB1A1B', // red-600 warning: '#FFF6DE', // yellow-10 - 'warning-content': '#C28B00', // yellow-600 + 'warning-content': '#775602', // yellow-700 }, }, ], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7f85cd1400..8ef633b9d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -205,7 +205,7 @@ importers: dependencies: '@wagmi/core': specifier: ^1.3.6 - version: 1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) + version: 1.3.8(lokijs@1.5.12)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) '@web3modal/ethereum': specifier: ^2.6.2 version: 2.7.1(@wagmi/core@1.3.8)(viem@1.5.3) @@ -215,17 +215,23 @@ importers: '@zerodevx/svelte-toast': specifier: ^0.9.5 version: 0.9.5(svelte@4.1.2) - abitype: - specifier: ^0.8.2 - version: 0.8.11(typescript@5.1.6) + axios: + specifier: ^1.4.0 + version: 1.4.0(debug@4.3.4) + buffer: + specifier: ^6.0.3 + version: 6.0.3 debug: specifier: ^4.3.4 version: 4.3.4(supports-color@8.1.1) + events: + specifier: ^3.3.0 + version: 3.3.0 svelte-i18n: specifier: ^3.6.0 version: 3.7.0(svelte@4.1.2) viem: - specifier: ^1.2.9 + specifier: ^1.4.1 version: 1.5.3(typescript@5.1.6)(zod@3.21.4) devDependencies: '@playwright/test': @@ -255,6 +261,9 @@ importers: '@wagmi/cli': specifier: ^1.0.1 version: 1.3.0(@wagmi/core@1.3.8)(typescript@5.1.6) + abitype: + specifier: ^0.8.7 + version: 0.8.11(typescript@5.1.6) autoprefixer: specifier: ^10.4.14 version: 10.4.14(postcss@8.4.27) @@ -279,6 +288,9 @@ importers: jsdom: specifier: ^22.1.0 version: 22.1.0 + lokijs: + specifier: ^1.5.12 + version: 1.5.12 postcss: specifier: ^8.4.24 version: 8.4.27 @@ -1174,7 +1186,7 @@ packages: '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4(supports-color@8.1.1) lodash.debounce: 4.0.8 - resolve: 1.22.2 + resolve: 1.22.3 transitivePeerDependencies: - supports-color dev: true @@ -4560,7 +4572,7 @@ packages: resolution: {integrity: sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==} dependencies: '@noble/curves': 1.0.0 - '@noble/hashes': 1.3.0 + '@noble/hashes': 1.3.1 '@scure/base': 1.1.1 /@scure/bip39@1.1.1: @@ -4573,7 +4585,7 @@ packages: /@scure/bip39@1.2.0: resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} dependencies: - '@noble/hashes': 1.3.0 + '@noble/hashes': 1.3.1 '@scure/base': 1.1.1 /@sentry-internal/tracing@7.61.1: @@ -5255,13 +5267,13 @@ packages: /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/bn.js@5.1.1: resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/cacheable-request@6.0.3: @@ -5269,7 +5281,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 12.20.55 + '@types/node': 20.4.7 '@types/responselike': 1.0.0 dev: true optional: true @@ -5287,13 +5299,13 @@ packages: /@types/concat-stream@1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 /@types/cookie@0.5.1: resolution: {integrity: sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==} @@ -5351,14 +5363,14 @@ packages: /@types/form-data@0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/glob@8.1.0: @@ -5435,7 +5447,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true optional: true @@ -5448,7 +5460,7 @@ packages: dependencies: '@types/abstract-leveldown': 7.2.1 '@types/level-errors': 3.0.0 - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/lru-cache@5.1.1: @@ -5522,7 +5534,7 @@ packages: /@types/pbkdf2@3.1.0: resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/prettier@2.7.3: @@ -5550,7 +5562,7 @@ packages: /@types/readable-stream@2.3.15: resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 safe-buffer: 5.1.2 dev: true @@ -5563,7 +5575,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true optional: true @@ -5586,7 +5598,7 @@ packages: /@types/secp256k1@4.0.3: resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 dev: true /@types/semver@7.5.0: @@ -5639,7 +5651,7 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.4.7 /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} @@ -6303,7 +6315,7 @@ packages: optional: true dependencies: '@wagmi/chains': 1.3.0(typescript@5.1.6) - '@wagmi/core': 1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) + '@wagmi/core': 1.3.8(lokijs@1.5.12)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4) abort-controller: 3.0.0 bundle-require: 3.1.2(esbuild@0.15.13) @@ -6440,7 +6452,7 @@ packages: - utf-8-validate - zod - /@wagmi/connectors@2.6.6(@wagmi/chains@1.6.0)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3): + /@wagmi/connectors@2.6.6(@wagmi/chains@1.6.0)(lokijs@1.5.12)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3): resolution: {integrity: sha512-/o1c/TCivQs8DOAUOcQvY2UIt3p2mWOAHi39D0LC74+ncpXzLC5/gyaWU38qnTxPM8s/PmTmaWDgz+VhICXrag==} peerDependencies: '@wagmi/chains': '>=1.3.0' @@ -6457,10 +6469,10 @@ packages: '@safe-global/safe-apps-provider': 0.17.1(typescript@5.1.6) '@safe-global/safe-apps-sdk': 8.0.0(typescript@5.1.6) '@wagmi/chains': 1.6.0(typescript@5.1.6) - '@walletconnect/ethereum-provider': 2.9.0(@walletconnect/modal@2.5.9) + '@walletconnect/ethereum-provider': 2.9.0(@walletconnect/modal@2.5.9)(lokijs@1.5.12) '@walletconnect/legacy-provider': 2.0.0 '@walletconnect/modal': 2.5.9(react@18.2.0) - '@walletconnect/utils': 2.9.0 + '@walletconnect/utils': 2.9.0(lokijs@1.5.12) abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4) eventemitter3: 4.0.7 typescript: 5.1.6 @@ -6537,7 +6549,7 @@ packages: - zod dev: false - /@wagmi/core@1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.5.3): + /@wagmi/core@1.3.8(lokijs@1.5.12)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3): resolution: {integrity: sha512-OYSxikoMizqVnpSkFTwGE7PwFaz2k0PXteSiI0W2Mtk4j4sZzRFdP+9AWeDB6AYm0yU3WvgN1IATx0EEBKUe3w==} peerDependencies: typescript: '>=5.0.4' @@ -6547,7 +6559,7 @@ packages: optional: true dependencies: '@wagmi/chains': 1.6.0(typescript@5.1.6) - '@wagmi/connectors': 2.6.6(@wagmi/chains@1.6.0)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) + '@wagmi/connectors': 2.6.6(@wagmi/chains@1.6.0)(lokijs@1.5.12)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4) eventemitter3: 4.0.7 typescript: 5.1.6 @@ -6599,7 +6611,7 @@ packages: - utf-8-validate dev: false - /@walletconnect/core@2.9.0: + /@walletconnect/core@2.9.0(lokijs@1.5.12): resolution: {integrity: sha512-MZYJghS9YCvGe32UOgDj0mCasaOoGHQaYXWeQblXE/xb8HuaM6kAWhjIQN9P+MNp5QP134BHP5olQostcCotXQ==} dependencies: '@walletconnect/heartbeat': 1.2.1 @@ -6607,14 +6619,14 @@ packages: '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/jsonrpc-ws-connection': 1.0.12 - '@walletconnect/keyvaluestorage': 1.0.2 + '@walletconnect/keyvaluestorage': 1.0.2(lokijs@1.5.12) '@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.9.0 - '@walletconnect/utils': 2.9.0 + '@walletconnect/types': 2.9.0(lokijs@1.5.12) + '@walletconnect/utils': 2.9.0(lokijs@1.5.12) events: 3.3.0 lodash.isequal: 4.5.0 uint8arrays: 3.1.1 @@ -6632,7 +6644,7 @@ packages: '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/jsonrpc-ws-connection': 1.0.13 - '@walletconnect/keyvaluestorage': 1.0.2 + '@walletconnect/keyvaluestorage': 1.0.2(lokijs@1.5.12) '@walletconnect/logger': 2.0.1 '@walletconnect/relay-api': 1.0.9 '@walletconnect/relay-auth': 1.0.4 @@ -6691,7 +6703,7 @@ packages: - utf-8-validate dev: false - /@walletconnect/ethereum-provider@2.9.0(@walletconnect/modal@2.5.9): + /@walletconnect/ethereum-provider@2.9.0(@walletconnect/modal@2.5.9)(lokijs@1.5.12): resolution: {integrity: sha512-rSXkC0SXMigJRdIi/M2RMuEuATY1AwtlTWQBnqyxoht7xbO2bQNPCXn0XL4s/GRNrSUtoKSY4aPMHXV4W4yLBA==} peerDependencies: '@walletconnect/modal': '>=2' @@ -6704,10 +6716,10 @@ packages: '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/modal': 2.5.9(react@18.2.0) - '@walletconnect/sign-client': 2.9.0 - '@walletconnect/types': 2.9.0 - '@walletconnect/universal-provider': 2.9.0 - '@walletconnect/utils': 2.9.0 + '@walletconnect/sign-client': 2.9.0(lokijs@1.5.12) + '@walletconnect/types': 2.9.0(lokijs@1.5.12) + '@walletconnect/universal-provider': 2.9.0(lokijs@1.5.12) + '@walletconnect/utils': 2.9.0(lokijs@1.5.12) events: 3.3.0 transitivePeerDependencies: - '@react-native-async-storage/async-storage' @@ -6729,10 +6741,10 @@ packages: '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/modal': 2.6.1(react@18.2.0) - '@walletconnect/sign-client': 2.9.0 - '@walletconnect/types': 2.9.0 - '@walletconnect/universal-provider': 2.9.0 - '@walletconnect/utils': 2.9.0 + '@walletconnect/sign-client': 2.9.0(lokijs@1.5.12) + '@walletconnect/types': 2.9.0(lokijs@1.5.12) + '@walletconnect/universal-provider': 2.9.0(lokijs@1.5.12) + '@walletconnect/utils': 2.9.0(lokijs@1.5.12) events: 3.3.0 transitivePeerDependencies: - '@react-native-async-storage/async-storage' @@ -6817,7 +6829,7 @@ packages: - utf-8-validate dev: false - /@walletconnect/keyvaluestorage@1.0.2: + /@walletconnect/keyvaluestorage@1.0.2(lokijs@1.5.12): resolution: {integrity: sha512-U/nNG+VLWoPFdwwKx0oliT4ziKQCEoQ27L5Hhw8YOFGA2Po9A9pULUYNWhDgHkrb0gYDNt//X7wABcEWWBd3FQ==} peerDependencies: '@react-native-async-storage/async-storage': 1.x @@ -6828,6 +6840,7 @@ packages: lokijs: optional: true dependencies: + lokijs: 1.5.12 safe-json-utils: 1.1.1 tslib: 1.14.1 @@ -6990,17 +7003,17 @@ packages: dependencies: tslib: 1.14.1 - /@walletconnect/sign-client@2.9.0: + /@walletconnect/sign-client@2.9.0(lokijs@1.5.12): resolution: {integrity: sha512-mEKc4LlLMebCe45qzqh+MX4ilQK4kOEBzLY6YJpG8EhyT45eX4JMNA7qQoYa9MRMaaVb/7USJcc4e3ZrjZvQmA==} dependencies: - '@walletconnect/core': 2.9.0 + '@walletconnect/core': 2.9.0(lokijs@1.5.12) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.9.0 - '@walletconnect/utils': 2.9.0 + '@walletconnect/types': 2.9.0(lokijs@1.5.12) + '@walletconnect/utils': 2.9.0(lokijs@1.5.12) events: 3.3.0 transitivePeerDependencies: - '@react-native-async-storage/async-storage' @@ -7062,13 +7075,13 @@ packages: deprecated: 'WalletConnect''s v1 SDKs are now deprecated. Please upgrade to a v2 SDK. For details see: https://docs.walletconnect.com/' dev: false - /@walletconnect/types@2.9.0: + /@walletconnect/types@2.9.0(lokijs@1.5.12): resolution: {integrity: sha512-ORopsMfSRvUYqtjKKd6scfg8o4/aGebipLxx92AuuUgMTERSU6cGmIrK6rdLu7W6FBJkmngPLEGc9mRqAb9Lug==} dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-types': 1.0.3 - '@walletconnect/keyvaluestorage': 1.0.2 + '@walletconnect/keyvaluestorage': 1.0.2(lokijs@1.5.12) '@walletconnect/logger': 2.0.1 events: 3.3.0 transitivePeerDependencies: @@ -7081,7 +7094,7 @@ packages: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-types': 1.0.3 - '@walletconnect/keyvaluestorage': 1.0.2 + '@walletconnect/keyvaluestorage': 1.0.2(lokijs@1.5.12) '@walletconnect/logger': 2.0.1 events: 3.3.0 transitivePeerDependencies: @@ -7089,7 +7102,7 @@ packages: - lokijs dev: false - /@walletconnect/universal-provider@2.9.0: + /@walletconnect/universal-provider@2.9.0(lokijs@1.5.12): resolution: {integrity: sha512-k3nkSBkF69sJJVoe17IVoPtnhp/sgaa2t+x7BvA/BKeMxE0DGdtRJdEXotTc8DBmI7o2tkq6l8+HyFBGjQ/CjQ==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 @@ -7097,9 +7110,9 @@ packages: '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 - '@walletconnect/sign-client': 2.9.0 - '@walletconnect/types': 2.9.0 - '@walletconnect/utils': 2.9.0 + '@walletconnect/sign-client': 2.9.0(lokijs@1.5.12) + '@walletconnect/types': 2.9.0(lokijs@1.5.12) + '@walletconnect/utils': 2.9.0(lokijs@1.5.12) events: 3.3.0 transitivePeerDependencies: - '@react-native-async-storage/async-storage' @@ -7140,7 +7153,7 @@ packages: query-string: 6.13.5 dev: false - /@walletconnect/utils@2.9.0: + /@walletconnect/utils@2.9.0(lokijs@1.5.12): resolution: {integrity: sha512-7Tu3m6dZL84KofrNBcblsgpSqU2vdo9ImLD7zWimLXERVGNQ8smXG+gmhQYblebIBhsPzjy9N38YMC3nPlfQNw==} dependencies: '@stablelib/chacha20poly1305': 1.0.1 @@ -7151,7 +7164,7 @@ packages: '@walletconnect/relay-api': 1.0.9 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.9.0 + '@walletconnect/types': 2.9.0(lokijs@1.5.12) '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 detect-browser: 5.3.0 @@ -7227,7 +7240,7 @@ packages: '@wagmi/core': '>=1' viem: '>=1' dependencies: - '@wagmi/core': 1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) + '@wagmi/core': 1.3.8(lokijs@1.5.12)(react@18.2.0)(typescript@5.1.6)(viem@1.5.3) viem: 1.5.3(typescript@5.1.6)(zod@3.21.4) dev: false @@ -7468,7 +7481,7 @@ packages: optional: true dependencies: typescript: 5.1.6 - dev: false + dev: true /abitype@0.8.7(typescript@4.9.5)(zod@3.21.4): resolution: {integrity: sha512-wQ7hV8Yg/yKmGyFpqrNZufCxbszDe5es4AZGYPBitocfSqXtjrTG9JMWFcc4N30ukl2ve48aBTwt7NJxVQdU3w==} @@ -10821,7 +10834,7 @@ packages: supports-color: optional: true dependencies: - ms: 2.1.1 + ms: 2.1.3 supports-color: 6.0.0 dev: true @@ -12653,7 +12666,7 @@ packages: /eth-json-rpc-middleware@1.6.0: resolution: {integrity: sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==} dependencies: - async: 2.6.2 + async: 2.6.4 eth-query: 2.1.2 eth-tx-summary: 3.2.4 ethereumjs-block: 1.7.1 @@ -12729,7 +12742,7 @@ packages: /eth-tx-summary@3.2.4: resolution: {integrity: sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg==} dependencies: - async: 2.6.2 + async: 2.6.4 clone: 2.1.2 concat-stream: 1.6.2 end-of-stream: 1.4.4 @@ -12745,7 +12758,7 @@ packages: resolution: {integrity: sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==} deprecated: 'New package name format for new versions: @ethereumjs/ethash. Please update.' dependencies: - async: 2.6.2 + async: 2.6.4 buffer-xor: 2.0.2 ethereumjs-util: 7.1.5 miller-rabin: 4.0.1 @@ -12854,7 +12867,7 @@ packages: resolution: {integrity: sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==} deprecated: 'New package name format for new versions: @ethereumjs/block. Please update.' dependencies: - async: 2.6.2 + async: 2.6.4 ethereum-common: 0.2.0 ethereumjs-tx: 1.3.7 ethereumjs-util: 5.2.1 @@ -12865,7 +12878,7 @@ packages: resolution: {integrity: sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==} deprecated: 'New package name format for new versions: @ethereumjs/block. Please update.' dependencies: - async: 2.6.2 + async: 2.6.4 ethereumjs-common: 1.5.0 ethereumjs-tx: 2.1.2 ethereumjs-util: 5.2.1 @@ -12876,7 +12889,7 @@ packages: resolution: {integrity: sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==} deprecated: 'New package name format for new versions: @ethereumjs/blockchain. Please update.' dependencies: - async: 2.6.2 + async: 2.6.4 ethashjs: 0.0.8 ethereumjs-block: 2.2.2 ethereumjs-common: 1.5.0 @@ -12958,7 +12971,7 @@ packages: resolution: {integrity: sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==} deprecated: 'New package name format for new versions: @ethereumjs/vm. Please update.' dependencies: - async: 2.6.2 + async: 2.6.4 async-eventemitter: 0.2.4 ethereumjs-account: 2.0.5 ethereumjs-block: 2.2.2 @@ -12975,7 +12988,7 @@ packages: resolution: {integrity: sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA==} deprecated: 'New package name format for new versions: @ethereumjs/vm. Please update.' dependencies: - async: 2.6.2 + async: 2.6.4 async-eventemitter: 0.2.4 core-js-pure: 3.32.0 ethereumjs-account: 3.0.0 @@ -13955,7 +13968,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -13977,7 +13990,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.8 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -15872,7 +15885,7 @@ packages: jest-pnp-resolver: 1.2.3(jest-resolve@27.5.1) jest-util: 27.5.1 jest-validate: 27.5.1 - resolve: 1.22.2 + resolve: 1.22.3 resolve.exports: 1.1.1 slash: 3.0.0 dev: true @@ -16217,7 +16230,7 @@ packages: /json-rpc-engine@3.8.0: resolution: {integrity: sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==} dependencies: - async: 2.6.2 + async: 2.6.4 babel-preset-env: 1.7.0 babelify: 7.3.0 json-rpc-error: 2.0.0 @@ -16670,7 +16683,7 @@ packages: /level-post@1.0.7: resolution: {integrity: sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew==} dependencies: - ltgt: 2.1.3 + ltgt: 2.2.1 dev: true /level-sublevel@5.2.3: @@ -17005,6 +17018,9 @@ packages: is-unicode-supported: 1.3.0 dev: true + /lokijs@1.5.12: + resolution: {integrity: sha512-Q5ALD6JiS6xAUWCwX3taQmgwxyveCtIIuL08+ml0nHwT3k0S/GIFJN+Hd38b1qYIMaE5X++iqsqWVksz7SYW+Q==} + /longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} dev: false @@ -17540,7 +17556,7 @@ packages: /merkle-patricia-tree@3.0.0: resolution: {integrity: sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ==} dependencies: - async: 2.6.2 + async: 2.6.4 ethereumjs-util: 5.2.1 level-mem: 3.0.1 level-ws: 1.0.0 @@ -18772,7 +18788,7 @@ packages: resolution: {integrity: sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==} hasBin: true dependencies: - abbrev: 1.0.9 + abbrev: 1.1.1 dev: true /nopt@5.0.0: @@ -18787,7 +18803,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 + resolve: 1.22.3 semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: true @@ -20377,7 +20393,7 @@ packages: resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} engines: {node: '>= 0.10'} dependencies: - resolve: 1.22.2 + resolve: 1.22.3 dev: true /recursive-readdir@2.2.3: @@ -22474,7 +22490,7 @@ packages: is-regex: 1.1.4 minimist: 1.2.8 object-inspect: 1.12.3 - resolve: 1.22.2 + resolve: 1.22.3 resumer: 0.0.0 string.prototype.trim: 1.2.7 through: 2.3.8 @@ -22883,7 +22899,7 @@ packages: glob: 7.2.3 mkdirp: 0.5.6 prettier: 2.8.8 - resolve: 1.22.2 + resolve: 1.22.3 ts-essentials: 1.0.4 dev: true @@ -24463,7 +24479,7 @@ packages: /web3-provider-engine@14.2.1: resolution: {integrity: sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw==} dependencies: - async: 2.6.2 + async: 2.6.4 backoff: 2.5.0 clone: 2.1.2 cross-fetch: 2.2.6