From 4995ee93b8c130d292bd2a4e0492c198686a5798 Mon Sep 17 00:00:00 2001 From: Matthew Lilley Date: Mon, 1 Aug 2022 14:36:07 +0000 Subject: [PATCH 1/9] chore: remove dhedge list and migrate --- src/config/token-lists.ts | 4 ++-- src/state/migrations.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/config/token-lists.ts b/src/config/token-lists.ts index 8e91189101..3a288c3ea3 100644 --- a/src/config/token-lists.ts +++ b/src/config/token-lists.ts @@ -14,7 +14,7 @@ const SET_LIST = 'https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlis const UMA_LIST = 'https://umaproject.org/uma.tokenlist.json' const WRAPPED_LIST = 'wrapped.tokensoft.eth' const ROLL_LIST = 'https://app.tryroll.com/tokens.json' -const DHEDGE_LIST = 'https://list.dhedge.eth.link' +// const DHEDGE_LIST = 'https://list.dhedge.eth.link' const SUSHI_LIST = 'https://token-list.sushi.com' const CHAINLINK_LIST = 'https://token-list.sushi.com/chainlink' @@ -38,7 +38,7 @@ const DEFAULT_LIST_OF_LISTS_TO_DISPLAY: string[] = [ SET_LIST, ROLL_LIST, NFTX_LIST, - DHEDGE_LIST, + // DHEDGE_LIST, ] export const DEFAULT_LIST_OF_LISTS: string[] = [ diff --git a/src/state/migrations.ts b/src/state/migrations.ts index 1620d3240b..6abde8d1f9 100644 --- a/src/state/migrations.ts +++ b/src/state/migrations.ts @@ -38,6 +38,13 @@ const migrations = { user: initialUserState, } }, + // @ts-ignore + 5: (state) => { + return { + ...state, + lists: initialListsState, + } + }, } export default migrations From adcc0fcb10ec5784b28e9dd4f42d090dbb6e3e41 Mon Sep 17 00:00:00 2001 From: Matthew Lilley Date: Mon, 1 Aug 2022 14:52:23 +0000 Subject: [PATCH 2/9] chore: remove gemini list and actually migrate --- src/config/token-lists.ts | 2 +- src/state/index.ts | 2 +- src/state/migrations.ts | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/config/token-lists.ts b/src/config/token-lists.ts index 3a288c3ea3..b085004d5b 100644 --- a/src/config/token-lists.ts +++ b/src/config/token-lists.ts @@ -47,4 +47,4 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [ ] // default lists to be 'active' aka searched across -export const DEFAULT_ACTIVE_LIST_URLS: string[] = [SUSHI_LIST, CHAINLINK_LIST, GEMINI_LIST, NFTX_LIST] +export const DEFAULT_ACTIVE_LIST_URLS: string[] = [SUSHI_LIST, CHAINLINK_LIST, NFTX_LIST] diff --git a/src/state/index.ts b/src/state/index.ts index 14d75d4352..81f3180eab 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -10,7 +10,7 @@ const PERSISTED_KEYS: string[] = ['user', 'transactions', 'lists', 'slippage'] const persistConfig = { key: 'root', whitelist: PERSISTED_KEYS, - version: 3, + version: 4, storage, migrate: createMigrate(migrations, { debug: process.env.NODE_ENV === 'development' }), } diff --git a/src/state/migrations.ts b/src/state/migrations.ts index 6abde8d1f9..257e3e32f9 100644 --- a/src/state/migrations.ts +++ b/src/state/migrations.ts @@ -36,12 +36,6 @@ const migrations = { return { ...state, user: initialUserState, - } - }, - // @ts-ignore - 5: (state) => { - return { - ...state, lists: initialListsState, } }, From c97d3690f1ef9fea895d5fc46f1bb254767ef961 Mon Sep 17 00:00:00 2001 From: Matthew Lilley Date: Mon, 1 Aug 2022 16:16:54 +0000 Subject: [PATCH 3/9] fix: race condition/s with network switching --- src/components/Web3Network/index.tsx | 48 ++++++++++++++++++++-------- src/modals/NetworkModal/index.tsx | 29 ++--------------- 2 files changed, 36 insertions(+), 41 deletions(-) diff --git a/src/components/Web3Network/index.tsx b/src/components/Web3Network/index.tsx index 5d5206b892..16d486d5d9 100644 --- a/src/components/Web3Network/index.tsx +++ b/src/components/Web3Network/index.tsx @@ -4,7 +4,8 @@ import useIsWindowVisible from 'app/hooks/useIsWindowVisible' import usePrevious from 'app/hooks/usePrevious' import NetworkModel from 'app/modals/NetworkModal' import { useActiveWeb3React } from 'app/services/web3' -import { useNetworkModalToggle } from 'app/state/application/hooks' +import { useModalOpen, useNetworkModalToggle } from 'app/state/application/hooks' +import { ApplicationModal } from 'app/state/application/reducer' import Cookies from 'js-cookie' import Image from 'next/image' import { useRouter } from 'next/router' @@ -27,6 +28,8 @@ function Web3Network(): JSX.Element | null { const queryChainId = Number(router.query.chainId) + const networkModalOpen = useModalOpen(ApplicationModal.NETWORK) + const handleChainSwitch = useCallback( (targetChain: number) => { if (!library || !library?.provider) { @@ -34,18 +37,24 @@ function Web3Network(): JSX.Element | null { return } - setSwitchedFromUrl(true) - - if (switchedFromUrl) return - - switchToNetwork({ provider: library.provider, chainId: targetChain }).then(() => { - return router.replace({ - pathname: router.pathname, - query: { ...router.query, chainId: targetChain }, + switchToNetwork({ provider: library.provider, chainId: targetChain }) + .then(() => { + return router.replace( + { + pathname: router.pathname, + query: { ...router.query, chainId: targetChain }, + }, + undefined, + { shallow: true } + ) + }) + .finally(() => { + if (networkModalOpen) { + toggleNetworkModal() + } }) - }) }, - [library, switchedFromUrl, router] + [library, router, toggleNetworkModal, networkModalOpen] ) useEffect(() => { @@ -54,7 +63,7 @@ function Web3Network(): JSX.Element | null { // when network change originates from wallet or dropdown selector, just update URL if (chainId !== prevChainId) { console.debug('network change from wallet or network modal') - router.replace({ pathname: router.pathname, query: { ...router.query, chainId } }) + router.replace({ pathname: router.pathname, query: { ...router.query, chainId } }, undefined, { shallow: true }) } }, [chainId, prevChainId, router]) @@ -75,13 +84,18 @@ function Web3Network(): JSX.Element | null { console.debug('network change from query chainId', { queryChainId, defaultChainId, chainId }) setAttemptingSwitchFromUrl(true) + + setSwitchedFromUrl(true) + + if (switchedFromUrl) return + handleChainSwitch(defaultChainId ? defaultChainId : queryChainId) }, [chainId, handleChainSwitch, switchedFromUrl, queryChainId, isWindowVisible, attemptingSwitchFromUrl]) // set chainId on initial load if not present useEffect(() => { if (chainId && !queryChainId) { - router.replace({ pathname: router.pathname, query: { ...router.query, chainId } }) + router.replace({ pathname: router.pathname, query: { ...router.query, chainId } }, undefined, { shallow: true }) } }, [chainId, queryChainId, router]) @@ -96,7 +110,13 @@ function Web3Network(): JSX.Element | null { {/*@ts-ignore TYPE NEEDS FIXING*/} Switch Network - + { + setSwitchedFromUrl(false) + setAttemptingSwitchFromUrl(false) + handleChainSwitch(targetChain) + }} + /> ) } diff --git a/src/modals/NetworkModal/index.tsx b/src/modals/NetworkModal/index.tsx index 452c95d69e..cc9deace50 100644 --- a/src/modals/NetworkModal/index.tsx +++ b/src/modals/NetworkModal/index.tsx @@ -285,7 +285,7 @@ export const SUPPORTED_NETWORKS: Record< }, } -const NetworkModal: FC = () => { +const NetworkModal: FC<{ switchNetwork: (targetChain: number) => void }> = ({ switchNetwork }) => { const { i18n } = useLingui() const { chainId, library, account } = useActiveWeb3React() const networkModalOpen = useModalOpen(ApplicationModal.NETWORK) @@ -344,32 +344,7 @@ const NetworkModal: FC = () => { return ( + + ) +} + +export default EmergencyDetails diff --git a/src/features/onsen/FarmList.tsx b/src/features/onsen/FarmList.tsx index 6b1f4df50d..d67d626e15 100644 --- a/src/features/onsen/FarmList.tsx +++ b/src/features/onsen/FarmList.tsx @@ -116,7 +116,11 @@ const FarmList = ({ farms, term }) => { afterLeave={handleDismiss} > {selectedFarm && ( - dispatch(setOnsenModalOpen(false))} /> + dispatch(setOnsenModalOpen(false))} + /> )} diff --git a/src/features/onsen/FarmListItemDetails.tsx b/src/features/onsen/FarmListItemDetails.tsx index 19315465cf..f4f25f3894 100644 --- a/src/features/onsen/FarmListItemDetails.tsx +++ b/src/features/onsen/FarmListItemDetails.tsx @@ -1,5 +1,6 @@ import { t } from '@lingui/macro' import { useLingui } from '@lingui/react' +import { ChainId } from '@sushiswap/core-sdk' import { HeadlessUiModal } from 'app/components/Modal' import QuestionHelper from 'app/components/QuestionHelper' import ToggleButtonGroup from 'app/components/ToggleButton' @@ -8,6 +9,7 @@ import { classNames } from 'app/functions' import { useAppDispatch, useAppSelector } from 'app/state/hooks' import React, { createContext, ReactNode, useContext, useMemo, useState } from 'react' +import EmergencyDetails from './EmergencyDetails' import { OnsenModalView, PairType } from './enum' import InformationDisclosure from './InformationDisclosure' import InvestmentDetails from './InvestmentDetails' @@ -26,7 +28,7 @@ interface FarmListItemDetailsModal { const Context = createContext(undefined) // @ts-ignore TYPE NEEDS FIXING -const FarmListItemDetails = ({ farm, onDismiss }) => { +const FarmListItemDetails = ({ farm, chainId, onDismiss }) => { const { i18n } = useLingui() const { view } = useAppSelector(selectOnsen) const dispatch = useAppDispatch() @@ -61,6 +63,11 @@ const FarmListItemDetails = ({ farm, onDismiss }) => { {i18n._(t`Staking`)} {i18n._(t`Rewards`)} + {chainId === ChainId.HARMONY ? ( + + {i18n._(t`Emergency`)} + + ) : undefined} {/*Dont unmount following components to make modal more react faster*/} @@ -79,6 +86,9 @@ const FarmListItemDetails = ({ farm, onDismiss }) => {
+
+ +
diff --git a/src/features/onsen/ManageTridentPair.tsx b/src/features/onsen/ManageTridentPair.tsx index a5a33a1ef3..8f3e5ed86f 100644 --- a/src/features/onsen/ManageTridentPair.tsx +++ b/src/features/onsen/ManageTridentPair.tsx @@ -13,8 +13,6 @@ const ManageTridentPair = ({ farm }) => { const token0 = useCurrency(farm.pair.token0.id) const token1 = useCurrency(farm.pair.token1.id) - console.log(farm) - return (
diff --git a/src/features/onsen/enum.ts b/src/features/onsen/enum.ts index 152a511fa3..73f22b43fb 100644 --- a/src/features/onsen/enum.ts +++ b/src/features/onsen/enum.ts @@ -21,4 +21,5 @@ export enum OnsenModalView { Staking, Position, AddLiquidityConfirm, + Emergency, } diff --git a/src/features/onsen/useMasterChef.ts b/src/features/onsen/useMasterChef.ts index 3bbd3bf61c..f755dbda2d 100644 --- a/src/features/onsen/useMasterChef.ts +++ b/src/features/onsen/useMasterChef.ts @@ -58,6 +58,25 @@ export default function useMasterChef(chef: Chef) { [account, chef, contract] ) + const emergency = useCallback( + async (pid: number) => { + try { + let tx + if (chef === Chef.MASTERCHEF) { + tx = await contract?.emergencyWithdraw(pid) + } else { + tx = await contract?.emergencyWithdraw(pid, account) + } + + return tx + } catch (e) { + console.error(e) + return e + } + }, + [account, chef, contract] + ) + const harvest = useCallback( async (pid: number) => { try { @@ -95,5 +114,5 @@ export default function useMasterChef(chef: Chef) { [account, chef, contract, sushi] ) - return { deposit, withdraw, harvest } + return { deposit, withdraw, harvest, emergency } } diff --git a/src/features/onsen/usePendingReward.ts b/src/features/onsen/usePendingReward.ts index 205fbb8936..86277a2cc2 100644 --- a/src/features/onsen/usePendingReward.ts +++ b/src/features/onsen/usePendingReward.ts @@ -17,8 +17,6 @@ const usePending = (farm) => { const cloneRewarder = useCloneRewarderContract(farm?.rewarder?.id) - console.log(farm) - const complexRewarder = useComplexRewarderContract(farm?.rewarder?.id) const contract = useMemo( From 5bb0dc0c24c22f16d831a11aa8ab369017e2fea5 Mon Sep 17 00:00:00 2001 From: 0xJiro <70732637+jiro-ono@users.noreply.github.com> Date: Fri, 5 Aug 2022 22:24:01 +0100 Subject: [PATCH 8/9] Revert "chore: add emergency button for harmony farms" --- src/features/onsen/EmergencyDetails.tsx | 60 ---------------------- src/features/onsen/FarmList.tsx | 6 +-- src/features/onsen/FarmListItemDetails.tsx | 12 +---- src/features/onsen/ManageTridentPair.tsx | 2 + src/features/onsen/enum.ts | 1 - src/features/onsen/useMasterChef.ts | 21 +------- src/features/onsen/usePendingReward.ts | 2 + 7 files changed, 7 insertions(+), 97 deletions(-) delete mode 100644 src/features/onsen/EmergencyDetails.tsx diff --git a/src/features/onsen/EmergencyDetails.tsx b/src/features/onsen/EmergencyDetails.tsx deleted file mode 100644 index fb121f5094..0000000000 --- a/src/features/onsen/EmergencyDetails.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { useLingui } from '@lingui/react' -import Button from 'app/components/Button' -import { HeadlessUiModal } from 'app/components/Modal' -import Typography from 'app/components/Typography' -import { useCurrency } from 'app/hooks/Tokens' -import useActiveWeb3React from 'app/lib/hooks/useActiveWeb3React' -import { useTransactionAdder } from 'app/state/transactions/hooks' -import React, { useState } from 'react' - -import useMasterChef from './useMasterChef' - -// @ts-ignore TYPE NEEDS FIXING -const EmergencyDetails = ({ farm }) => { - const { i18n } = useLingui() - const { account, chainId } = useActiveWeb3React() - const addTransaction = useTransactionAdder() - const [pendingTx, setPendingTx] = useState(false) - const token0 = useCurrency(farm.pair.token0.id) - const token1 = useCurrency(farm.pair.token1.id) - const { emergency } = useMasterChef(farm.chef) - - async function onEmergency() { - setPendingTx(true) - try { - const tx = await emergency(farm.id) - addTransaction(tx, { - summary: `Emergency Withdraw`, - }) - } catch (error) { - console.error(error) - } - setPendingTx(false) - } - - return ( - <> - -
-
- - {`Emergency Withdraw`} - -
- - - {`Emergency withdrawal should only be used in the case of SLP tokens being stuck, or in the case of an emergency. When used all SLP tokens will be withdrawn, and accumulated SUSHI rewards will be abandoned.`} - - - {`*For Harmony Users: wONE rewards will be harvested but SUSHI will not on emergency withdrawal. At the moment it is unclear if the current earned SUSHI will be able to be harvested in the future.`} - -
-
- - - ) -} - -export default EmergencyDetails diff --git a/src/features/onsen/FarmList.tsx b/src/features/onsen/FarmList.tsx index d67d626e15..6b1f4df50d 100644 --- a/src/features/onsen/FarmList.tsx +++ b/src/features/onsen/FarmList.tsx @@ -116,11 +116,7 @@ const FarmList = ({ farms, term }) => { afterLeave={handleDismiss} > {selectedFarm && ( - dispatch(setOnsenModalOpen(false))} - /> + dispatch(setOnsenModalOpen(false))} /> )} diff --git a/src/features/onsen/FarmListItemDetails.tsx b/src/features/onsen/FarmListItemDetails.tsx index f4f25f3894..19315465cf 100644 --- a/src/features/onsen/FarmListItemDetails.tsx +++ b/src/features/onsen/FarmListItemDetails.tsx @@ -1,6 +1,5 @@ import { t } from '@lingui/macro' import { useLingui } from '@lingui/react' -import { ChainId } from '@sushiswap/core-sdk' import { HeadlessUiModal } from 'app/components/Modal' import QuestionHelper from 'app/components/QuestionHelper' import ToggleButtonGroup from 'app/components/ToggleButton' @@ -9,7 +8,6 @@ import { classNames } from 'app/functions' import { useAppDispatch, useAppSelector } from 'app/state/hooks' import React, { createContext, ReactNode, useContext, useMemo, useState } from 'react' -import EmergencyDetails from './EmergencyDetails' import { OnsenModalView, PairType } from './enum' import InformationDisclosure from './InformationDisclosure' import InvestmentDetails from './InvestmentDetails' @@ -28,7 +26,7 @@ interface FarmListItemDetailsModal { const Context = createContext(undefined) // @ts-ignore TYPE NEEDS FIXING -const FarmListItemDetails = ({ farm, chainId, onDismiss }) => { +const FarmListItemDetails = ({ farm, onDismiss }) => { const { i18n } = useLingui() const { view } = useAppSelector(selectOnsen) const dispatch = useAppDispatch() @@ -63,11 +61,6 @@ const FarmListItemDetails = ({ farm, chainId, onDismiss }) => { {i18n._(t`Staking`)} {i18n._(t`Rewards`)} - {chainId === ChainId.HARMONY ? ( - - {i18n._(t`Emergency`)} - - ) : undefined} {/*Dont unmount following components to make modal more react faster*/} @@ -86,9 +79,6 @@ const FarmListItemDetails = ({ farm, chainId, onDismiss }) => {
-
- -
diff --git a/src/features/onsen/ManageTridentPair.tsx b/src/features/onsen/ManageTridentPair.tsx index 8f3e5ed86f..a5a33a1ef3 100644 --- a/src/features/onsen/ManageTridentPair.tsx +++ b/src/features/onsen/ManageTridentPair.tsx @@ -13,6 +13,8 @@ const ManageTridentPair = ({ farm }) => { const token0 = useCurrency(farm.pair.token0.id) const token1 = useCurrency(farm.pair.token1.id) + console.log(farm) + return (
diff --git a/src/features/onsen/enum.ts b/src/features/onsen/enum.ts index 73f22b43fb..152a511fa3 100644 --- a/src/features/onsen/enum.ts +++ b/src/features/onsen/enum.ts @@ -21,5 +21,4 @@ export enum OnsenModalView { Staking, Position, AddLiquidityConfirm, - Emergency, } diff --git a/src/features/onsen/useMasterChef.ts b/src/features/onsen/useMasterChef.ts index f755dbda2d..3bbd3bf61c 100644 --- a/src/features/onsen/useMasterChef.ts +++ b/src/features/onsen/useMasterChef.ts @@ -58,25 +58,6 @@ export default function useMasterChef(chef: Chef) { [account, chef, contract] ) - const emergency = useCallback( - async (pid: number) => { - try { - let tx - if (chef === Chef.MASTERCHEF) { - tx = await contract?.emergencyWithdraw(pid) - } else { - tx = await contract?.emergencyWithdraw(pid, account) - } - - return tx - } catch (e) { - console.error(e) - return e - } - }, - [account, chef, contract] - ) - const harvest = useCallback( async (pid: number) => { try { @@ -114,5 +95,5 @@ export default function useMasterChef(chef: Chef) { [account, chef, contract, sushi] ) - return { deposit, withdraw, harvest, emergency } + return { deposit, withdraw, harvest } } diff --git a/src/features/onsen/usePendingReward.ts b/src/features/onsen/usePendingReward.ts index 86277a2cc2..205fbb8936 100644 --- a/src/features/onsen/usePendingReward.ts +++ b/src/features/onsen/usePendingReward.ts @@ -17,6 +17,8 @@ const usePending = (farm) => { const cloneRewarder = useCloneRewarderContract(farm?.rewarder?.id) + console.log(farm) + const complexRewarder = useComplexRewarderContract(farm?.rewarder?.id) const contract = useMemo( From 3df11eaab6bb15710429fc5d32a0def850e7d981 Mon Sep 17 00:00:00 2001 From: Matthew Lilley Date: Tue, 9 Aug 2022 12:05:12 +0000 Subject: [PATCH 9/9] feat: arbitrum nova --- package.json | 12 ++-- src/components/CurrencyLogo/CurrencyLogo.tsx | 2 + src/config/features.ts | 1 + src/config/networks.ts | 2 + src/config/routing.ts | 24 +++++++ src/config/rpc.ts | 1 + src/config/token-lists.ts | 8 +-- src/config/tokens/arbitrum-nova.ts | 30 +++++++++ src/enums/ChainSubdomain.ts | 1 + src/features/trade/HeaderNew.tsx | 28 ++++---- src/functions/explorer.ts | 4 ++ src/hooks/useContract.ts | 1 + src/middleware.ts | 1 + src/modals/NetworkModal/index.tsx | 12 ++++ src/pages/legacy/swap/index.tsx | 3 +- src/state/index.ts | 2 +- src/state/migrations.ts | 7 ++ yarn.lock | 68 ++++++++++---------- 18 files changed, 149 insertions(+), 58 deletions(-) create mode 100644 src/config/tokens/arbitrum-nova.ts diff --git a/package.json b/package.json index b605612ab2..4100d17697 100644 --- a/package.json +++ b/package.json @@ -95,17 +95,17 @@ "@sentry/nextjs": "^7.0.0", "@sentry/react": "^7.0.0", "@sentry/tracing": "^7.0.0", - "@sushiswap/bentobox-sdk": "1.0.0-canary.109", + "@sushiswap/bentobox-sdk": "1.0.0-canary.112", "@sushiswap/chainlink-whitelist": "0.2.8", "@sushiswap/core": "^2.0.0-canary.1", - "@sushiswap/core-sdk": "1.0.0-canary.128", - "@sushiswap/kashi-sdk": "1.0.0-canary.100", + "@sushiswap/core-sdk": "1.0.0-canary.131", + "@sushiswap/kashi-sdk": "1.0.0-canary.103", "@sushiswap/limit-order-pair-list": "0.2.17", - "@sushiswap/limit-order-sdk": "1.0.0-canary.109", + "@sushiswap/limit-order-sdk": "1.0.0-canary.112", "@sushiswap/miso": "1.0.0-canary.47", - "@sushiswap/miso-sdk": "1.0.0-canary.98", + "@sushiswap/miso-sdk": "1.0.0-canary.101", "@sushiswap/trident": "^1.0.0-canary.40", - "@sushiswap/trident-sdk": "1.0.0-canary.137", + "@sushiswap/trident-sdk": "1.0.0-canary.140", "@testing-library/jest-dom": "^5.14.0", "@testing-library/react": "^12.1.0", "@transak/transak-sdk": "^1.0.31", diff --git a/src/components/CurrencyLogo/CurrencyLogo.tsx b/src/components/CurrencyLogo/CurrencyLogo.tsx index 37b0fa76c2..127122c3c5 100644 --- a/src/components/CurrencyLogo/CurrencyLogo.tsx +++ b/src/components/CurrencyLogo/CurrencyLogo.tsx @@ -25,6 +25,7 @@ const BLOCKCHAIN = { [ChainId.MOONBEAM]: 'moonbeam', [ChainId.KAVA]: 'kava', [ChainId.METIS]: 'metis', + [ChainId.ARBITRUM_NOVA]: 'arbitrum-nova', [ChainId.HARDHAT]: 'hardhat', } @@ -116,6 +117,7 @@ const LOGO: Record = { [ChainId.OPTIMISM]: EthereumLogo, [ChainId.KAVA]: KavaLogo, [ChainId.METIS]: MetisLogo, + [ChainId.ARBITRUM_NOVA]: EthereumLogo, } export interface CurrencyLogoProps { diff --git a/src/config/features.ts b/src/config/features.ts index f96aa53876..f40da88fb0 100644 --- a/src/config/features.ts +++ b/src/config/features.ts @@ -86,6 +86,7 @@ const features: FeatureMap = { [ChainId.OPTIMISM]: [Feature.TRIDENT, Feature.BENTOBOX], [ChainId.KAVA]: [Feature.TRIDENT, Feature.BENTOBOX, Feature.LIQUIDITY_MINING], [ChainId.METIS]: [Feature.TRIDENT, Feature.BENTOBOX, Feature.LIQUIDITY_MINING], + [ChainId.ARBITRUM_NOVA]: [Feature.AMM], } export default features diff --git a/src/config/networks.ts b/src/config/networks.ts index 8f56303446..3ff6f2eeea 100644 --- a/src/config/networks.ts +++ b/src/config/networks.ts @@ -58,6 +58,7 @@ export const NETWORK_ICON: Record = { [ChainId.OPTIMISM]: Optimism, [ChainId.KAVA]: Kava, [ChainId.METIS]: Metis, + [ChainId.ARBITRUM_NOVA]: Arbitrum, } export const NETWORK_LABEL: Record = { @@ -93,4 +94,5 @@ export const NETWORK_LABEL: Record = { [ChainId.OPTIMISM]: 'Optimism', [ChainId.KAVA]: 'Kava', [ChainId.METIS]: 'Metis', + [ChainId.ARBITRUM_NOVA]: 'Arbitrum Nova', } diff --git a/src/config/routing.ts b/src/config/routing.ts index 8a1a27c696..efd2a3c79e 100644 --- a/src/config/routing.ts +++ b/src/config/routing.ts @@ -2,6 +2,7 @@ import { ChainId, SUSHI, Token, WNATIVE } from '@sushiswap/core-sdk' import * as ARBITRUM from './tokens/arbitrum' +import * as ARBITRUM_NOVA from './tokens/arbitrum-nova' import * as AVALANCHE from './tokens/avalanche' import * as BSC from './tokens/bsc' import * as CELO from './tokens/celo' @@ -20,6 +21,7 @@ import * as OPTIMISM from './tokens/optimism' import * as PALM from './tokens/palm' import * as TELOS from './tokens/telos' import * as XDAI from './tokens/xdai' + type ChainTokenList = { readonly [chainId: number]: Token[] } @@ -78,6 +80,7 @@ const WRAPPED_NATIVE_ONLY: ChainTokenList = { [ChainId.OPTIMISM]: [WNATIVE[ChainId.OPTIMISM]], [ChainId.KAVA]: [WNATIVE[ChainId.KAVA]], [ChainId.METIS]: [WNATIVE[ChainId.METIS]], + [ChainId.ARBITRUM_NOVA]: [WNATIVE[ChainId.ARBITRUM_NOVA]], } // used to construct intermediary pairs for trading @@ -246,6 +249,13 @@ export const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = { ], [ChainId.KAVA]: [...WRAPPED_NATIVE_ONLY[ChainId.KAVA], KAVA.USDC, KAVA.USDT, KAVA.WETH, KAVA.WBTC, KAVA.DAI], [ChainId.METIS]: [...WRAPPED_NATIVE_ONLY[ChainId.METIS], METIS.USDC, METIS.USDT, METIS.WETH, METIS.DAI, METIS.WBTC], + [ChainId.ARBITRUM_NOVA]: [ + ...WRAPPED_NATIVE_ONLY[ChainId.ARBITRUM_NOVA], + ARBITRUM_NOVA.USDC, + ARBITRUM_NOVA.USDT, + ARBITRUM_NOVA.DAI, + ARBITRUM_NOVA.WBTC, + ], } export const ADDITIONAL_BASES: { @@ -643,6 +653,13 @@ export const COMMON_BASES: ChainTokenList = { ], [ChainId.KAVA]: [...WRAPPED_NATIVE_ONLY[ChainId.KAVA], KAVA.USDC, KAVA.USDT, KAVA.WETH, KAVA.WBTC, KAVA.DAI], [ChainId.METIS]: [...WRAPPED_NATIVE_ONLY[ChainId.METIS], METIS.USDC, METIS.USDT, METIS.WETH, METIS.DAI, METIS.WBTC], + [ChainId.ARBITRUM_NOVA]: [ + ...WRAPPED_NATIVE_ONLY[ChainId.ARBITRUM_NOVA], + ARBITRUM_NOVA.USDC, + ARBITRUM_NOVA.USDT, + ARBITRUM_NOVA.DAI, + ARBITRUM_NOVA.WBTC, + ], } // used to construct the list of all pairs we consider by default in the frontend @@ -792,6 +809,13 @@ export const BASES_TO_TRACK_LIQUIDITY_FOR: ChainTokenList = { ], [ChainId.KAVA]: [...WRAPPED_NATIVE_ONLY[ChainId.KAVA], KAVA.USDC, KAVA.USDT, KAVA.WETH, KAVA.WBTC, KAVA.DAI], [ChainId.METIS]: [...WRAPPED_NATIVE_ONLY[ChainId.METIS], METIS.USDC, METIS.USDT, METIS.WETH, METIS.DAI, METIS.WBTC], + [ChainId.ARBITRUM_NOVA]: [ + ...WRAPPED_NATIVE_ONLY[ChainId.ARBITRUM_NOVA], + ARBITRUM_NOVA.USDC, + ARBITRUM_NOVA.USDT, + ARBITRUM_NOVA.DAI, + ARBITRUM_NOVA.WBTC, + ], } export const PINNED_PAIRS: { readonly [chainId: number]: [Token, Token][] } = { diff --git a/src/config/rpc.ts b/src/config/rpc.ts index 93899ffb6b..e1404c2566 100644 --- a/src/config/rpc.ts +++ b/src/config/rpc.ts @@ -34,6 +34,7 @@ const RPC = { [ChainId.OPTIMISM]: 'https://mainnet.optimism.io', [ChainId.KAVA]: 'https://evm.kava.io', [ChainId.METIS]: 'https://andromeda.metis.io/?owner=1088', + [ChainId.ARBITRUM_NOVA]: 'https://a4ba.arbitrum.io/rpc', } export default RPC diff --git a/src/config/token-lists.ts b/src/config/token-lists.ts index b085004d5b..39751d6f4a 100644 --- a/src/config/token-lists.ts +++ b/src/config/token-lists.ts @@ -1,6 +1,5 @@ const BA_LIST = 'https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json' -const YEARN_LIST = 'https://yearn.science/static/tokenlist.json' -const NFTX_LIST = 'https://nftx.ethereumdb.com/v2/tokenlist/' +const NFTX_LIST = 'https://tokenlist.nftx.io' const SYNTHETIX_LIST = 'synths.snx.eth' const AAVE_LIST = 'tokenlist.aave.eth' const CMC_ALL_LIST = 'https://api.coinmarketcap.com/data-api/v3/uniswap/all.json' @@ -27,10 +26,9 @@ const DEFAULT_LIST_OF_LISTS_TO_DISPLAY: string[] = [ CHAINLINK_LIST, COMPOUND_LIST, AAVE_LIST, - CMC_ALL_LIST, + // CMC_ALL_LIST, COINGECKO_LIST, - UMA_LIST, - YEARN_LIST, + // UMA_LIST, SYNTHETIX_LIST, KLEROS_LIST, GEMINI_LIST, diff --git a/src/config/tokens/arbitrum-nova.ts b/src/config/tokens/arbitrum-nova.ts new file mode 100644 index 0000000000..fc36a6ac32 --- /dev/null +++ b/src/config/tokens/arbitrum-nova.ts @@ -0,0 +1,30 @@ +import { ChainId, Token } from '@sushiswap/core-sdk' + +export const USDC = new Token( + ChainId.ARBITRUM_NOVA, + '0x750ba8b76187092B0D1E87E28daaf484d1b5273b', + 6, + 'USDC', + 'USD Coin' +) +export const WBTC = new Token( + ChainId.ARBITRUM_NOVA, + '0x1d05e4e72cD994cdF976181CfB0707345763564d', + 8, + 'WBTC', + 'Wrapped Bitcoin' +) +export const USDT = new Token( + ChainId.ARBITRUM_NOVA, + '0x52484E1ab2e2B22420a25c20FA49E173a26202Cd', + 8, + 'USDT', + 'Tether USD' +) +export const DAI = new Token( + ChainId.ARBITRUM_NOVA, + '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', + 18, + 'DAI', + 'Dai Stablecoin' +) diff --git a/src/enums/ChainSubdomain.ts b/src/enums/ChainSubdomain.ts index 97fa349dbd..393ebcaa62 100644 --- a/src/enums/ChainSubdomain.ts +++ b/src/enums/ChainSubdomain.ts @@ -19,4 +19,5 @@ export enum ChainSubdomain { FUSE = 'fuse', TELOS = 'telos', MOONBEAM = 'moonbeam', + ARBITRUM_NOVA = 'arbitrum-nova', } diff --git a/src/features/trade/HeaderNew.tsx b/src/features/trade/HeaderNew.tsx index 52d798c37b..458cd05f8d 100644 --- a/src/features/trade/HeaderNew.tsx +++ b/src/features/trade/HeaderNew.tsx @@ -4,7 +4,10 @@ import { Currency } from '@sushiswap/core-sdk' import NavLink from 'app/components/NavLink' import Settings from 'app/components/Settings' import Typography from 'app/components/Typography' +import { Feature } from 'app/enums' import MyOrders from 'app/features/legacy/limit-order/MyOrders' +import { featureEnabled } from 'app/functions' +import { useActiveWeb3React } from 'app/services/web3' import { useRouter } from 'next/router' import React, { FC } from 'react' @@ -27,6 +30,7 @@ interface HeaderNewProps { } const HeaderNew: FC = ({ inputCurrency, outputCurrency, trident = false }) => { + const { chainId } = useActiveWeb3React() const { i18n } = useLingui() const { asPath } = useRouter() const isLimitOrder = asPath.startsWith('/limit-order') @@ -45,17 +49,19 @@ const HeaderNew: FC = ({ inputCurrency, outputCurrency, trident {i18n._(t`Swap`)} - - - {i18n._(t`Limit`)} - - + {featureEnabled(Feature.LIMIT_ORDERS, chainId) ? ( + + + {i18n._(t`Limit`)} + + + ) : null}
{isLimitOrder && } diff --git a/src/functions/explorer.ts b/src/functions/explorer.ts index 69a08621c8..1cc22c8bec 100644 --- a/src/functions/explorer.ts +++ b/src/functions/explorer.ts @@ -217,6 +217,10 @@ const chains: ChainObject = { link: 'https://andromeda-explorer.metis.io/', builder: explorers.blockscout, }, + [ChainId.ARBITRUM_NOVA]: { + link: 'https://nova-explorer.arbitrum.io/', + builder: explorers.blockscout, + }, } export function getExplorerLink( diff --git a/src/hooks/useContract.ts b/src/hooks/useContract.ts index 93298ab492..8a84a0d8ad 100644 --- a/src/hooks/useContract.ts +++ b/src/hooks/useContract.ts @@ -191,6 +191,7 @@ const MULTICALL_ADDRESS = { [ChainId.PALM]: '0x4d4A0D45a98AE8EC25b359D93A088A87BC9eF70b', [ChainId.KAVA]: '0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287', [ChainId.METIS]: '0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287', + [ChainId.ARBITRUM_NOVA]: '0x0769fd68dFb93167989C6f7254cd0D766Fb2841F', } export function useInterfaceMulticall(): Contract | null | undefined { diff --git a/src/middleware.ts b/src/middleware.ts index 772b331d77..797f12a43c 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -23,6 +23,7 @@ const SUBDOMAIN_CHAIN_ID: { [subdomain: string]: string } = { [ChainSubdomain.FUSE]: '122', [ChainSubdomain.TELOS]: '40', [ChainSubdomain.MOONBEAM]: '1284', + [ChainSubdomain.ARBITRUM_NOVA]: '42170', } const DEFAULT_CHAIN_ID = '1' diff --git a/src/modals/NetworkModal/index.tsx b/src/modals/NetworkModal/index.tsx index cc9deace50..0abd86f71f 100644 --- a/src/modals/NetworkModal/index.tsx +++ b/src/modals/NetworkModal/index.tsx @@ -283,6 +283,17 @@ export const SUPPORTED_NETWORKS: Record< rpcUrls: ['https://andromeda.metis.io/?owner=1088'], blockExplorerUrls: ['https://andromeda-explorer.metis.io/'], }, + [ChainId.ARBITRUM_NOVA]: { + chainId: '0xA4BA', + chainName: 'Arbitrum Nova', + nativeCurrency: { + name: 'Ether', + symbol: 'ETH', + decimals: 18, + }, + rpcUrls: ['https://nova.arbitrum.io/rpc '], + blockExplorerUrls: ['https://nova-explorer.arbitrum.io/'], + }, } const NetworkModal: FC<{ switchNetwork: (targetChain: number) => void }> = ({ switchNetwork }) => { @@ -301,6 +312,7 @@ const NetworkModal: FC<{ switchNetwork: (targetChain: number) => void }> = ({ sw {[ ChainId.ETHEREUM, ChainId.ARBITRUM, + ChainId.ARBITRUM_NOVA, ChainId.MATIC, ChainId.XDAI, ChainId.FANTOM, diff --git a/src/pages/legacy/swap/index.tsx b/src/pages/legacy/swap/index.tsx index 474bfe678e..2ba13e14b6 100644 --- a/src/pages/legacy/swap/index.tsx +++ b/src/pages/legacy/swap/index.tsx @@ -41,7 +41,8 @@ const Swap = ({ banners }: SwapProps) => { const { i18n } = useLingui() const loadedUrlParams = useDefaultsFromURLSearch() - const { account } = useActiveWeb3React() + const { account, chainId } = useActiveWeb3React() + const defaultTokens = useAllTokens() const [isExpertMode] = useExpertModeManager() diff --git a/src/state/index.ts b/src/state/index.ts index 81f3180eab..1392657dd9 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -10,7 +10,7 @@ const PERSISTED_KEYS: string[] = ['user', 'transactions', 'lists', 'slippage'] const persistConfig = { key: 'root', whitelist: PERSISTED_KEYS, - version: 4, + version: 5, storage, migrate: createMigrate(migrations, { debug: process.env.NODE_ENV === 'development' }), } diff --git a/src/state/migrations.ts b/src/state/migrations.ts index 257e3e32f9..6bd777223b 100644 --- a/src/state/migrations.ts +++ b/src/state/migrations.ts @@ -39,6 +39,13 @@ const migrations = { lists: initialListsState, } }, + // @ts-ignore + 5: (state) => { + return { + ...state, + lists: initialListsState, + } + }, } export default migrations diff --git a/yarn.lock b/yarn.lock index f6d3f39d12..3a32022194 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2677,22 +2677,22 @@ magic-string "^0.25.0" string.prototype.matchall "^4.0.6" -"@sushiswap/bentobox-sdk@1.0.0-canary.109": - version "1.0.0-canary.109" - resolved "https://registry.yarnpkg.com/@sushiswap/bentobox-sdk/-/bentobox-sdk-1.0.0-canary.109.tgz#99e38c124783c43617d9a7fe775dfc80e8cb4421" - integrity sha512-rVh8KHb0gBqAcRKvgSz5QfLcQLKcFIfBFXt6ToQdtzbt2RDx6qpFilEw76Sv05bf8TBldvSNYAPxm+ROmLaIBg== +"@sushiswap/bentobox-sdk@1.0.0-canary.112": + version "1.0.0-canary.112" + resolved "https://registry.yarnpkg.com/@sushiswap/bentobox-sdk/-/bentobox-sdk-1.0.0-canary.112.tgz#0e0713b906ce5e0d572afa832aaa540ae911874a" + integrity sha512-4Lf3agdgfBbu38WnXM8tZIuMi+xGe/rblkEMc7D+SpctOgmOW7EvkqnkOg3CpLBd9h4GdE4HEU4R5r/MxLRDXQ== dependencies: - "@sushiswap/core-sdk" "1.0.0-canary.128" + "@sushiswap/core-sdk" "1.0.0-canary.131" "@sushiswap/chainlink-whitelist@0.2.8": version "0.2.8" resolved "https://registry.yarnpkg.com/@sushiswap/chainlink-whitelist/-/chainlink-whitelist-0.2.8.tgz#832dc80963b890a2eb02aaaf11ea8b57b2b7dde0" integrity sha512-YhhGfF/smND4jUdVWuTr3e9Np08zLyxrOfbQ6GkAhmrld4lWBs2sk4TV6oWSBWPbuUb3A2mw203uCnbMHpSoXw== -"@sushiswap/core-sdk@1.0.0-canary.128": - version "1.0.0-canary.128" - resolved "https://registry.yarnpkg.com/@sushiswap/core-sdk/-/core-sdk-1.0.0-canary.128.tgz#ed0eb6866ea1310d131e835575cfd0269e079bb8" - integrity sha512-q/M1OLh8Q4MoS9UmyixQf7PEhjBJF9ReHj+4xUaBKhzyK5NF7ej6rsIAIbGFof2HC7hYU4gWZdyW/n97rwr0Zg== +"@sushiswap/core-sdk@1.0.0-canary.131": + version "1.0.0-canary.131" + resolved "https://registry.yarnpkg.com/@sushiswap/core-sdk/-/core-sdk-1.0.0-canary.131.tgz#36ae064863985c0b1a41dc2c99e0a99149bfd42e" + integrity sha512-pkfDoDrLFUYlDDOscnj1hRsmSMLTkH2aj15NYBifIclg8ABKqhoyD1StEfK5NpkrdwgUhx7jkU3lzLXg3vCT6g== dependencies: "@ethersproject/address" "^5.4.0" "@ethersproject/bignumber" "^5.4.0" @@ -2710,24 +2710,24 @@ resolved "https://registry.yarnpkg.com/@sushiswap/core/-/core-2.0.0-canary.1.tgz#91c938668282d463e4fce6e0cf4d320ce5f3768f" integrity sha512-6YFT4EKgm0XgfwCBsKx5HrDtRI6EvhZHipjBKegdTV0b2zKuXnmdyZ+RwPCr0mCKq2pKB0qIiqCxfbgXYDlLCQ== -"@sushiswap/kashi-sdk@1.0.0-canary.100": - version "1.0.0-canary.100" - resolved "https://registry.yarnpkg.com/@sushiswap/kashi-sdk/-/kashi-sdk-1.0.0-canary.100.tgz#1dda5f692f609d06c9e1b7e2cfe4df9a8c4c51b4" - integrity sha512-i6ze+MG+tJxywDH7KxpHrJteq15kd8gmGlW7mIGCZGYd7aFzaqsdJ5F1HuObHpJvlb5Zu2zAIuwl58lIVNZRag== +"@sushiswap/kashi-sdk@1.0.0-canary.103": + version "1.0.0-canary.103" + resolved "https://registry.yarnpkg.com/@sushiswap/kashi-sdk/-/kashi-sdk-1.0.0-canary.103.tgz#a164aec05dd50f8f709ce23d68cb6428a15b8d75" + integrity sha512-7x5zhKdpAnp0jMHVhOOkAXGlDXVOOQy6I7oq6DhyoDx3LpEEiHQLrvp9Cl/NS7XlEK1o3VJqOGSyRaWBmlsOtQ== dependencies: "@ethersproject/abi" "^5.4.0" "@ethersproject/contracts" "^5.4.0" - "@sushiswap/bentobox-sdk" "1.0.0-canary.109" + "@sushiswap/bentobox-sdk" "1.0.0-canary.112" "@sushiswap/limit-order-pair-list@0.2.17": version "0.2.17" resolved "https://registry.yarnpkg.com/@sushiswap/limit-order-pair-list/-/limit-order-pair-list-0.2.17.tgz#0f0b1fb2d4f2425056e76673cb3c3c7011dacfcb" integrity sha512-j5ewnBO2kEH1s3/dXPS8+qaFO/rM83H6DMP9Zy/Uh76Ub+wjRC4EqQEuhPlrAgQvqSTNX4hbPByD7x/OMzINuw== -"@sushiswap/limit-order-sdk@1.0.0-canary.109": - version "1.0.0-canary.109" - resolved "https://registry.yarnpkg.com/@sushiswap/limit-order-sdk/-/limit-order-sdk-1.0.0-canary.109.tgz#b19fc64f9718c5caef9b24fb5c4de78356361a05" - integrity sha512-3G2+UmGjWALAQzZnM5Vxv4IqkIIPa303qIS+Oav4Tw/HlzKo7O+4DUvQvDwag8GbULWDSkOYbPssPumGchycaA== +"@sushiswap/limit-order-sdk@1.0.0-canary.112": + version "1.0.0-canary.112" + resolved "https://registry.yarnpkg.com/@sushiswap/limit-order-sdk/-/limit-order-sdk-1.0.0-canary.112.tgz#92bb09bc158955badd46c1fc754f5f2b2c8ec0a0" + integrity sha512-NInqgW30T4ZRVR/6Deo+9c0UAIDYxdD/vyyA3RWdmbSaPAeWaAjf/SvETvcZSlZEw8O2CwIZ7WMTiixt+9ky9w== dependencies: "@ethersproject/abi" "^5.4.0" "@ethersproject/abstract-signer" "^5.4.0" @@ -2736,37 +2736,37 @@ "@ethersproject/experimental" "^5.4.0" "@ethersproject/signing-key" "^5.4.0" "@ethersproject/transactions" "^5.4.0" - "@sushiswap/core-sdk" "1.0.0-canary.128" + "@sushiswap/core-sdk" "1.0.0-canary.131" eip-712 "^0.4.0" isomorphic-unfetch "^3.0.0" -"@sushiswap/miso-sdk@1.0.0-canary.98": - version "1.0.0-canary.98" - resolved "https://registry.yarnpkg.com/@sushiswap/miso-sdk/-/miso-sdk-1.0.0-canary.98.tgz#c0687d4339bd588d58638c87796ad293b9493f24" - integrity sha512-jPJfULxizKGFKxGwzj4aI39eBsjYQF8bEW0bxElqmGGIJnTr0f+WhLd4QYCkH+EaRQe2tFdC4X+IW4Hs036IOg== +"@sushiswap/miso-sdk@1.0.0-canary.101": + version "1.0.0-canary.101" + resolved "https://registry.yarnpkg.com/@sushiswap/miso-sdk/-/miso-sdk-1.0.0-canary.101.tgz#efd2444d860ecb6bbe9759cf31d9f5a2138f1619" + integrity sha512-fYhM9gMxPniWkmPalLrGLQfRtMwJozz1QK0f/tG18b1SWUmByCoGU9AAh5btlnVRE3JZ+A5aw9SSAu+TSKmbuw== "@sushiswap/miso@1.0.0-canary.47": version "1.0.0-canary.47" resolved "https://registry.yarnpkg.com/@sushiswap/miso/-/miso-1.0.0-canary.47.tgz#743f7f57ce28e796b93262eec2ea429942fa2e74" integrity sha512-bEDm9ZDE8jh1A+edGnYYH8dTNHytel7sk6k8EKS42Xw0szrjghWMq7HbOQ3PXrMFj2ChDOz/g6G3DZ0JrJasGA== -"@sushiswap/tines@1.0.0-canary.112": - version "1.0.0-canary.112" - resolved "https://registry.yarnpkg.com/@sushiswap/tines/-/tines-1.0.0-canary.112.tgz#29fc603ce320b6ddbc8f5ebc47b543f6aeaca76f" - integrity sha512-db2pZlQkrcK6vzV1lfveftMT29ldgYL8Y6I1jhH3XAwxwbzoOHLGERfzALbYe9GKJ04ZuHZ9ZcZWpVB9yYkFrQ== +"@sushiswap/tines@1.0.0-canary.115": + version "1.0.0-canary.115" + resolved "https://registry.yarnpkg.com/@sushiswap/tines/-/tines-1.0.0-canary.115.tgz#b721097481e8096b6c4bbcf76f977e872555b19b" + integrity sha512-t7RaYqFrMB7X2LMM+69mkXPcwYE23nYhvNeo+ag8SUbGwZq8TdesWaYSl1r/kAXwBdfYyL2lpM2lLnyGzeBkGw== dependencies: "@ethersproject/bignumber" "^5.4.0" - "@sushiswap/core-sdk" "1.0.0-canary.128" + "@sushiswap/core-sdk" "1.0.0-canary.131" -"@sushiswap/trident-sdk@1.0.0-canary.137": - version "1.0.0-canary.137" - resolved "https://registry.yarnpkg.com/@sushiswap/trident-sdk/-/trident-sdk-1.0.0-canary.137.tgz#0d9f9977bb3173ee2948cfb58dfe3ec07b25f023" - integrity sha512-4COITERQ2NLxpU+/XOtGFwooHmiA6aEUo9rjUhC/9QKFGpXfIn2M/jxzgMfoCaUICDJXX9WDt7wpiwg9G7O+3g== +"@sushiswap/trident-sdk@1.0.0-canary.140": + version "1.0.0-canary.140" + resolved "https://registry.yarnpkg.com/@sushiswap/trident-sdk/-/trident-sdk-1.0.0-canary.140.tgz#e69b0b91e2f38ea8ba57c54c8791561331aba98b" + integrity sha512-c/UxBmQ2XhklYo/kGfK2otrOKfEgh/rKaqyugiwzVf41QM+VdL9K7tn1/XNRV28x3u93X/oOPbt+rYiICfIpKA== dependencies: "@ethersproject/abi" "^5.4.0" "@ethersproject/bignumber" "^5.4.0" - "@sushiswap/core-sdk" "1.0.0-canary.128" - "@sushiswap/tines" "1.0.0-canary.112" + "@sushiswap/core-sdk" "1.0.0-canary.131" + "@sushiswap/tines" "1.0.0-canary.115" "@sushiswap/trident" "1.0.0-canary.40" tiny-invariant "^1.1.0" trident-preview "npm:@sushiswap/trident@1.0.0-canary.36"