Commit 711b2ca8 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

chore: import @ethersprojects directly (#3104)

* Revert "chore: import from ethers"

This reverts commit 6d9c0855d261679c316307ea3f668869c90e63a2.

* Revert "fix: use provider JsonRpcProvider"

This reverts commit dcbbab5e4d6458a11c38582388a7cb5b12691188.

* chore: depend on @ethersprojects directly
parent aa97ec01
...@@ -59,13 +59,17 @@ ...@@ -59,13 +59,17 @@
{ {
"paths": [ "paths": [
{ {
"name": "@lingui/macro", "name": "ethers",
"importNames": ["t"], "message": "Please import from '@ethersproject/module' directly to support tree-shaking."
"message": "Please use <Trans> instead of t."
}, },
{ {
"name": "styled-components", "name": "styled-components",
"message": "Please import from styled-components/macro." "message": "Please import from styled-components/macro."
},
{
"name": "@lingui/macro",
"importNames": ["t"],
"message": "Please use <Trans> instead of t."
} }
], ],
"patterns": [ "patterns": [
...@@ -73,10 +77,6 @@ ...@@ -73,10 +77,6 @@
"group": ["**/dist"], "group": ["**/dist"],
"message": "Do not import from dist/ - this is an implementation detail, and breaks tree-shaking." "message": "Do not import from dist/ - this is an implementation detail, and breaks tree-shaking."
}, },
{
"group": ["@ethersproject"],
"message": "Please import from 'ethers' to support bundling."
},
{ {
"group": ["!styled-components/macro"] "group": ["!styled-components/macro"]
} }
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
// https://on.cypress.io/custom-commands // https://on.cypress.io/custom-commands
// *********************************************** // ***********************************************
// eslint-disable-next-line no-restricted-imports
import { Eip1193Bridge } from '@ethersproject/experimental/lib/eip1193-bridge' import { Eip1193Bridge } from '@ethersproject/experimental/lib/eip1193-bridge'
import { providers, Wallet } from 'ethers' import { JsonRpcProvider } from '@ethersproject/providers'
import { Wallet } from '@ethersproject/wallet'
// todo: figure out how env vars actually work in CI // todo: figure out how env vars actually work in CI
// const TEST_PRIVATE_KEY = Cypress.env('INTEGRATION_TEST_PRIVATE_KEY') // const TEST_PRIVATE_KEY = Cypress.env('INTEGRATION_TEST_PRIVATE_KEY')
...@@ -81,7 +81,7 @@ Cypress.Commands.overwrite('visit', (original, url, options) => { ...@@ -81,7 +81,7 @@ Cypress.Commands.overwrite('visit', (original, url, options) => {
onBeforeLoad(win) { onBeforeLoad(win) {
options && options.onBeforeLoad && options.onBeforeLoad(win) options && options.onBeforeLoad && options.onBeforeLoad(win)
win.localStorage.clear() win.localStorage.clear()
const provider = new providers.JsonRpcProvider('https://rinkeby.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4) const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4)
const signer = new Wallet(TEST_PRIVATE_KEY, provider) const signer = new Wallet(TEST_PRIVATE_KEY, provider)
win.ethereum = new CustomizedBridge(signer, provider) win.ethereum = new CustomizedBridge(signer, provider)
}, },
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
"start": "react-scripts start", "start": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test --env=./custom-test-env.js", "test": "react-scripts test --env=./custom-test-env.js",
"test:e2e": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run'", "test:e2e": "start-server-and-test 'serve build -l 3000' http://localhost:3000 'cypress run --record'",
"assets:generate": "yarn assets:svg:generate && yarn assets:font:generate", "assets:generate": "yarn assets:svg:generate && yarn assets:font:generate",
"assets:svg:generate": "svgr -d src/lib/assets/svg --ext tsx --typescript src/lib/assets/svg && rm src/lib/assets/svg/index.tsx", "assets:svg:generate": "svgr -d src/lib/assets/svg --ext tsx --typescript src/lib/assets/svg && rm src/lib/assets/svg/index.tsx",
"assets:font:generate": "sass src/lib/assets/fonts/index.scss src/lib/assets/fonts/index.css --no-source-map -I node_modules", "assets:font:generate": "sass src/lib/assets/fonts/index.scss src/lib/assets/fonts/index.css --no-source-map -I node_modules",
...@@ -156,6 +156,19 @@ ...@@ -156,6 +156,19 @@
}, },
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"dependencies": { "dependencies": {
"@ethersproject/abi": "^5.4.1",
"@ethersproject/abstract-provider": "^5.4.1",
"@ethersproject/address": "^5.4.0",
"@ethersproject/bignumber": "^5.4.2",
"@ethersproject/bytes": "^5.4.0",
"@ethersproject/constants": "^5.4.0",
"@ethersproject/contracts": "^5.4.1",
"@ethersproject/hash": "^5.4.0",
"@ethersproject/providers": "^5.4.5",
"@ethersproject/solidity": "^5.4.0",
"@ethersproject/strings": "^5.4.0",
"@ethersproject/units": "^5.4.0",
"@ethersproject/wallet": "^5.4.0",
"@fontsource/ibm-plex-mono": "^4.5.1", "@fontsource/ibm-plex-mono": "^4.5.1",
"@fontsource/inter": "^4.5.1", "@fontsource/inter": "^4.5.1",
"@lingui/core": "^3.9.0", "@lingui/core": "^3.9.0",
...@@ -167,7 +180,6 @@ ...@@ -167,7 +180,6 @@
"@uniswap/token-lists": "^1.0.0-beta.27", "@uniswap/token-lists": "^1.0.0-beta.27",
"ajv": "^6.12.3", "ajv": "^6.12.3",
"cids": "^1.0.0", "cids": "^1.0.0",
"ethers": "^5.4.6",
"immer": "^9.0.6", "immer": "^9.0.6",
"jotai": "^1.3.7", "jotai": "^1.3.7",
"make-plural": "^7.0.0", "make-plural": "^7.0.0",
......
import { isAddress } from '@ethersproject/address'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { isAddress } from 'ethers/lib/utils'
import { useState } from 'react' import { useState } from 'react'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
......
import { isAddress } from '@ethersproject/address'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { isAddress } from 'ethers/lib/utils'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { Text } from 'rebass' import { Text } from 'rebass'
......
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import type { providers } from 'ethers'
import { ReactNode, useState } from 'react' import { ReactNode, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
...@@ -47,7 +47,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta ...@@ -47,7 +47,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
setAttempting(true) setAttempting(true)
await stakingContract await stakingContract
.getReward({ gasLimit: 350000 }) .getReward({ gasLimit: 350000 })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.CLAIM, type: TransactionType.CLAIM,
recipient: account, recipient: account,
......
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import type { providers } from 'ethers'
import { useCallback, useState } from 'react' import { useCallback, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
...@@ -105,7 +105,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui ...@@ -105,7 +105,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
signatureData.s, signatureData.s,
{ gasLimit: 350000 } { gasLimit: 350000 }
) )
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.DEPOSIT_LIQUIDITY_STAKING, type: TransactionType.DEPOSIT_LIQUIDITY_STAKING,
token0Address: stakingInfo.tokens[0].address, token0Address: stakingInfo.tokens[0].address,
......
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import type { providers } from 'ethers'
import { ReactNode, useState } from 'react' import { ReactNode, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
...@@ -48,7 +48,7 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki ...@@ -48,7 +48,7 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
setAttempting(true) setAttempting(true)
await stakingContract await stakingContract
.exit({ gasLimit: 300000 }) .exit({ gasLimit: 300000 })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.WITHDRAW_LIQUIDITY_STAKING, type: TransactionType.WITHDRAW_LIQUIDITY_STAKING,
token0Address: stakingInfo.tokens[0].address, token0Address: stakingInfo.tokens[0].address,
......
import { isAddress } from '@ethersproject/address'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { isAddress } from 'ethers/lib/utils'
import { ReactNode, useState } from 'react' import { ReactNode, useState } from 'react'
import { X } from 'react-feather' import { X } from 'react-feather'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
......
import { Web3Provider } from '@ethersproject/providers'
import { SafeAppConnector } from '@gnosis.pm/safe-apps-web3-react' import { SafeAppConnector } from '@gnosis.pm/safe-apps-web3-react'
import { InjectedConnector } from '@web3-react/injected-connector' import { InjectedConnector } from '@web3-react/injected-connector'
import { PortisConnector } from '@web3-react/portis-connector' import { PortisConnector } from '@web3-react/portis-connector'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector' import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
import { WalletLinkConnector } from '@web3-react/walletlink-connector' import { WalletLinkConnector } from '@web3-react/walletlink-connector'
import type { providers } from 'ethers'
import UNISWAP_LOGO_URL from '../assets/svg/logo.svg' import UNISWAP_LOGO_URL from '../assets/svg/logo.svg'
import { ALL_SUPPORTED_CHAIN_IDS, INFURA_NETWORK_URLS, SupportedChainId } from '../constants/chains' import { ALL_SUPPORTED_CHAIN_IDS, INFURA_NETWORK_URLS, SupportedChainId } from '../constants/chains'
...@@ -19,8 +19,8 @@ export const network = new NetworkConnector({ ...@@ -19,8 +19,8 @@ export const network = new NetworkConnector({
defaultChainId: 1, defaultChainId: 1,
}) })
let networkLibrary: providers.Web3Provider | undefined let networkLibrary: Web3Provider | undefined
export function getNetworkLibrary(): providers.Web3Provider { export function getNetworkLibrary(): Web3Provider {
return (networkLibrary = networkLibrary ?? getLibrary(network.provider)) return (networkLibrary = networkLibrary ?? getLibrary(network.provider))
} }
......
import { arrayify } from '@ethersproject/bytes'
import { parseBytes32String } from '@ethersproject/strings'
import { Currency, Token } from '@uniswap/sdk-core' import { Currency, Token } from '@uniswap/sdk-core'
import { CHAIN_INFO, L2_CHAIN_IDS, SupportedChainId, SupportedL2ChainId } from 'constants/chains' import { CHAIN_INFO, L2_CHAIN_IDS, SupportedChainId, SupportedL2ChainId } from 'constants/chains'
import { arrayify, parseBytes32String } from 'ethers/lib/utils'
import { useMemo } from 'react' import { useMemo } from 'react'
import { createTokenFilterFunction } from '../components/SearchModal/filtering' import { createTokenFilterFunction } from '../components/SearchModal/filtering'
......
import { Web3Provider } from '@ethersproject/providers'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
import { providers } from 'ethers'
import { default as useWidgetsWeb3React } from 'lib/hooks/useActiveWeb3React' import { default as useWidgetsWeb3React } from 'lib/hooks/useActiveWeb3React'
import { NetworkContextName } from '../constants/misc' import { NetworkContextName } from '../constants/misc'
export default function useActiveWeb3React() { export default function useActiveWeb3React() {
const widgetsContext = useWidgetsWeb3React() const widgetsContext = useWidgetsWeb3React()
const interfaceContext = useWeb3React<providers.Web3Provider>() const interfaceContext = useWeb3React<Web3Provider>()
const interfaceNetworkContext = useWeb3React<providers.Web3Provider>( const interfaceNetworkContext = useWeb3React<Web3Provider>(
process.env.REACT_APP_IS_WIDGET ? undefined : NetworkContextName process.env.REACT_APP_IS_WIDGET ? undefined : NetworkContextName
) )
......
import { MaxUint256 } from '@ethersproject/constants'
import { TransactionResponse } from '@ethersproject/providers'
import { Protocol, Trade } from '@uniswap/router-sdk' import { Protocol, Trade } from '@uniswap/router-sdk'
import { Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'
import { Pair, Route as V2Route, Trade as V2Trade } from '@uniswap/v2-sdk' import { Pair, Route as V2Route, Trade as V2Trade } from '@uniswap/v2-sdk'
import { Pool, Route as V3Route, Trade as V3Trade } from '@uniswap/v3-sdk' import { Pool, Route as V3Route, Trade as V3Trade } from '@uniswap/v3-sdk'
import type { providers } from 'ethers'
import { constants } from 'ethers'
import { useCallback, useMemo } from 'react' import { useCallback, useMemo } from 'react'
import { getTxOptimizedSwapRouter, SwapRouterVersion } from 'utils/getTxOptimizedSwapRouter' import { getTxOptimizedSwapRouter, SwapRouterVersion } from 'utils/getTxOptimizedSwapRouter'
...@@ -111,17 +111,17 @@ export function useApproveCallback( ...@@ -111,17 +111,17 @@ export function useApproveCallback(
} }
let useExact = false let useExact = false
const estimatedGas = await tokenContract.estimateGas.approve(spender, constants.MaxUint256).catch(() => { const estimatedGas = await tokenContract.estimateGas.approve(spender, MaxUint256).catch(() => {
// general fallback for tokens who restrict approval amounts // general fallback for tokens who restrict approval amounts
useExact = true useExact = true
return tokenContract.estimateGas.approve(spender, amountToApprove.quotient.toString()) return tokenContract.estimateGas.approve(spender, amountToApprove.quotient.toString())
}) })
return tokenContract return tokenContract
.approve(spender, useExact ? amountToApprove.quotient.toString() : constants.MaxUint256, { .approve(spender, useExact ? amountToApprove.quotient.toString() : MaxUint256, {
gasLimit: calculateGasMargin(estimatedGas), gasLimit: calculateGasMargin(estimatedGas),
}) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { type: TransactionType.APPROVAL, tokenAddress: token.address, spender }) addTransaction(response, { type: TransactionType.APPROVAL, tokenAddress: token.address, spender })
}) })
.catch((error: Error) => { .catch((error: Error) => {
......
import { Contract } from '@ethersproject/contracts'
import { abi as GOVERNANCE_ABI } from '@uniswap/governance/build/GovernorAlpha.json' import { abi as GOVERNANCE_ABI } from '@uniswap/governance/build/GovernorAlpha.json'
import { abi as UNI_ABI } from '@uniswap/governance/build/Uni.json' import { abi as UNI_ABI } from '@uniswap/governance/build/Uni.json'
import { abi as STAKING_REWARDS_ABI } from '@uniswap/liquidity-staker/build/StakingRewards.json' import { abi as STAKING_REWARDS_ABI } from '@uniswap/liquidity-staker/build/StakingRewards.json'
...@@ -31,7 +32,6 @@ import { ...@@ -31,7 +32,6 @@ import {
V2_ROUTER_ADDRESS, V2_ROUTER_ADDRESS,
V3_MIGRATOR_ADDRESSES, V3_MIGRATOR_ADDRESSES,
} from 'constants/addresses' } from 'constants/addresses'
import { Contract } from 'ethers'
import { useMemo } from 'react' import { useMemo } from 'react'
import { NonfungiblePositionManager, Quoter, UniswapInterfaceMulticall } from 'types/v3' import { NonfungiblePositionManager, Quoter, UniswapInterfaceMulticall } from 'types/v3'
import { V3Migrator } from 'types/v3/V3Migrator' import { V3Migrator } from 'types/v3/V3Migrator'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
import { useSingleCallResult } from '../state/multicall/hooks' import { useSingleCallResult } from '../state/multicall/hooks'
import { useInterfaceMulticall } from './useContract' import { useInterfaceMulticall } from './useContract'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
import { hexZeroPad, namehash } from 'ethers/lib/utils' import { hexZeroPad } from '@ethersproject/bytes'
import { namehash } from '@ethersproject/hash'
import uriToHttp from 'lib/utils/uriToHttp' import uriToHttp from 'lib/utils/uriToHttp'
import { useEffect, useMemo, useState } from 'react' import { useEffect, useMemo, useState } from 'react'
import { safeNamehash } from 'utils/safeNamehash' import { safeNamehash } from 'utils/safeNamehash'
......
import { namehash } from 'ethers/lib/utils' import { namehash } from '@ethersproject/hash'
import { useMemo } from 'react' import { useMemo } from 'react'
import { useSingleCallResult } from '../state/multicall/hooks' import { useSingleCallResult } from '../state/multicall/hooks'
......
import { splitSignature } from '@ethersproject/bytes'
import { Trade } from '@uniswap/router-sdk' import { Trade } from '@uniswap/router-sdk'
import { Currency, CurrencyAmount, Percent, Token, TradeType } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent, Token, TradeType } from '@uniswap/sdk-core'
import { Trade as V2Trade } from '@uniswap/v2-sdk' import { Trade as V2Trade } from '@uniswap/v2-sdk'
import { Trade as V3Trade } from '@uniswap/v3-sdk' import { Trade as V3Trade } from '@uniswap/v3-sdk'
import { splitSignature } from 'ethers/lib/utils'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useMemo, useState } from 'react' import { useMemo, useState } from 'react'
......
import { providers } from 'ethers' import { TransactionResponse } from '@ethersproject/providers'
import { initializeApp } from 'firebase/app' import { initializeApp } from 'firebase/app'
import { getDatabase, push, ref } from 'firebase/database' import { getDatabase, push, ref } from 'firebase/database'
import { useCallback } from 'react' import { useCallback } from 'react'
...@@ -6,7 +6,7 @@ import { TransactionInfo, TransactionType } from 'state/transactions/actions' ...@@ -6,7 +6,7 @@ import { TransactionInfo, TransactionType } from 'state/transactions/actions'
import { useActiveWeb3React } from './web3' import { useActiveWeb3React } from './web3'
type PartialTransactionResponse = Pick<providers.TransactionResponse, 'hash' | 'v' | 'r' | 's'> type PartialTransactionResponse = Pick<TransactionResponse, 'hash' | 'v' | 'r' | 's'>
const SUPPORTED_TRANSACTION_TYPES = [ const SUPPORTED_TRANSACTION_TYPES = [
TransactionType.ADD_LIQUIDITY_V2_POOL, TransactionType.ADD_LIQUIDITY_V2_POOL,
...@@ -61,7 +61,7 @@ export function useTransactionMonitoringEventCallback() { ...@@ -61,7 +61,7 @@ export function useTransactionMonitoringEventCallback() {
const log = useMonitoringEventCallback() const log = useMonitoringEventCallback()
return useCallback( return useCallback(
(info: TransactionInfo, transactionResponse: providers.TransactionResponse) => { (info: TransactionInfo, transactionResponse: TransactionResponse) => {
if (SUPPORTED_TRANSACTION_TYPES.includes(info.type)) { if (SUPPORTED_TRANSACTION_TYPES.includes(info.type)) {
log(TransactionType[info.type], { log(TransactionType[info.type], {
transactionResponse: (({ hash, v, r, s }: PartialTransactionResponse) => ({ hash, v, r, s }))( transactionResponse: (({ hash, v, r, s }: PartialTransactionResponse) => ({ hash, v, r, s }))(
......
import { Interface } from '@ethersproject/abi'
import { Currency, Token } from '@uniswap/sdk-core' import { Currency, Token } from '@uniswap/sdk-core'
import { abi as IUniswapV3PoolStateABI } from '@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json' import { abi as IUniswapV3PoolStateABI } from '@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json'
import { computePoolAddress } from '@uniswap/v3-sdk' import { computePoolAddress } from '@uniswap/v3-sdk'
import { FeeAmount, Pool } from '@uniswap/v3-sdk' import { FeeAmount, Pool } from '@uniswap/v3-sdk'
import { Interface } from 'ethers/lib/utils'
import { useMemo } from 'react' import { useMemo } from 'react'
import { V3_CORE_FACTORY_ADDRESSES } from '../constants/addresses' import { V3_CORE_FACTORY_ADDRESSES } from '../constants/addresses'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useMemo } from 'react' import { useMemo } from 'react'
......
import { BigNumber } from '@ethersproject/bignumber'
// eslint-disable-next-line no-restricted-imports // eslint-disable-next-line no-restricted-imports
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { SwapRouter, Trade } from '@uniswap/router-sdk' import { SwapRouter, Trade } from '@uniswap/router-sdk'
import { Currency, Percent, TradeType } from '@uniswap/sdk-core' import { Currency, Percent, TradeType } from '@uniswap/sdk-core'
import { Router as V2SwapRouter, Trade as V2Trade } from '@uniswap/v2-sdk' import { Router as V2SwapRouter, Trade as V2Trade } from '@uniswap/v2-sdk'
import { SwapRouter as V3SwapRouter, Trade as V3Trade } from '@uniswap/v3-sdk' import { SwapRouter as V3SwapRouter, Trade as V3Trade } from '@uniswap/v3-sdk'
import { BigNumber } from 'ethers'
import { ReactNode, useMemo } from 'react' import { ReactNode, useMemo } from 'react'
import { SWAP_ROUTER_ADDRESSES, V3_ROUTER_ADDRESS } from '../constants/addresses' import { SWAP_ROUTER_ADDRESSES, V3_ROUTER_ADDRESS } from '../constants/addresses'
......
import { BigNumber } from '@ethersproject/bignumber'
import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
import { BigNumber } from 'ethers'
import { useSingleCallResult } from '../state/multicall/hooks' import { useSingleCallResult } from '../state/multicall/hooks'
import { useTokenContract } from './useContract' import { useTokenContract } from './useContract'
......
import { BigNumber } from '@ethersproject/bignumber'
import { L2_CHAIN_IDS } from 'constants/chains' import { L2_CHAIN_IDS } from 'constants/chains'
import { L2_DEADLINE_FROM_NOW } from 'constants/misc' import { L2_DEADLINE_FROM_NOW } from 'constants/misc'
import { BigNumber } from 'ethers'
import { useMemo } from 'react' import { useMemo } from 'react'
import { useAppSelector } from 'state/hooks' import { useAppSelector } from 'state/hooks'
......
import { Interface } from '@ethersproject/abi'
import { Currency, CurrencyAmount } from '@uniswap/sdk-core' import { Currency, CurrencyAmount } from '@uniswap/sdk-core'
import { abi as IUniswapV2PairABI } from '@uniswap/v2-core/build/IUniswapV2Pair.json' import { abi as IUniswapV2PairABI } from '@uniswap/v2-core/build/IUniswapV2Pair.json'
import { computePairAddress, Pair } from '@uniswap/v2-sdk' import { computePairAddress, Pair } from '@uniswap/v2-sdk'
import { Interface } from 'ethers/lib/utils'
import { useMemo } from 'react' import { useMemo } from 'react'
import { V2_FACTORY_ADDRESSES } from '../constants/addresses' import { V2_FACTORY_ADDRESSES } from '../constants/addresses'
......
import { BigNumber } from '@ethersproject/bignumber'
import { Currency, CurrencyAmount } from '@uniswap/sdk-core' import { Currency, CurrencyAmount } from '@uniswap/sdk-core'
import { Pool } from '@uniswap/v3-sdk' import { Pool } from '@uniswap/v3-sdk'
import { BigNumber } from 'ethers'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { useBlockNumber } from 'state/application/hooks' import { useBlockNumber } from 'state/application/hooks'
import { useSingleCallResult } from 'state/multicall/hooks' import { useSingleCallResult } from 'state/multicall/hooks'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
import { useMemo } from 'react' import { useMemo } from 'react'
import { CallStateResult, useSingleCallResult, useSingleContractMultipleData } from 'state/multicall/hooks' import { CallStateResult, useSingleCallResult, useSingleContractMultipleData } from 'state/multicall/hooks'
import { PositionDetails } from 'types/position' import { PositionDetails } from 'types/position'
......
import type { providers } from 'ethers' import { Provider } from '@ethersproject/abstract-provider'
import { Contract } from 'ethers' import { Contract } from '@ethersproject/contracts'
import { namehash } from 'ethers/lib/utils' import { namehash } from '@ethersproject/hash'
const REGISTRAR_ABI = [ const REGISTRAR_ABI = [
{ {
...@@ -50,7 +50,7 @@ const RESOLVER_ABI = [ ...@@ -50,7 +50,7 @@ const RESOLVER_ABI = [
] ]
// cache the resolver contracts since most of them are the public resolver // cache the resolver contracts since most of them are the public resolver
function resolverContract(resolverAddress: string, provider: providers.Provider): Contract { function resolverContract(resolverAddress: string, provider: Provider): Contract {
return new Contract(resolverAddress, RESOLVER_ABI, provider) return new Contract(resolverAddress, RESOLVER_ABI, provider)
} }
...@@ -59,7 +59,7 @@ function resolverContract(resolverAddress: string, provider: providers.Provider) ...@@ -59,7 +59,7 @@ function resolverContract(resolverAddress: string, provider: providers.Provider)
* @param ensName to resolve * @param ensName to resolve
* @param provider provider to use to fetch the data * @param provider provider to use to fetch the data
*/ */
export default async function resolveENSContentHash(ensName: string, provider: providers.Provider): Promise<string> { export default async function resolveENSContentHash(ensName: string, provider: Provider): Promise<string> {
const ensRegistrarContract = new Contract(REGISTRAR_ADDRESS, REGISTRAR_ABI, provider) const ensRegistrarContract = new Contract(REGISTRAR_ADDRESS, REGISTRAR_ABI, provider)
const hash = namehash(ensName) const hash = namehash(ensName)
const resolverAddress = await ensRegistrarContract.resolver(hash) const resolverAddress = await ensRegistrarContract.resolver(hash)
......
import { BigNumber } from '@ethersproject/bignumber'
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core'
import { FeeAmount, NonfungiblePositionManager } from '@uniswap/v3-sdk' import { FeeAmount, NonfungiblePositionManager } from '@uniswap/v3-sdk'
import UnsupportedCurrencyFooter from 'components/swap/UnsupportedCurrencyFooter' import UnsupportedCurrencyFooter from 'components/swap/UnsupportedCurrencyFooter'
import type { providers } from 'ethers'
import { BigNumber } from 'ethers'
import { useCallback, useContext, useEffect, useState } from 'react' import { useCallback, useContext, useEffect, useState } from 'react'
import { AlertTriangle } from 'react-feather' import { AlertTriangle } from 'react-feather'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
...@@ -272,7 +272,7 @@ export default function AddLiquidity({ ...@@ -272,7 +272,7 @@ export default function AddLiquidity({
return library return library
.getSigner() .getSigner()
.sendTransaction(newTxn) .sendTransaction(newTxn)
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
setAttemptingTxn(false) setAttemptingTxn(false)
addTransaction(response, { addTransaction(response, {
type: TransactionType.ADD_LIQUIDITY_V3_POOL, type: TransactionType.ADD_LIQUIDITY_V3_POOL,
......
import { BigNumber } from '@ethersproject/bignumber'
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core'
import UnsupportedCurrencyFooter from 'components/swap/UnsupportedCurrencyFooter' import UnsupportedCurrencyFooter from 'components/swap/UnsupportedCurrencyFooter'
import { SwitchLocaleLink } from 'components/SwitchLocaleLink' import { SwitchLocaleLink } from 'components/SwitchLocaleLink'
import type { providers } from 'ethers'
import { BigNumber } from 'ethers'
import { useCallback, useContext, useState } from 'react' import { useCallback, useContext, useState } from 'react'
import { Plus } from 'react-feather' import { Plus } from 'react-feather'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
...@@ -147,7 +147,7 @@ export default function AddLiquidity({ ...@@ -147,7 +147,7 @@ export default function AddLiquidity({
} }
let estimate, let estimate,
method: (...args: any) => Promise<providers.TransactionResponse>, method: (...args: any) => Promise<TransactionResponse>,
args: Array<string | string[] | number>, args: Array<string | string[] | number>,
value: BigNumber | null value: BigNumber | null
if (currencyA.isNative || currencyB.isNative) { if (currencyA.isNative || currencyB.isNative) {
......
import { defaultAbiCoder } from '@ethersproject/abi'
import { getAddress, isAddress } from '@ethersproject/address'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
import { ButtonError } from 'components/Button' import { ButtonError } from 'components/Button'
import { BlueCard } from 'components/Card' import { BlueCard } from 'components/Card'
import { AutoColumn } from 'components/Column' import { AutoColumn } from 'components/Column'
import { defaultAbiCoder, getAddress, isAddress } from 'ethers/lib/utils'
import { useActiveWeb3React } from 'hooks/web3' import { useActiveWeb3React } from 'hooks/web3'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { Wrapper } from 'pages/Pool/styleds' import { Wrapper } from 'pages/Pool/styleds'
......
import { Contract } from '@ethersproject/contracts'
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { CurrencyAmount, Fraction, Percent, Price, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Fraction, Percent, Price, Token } from '@uniswap/sdk-core'
import { FeeAmount, Pool, Position, priceToClosestTick, TickMath } from '@uniswap/v3-sdk' import { FeeAmount, Pool, Position, priceToClosestTick, TickMath } from '@uniswap/v3-sdk'
...@@ -10,8 +12,6 @@ import RangeSelector from 'components/RangeSelector' ...@@ -10,8 +12,6 @@ import RangeSelector from 'components/RangeSelector'
import RateToggle from 'components/RateToggle' import RateToggle from 'components/RateToggle'
import SettingsTab from 'components/Settings' import SettingsTab from 'components/Settings'
import { Dots } from 'components/swap/styleds' import { Dots } from 'components/swap/styleds'
import type { providers } from 'ethers'
import { Contract } from 'ethers'
import { ApprovalState, useApproveCallback } from 'hooks/useApproveCallback' import { ApprovalState, useApproveCallback } from 'hooks/useApproveCallback'
import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp' import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp'
import { PoolState, usePool } from 'hooks/usePools' import { PoolState, usePool } from 'hooks/usePools'
...@@ -335,7 +335,7 @@ function V2PairMigration({ ...@@ -335,7 +335,7 @@ function V2PairMigration({
.then((gasEstimate) => { .then((gasEstimate) => {
return migrator return migrator
.multicall(data, { gasLimit: calculateGasMargin(gasEstimate) }) .multicall(data, { gasLimit: calculateGasMargin(gasEstimate) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
ReactGA.event({ ReactGA.event({
category: 'Migrate', category: 'Migrate',
action: `${isNotUniswap ? 'SushiSwap' : 'V2'}->V3`, action: `${isNotUniswap ? 'SushiSwap' : 'V2'}->V3`,
......
import { getCreate2Address } from '@ethersproject/address'
import { keccak256, pack } from '@ethersproject/solidity'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Token } from '@uniswap/sdk-core' import { Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import MigrateSushiPositionCard from 'components/PositionCard/Sushi' import MigrateSushiPositionCard from 'components/PositionCard/Sushi'
import MigrateV2PositionCard from 'components/PositionCard/V2' import MigrateV2PositionCard from 'components/PositionCard/V2'
import { SwitchLocaleLink } from 'components/SwitchLocaleLink' import { SwitchLocaleLink } from 'components/SwitchLocaleLink'
import { getCreate2Address, solidityKeccak256 as keccak256, solidityPack as pack } from 'ethers/lib/utils'
import { PairState, useV2Pairs } from 'hooks/useV2Pairs' import { PairState, useV2Pairs } from 'hooks/useV2Pairs'
import { ReactNode, useContext, useMemo } from 'react' import { ReactNode, useContext, useMemo } from 'react'
import { Text } from 'rebass' import { Text } from 'rebass'
......
import { BigNumber } from '@ethersproject/bignumber'
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Fraction, Percent, Price, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Fraction, Percent, Price, Token } from '@uniswap/sdk-core'
import { NonfungiblePositionManager, Pool, Position } from '@uniswap/v3-sdk' import { NonfungiblePositionManager, Pool, Position } from '@uniswap/v3-sdk'
...@@ -12,8 +14,6 @@ import { RowBetween, RowFixed } from 'components/Row' ...@@ -12,8 +14,6 @@ import { RowBetween, RowFixed } from 'components/Row'
import { Dots } from 'components/swap/styleds' import { Dots } from 'components/swap/styleds'
import Toggle from 'components/Toggle' import Toggle from 'components/Toggle'
import TransactionConfirmationModal, { ConfirmationModalContent } from 'components/TransactionConfirmationModal' import TransactionConfirmationModal, { ConfirmationModalContent } from 'components/TransactionConfirmationModal'
import type { providers } from 'ethers'
import { BigNumber } from 'ethers'
import { useToken } from 'hooks/Tokens' import { useToken } from 'hooks/Tokens'
import { useV3NFTPositionManagerContract } from 'hooks/useContract' import { useV3NFTPositionManagerContract } from 'hooks/useContract'
import useIsTickAtLimit from 'hooks/useIsTickAtLimit' import useIsTickAtLimit from 'hooks/useIsTickAtLimit'
...@@ -448,7 +448,7 @@ export function PositionPage({ ...@@ -448,7 +448,7 @@ export function PositionPage({
return library return library
.getSigner() .getSigner()
.sendTransaction(newTxn) .sendTransaction(newTxn)
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
setCollectMigrationHash(response.hash) setCollectMigrationHash(response.hash)
setCollecting(false) setCollecting(false)
......
import { BigNumber } from '@ethersproject/bignumber'
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Percent } from '@uniswap/sdk-core' import { Percent } from '@uniswap/sdk-core'
import { NonfungiblePositionManager } from '@uniswap/v3-sdk' import { NonfungiblePositionManager } from '@uniswap/v3-sdk'
...@@ -14,8 +16,6 @@ import { AddRemoveTabs } from 'components/NavigationTabs' ...@@ -14,8 +16,6 @@ import { AddRemoveTabs } from 'components/NavigationTabs'
import { AutoRow, RowBetween, RowFixed } from 'components/Row' import { AutoRow, RowBetween, RowFixed } from 'components/Row'
import Slider from 'components/Slider' import Slider from 'components/Slider'
import Toggle from 'components/Toggle' import Toggle from 'components/Toggle'
import type { providers } from 'ethers'
import { BigNumber } from 'ethers'
import { useV3NFTPositionManagerContract } from 'hooks/useContract' import { useV3NFTPositionManagerContract } from 'hooks/useContract'
import useDebouncedChangeHandler from 'hooks/useDebouncedChangeHandler' import useDebouncedChangeHandler from 'hooks/useDebouncedChangeHandler'
import useTheme from 'hooks/useTheme' import useTheme from 'hooks/useTheme'
...@@ -145,7 +145,7 @@ function Remove({ tokenId }: { tokenId: BigNumber }) { ...@@ -145,7 +145,7 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
return library return library
.getSigner() .getSigner()
.sendTransaction(newTxn) .sendTransaction(newTxn)
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
ReactGA.event({ ReactGA.event({
category: 'Liquidity', category: 'Liquidity',
action: 'RemoveV3', action: 'RemoveV3',
......
import { BigNumber } from '@ethersproject/bignumber'
import { Contract } from '@ethersproject/contracts'
import { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, Percent } from '@uniswap/sdk-core' import { Currency, Percent } from '@uniswap/sdk-core'
import type { providers } from 'ethers'
import { BigNumber, Contract } from 'ethers'
import { useCallback, useContext, useMemo, useState } from 'react' import { useCallback, useContext, useMemo, useState } from 'react'
import { ArrowDown, Plus } from 'react-feather' import { ArrowDown, Plus } from 'react-feather'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
...@@ -261,7 +262,7 @@ export default function RemoveLiquidity({ ...@@ -261,7 +262,7 @@ export default function RemoveLiquidity({
await router[methodName](...args, { await router[methodName](...args, {
gasLimit: safeGasEstimate, gasLimit: safeGasEstimate,
}) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
setAttemptingTxn(false) setAttemptingTxn(false)
addTransaction(response, { addTransaction(response, {
......
import { BigNumber } from '@ethersproject/bignumber'
// eslint-disable-next-line no-restricted-imports // eslint-disable-next-line no-restricted-imports
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { BigNumber } from 'ethers'
import { useActiveLocale } from 'hooks/useActiveLocale' import { useActiveLocale } from 'hooks/useActiveLocale'
import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp' import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp'
import JSBI from 'jsbi' import JSBI from 'jsbi'
......
import { TransactionResponse } from '@ethersproject/providers'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import type { providers } from 'ethers'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
...@@ -165,7 +165,7 @@ export function useClaimCallback(account: string | null | undefined): { ...@@ -165,7 +165,7 @@ export function useClaimCallback(account: string | null | undefined): {
return distributorContract.estimateGas['claim'](...args, {}).then((estimatedGasLimit) => { return distributorContract.estimateGas['claim'](...args, {}).then((estimatedGasLimit) => {
return distributorContract return distributorContract
.claim(...args, { value: null, gasLimit: calculateGasMargin(estimatedGasLimit) }) .claim(...args, { value: null, gasLimit: calculateGasMargin(estimatedGasLimit) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.CLAIM, type: TransactionType.CLAIM,
recipient: account, recipient: account,
......
import { defaultAbiCoder, Interface } from '@ethersproject/abi'
import { isAddress } from '@ethersproject/address'
import { Contract } from '@ethersproject/contracts'
import { TransactionResponse } from '@ethersproject/providers'
import { toUtf8String, Utf8ErrorFuncs, Utf8ErrorReason } from '@ethersproject/strings'
import { formatUnits } from '@ethersproject/units'
// eslint-disable-next-line no-restricted-imports // eslint-disable-next-line no-restricted-imports
import { t } from '@lingui/macro' import { t } from '@lingui/macro'
import { abi as GOV_ABI } from '@uniswap/governance/build/GovernorAlpha.json' import { abi as GOV_ABI } from '@uniswap/governance/build/GovernorAlpha.json'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { POLYGON_PROPOSAL_TITLE } from 'constants/proposals/polygon_proposal_title' import { POLYGON_PROPOSAL_TITLE } from 'constants/proposals/polygon_proposal_title'
import { UNISWAP_GRANTS_PROPOSAL_DESCRIPTION } from 'constants/proposals/uniswap_grants_proposal_description' import { UNISWAP_GRANTS_PROPOSAL_DESCRIPTION } from 'constants/proposals/uniswap_grants_proposal_description'
import type { providers } from 'ethers'
import { Contract } from 'ethers'
import {
defaultAbiCoder,
formatUnits,
Interface,
isAddress,
toUtf8String,
Utf8ErrorFuncs,
Utf8ErrorReason,
} from 'ethers/lib/utils'
import { import {
useGovernanceBravoContract, useGovernanceBravoContract,
useGovernanceV0Contract, useGovernanceV0Contract,
...@@ -325,7 +320,7 @@ export function useDelegateCallback(): (delegatee: string | undefined) => undefi ...@@ -325,7 +320,7 @@ export function useDelegateCallback(): (delegatee: string | undefined) => undefi
return uniContract.estimateGas.delegate(...args, {}).then((estimatedGasLimit) => { return uniContract.estimateGas.delegate(...args, {}).then((estimatedGasLimit) => {
return uniContract return uniContract
.delegate(...args, { value: null, gasLimit: calculateGasMargin(estimatedGasLimit) }) .delegate(...args, { value: null, gasLimit: calculateGasMargin(estimatedGasLimit) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.DELEGATE, type: TransactionType.DELEGATE,
delegatee, delegatee,
...@@ -354,7 +349,7 @@ export function useVoteCallback(): { ...@@ -354,7 +349,7 @@ export function useVoteCallback(): {
return latestGovernanceContract.estimateGas.castVote(...args, {}).then((estimatedGasLimit) => { return latestGovernanceContract.estimateGas.castVote(...args, {}).then((estimatedGasLimit) => {
return latestGovernanceContract return latestGovernanceContract
.castVote(...args, { value: null, gasLimit: calculateGasMargin(estimatedGasLimit) }) .castVote(...args, { value: null, gasLimit: calculateGasMargin(estimatedGasLimit) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.VOTE, type: TransactionType.VOTE,
decision: voteOption, decision: voteOption,
...@@ -394,7 +389,7 @@ export function useCreateProposalCallback(): ( ...@@ -394,7 +389,7 @@ export function useCreateProposalCallback(): (
return latestGovernanceContract.estimateGas.propose(...args).then((estimatedGasLimit) => { return latestGovernanceContract.estimateGas.propose(...args).then((estimatedGasLimit) => {
return latestGovernanceContract return latestGovernanceContract
.propose(...args, { gasLimit: calculateGasMargin(estimatedGasLimit) }) .propose(...args, { gasLimit: calculateGasMargin(estimatedGasLimit) })
.then((response: providers.TransactionResponse) => { .then((response: TransactionResponse) => {
addTransaction(response, { addTransaction(response, {
type: TransactionType.SUBMIT_PROPOSAL, type: TransactionType.SUBMIT_PROPOSAL,
}) })
......
import { Interface } from '@ethersproject/abi'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { abi as STAKING_REWARDS_ABI } from '@uniswap/liquidity-staker/build/StakingRewards.json' import { abi as STAKING_REWARDS_ABI } from '@uniswap/liquidity-staker/build/StakingRewards.json'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import { Interface } from 'ethers/lib/utils'
import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp' import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { ReactNode, useMemo } from 'react' import { ReactNode, useMemo } from 'react'
......
import { parseUnits } from '@ethersproject/units'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent, TradeType } from '@uniswap/sdk-core'
import { parseUnits } from 'ethers/lib/utils'
import { useBestTrade } from 'hooks/useBestTrade' import { useBestTrade } from 'hooks/useBestTrade'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { ParsedQs } from 'qs' import { ParsedQs } from 'qs'
......
import type { providers } from 'ethers' import { TransactionResponse } from '@ethersproject/providers'
import { useTransactionMonitoringEventCallback } from 'hooks/useMonitoringEventCallback' import { useTransactionMonitoringEventCallback } from 'hooks/useMonitoringEventCallback'
import { useCallback, useMemo } from 'react' import { useCallback, useMemo } from 'react'
import { useAppDispatch, useAppSelector } from 'state/hooks' import { useAppDispatch, useAppSelector } from 'state/hooks'
...@@ -8,14 +8,14 @@ import { addTransaction, TransactionInfo, TransactionType } from './actions' ...@@ -8,14 +8,14 @@ import { addTransaction, TransactionInfo, TransactionType } from './actions'
import { TransactionDetails } from './reducer' import { TransactionDetails } from './reducer'
// helper that can take a ethers library transaction response and add it to the list of transactions // helper that can take a ethers library transaction response and add it to the list of transactions
export function useTransactionAdder(): (response: providers.TransactionResponse, info: TransactionInfo) => void { export function useTransactionAdder(): (response: TransactionResponse, info: TransactionInfo) => void {
const { chainId, account } = useActiveWeb3React() const { chainId, account } = useActiveWeb3React()
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const logMonitoringEvent = useTransactionMonitoringEventCallback() const logMonitoringEvent = useTransactionMonitoringEventCallback()
return useCallback( return useCallback(
(response: providers.TransactionResponse, info: TransactionInfo) => { (response: TransactionResponse, info: TransactionInfo) => {
if (!account) return if (!account) return
if (!chainId) return if (!chainId) return
......
import { Interface } from '@ethersproject/abi'
import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
import ERC20ABI from 'abis/erc20.json' import ERC20ABI from 'abis/erc20.json'
import { Erc20Interface } from 'abis/types/Erc20' import { Erc20Interface } from 'abis/types/Erc20'
import { Interface } from 'ethers/lib/utils'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useMemo } from 'react' import { useMemo } from 'react'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
export interface PositionDetails { export interface PositionDetails {
nonce: BigNumber nonce: BigNumber
......
import { Interface } from '@ethersproject/abi'
import { Currency, CurrencyAmount } from '@uniswap/sdk-core' import { Currency, CurrencyAmount } from '@uniswap/sdk-core'
import { toHex } from '@uniswap/v3-sdk' import { toHex } from '@uniswap/v3-sdk'
import { Interface } from 'ethers/lib/utils'
import { Erc20Interface } from '../abis/types/Erc20' import { Erc20Interface } from '../abis/types/Erc20'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
import { calculateGasMargin } from './calculateGasMargin' import { calculateGasMargin } from './calculateGasMargin'
......
import { BigNumber } from 'ethers' import { BigNumber } from '@ethersproject/bignumber'
/** /**
* Returns the gas value plus a margin for unexpected or variable gas costs * Returns the gas value plus a margin for unexpected or variable gas costs
......
import { AddressZero } from '@ethersproject/constants'
import { CurrencyAmount, Percent, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
import { constants } from 'ethers'
import { calculateSlippageAmount } from './calculateSlippageAmount' import { calculateSlippageAmount } from './calculateSlippageAmount'
describe('#calculateSlippageAmount', () => { describe('#calculateSlippageAmount', () => {
it('bounds are correct', () => { it('bounds are correct', () => {
const tokenAmount = CurrencyAmount.fromRawAmount(new Token(1, constants.AddressZero, 0), '100') const tokenAmount = CurrencyAmount.fromRawAmount(new Token(1, AddressZero, 0), '100')
expect(() => calculateSlippageAmount(tokenAmount, new Percent(-1, 10_000))).toThrow('Unexpected slippage') expect(() => calculateSlippageAmount(tokenAmount, new Percent(-1, 10_000))).toThrow('Unexpected slippage')
expect(() => calculateSlippageAmount(tokenAmount, new Percent(10_001, 10_000))).toThrow('Unexpected slippage') expect(() => calculateSlippageAmount(tokenAmount, new Percent(10_001, 10_000))).toThrow('Unexpected slippage')
expect(calculateSlippageAmount(tokenAmount, new Percent(0, 10_000)).map((bound) => bound.toString())).toEqual([ expect(calculateSlippageAmount(tokenAmount, new Percent(0, 10_000)).map((bound) => bound.toString())).toEqual([
...@@ -30,7 +30,7 @@ describe('#calculateSlippageAmount', () => { ...@@ -30,7 +30,7 @@ describe('#calculateSlippageAmount', () => {
]) ])
}) })
it('works for 18 decimals', () => { it('works for 18 decimals', () => {
const tokenAmount = CurrencyAmount.fromRawAmount(new Token(1, constants.AddressZero, 18), '100') const tokenAmount = CurrencyAmount.fromRawAmount(new Token(1, AddressZero, 18), '100')
expect(() => calculateSlippageAmount(tokenAmount, new Percent(-1, 10_000))).toThrow('Unexpected slippage') expect(() => calculateSlippageAmount(tokenAmount, new Percent(-1, 10_000))).toThrow('Unexpected slippage')
expect(() => calculateSlippageAmount(tokenAmount, new Percent(10_001, 10_000))).toThrow('Unexpected slippage') expect(() => calculateSlippageAmount(tokenAmount, new Percent(10_001, 10_000))).toThrow('Unexpected slippage')
expect(calculateSlippageAmount(tokenAmount, new Percent(0, 10_000)).map((bound) => bound.toString())).toEqual([ expect(calculateSlippageAmount(tokenAmount, new Percent(0, 10_000)).map((bound) => bound.toString())).toEqual([
......
import { BigNumber } from '@ethersproject/bignumber'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { BigNumber } from 'ethers'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { ZERO_ADDRESS } from '../constants/misc' import { ZERO_ADDRESS } from '../constants/misc'
......
import { BigNumber } from '@ethersproject/bignumber'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { BigNumber } from 'ethers'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { STAKING_GENESIS } from '../state/stake/hooks' import { STAKING_GENESIS } from '../state/stake/hooks'
......
import { providers } from 'ethers' import { Web3Provider } from '@ethersproject/providers'
import ms from 'ms.macro' import ms from 'ms.macro'
import { SupportedChainId } from '../constants/chains' import { SupportedChainId } from '../constants/chains'
...@@ -10,8 +10,8 @@ const NETWORK_POLLING_INTERVALS: { [chainId: number]: number } = { ...@@ -10,8 +10,8 @@ const NETWORK_POLLING_INTERVALS: { [chainId: number]: number } = {
[SupportedChainId.OPTIMISTIC_KOVAN]: ms`1s`, [SupportedChainId.OPTIMISTIC_KOVAN]: ms`1s`,
} }
export default function getLibrary(provider: any): providers.Web3Provider { export default function getLibrary(provider: any): Web3Provider {
const library = new providers.Web3Provider( const library = new Web3Provider(
provider, provider,
typeof provider.chainId === 'number' typeof provider.chainId === 'number'
? provider.chainId ? provider.chainId
......
import { getAddress } from '@ethersproject/address'
import { AddressZero } from '@ethersproject/constants'
import { Contract } from '@ethersproject/contracts'
import { JsonRpcSigner, Web3Provider } from '@ethersproject/providers'
import { Token } from '@uniswap/sdk-core' import { Token } from '@uniswap/sdk-core'
import { FeeAmount } from '@uniswap/v3-sdk' import { FeeAmount } from '@uniswap/v3-sdk'
import type { providers } from 'ethers'
import { constants, Contract } from 'ethers'
import { getAddress } from 'ethers/lib/utils'
import { TokenAddressMap } from '../state/lists/hooks' import { TokenAddressMap } from '../state/lists/hooks'
...@@ -25,21 +26,18 @@ export function shortenAddress(address: string, chars = 4): string { ...@@ -25,21 +26,18 @@ export function shortenAddress(address: string, chars = 4): string {
} }
// account is not optional // account is not optional
function getSigner(library: providers.Web3Provider, account: string): providers.JsonRpcSigner { function getSigner(library: Web3Provider, account: string): JsonRpcSigner {
return library.getSigner(account).connectUnchecked() return library.getSigner(account).connectUnchecked()
} }
// account is optional // account is optional
function getProviderOrSigner( function getProviderOrSigner(library: Web3Provider, account?: string): Web3Provider | JsonRpcSigner {
library: providers.Web3Provider,
account?: string
): providers.Web3Provider | providers.JsonRpcSigner {
return account ? getSigner(library, account) : library return account ? getSigner(library, account) : library
} }
// account is optional // account is optional
export function getContract(address: string, ABI: any, library: providers.Web3Provider, account?: string): Contract { export function getContract(address: string, ABI: any, library: Web3Provider, account?: string): Contract {
if (!isAddress(address) || address === constants.AddressZero) { if (!isAddress(address) || address === AddressZero) {
throw Error(`Invalid 'address' parameter '${address}'.`) throw Error(`Invalid 'address' parameter '${address}'.`)
} }
......
import { namehash } from 'ethers/lib/utils' import { namehash } from '@ethersproject/hash'
import { safeNamehash } from './safeNamehash' import { safeNamehash } from './safeNamehash'
......
import { namehash } from 'ethers/lib/utils' import { namehash } from '@ethersproject/hash'
export function safeNamehash(name?: string): string | undefined { export function safeNamehash(name?: string): string | undefined {
if (name === undefined) return undefined if (name === undefined) return undefined
......
import { BigNumber } from '@ethersproject/bignumber'
import { hexStripZeros } from '@ethersproject/bytes'
import { Web3Provider } from '@ethersproject/providers'
import { CHAIN_INFO, SupportedChainId } from 'constants/chains' import { CHAIN_INFO, SupportedChainId } from 'constants/chains'
import type { providers } from 'ethers'
import { BigNumber } from 'ethers'
import { hexStripZeros } from 'ethers/lib/utils'
interface SwitchNetworkArguments { interface SwitchNetworkArguments {
library: providers.Web3Provider library: Web3Provider
chainId: SupportedChainId chainId: SupportedChainId
} }
......
...@@ -1481,7 +1481,7 @@ ...@@ -1481,7 +1481,7 @@
"@ethersproject/properties" "^5.4.0" "@ethersproject/properties" "^5.4.0"
"@ethersproject/strings" "^5.4.0" "@ethersproject/strings" "^5.4.0"
"@ethersproject/abi@^5.0.12", "@ethersproject/abi@^5.4.0", "@ethersproject/abi@^5.5.0": "@ethersproject/abi@^5.0.12", "@ethersproject/abi@^5.4.0", "@ethersproject/abi@^5.4.1", "@ethersproject/abi@^5.5.0":
version "5.5.0" version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.5.0.tgz#fb52820e22e50b854ff15ce1647cc508d6660613" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.5.0.tgz#fb52820e22e50b854ff15ce1647cc508d6660613"
integrity sha512-loW7I4AohP5KycATvc0MgujU6JyCHPqHdeoo9z3Nr9xEiNioxa65ccdm1+fsoJhkuhdRtfcL8cfyGamz2AxZ5w== integrity sha512-loW7I4AohP5KycATvc0MgujU6JyCHPqHdeoo9z3Nr9xEiNioxa65ccdm1+fsoJhkuhdRtfcL8cfyGamz2AxZ5w==
...@@ -1509,7 +1509,7 @@ ...@@ -1509,7 +1509,7 @@
"@ethersproject/transactions" "^5.4.0" "@ethersproject/transactions" "^5.4.0"
"@ethersproject/web" "^5.4.0" "@ethersproject/web" "^5.4.0"
"@ethersproject/abstract-provider@^5.4.0", "@ethersproject/abstract-provider@^5.5.0": "@ethersproject/abstract-provider@^5.4.0", "@ethersproject/abstract-provider@^5.4.1", "@ethersproject/abstract-provider@^5.5.0":
version "5.5.1" version "5.5.1"
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.5.1.tgz#2f1f6e8a3ab7d378d8ad0b5718460f85649710c5" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.5.1.tgz#2f1f6e8a3ab7d378d8ad0b5718460f85649710c5"
integrity sha512-m+MA/ful6eKbxpr99xUYeRvLkfnlqzrF8SZ46d/xFB1A7ZVknYc/sXJG0RcufF52Qn2jeFj1hhcoQ7IXjNKUqg== integrity sha512-m+MA/ful6eKbxpr99xUYeRvLkfnlqzrF8SZ46d/xFB1A7ZVknYc/sXJG0RcufF52Qn2jeFj1hhcoQ7IXjNKUqg==
...@@ -1605,7 +1605,7 @@ ...@@ -1605,7 +1605,7 @@
"@ethersproject/logger" "^5.4.0" "@ethersproject/logger" "^5.4.0"
bn.js "^4.11.9" bn.js "^4.11.9"
"@ethersproject/bignumber@^5.1.1", "@ethersproject/bignumber@^5.4.0", "@ethersproject/bignumber@^5.5.0": "@ethersproject/bignumber@^5.1.1", "@ethersproject/bignumber@^5.4.0", "@ethersproject/bignumber@^5.4.2", "@ethersproject/bignumber@^5.5.0":
version "5.5.0" version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.5.0.tgz#875b143f04a216f4f8b96245bde942d42d279527" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.5.0.tgz#875b143f04a216f4f8b96245bde942d42d279527"
integrity sha512-6Xytlwvy6Rn3U3gKEc1vP7nR92frHkv6wtVr95LFR3jREXiCPzdWxKQ1cx4JGQBXxcguAwjA8murlYN2TSiEbg== integrity sha512-6Xytlwvy6Rn3U3gKEc1vP7nR92frHkv6wtVr95LFR3jREXiCPzdWxKQ1cx4JGQBXxcguAwjA8murlYN2TSiEbg==
...@@ -1642,7 +1642,7 @@ ...@@ -1642,7 +1642,7 @@
dependencies: dependencies:
"@ethersproject/bignumber" "^5.5.0" "@ethersproject/bignumber" "^5.5.0"
"@ethersproject/contracts@5.4.1": "@ethersproject/contracts@5.4.1", "@ethersproject/contracts@^5.4.1":
version "5.4.1" version "5.4.1"
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470"
integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w== integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==
...@@ -1918,7 +1918,7 @@ ...@@ -1918,7 +1918,7 @@
elliptic "6.5.4" elliptic "6.5.4"
hash.js "1.1.7" hash.js "1.1.7"
"@ethersproject/solidity@5.4.0", "@ethersproject/solidity@^5.0.0", "@ethersproject/solidity@^5.0.9": "@ethersproject/solidity@5.4.0", "@ethersproject/solidity@^5.4.0":
version "5.4.0" version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec"
integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ== integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ==
...@@ -1929,6 +1929,18 @@ ...@@ -1929,6 +1929,18 @@
"@ethersproject/sha2" "^5.4.0" "@ethersproject/sha2" "^5.4.0"
"@ethersproject/strings" "^5.4.0" "@ethersproject/strings" "^5.4.0"
"@ethersproject/solidity@^5.0.0", "@ethersproject/solidity@^5.0.9":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.5.0.tgz#2662eb3e5da471b85a20531e420054278362f93f"
integrity sha512-9NgZs9LhGMj6aCtHXhtmFQ4AN4sth5HuFXVvAQtzmm0jpSCNOTGtrHZJAeYTh7MBjRR8brylWZxBZR9zDStXbw==
dependencies:
"@ethersproject/bignumber" "^5.5.0"
"@ethersproject/bytes" "^5.5.0"
"@ethersproject/keccak256" "^5.5.0"
"@ethersproject/logger" "^5.5.0"
"@ethersproject/sha2" "^5.5.0"
"@ethersproject/strings" "^5.5.0"
"@ethersproject/strings@5.4.0": "@ethersproject/strings@5.4.0":
version "5.4.0" version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a"
...@@ -1977,7 +1989,7 @@ ...@@ -1977,7 +1989,7 @@
"@ethersproject/rlp" "^5.5.0" "@ethersproject/rlp" "^5.5.0"
"@ethersproject/signing-key" "^5.5.0" "@ethersproject/signing-key" "^5.5.0"
"@ethersproject/units@5.4.0": "@ethersproject/units@5.4.0", "@ethersproject/units@^5.4.0":
version "5.4.0" version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe"
integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg== integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg==
...@@ -1986,7 +1998,7 @@ ...@@ -1986,7 +1998,7 @@
"@ethersproject/constants" "^5.4.0" "@ethersproject/constants" "^5.4.0"
"@ethersproject/logger" "^5.4.0" "@ethersproject/logger" "^5.4.0"
"@ethersproject/wallet@5.4.0": "@ethersproject/wallet@5.4.0", "@ethersproject/wallet@^5.4.0":
version "5.4.0" version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353"
integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ== integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ==
...@@ -4974,18 +4986,7 @@ ...@@ -4974,18 +4986,7 @@
resolved "https://registry.yarnpkg.com/@uniswap/redux-multicall/-/redux-multicall-1.0.0.tgz#0cee4448909a788ea4700e5ede75ffeba05b5d75" resolved "https://registry.yarnpkg.com/@uniswap/redux-multicall/-/redux-multicall-1.0.0.tgz#0cee4448909a788ea4700e5ede75ffeba05b5d75"
integrity sha512-zR6tNC3XF6JuI6PjGlZW2Hz7tTzRzzVaPJfZ01BBWBJVt/2ixJY0SH514uffD03NHYiXZA//hlPQLfw3TkIxQg== integrity sha512-zR6tNC3XF6JuI6PjGlZW2Hz7tTzRzzVaPJfZ01BBWBJVt/2ixJY0SH514uffD03NHYiXZA//hlPQLfw3TkIxQg==
"@uniswap/router-sdk@^1.0.3": "@uniswap/router-sdk@^1.0.3", "@uniswap/router-sdk@^1.0.5":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@uniswap/router-sdk/-/router-sdk-1.0.3.tgz#378a8cc96a3f17b5627b811e64bfcf1e0e50a551"
integrity sha512-9Nq0+J4+u5cPkZlLjCnV1IbbmPVVDxlwrIuYh/fPTVMH4DnPVVEcP68BArtkSUG0OSC87rWrkEHIZd+L8CO6sQ==
dependencies:
"@ethersproject/abi" "^5.5.0"
"@uniswap/sdk-core" "^3.0.1"
"@uniswap/swap-router-contracts" "1.1.0"
"@uniswap/v2-sdk" "^3.0.1"
"@uniswap/v3-sdk" "^3.7.1"
"@uniswap/router-sdk@^1.0.5":
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/@uniswap/router-sdk/-/router-sdk-1.0.5.tgz#59b429327b0d202744db6de958e6b61d5adeec12" resolved "https://registry.yarnpkg.com/@uniswap/router-sdk/-/router-sdk-1.0.5.tgz#59b429327b0d202744db6de958e6b61d5adeec12"
integrity sha512-PA/0Ye9u3U5cm/LHrJuOgVSff6W4oFY3h+MUEzdp80SYIQdZZJ+BV06RL0h5KOSH+tuIX72n/qNusuRcf2Tc8Q== integrity sha512-PA/0Ye9u3U5cm/LHrJuOgVSff6W4oFY3h+MUEzdp80SYIQdZZJ+BV06RL0h5KOSH+tuIX72n/qNusuRcf2Tc8Q==
...@@ -10840,7 +10841,7 @@ ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: ...@@ -10840,7 +10841,7 @@ ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0:
rustbn.js "~0.2.0" rustbn.js "~0.2.0"
safe-buffer "^5.1.1" safe-buffer "^5.1.1"
ethers@^5.1.4, ethers@^5.4.0, ethers@^5.4.6: ethers@^5.1.4, ethers@^5.4.0:
version "5.4.7" version "5.4.7"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.7.tgz#0fd491a5da7c9793de2d6058d76b41b1e7efba8f" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.7.tgz#0fd491a5da7c9793de2d6058d76b41b1e7efba8f"
integrity sha512-iZc5p2nqfWK1sj8RabwsPM28cr37Bpq7ehTQ5rWExBr2Y09Sn1lDKZOED26n+TsZMye7Y6mIgQ/1cwpSD8XZew== integrity sha512-iZc5p2nqfWK1sj8RabwsPM28cr37Bpq7ehTQ5rWExBr2Y09Sn1lDKZOED26n+TsZMye7Y6mIgQ/1cwpSD8XZew==
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment