diff --git a/package.json b/package.json index 272ed9e6..4197ca62 100644 --- a/package.json +++ b/package.json @@ -230,6 +230,8 @@ "@web3-react/walletconnect-v2": "^8.5.1", "ajv": "^8.11.0", "ajv-formats": "^2.1.1", + "apollo-cache-inmemory": "^1.6.6", + "apollo-link-http": "^1.5.17", "array.prototype.flat": "^1.2.4", "array.prototype.flatmap": "^1.2.4", "cids": "^1.0.0", @@ -263,6 +265,7 @@ "qs": "^6.9.4", "rc-slider": "^10.0.1", "react": "^18.2.0", + "react-apollo": "^3.1.5", "react-dom": "^18.2.0", "react-feather": "^2.0.8", "react-helmet": "^6.1.0", diff --git a/src/apollo/client.js b/src/apollo/client.js new file mode 100644 index 00000000..02a8998a --- /dev/null +++ b/src/apollo/client.js @@ -0,0 +1,35 @@ +import { ApolloClient } from '@apollo/client' +import { InMemoryCache } from 'apollo-cache-inmemory' +import { HttpLink } from 'apollo-link-http' +import { getApiUrl } from 'constants/tokens' + +export const jediSwapClient = new ApolloClient({ + link: new HttpLink({ + uri: getApiUrl(), + headers: { + // 'm-color': 'blue', + }, + }), + cache: new InMemoryCache({ + dataIdFromObject: (object) => { + switch (object.__typename) { + case 'TokenDayData': { + return `${object.tokenAddress}${object.datetime}` + } + case 'FactoryDayData': { + return `${object.id}${object.dayId}` + } + case 'Token': { + return `${object.tokenAddress}${object.name}` + } + case 'Pool': { + return `${object.poolAddress}${object.datetime}` + } + default: { + return object.id || object._id + } + } + }, + }), + shouldBatch: true, +}) diff --git a/src/apollo/queries.js b/src/apollo/queries.js new file mode 100644 index 00000000..2f75e3bc --- /dev/null +++ b/src/apollo/queries.js @@ -0,0 +1,32 @@ +import gql from 'graphql-tag' + +const TokenFields = ` + fragment TokenFields on Token { + tokenAddress + name + symbol + derivedETH + volume + volumeUSD + untrackedVolumeUSD + totalValueLocked + totalValueLockedUSD + txCount + feesUSD + } +` + +export const TOKENS_DATA = ({ tokenIds = [] }) => { + const tokenString = `[${tokenIds.map((token) => `"${token}"`).join(',')}]` + + let queryString = ` + ${TokenFields} + query tokensData { + tokensData(first: 500, where: {tokenAddressIn: ${tokenString}, periodIn: "one_day"}) { + token{...TokenFields} + period + } + } + ` + return gql(queryString) +} diff --git a/src/components/CurrencyInputPanel/FiatValue.tsx b/src/components/CurrencyInputPanel/FiatValue.tsx index 7121a048..2e9ae6ca 100644 --- a/src/components/CurrencyInputPanel/FiatValue.tsx +++ b/src/components/CurrencyInputPanel/FiatValue.tsx @@ -16,49 +16,19 @@ const FiatLoadingBubble = styled(LoadingBubble)` height: 1rem; ` -export function FiatValue({ - fiatValue, - priceImpact, -}: { - fiatValue: { data?: number; isLoading: boolean } - priceImpact?: Percent -}) { - const { formatNumber, formatPercent } = useFormatter() - - const priceImpactColor = useMemo(() => { - if (!priceImpact) { - return undefined - } - if (priceImpact.lessThan('0')) { - return 'success' - } - const severity = warningSeverity(priceImpact) - if (severity < 1) { - return 'neutral3' - } - if (severity < 3) { - return 'deprecated_yellow1' - } - return 'critical' - }, [priceImpact]) - - if (fiatValue.isLoading) { - return - } +export function FiatValue({ fiatValue, priceImpact }: { fiatValue: number; priceImpact?: Percent }) { + const { formatNumber } = useFormatter() return ( - {fiatValue.data ? ( - formatNumber({ - input: fiatValue.data, - type: NumberType.FiatTokenPrice, - }) + {fiatValue ? ( + formatNumber({ input: fiatValue, type: NumberType.FiatTokenPrice }) ) : ( Not enough liquidity to show accurate USD value.}>- )} - {priceImpact && ( + {/* {priceImpact && ( The estimated difference between the USD values of input and output amounts.} @@ -66,7 +36,7 @@ export function FiatValue({ ({formatPercent(priceImpact.multiply(-1))}) - )} + )} */} ) } diff --git a/src/components/CurrencyInputPanel/SwapCurrencyInputPanel.tsx b/src/components/CurrencyInputPanel/SwapCurrencyInputPanel.tsx index 64fdb172..0688206e 100644 --- a/src/components/CurrencyInputPanel/SwapCurrencyInputPanel.tsx +++ b/src/components/CurrencyInputPanel/SwapCurrencyInputPanel.tsx @@ -222,7 +222,7 @@ interface SwapCurrencyInputPanelProps { pair?: Pair | null hideInput?: boolean otherCurrency?: Currency | null - fiatValue?: { data?: number; isLoading: boolean } + fiatValue?: number priceImpact?: Percent id: string showCommonBases?: boolean @@ -398,7 +398,7 @@ const SwapCurrencyInputPanel = forwardRef )} - {fiatValue && } + {fiatValue === 0 ? 'N/A' : fiatValue && } diff --git a/src/connectors/index.ts b/src/connectors/index.ts index cea8e517..303659c9 100644 --- a/src/connectors/index.ts +++ b/src/connectors/index.ts @@ -3,6 +3,17 @@ import { InjectedConnector } from '@starknet-react/core' export const NETWORK_CHAIN_ID: number = parseInt(process.env.REACT_APP_CHAIN_ID ?? '5') +export const isProductionEnvironment = () => { + if (!window.location) { + return false + } + if (String(window.location) === '//') { + return false + } + const host = new URL(String(window.location))?.host || '' + return host === 'app.jediswap.xyz' +} + export const isTestnetEnvironment = () => { if (!location) { return false diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 2e5a8eaa..8bcca4b5 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -3,6 +3,7 @@ import { ChainId, Currency, NativeCurrency, Percent, Token } from '@vnaysn/jedis // import { fortmatic, injected, portis, walletconnect, walletlink, argentX } from '../connectors' import JSBI from 'jsbi' +import { isProductionEnvironment } from 'connectors' export const DEFAULT_CHAIN_ID = ChainId.MAINNET export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0xC36442b4a4522E871399CD717aBDD847Ab11FE88' @@ -17,6 +18,13 @@ export const MAX_UINT128 = BigInt(2) ** BigInt(128) - BigInt(1) export const NATIVE_CHAIN_ID = 'NATIVE' export const ZERO_ADDRESS_STARKNET = '0x0000000000000000000000000000000000000000000000000000000000000000' +export const getApiUrl = () => { + if (isProductionEnvironment()) { + return 'https://api.v2.goerli.jediswap.xyz/graphql' + } + return 'https://api.v2.jediswap.xyz/graphql' +} + const cachedNativeCurrency: { [chainId: string]: NativeCurrency | Token } = {} export function nativeOnChain(chainId: ChainId): NativeCurrency | Token { if (cachedNativeCurrency[chainId]) return cachedNativeCurrency[chainId] diff --git a/src/index.tsx b/src/index.tsx index a92456b7..92f0064e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -32,6 +32,7 @@ import RadialGradientByChainUpdater from './theme/components/RadialGradientByCha import { goerli, mainnet, sepolia } from '@starknet-react/chains' import { StarknetConfig, publicProvider, argent, braavos } from '@starknet-react/core' import { StarknetProvider } from 'context/StarknetProvider' +import { jediSwapClient } from 'apollo/client' function Updaters() { const location = useLocation() @@ -66,7 +67,7 @@ createRoot(container).render( {/* */} - + diff --git a/src/pages/Pool/PositionPage.tsx b/src/pages/Pool/PositionPage.tsx index 9cf44cc2..68f4ef04 100644 --- a/src/pages/Pool/PositionPage.tsx +++ b/src/pages/Pool/PositionPage.tsx @@ -51,6 +51,7 @@ import { LoadingRows } from './styled' import { useContractWrite } from '@starknet-react/core' import { cairo, Call, CallData, validateAndParseAddress } from 'starknet' import { DEFAULT_CHAIN_ID, MAX_UINT128, NONFUNGIBLE_POOL_MANAGER_ADDRESS } from 'constants/tokens' +import TokensList from 'data/tokens-list.json' const PositionPageButtonPrimary = styled(ButtonPrimary)` width: 228px; @@ -168,6 +169,16 @@ const NFTImage = styled.img` z-index: 1; ` +import { CoinGeckoClient } from 'coingecko-api-v3' +import { useQuery } from 'react-query' +import { jediSwapClient } from 'apollo/client' +import { TOKENS_DATA } from 'apollo/queries' +const client = new CoinGeckoClient({ + timeout: 10000, + autoRetry: true, + apiKey: 'CG-LjiMiXQR6FUgXee6s89GnnrD', +}) + function CurrentPriceCard({ inverted, pool, @@ -667,14 +678,49 @@ function PositionPageContent() { return amount0.add(amount1) }, [price0, price1, feeValue0, feeValue1]) - const fiatValueOfLiquidity: CurrencyAmount | null = useMemo(() => { - if (!price0 || !price1 || !position) { - return null + const separatedFiatValueofLiquidity = useQuery({ + queryKey: [`fiat_value_0/${position?.amount0.toSignificant()}/${position?.amount0.currency.symbol}`], + queryFn: async () => { + const ids = [] + if (!position?.amount0 && !position?.amount1) return + if (position?.amount0) ids.push(position?.amount0.currency.address) + if (position?.amount1) ids.push(position?.amount1.currency.address) + let result = await jediSwapClient.query({ + query: TOKENS_DATA({ tokenIds: ids }), + fetchPolicy: 'cache-first', + }) + + try { + if (result.data) { + const tokensData = result.data.tokensData + if (tokensData) { + const [price0, price1] = [tokensData[0], tokensData[1]] + return { token0usdPrice: price1?.period?.one_day?.close, token1usdPrice: price0?.period?.one_day?.close } + } + } + } catch (e) { + console.log(e) + return { token0usdPrice: null, token1usdPrice: null } + } + }, + }) + + const { token0usdPrice, token1usdPrice } = useMemo(() => { + if (!separatedFiatValueofLiquidity.data) return { token0usdPrice: undefined, token1usdPrice: undefined } + return { + token0usdPrice: separatedFiatValueofLiquidity.data.token0usdPrice + ? separatedFiatValueofLiquidity.data.token0usdPrice * position?.amount0.toSignificant() + : undefined, + token1usdPrice: separatedFiatValueofLiquidity.data.token1usdPrice + ? separatedFiatValueofLiquidity.data.token1usdPrice * position?.amount1.toSignificant() + : undefined, } - const amount0 = price0.quote(position.amount0) - const amount1 = price1.quote(position.amount1) - return amount0.add(amount1) - }, [price0, price1, position]) + }, [separatedFiatValueofLiquidity]) + + const fiatValueofLiquidity = useMemo(() => { + if (token0usdPrice && token1usdPrice) (Number(token0usdPrice) + Number(token1usdPrice)).toFixed(4) + return undefined + }, [token0usdPrice, token1usdPrice]) useEffect(() => { if (callData) { @@ -873,9 +919,9 @@ function PositionPageContent() { - {fiatValueOfLiquidity?.greaterThan(new Fraction(1, 100)) ? ( + {fiatValueofLiquidity ? ( - ${fiatValueOfLiquidity.toFixed(2, { groupSeparator: ',' })} + ${fiatValueofLiquidity} ) : ( diff --git a/src/pages/Swap/index.tsx b/src/pages/Swap/index.tsx index 695b340e..f719d685 100644 --- a/src/pages/Swap/index.tsx +++ b/src/pages/Swap/index.tsx @@ -72,6 +72,9 @@ import useTransactionDeadline from 'hooks/useTransactionDeadline' import { useApprovalCall } from 'hooks/useApproveCall' import { Pool, TradeType, toHex } from '@vnaysn/jediswap-sdk-v3' import fetchAllPairs from 'api/fetchAllPairs' +import { useQuery } from 'react-query' +import { jediSwapClient } from 'apollo/client' +import { TOKENS_DATA } from 'apollo/queries' export const ArrowContainer = styled.div` display: inline-flex; @@ -386,8 +389,7 @@ export function Swap({ }, [independentField, parsedAmount, showWrap, trade] ) - const showFiatValueInput = Boolean(parsedAmounts[Field.INPUT]) - const showFiatValueOutput = Boolean(parsedAmounts[Field.OUTPUT]) + const getSingleUnitAmount = (currency?: Currency) => { if (!currency) { return @@ -395,15 +397,6 @@ export function Swap({ return CurrencyAmount.fromRawAmount(currency, JSBI.BigInt(10 ** currency.decimals)) } - const fiatValueInput = useUSDPrice( - parsedAmounts[Field.INPUT] ?? getSingleUnitAmount(currencies[Field.INPUT]), - currencies[Field.INPUT] - ) - const fiatValueOutput = useUSDPrice( - parsedAmounts[Field.OUTPUT] ?? getSingleUnitAmount(currencies[Field.OUTPUT]), - currencies[Field.OUTPUT] - ) - const [routeNotFound, routeIsLoading, routeIsSyncing] = useMemo( () => [ tradeState === TradeState.NO_ROUTE_FOUND, @@ -557,6 +550,55 @@ export function Swap({ } }, [swapCallData]) + const separatedFiatValueofLiquidity = useQuery({ + queryKey: ['fiat_value', trade?.inputAmount, trade?.outputAmount], + queryFn: async () => { + const ids = [] + if (!trade?.inputAmount && !trade?.outputAmount) return + if (trade?.inputAmount) ids.push((trade?.inputAmount.currency as any).address) + if (trade?.outputAmount) ids.push((trade?.outputAmount.currency as any).address) + let result = await jediSwapClient.query({ + query: TOKENS_DATA({ tokenIds: ids }), + // fetchPolicy: 'cache-first', + }) + + try { + if (result.data) { + const tokensData = result.data.tokensData + if (tokensData) { + const [price0, price1] = [tokensData[0], tokensData[1]] + const isToken0InputAmount = + validateAndParseAddress((trade?.inputAmount.currency as any).address) === + validateAndParseAddress(price0.token.tokenAddress) + const price0_one_day = price0?.period?.one_day?.close + const price1_one_day = price1?.period?.one_day?.close + return { + token0usdPrice: isToken0InputAmount ? price0_one_day : price1_one_day, + token1usdPrice: isToken0InputAmount ? price1_one_day : price0_one_day, + } + } + } + + return { token0usdPrice: undefined, token1usdPrice: undefined } + } catch (e) { + console.log(e) + return { token0usdPrice: null, token1usdPrice: null } + } + }, + }) + + const { token0usdPrice, token1usdPrice } = useMemo(() => { + if (!separatedFiatValueofLiquidity.data || !trade) return { token0usdPrice: undefined, token1usdPrice: undefined } + return { + token0usdPrice: separatedFiatValueofLiquidity.data.token0usdPrice + ? Number(separatedFiatValueofLiquidity.data.token0usdPrice) * Number(trade.inputAmount.toSignificant()) + : undefined, + token1usdPrice: separatedFiatValueofLiquidity.data.token1usdPrice + ? Number(separatedFiatValueofLiquidity.data.token1usdPrice) * Number(trade?.outputAmount.toSignificant()) + : undefined, + } + }, [separatedFiatValueofLiquidity]) + const amountToApprove = useMemo( () => (trade ? trade.maximumAmountIn(allowedSlippage) : undefined), [trade, allowedSlippage] @@ -880,7 +922,7 @@ export function Swap({ currency={currencies[Field.INPUT] ?? null} onUserInput={handleTypeInput} onMax={handleMaxInput} - fiatValue={showFiatValueInput ? fiatValueInput : undefined} + fiatValue={token0usdPrice} onCurrencySelect={handleInputSelect} otherCurrency={currencies[Field.OUTPUT]} showCommonBases @@ -914,7 +956,7 @@ export function Swap({ label={To} showMaxButton={false} hideBalance={false} - fiatValue={showFiatValueOutput ? fiatValueOutput : undefined} + fiatValue={token1usdPrice} priceImpact={stablecoinPriceImpact} currency={currencies[Field.OUTPUT] ?? null} onCurrencySelect={handleOutputSelect} diff --git a/yarn.lock b/yarn.lock index ee02d4a9..16529c01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -134,6 +134,55 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" +"@apollo/react-common@^3.1.4": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@apollo/react-common/-/react-common-3.1.4.tgz#ec13c985be23ea8e799c9ea18e696eccc97be345" + integrity sha512-X5Kyro73bthWSCBJUC5XYQqMnG0dLWuDZmVkzog9dynovhfiVCV4kPSdgSIkqnb++cwCzOVuQ4rDKVwo2XRzQA== + dependencies: + ts-invariant "^0.4.4" + tslib "^1.10.0" + +"@apollo/react-components@^3.1.5": + version "3.1.5" + resolved "https://registry.yarnpkg.com/@apollo/react-components/-/react-components-3.1.5.tgz#040d2f35ce4947747efe16f76d59dcbd797ffdaf" + integrity sha512-c82VyUuE9VBnJB7bnX+3dmwpIPMhyjMwyoSLyQWPHxz8jK4ak30XszJtqFf4eC4hwvvLYa+Ou6X73Q8V8e2/jg== + dependencies: + "@apollo/react-common" "^3.1.4" + "@apollo/react-hooks" "^3.1.5" + prop-types "^15.7.2" + ts-invariant "^0.4.4" + tslib "^1.10.0" + +"@apollo/react-hoc@^3.1.5": + version "3.1.5" + resolved "https://registry.yarnpkg.com/@apollo/react-hoc/-/react-hoc-3.1.5.tgz#6552d2fb4aafc59fdc8f4e353358b98b89cfab6f" + integrity sha512-jlZ2pvEnRevLa54H563BU0/xrYSgWQ72GksarxUzCHQW85nmn9wQln0kLBX7Ua7SBt9WgiuYQXQVechaaCulfQ== + dependencies: + "@apollo/react-common" "^3.1.4" + "@apollo/react-components" "^3.1.5" + hoist-non-react-statics "^3.3.0" + ts-invariant "^0.4.4" + tslib "^1.10.0" + +"@apollo/react-hooks@^3.1.5": + version "3.1.5" + resolved "https://registry.yarnpkg.com/@apollo/react-hooks/-/react-hooks-3.1.5.tgz#7e710be52461255ae7fc0b3b9c2ece64299c10e6" + integrity sha512-y0CJ393DLxIIkksRup4nt+vSjxalbZBXnnXxYbviq/woj+zKa431zy0yT4LqyRKpFy9ahMIwxBnBwfwIoupqLQ== + dependencies: + "@apollo/react-common" "^3.1.4" + "@wry/equality" "^0.1.9" + ts-invariant "^0.4.4" + tslib "^1.10.0" + +"@apollo/react-ssr@^3.1.5": + version "3.1.5" + resolved "https://registry.yarnpkg.com/@apollo/react-ssr/-/react-ssr-3.1.5.tgz#53703cd493afcde567acc6d5512cab03dafce6de" + integrity sha512-wuLPkKlctNn3u8EU8rlECyktpOUCeekFfb0KhIKknpGY6Lza2Qu0bThx7D9MIbVEzhKadNNrzLcpk0Y8/5UuWg== + dependencies: + "@apollo/react-common" "^3.1.4" + "@apollo/react-hooks" "^3.1.5" + tslib "^1.10.0" + "@ardatan/relay-compiler@12.0.0": version "12.0.0" resolved "https://registry.yarnpkg.com/@ardatan/relay-compiler/-/relay-compiler-12.0.0.tgz#2e4cca43088e807adc63450e8cab037020e91106" @@ -5949,6 +5998,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.13.tgz#392ba5c51b1550ee3c38082cf1e59b3144f06871" integrity sha512-OqG3iSnFg3cnJLsSRyhriILdDfBOwGty0fmnalbsPdYKbDgK6TI9On/36lzO/1bcaeEkg9OGD2wYLjx8t5MZNQ== +"@types/node@>=6": + version "20.11.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.19.tgz#b466de054e9cb5b3831bee38938de64ac7f81195" + integrity sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ== + dependencies: + undici-types "~5.26.4" + "@types/node@^10.12.18": version "10.17.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" @@ -7692,6 +7748,14 @@ fast-url-parser "^1.1.3" tslib "^2.3.1" +"@wry/context@^0.4.0": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.4.4.tgz#e50f5fa1d6cfaabf2977d1fda5ae91717f8815f8" + integrity sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag== + dependencies: + "@types/node" ">=6" + tslib "^1.9.3" + "@wry/context@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.0.tgz#be88e22c0ddf62aeb0ae9f95c3d90932c619a5c8" @@ -7699,6 +7763,13 @@ dependencies: tslib "^2.3.0" +"@wry/equality@^0.1.2", "@wry/equality@^0.1.9": + version "0.1.11" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" + integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== + dependencies: + tslib "^1.9.3" + "@wry/equality@^0.5.0": version "0.5.3" resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.3.tgz#fafebc69561aa2d40340da89fa7dc4b1f6fb7831" @@ -8024,6 +8095,63 @@ anymatch@^3.0.3, anymatch@^3.1.3, anymatch@~3.1.1, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +apollo-cache-inmemory@^1.6.6: + version "1.6.6" + resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd" + integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A== + dependencies: + apollo-cache "^1.3.5" + apollo-utilities "^1.3.4" + optimism "^0.10.0" + ts-invariant "^0.4.0" + tslib "^1.10.0" + +apollo-cache@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461" + integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA== + dependencies: + apollo-utilities "^1.3.4" + tslib "^1.10.0" + +apollo-link-http-common@^0.2.16: + version "0.2.16" + resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc" + integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg== + dependencies: + apollo-link "^1.2.14" + ts-invariant "^0.4.0" + tslib "^1.9.3" + +apollo-link-http@^1.5.17: + version "1.5.17" + resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.17.tgz#499e9f1711bf694497f02c51af12d82de5d8d8ba" + integrity sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg== + dependencies: + apollo-link "^1.2.14" + apollo-link-http-common "^0.2.16" + tslib "^1.9.3" + +apollo-link@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" + integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== + dependencies: + apollo-utilities "^1.3.0" + ts-invariant "^0.4.0" + tslib "^1.9.3" + zen-observable-ts "^0.8.21" + +apollo-utilities@^1.3.0, apollo-utilities@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf" + integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== + dependencies: + "@wry/equality" "^0.1.2" + fast-json-stable-stringify "^2.0.0" + ts-invariant "^0.4.0" + tslib "^1.10.0" + arch@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" @@ -8983,6 +9111,11 @@ builtin-modules@^3.1.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== + bunyan-blackhole@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/bunyan-blackhole/-/bunyan-blackhole-1.1.1.tgz#b9208586dc0b4e47f4f713215b1bddd65e4f6257" @@ -9514,6 +9647,13 @@ coa@^2.0.2: chalk "^2.4.1" q "^1.1.2" +coingecko-api-v3@^0.0.29: + version "0.0.29" + resolved "https://registry.yarnpkg.com/coingecko-api-v3/-/coingecko-api-v3-0.0.29.tgz#68b43ecae04519ca9f669da44df596e868861845" + integrity sha512-4aF0mU6Pwmo78W4NsPbMslU3ooeSa2Dq8a8PFR+5+wWcWvTBMiUZgfy9UvybynYVsnvYCoyxtNwxTiMZBeZh4w== + dependencies: + https "^1.0.0" + collapse-white-space@^1.0.2: version "1.0.6" resolved "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz" @@ -13430,6 +13570,11 @@ http-signature@~1.3.6: jsprim "^2.0.2" sshpk "^1.14.1" +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== + https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -13446,6 +13591,11 @@ https-proxy-agent@^6.0.0: agent-base "^7.0.2" debug "4" +https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https/-/https-1.0.0.tgz#3c37c7ae1a8eeb966904a2ad1e975a194b7ed3a4" + integrity sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg== + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -16794,6 +16944,13 @@ open@^8.0.9, open@^8.4.0: resolved "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.3.0.tgz" integrity sha512-QYeiPLvB1oSbDt6lDQvvpx7k8ODczvE474hb2kLXZBPKMsxKT1WxTCHBYrCU7kS7hfAku4DcJ0jqOyL+jvjwQw== +optimism@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.10.3.tgz#163268fdc741dea2fb50f300bedda80356445fd7" + integrity sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw== + dependencies: + "@wry/context" "^0.4.0" + optimism@^0.16.1: version "0.16.2" resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.16.2.tgz#519b0c78b3b30954baed0defe5143de7776bf081" @@ -18272,6 +18429,17 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" +react-apollo@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/react-apollo/-/react-apollo-3.1.5.tgz#36692d393c47e7ccc37f0a885c7cc5a8b4961c91" + integrity sha512-xOxMqxORps+WHrUYbjVHPliviomefOpu5Sh35oO3osuOyPTxvrljdfTLGCggMhcXBsDljtS5Oy4g+ijWg3D4JQ== + dependencies: + "@apollo/react-common" "^3.1.4" + "@apollo/react-components" "^3.1.5" + "@apollo/react-hoc" "^3.1.5" + "@apollo/react-hooks" "^3.1.5" + "@apollo/react-ssr" "^3.1.5" + react-app-polyfill@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-3.0.0.tgz#95221e0a9bd259e5ca6b177c7bb1cb6768f68fd7" @@ -20016,6 +20184,16 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" +stream-http@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" + integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.4" + readable-stream "^3.6.0" + xtend "^4.0.2" + stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -20763,6 +20941,13 @@ ts-invariant@^0.10.3: dependencies: tslib "^2.1.0" +ts-invariant@^0.4.0, ts-invariant@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" + integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== + dependencies: + tslib "^1.9.3" + ts-jest@^29.1.1: version "29.1.1" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" @@ -20821,7 +21006,7 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@1.14.1, tslib@^1.0.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@1.14.1, tslib@^1.0.0, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -21058,6 +21243,11 @@ uncrypto@^0.1.3: resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + undici@^5.12.0, undici@^5.14.0, undici@^5.22.1: version "5.23.0" resolved "https://registry.yarnpkg.com/undici/-/undici-5.23.0.tgz#e7bdb0ed42cebe7b7aca87ced53e6eaafb8f8ca0" @@ -22248,7 +22438,7 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xtend@^4.0.0, xtend@^4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -22411,6 +22601,14 @@ youch@^3.2.2: mustache "^4.2.0" stacktracey "^2.1.8" +zen-observable-ts@^0.8.21: + version "0.8.21" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d" + integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== + dependencies: + tslib "^1.9.3" + zen-observable "^0.8.0" + zen-observable-ts@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz#6c6d9ea3d3a842812c6e9519209365a122ba8b58" @@ -22418,7 +22616,7 @@ zen-observable-ts@^1.2.5: dependencies: zen-observable "0.8.15" -zen-observable@0.8.15: +zen-observable@0.8.15, zen-observable@^0.8.0: version "0.8.15" resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==