diff --git a/.changeset/config.json b/.changeset/config.json index 5f561a1e8e..bf321d7969 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -31,8 +31,6 @@ "@sushiswap/tailwindcss-config", "@sushiswap/typescript-config", - "@sushiswap/pool-job", - "@sushiswap/bonds-sdk", "@sushiswap/client", "@sushiswap/database", diff --git a/apps/web/.env.example b/apps/web/.env.example index d2ca464e96..d14d60ab3b 100644 --- a/apps/web/.env.example +++ b/apps/web/.env.example @@ -11,3 +11,6 @@ ALCHEMY_ID= NEXT_PUBLIC_INFURA_ID= INFURA_ID= DRPC_ID= + +SUSHI_DATA_API_HOST= +NEXT_PUBLIC_SUSHI_DATA_API_HOST= diff --git a/apps/web/src/app/(cms)/header.tsx b/apps/web/src/app/(cms)/header.tsx index 5f177b4ca8..ffa8b887d7 100644 --- a/apps/web/src/app/(cms)/header.tsx +++ b/apps/web/src/app/(cms)/header.tsx @@ -40,7 +40,7 @@ export async function Header() { const navData: NavigationElement[] = [ { title: 'Explore', - items: EXPLORE_NAVIGATION_LINKS, + items: EXPLORE_NAVIGATION_LINKS(), show: 'everywhere', type: NavigationElementType.Dropdown, }, diff --git a/apps/web/src/app/(evm)/(trade)/header.tsx b/apps/web/src/app/(evm)/(trade)/header.tsx index 2b93fa8062..94558372a6 100644 --- a/apps/web/src/app/(evm)/(trade)/header.tsx +++ b/apps/web/src/app/(evm)/(trade)/header.tsx @@ -11,9 +11,8 @@ export const Header: FC = () => { const chainId = useChainId() return ( } - chainId={chainId} /> ) } diff --git a/apps/web/src/app/(evm)/pool/hero.tsx b/apps/web/src/app/(evm)/[chainId]/(positions)/hero.tsx similarity index 55% rename from apps/web/src/app/(evm)/pool/hero.tsx rename to apps/web/src/app/(evm)/[chainId]/(positions)/hero.tsx index e0b5408950..7cc7a2defa 100644 --- a/apps/web/src/app/(evm)/pool/hero.tsx +++ b/apps/web/src/app/(evm)/[chainId]/(positions)/hero.tsx @@ -1,63 +1,47 @@ -'use client' - import { GiftIcon } from '@heroicons/react-v1/outline' -import { LinkExternal, LinkInternal, typographyVariants } from '@sushiswap/ui' -import { Button } from '@sushiswap/ui' -import { Chip } from '@sushiswap/ui' import { + Button, + Chip, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuTrigger, + LinkInternal, + SelectIcon, } from '@sushiswap/ui' -import { SelectIcon } from '@sushiswap/ui' -import { DiscordIcon } from '@sushiswap/ui/icons/DiscordIcon' import { FC } from 'react' -import { ChainId } from 'sushi/chain' +import { ChainId, ChainKey } from 'sushi/chain' import { SushiSwapV3ChainId, isSushiSwapV2ChainId, isSushiSwapV3ChainId, } from 'sushi/config' -import { useChainId } from 'wagmi' - -export const Hero: FC = () => { - const chainId = useChainId() +export const Hero: FC<{ chainId: ChainId }> = ({ chainId }) => { return ( -
-
-
-

- Put your funds to work
- by providing liquidity. -

-

- When you add liquidity to a pool, you can receive a share of its - trading volume and potentially snag extra rewards when there are - incentives involved! -

-
-
+
+ Manage Liquidity Positions +
+ + You can adjust and claim rewards for your liquidity positions on the + connected network. For V2 pools, you can migrate to increase capital + efficiency. + +
- @@ -78,7 +62,7 @@ export const Hero: FC = () => { asChild >
@@ -97,7 +81,7 @@ export const Hero: FC = () => { {isSushiSwapV2ChainId(chainId as ChainId) ? (
@@ -118,37 +102,17 @@ export const Hero: FC = () => { asChild icon={GiftIcon} variant="secondary" - size="lg" + size="sm" > - + I want to incentivize a pool
-
-
- - Looking for a partnership with Sushi? - - -
-
- Need Help? - -
-
) } diff --git a/apps/web/src/app/(evm)/pool/(landing)/layout.tsx b/apps/web/src/app/(evm)/[chainId]/(positions)/layout.tsx similarity index 50% rename from apps/web/src/app/(evm)/pool/(landing)/layout.tsx rename to apps/web/src/app/(evm)/[chainId]/(positions)/layout.tsx index 009e0f8f65..e99da70f8c 100644 --- a/apps/web/src/app/(evm)/pool/(landing)/layout.tsx +++ b/apps/web/src/app/(evm)/[chainId]/(positions)/layout.tsx @@ -2,53 +2,43 @@ import { Container, LinkInternal } from '@sushiswap/ui' import { useSearchParams } from 'next/navigation' - -import { PathnameButton, PoolsFiltersProvider } from 'src/ui/pool' -import { Hero } from '../hero' +import { PathnameButton } from 'src/ui/pathname-button' +import { PoolsFiltersProvider } from 'src/ui/pool' +import { ChainId, ChainKey, isChainId } from 'sushi/chain' +import { Hero } from './hero' export default function TabsLayout({ children, -}: { children: React.ReactNode }) { + params, +}: { + children: React.ReactNode + params: { chainId: string } +}) { + const chainId = +params.chainId as ChainId const searchParams = useSearchParams() + if (!isChainId(chainId)) { + throw new Error('Must be a valid chain id') + } + return ( <> - - + + - -
- - - All Pools - - - - - Smart Pools - - + +
@@ -58,11 +48,11 @@ export default function TabsLayout({ @@ -72,11 +62,11 @@ export default function TabsLayout({ diff --git a/apps/web/src/app/(evm)/[chainId]/(positions)/migrate/page.tsx b/apps/web/src/app/(evm)/[chainId]/(positions)/migrate/page.tsx new file mode 100644 index 0000000000..7e25fd2027 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/(positions)/migrate/page.tsx @@ -0,0 +1,10 @@ +import React from 'react' + +import { MigrateTabContent } from 'src/ui/pool/MigrateTabContent' +import { ChainId } from 'sushi' + +export default function MigratePage({ + params, +}: { params: { chainId: string } }) { + return +} diff --git a/apps/web/src/app/(evm)/pool/(landing)/my-positions/page.tsx b/apps/web/src/app/(evm)/[chainId]/(positions)/pool/page.tsx similarity index 69% rename from apps/web/src/app/(evm)/pool/(landing)/my-positions/page.tsx rename to apps/web/src/app/(evm)/[chainId]/(positions)/pool/page.tsx index ce75c7bbcc..c5475622af 100644 --- a/apps/web/src/app/(evm)/pool/(landing)/my-positions/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/(positions)/pool/page.tsx @@ -2,21 +2,26 @@ import { Container } from '@sushiswap/ui' import React from 'react' +import { ChainId } from 'sushi/chain' import { PositionsTab } from 'src/ui/pool/PositionsTab' import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' -export default function MyPositionsPage() { +export default function MyPositionsPage({ + params: { chainId }, +}: { + params: { chainId: string } +}) { return (
- +
- +
) } diff --git a/apps/web/src/app/(evm)/pool/(landing)/my-rewards/page.tsx b/apps/web/src/app/(evm)/[chainId]/(positions)/rewards/page.tsx similarity index 100% rename from apps/web/src/app/(evm)/pool/(landing)/my-rewards/page.tsx rename to apps/web/src/app/(evm)/[chainId]/(positions)/rewards/page.tsx diff --git a/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx b/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx new file mode 100644 index 0000000000..8d90bc6679 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx @@ -0,0 +1,70 @@ +import { isSteerChainId } from '@sushiswap/steer-sdk' +import { Container } from '@sushiswap/ui' +import { LinkInternal } from '@sushiswap/ui' + +import React from 'react' +import { GlobalStatsCharts } from 'src/ui/explore/global-stats-charts' +import { PathnameButton } from 'src/ui/pathname-button' +import { PoolsFiltersProvider } from 'src/ui/pool' +import { ChainId, ChainKey } from 'sushi/chain' + +export const metadata = { + title: 'Pools 💦', +} + +export default async function ExploreLayout({ + children, + params, +}: { children: React.ReactNode; params: { chainId: string } }) { + const chainId = +params.chainId as ChainId + return ( + <> + + + + +
+ + + All Pools + + + {isSteerChainId(chainId) ? ( + + + Smart Pools + + + ) : ( + + Smart Pools + + )} +
+
+
+
+ {children} +
+
+ + ) +} diff --git a/apps/web/src/app/(evm)/pool/(landing)/page.tsx b/apps/web/src/app/(evm)/[chainId]/explore/pools/page.tsx similarity index 52% rename from apps/web/src/app/(evm)/pool/(landing)/page.tsx rename to apps/web/src/app/(evm)/[chainId]/explore/pools/page.tsx index 555e7dfaab..34a783aaf2 100644 --- a/apps/web/src/app/(evm)/pool/(landing)/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/explore/pools/page.tsx @@ -1,6 +1,7 @@ +import { getTopPools } from '@sushiswap/graph-client/data-api' import { Container } from '@sushiswap/ui' -import React from 'react' - +import { unstable_cache } from 'next/cache' +import React, { FC, Suspense } from 'react' import { PoolsTable } from 'src/ui/pool/PoolsTable' import { TableFiltersSmartPoolsOnly } from 'src/ui/pool/TableFilterSmartPoolsOnly' import { TableFiltersFarmsOnly } from 'src/ui/pool/TableFiltersFarmsOnly' @@ -8,19 +9,39 @@ import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' import { TableFiltersPoolType } from 'src/ui/pool/TableFiltersPoolType' import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' +import { ChainId } from 'sushi/chain' + +const _PoolsTable: FC<{ chainId: ChainId }> = async ({ chainId }) => { + const pools = await unstable_cache( + async () => getTopPools({ chainId: `${chainId}` }), + ['pools', `${chainId}`], + { + revalidate: 60 * 15, + }, + )() + + return +} -export default async function PoolPage() { +export default async function PoolsPage({ + params, +}: { + params: { chainId: string } +}) { + const chainId = +params.chainId as ChainId return (
- +
- + }> + <_PoolsTable chainId={chainId} /> +
) } diff --git a/apps/web/src/app/(evm)/[chainId]/explore/smart-pools/page.tsx b/apps/web/src/app/(evm)/[chainId]/explore/smart-pools/page.tsx new file mode 100644 index 0000000000..6b6907713a --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/explore/smart-pools/page.tsx @@ -0,0 +1,52 @@ +import { getSmartPools } from '@sushiswap/graph-client/data-api' +import { STEER_SUPPORTED_CHAIN_IDS } from '@sushiswap/steer-sdk' +import { Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import React, { FC, Suspense } from 'react' +import { SmartPoolsTable } from 'src/ui/pool/SmartPoolsTable' +import { TableFiltersFarmsOnly } from 'src/ui/pool/TableFiltersFarmsOnly' +import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' +import { TableFiltersPoolType } from 'src/ui/pool/TableFiltersPoolType' +import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' +import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' +import { ChainId } from 'sushi/chain' + +const _SmartPoolsTable: FC<{ chainId: ChainId }> = async ({ chainId }) => { + const smartPools = await unstable_cache( + async () => + getSmartPools({ chainId }).then((smartPools) => + smartPools.filter((smartPool) => smartPool.isEnabled), + ), + ['smart-pools', `${chainId}`], + { + revalidate: 60 * 15, + }, + )() + + return +} + +export default async function SmartPoolsPage({ + params, +}: { + params: { chainId: string } +}) { + const chainId = +params.chainId as ChainId + return ( + +
+ + + + + +
+ }> + <_SmartPoolsTable chainId={chainId} /> + +
+ ) +} diff --git a/apps/web/src/app/(evm)/pool/header.tsx b/apps/web/src/app/(evm)/[chainId]/header.tsx similarity index 89% rename from apps/web/src/app/(evm)/pool/header.tsx rename to apps/web/src/app/(evm)/[chainId]/header.tsx index 2b93fa8062..94558372a6 100644 --- a/apps/web/src/app/(evm)/pool/header.tsx +++ b/apps/web/src/app/(evm)/[chainId]/header.tsx @@ -11,9 +11,8 @@ export const Header: FC = () => { const chainId = useChainId() return ( } - chainId={chainId} /> ) } diff --git a/apps/web/src/app/(evm)/pool/layout.tsx b/apps/web/src/app/(evm)/[chainId]/layout.tsx similarity index 58% rename from apps/web/src/app/(evm)/pool/layout.tsx rename to apps/web/src/app/(evm)/[chainId]/layout.tsx index bd46e1474f..293a1baf59 100644 --- a/apps/web/src/app/(evm)/pool/layout.tsx +++ b/apps/web/src/app/(evm)/[chainId]/layout.tsx @@ -1,15 +1,18 @@ import { HotJar } from '@sushiswap/ui' +import { isSupportedChainId } from 'src/config' import { Header } from './header' +import notFound from './not-found' import { Providers } from './providers' -export const metadata = { - title: 'Pool 💦', -} - export default function PoolLayout({ children, -}: { children: React.ReactNode }) { + params: { chainId }, +}: { children: React.ReactNode; params: { chainId: string } }) { + if (!isSupportedChainId(+chainId)) { + return notFound() + } + return ( <> diff --git a/apps/web/src/app/(evm)/pool/not-found.tsx b/apps/web/src/app/(evm)/[chainId]/not-found.tsx similarity index 77% rename from apps/web/src/app/(evm)/pool/not-found.tsx rename to apps/web/src/app/(evm)/[chainId]/not-found.tsx index f0b52bf960..8d82d88676 100644 --- a/apps/web/src/app/(evm)/pool/not-found.tsx +++ b/apps/web/src/app/(evm)/[chainId]/not-found.tsx @@ -1,7 +1,9 @@ import { ChevronRightIcon } from '@heroicons/react/20/solid' import { Button, LinkInternal, typographyVariants } from '@sushiswap/ui' +import { ChainKey } from 'sushi' +import { ChainId } from 'sushi/chain' -export default function NotFound() { +export default function NotFound(chainId: ChainId = ChainId.ETHEREUM) { return (
@@ -30,7 +32,9 @@ export default function NotFound() { icon={ChevronRightIcon} iconPosition="end" > - See a list of our pools + + See a list of our pools +
diff --git a/apps/web/src/app/(evm)/pool/incentivize/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/incentivize/layout.tsx similarity index 99% rename from apps/web/src/app/(evm)/pool/incentivize/layout.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/incentivize/layout.tsx index c835e12861..49afc9279d 100644 --- a/apps/web/src/app/(evm)/pool/incentivize/layout.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/incentivize/layout.tsx @@ -1,5 +1,4 @@ import { Container, typographyVariants } from '@sushiswap/ui' - import { BackButton } from 'src/ui/pool/BackButton' export const metadata = { diff --git a/apps/web/src/app/(evm)/pool/incentivize/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/incentivize/page.tsx similarity index 98% rename from apps/web/src/app/(evm)/pool/incentivize/page.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/incentivize/page.tsx index 14d8cfd6a0..e4cb213411 100644 --- a/apps/web/src/app/(evm)/pool/incentivize/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/incentivize/page.tsx @@ -28,6 +28,7 @@ import { typographyVariants, } from '@sushiswap/ui' import format from 'date-fns/format' +import { useRouter } from 'next/navigation' import { useMemo, useState } from 'react' import { Web3Input } from 'src/lib/wagmi/components/web3-input' import { useConcentratedLiquidityPool } from 'src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPool' @@ -49,10 +50,11 @@ import { import { SelectFeeConcentratedWidget } from 'src/ui/pool/SelectFeeConcentratedWidget' import { SelectNetworkWidget } from 'src/ui/pool/SelectNetworkWidget' import { SelectTokensWidget } from 'src/ui/pool/SelectTokensWidget' -import { Chain } from 'sushi/chain' +import { Chain, ChainId, ChainKey } from 'sushi/chain' import { ANGLE_SUPPORTED_CHAIN_IDS, SushiSwapV3ChainId, + isAngleEnabledChainId, isWNativeSupported, } from 'sushi/config' import { Token, Type, tryParseAmount } from 'sushi/currency' @@ -62,9 +64,11 @@ import { useAccount, useWaitForTransactionReceipt } from 'wagmi' const APPROVE_TAG = 'approve-incentivize' -export default function Page() { +export default function Page({ params }: { params: { chainId: string } }) { + const chainId = +params.chainId as ChainId return ( @@ -82,11 +86,11 @@ const Incentivize = withCheckerRoot(() => { token1, setToken1, setToken0, - setNetwork, feeAmount, setFeeAmount, } = useConcentratedLiquidityURLState() + const router = useRouter() const { approved } = useApproved(APPROVE_TAG) const [value, setValue] = useState('') const [customize, setCustomize] = useState(false) @@ -201,7 +205,9 @@ const Incentivize = withCheckerRoot(() => { + router.push(`/${ChainKey[chainId]}/pool/incentivize`) + } networks={ANGLE_SUPPORTED_CHAIN_IDS} /> { testId="incentivize-confirmation-modal" successMessage={`Successfully incentivized the ${token0.symbol}/${token1.symbol} V3 pool`} buttonText="Go to pool" - buttonLink={`/pools/${pool.chainId}:${v3Address}?activeTab=myPositions`} + buttonLink={`/${pool.chainId}/pool/v3/${v3Address}`} txHash={data} /> ) : null} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/(landing)/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/(landing)/page.tsx new file mode 100644 index 0000000000..52eb669873 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/(landing)/page.tsx @@ -0,0 +1,21 @@ +import { V2Pool, getV2Pool } from '@sushiswap/graph-client/data-api' +import { unstable_cache } from 'next/cache' + +import { PoolPageV2 } from 'src/ui/pool/PoolPageV2' + +export default async function PoolPage({ + params, +}: { + params: { chainId: string; address: string } +}) { + const { chainId, address } = params + const pool = (await unstable_cache( + async () => await getV2Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/add/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/add/page.tsx new file mode 100644 index 0000000000..4642db89f8 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/add/page.tsx @@ -0,0 +1,48 @@ +import { V2Pool, getV2Pool } from '@sushiswap/graph-client/data-api' +import { Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { + PoolPositionProvider, + PoolPositionRewardsProvider, + PoolPositionStakedProvider, +} from 'src/ui/pool' +import { ManageV2LiquidityCard } from 'src/ui/pool/ManageV2LiquidityCard' +import { PoolMyRewards } from 'src/ui/pool/PoolMyRewards' +import { PoolPosition } from 'src/ui/pool/PoolPosition' + +export default async function ManageV2PoolPage({ + params: { chainId, address }, +}: { + params: { + chainId: string + address: string + } +}) { + const pool = (await unstable_cache( + async () => getV2Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return ( + +
+
+ +
+
+ + + + + + + + +
+
+
+ ) +} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/layout.tsx similarity index 52% rename from apps/web/src/app/(evm)/pool/[id]/(landing)/layout.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/layout.tsx index 06fb975a11..3bed90c1f6 100644 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/layout.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/layout.tsx @@ -1,10 +1,10 @@ -import { getPool } from '@sushiswap/client' -import { Breadcrumb, Container } from '@sushiswap/ui' +import { getV2Pool } from '@sushiswap/graph-client/data-api' +import { Container } from '@sushiswap/ui' import { unstable_cache } from 'next/cache' import { headers } from 'next/headers' import { PoolHeader } from 'src/ui/pool/PoolHeader' -import { unsanitize } from 'sushi/format' -import notFound from '../../not-found' +import { ChainKey, isChainId } from 'sushi' +import notFound from '../../../not-found' export const metadata = { title: 'Pool 💦', @@ -13,30 +13,38 @@ export const metadata = { export default async function Layout({ children, params, -}: { children: React.ReactNode; params: { id: string } }) { - const poolId = unsanitize(params.id) +}: { + children: React.ReactNode + params: { chainId: string; address: string } +}) { + const { chainId, address } = params + const _chainId = Number(chainId) + if (!isChainId(_chainId)) { + return notFound() + } const pool = await unstable_cache( - async () => getPool(poolId), - ['pool', poolId], + async () => getV2Pool({ chainId: _chainId, address }), + ['pool', `${chainId}:${address}`], { revalidate: 60 * 15, }, )() - if (!pool) { - notFound() + // Rockstar C&D + if (!pool || pool.id === '42161:0x0a4f9962e24893a4a7567e52c1ce37d5482365de') { + return notFound() } - const headersList = headers() const referer = headersList.get('referer') return ( <> - - - getV2Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return ( + +
+
+ +
+
+ + + + + + + + +
+
+
+ ) +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/stake/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/stake/page.tsx new file mode 100644 index 0000000000..c93ed7ce98 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/stake/page.tsx @@ -0,0 +1,48 @@ +import { V2Pool, getV2Pool } from '@sushiswap/graph-client/data-api' +import { Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { + PoolPositionProvider, + PoolPositionRewardsProvider, + PoolPositionStakedProvider, +} from 'src/ui/pool' +import { ManageV2LiquidityCard } from 'src/ui/pool/ManageV2LiquidityCard' +import { PoolMyRewards } from 'src/ui/pool/PoolMyRewards' +import { PoolPosition } from 'src/ui/pool/PoolPosition' + +export default async function ManageV2PoolPage({ + params: { chainId, address }, +}: { + params: { + chainId: string + address: string + } +}) { + const pool = (await unstable_cache( + async () => getV2Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return ( + +
+
+ +
+
+ + + + + + + + +
+
+
+ ) +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/unstake/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/unstake/page.tsx new file mode 100644 index 0000000000..13eace486e --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/[address]/unstake/page.tsx @@ -0,0 +1,48 @@ +import { V2Pool, getV2Pool } from '@sushiswap/graph-client/data-api' +import { Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { + PoolPositionProvider, + PoolPositionRewardsProvider, + PoolPositionStakedProvider, +} from 'src/ui/pool' +import { ManageV2LiquidityCard } from 'src/ui/pool/ManageV2LiquidityCard' +import { PoolMyRewards } from 'src/ui/pool/PoolMyRewards' +import { PoolPosition } from 'src/ui/pool/PoolPosition' + +export default async function ManageV2PoolPage({ + params: { chainId, address }, +}: { + params: { + chainId: string + address: string + } +}) { + const pool = (await unstable_cache( + async () => getV2Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return ( + +
+
+ +
+
+ + + + + + + + +
+
+
+ ) +} diff --git a/apps/web/src/app/(evm)/pool/add/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/add/layout.tsx similarity index 100% rename from apps/web/src/app/(evm)/pool/add/layout.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v2/add/layout.tsx diff --git a/apps/web/src/app/(evm)/pool/add/v2/[chainId]/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/add/page.tsx similarity index 97% rename from apps/web/src/app/(evm)/pool/add/v2/[chainId]/page.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v2/add/page.tsx index 6185068140..6054ff2003 100644 --- a/apps/web/src/app/(evm)/pool/add/v2/[chainId]/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/add/page.tsx @@ -18,11 +18,10 @@ import React, { import { DISABLED_CHAIN_IDS } from 'src/config' import { APPROVE_TAG_ADD_LEGACY } from 'src/lib/constants' import { isSushiSwapV2Pool } from 'src/lib/functions' -import { ChainId, TESTNET_CHAIN_IDS } from 'sushi/chain' +import { ChainId, ChainKey, TESTNET_CHAIN_IDS } from 'sushi/chain' import { SUSHISWAP_V2_ROUTER_ADDRESS, SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - SushiSwapV2ChainId, defaultCurrency, defaultQuoteCurrency, isSushiSwapV2ChainId, @@ -42,10 +41,15 @@ import { AddSectionPoolShareCardV2 } from 'src/ui/pool/AddSectionPoolShareCardV2 import { AddSectionReviewModalLegacy } from 'src/ui/pool/AddSectionReviewModalLegacy' import { SelectNetworkWidget } from 'src/ui/pool/SelectNetworkWidget' import { SelectTokensWidget } from 'src/ui/pool/SelectTokensWidget' +import notFound from '../../../not-found' export default function Page({ params }: { params: { chainId: string } }) { + const chainId = +params.chainId as ChainId + if (!isSushiSwapV2ChainId(chainId)) { + return notFound(chainId) + } + const router = useRouter() - const [chainId, setChainId] = useState(+params.chainId as SushiSwapV2ChainId) const [token0, setToken0] = useState( defaultCurrency[chainId as keyof typeof defaultCurrency], ) @@ -97,8 +101,7 @@ export default function Page({ params }: { params: { chainId: string } }) { chainId={chainId} setChainId={(chainId) => { if (!isSushiSwapV2ChainId(chainId)) return - router.push(`/pool/add/v2/${chainId}`) - setChainId(chainId) + router.push(`/${ChainKey[chainId]}/pool/v2/add`) }} pool={pool as SushiSwapV2Pool | null} poolState={poolState as SushiSwapV2PoolState} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v2/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v2/layout.tsx new file mode 100644 index 0000000000..1cda237791 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v2/layout.tsx @@ -0,0 +1,15 @@ +import { ChainId } from 'sushi/chain' +import { isSushiSwapV2ChainId } from 'sushi/config' +import notFound from '../../not-found' + +export default function Layout({ + children, + params, +}: { children: React.ReactNode; params: { chainId: string } }) { + const chainId = +params.chainId as ChainId + if (!isSushiSwapV2ChainId(chainId)) { + return notFound(chainId) + } + + return <>{children} +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/(landing)/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/(landing)/page.tsx new file mode 100644 index 0000000000..635eca0898 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/(landing)/page.tsx @@ -0,0 +1,21 @@ +import { V3Pool, getV3Pool } from '@sushiswap/graph-client/data-api' +import { unstable_cache } from 'next/cache' + +import { PoolPageV3 } from 'src/ui/pool/PoolPageV3' + +export default async function PoolPage({ + params, +}: { + params: { chainId: string; address: string } +}) { + const { chainId, address } = params + const pool = (await unstable_cache( + async () => await getV3Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/layout.tsx new file mode 100644 index 0000000000..f7bd79d338 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/layout.tsx @@ -0,0 +1,57 @@ +import { getV3Pool } from '@sushiswap/graph-client/data-api' +import { Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { headers } from 'next/headers' +import { PoolHeader } from 'src/ui/pool/PoolHeader' +import { ChainId, ChainKey } from 'sushi/chain' +import notFound from '../../../not-found' + +export const metadata = { + title: 'Pool 💦', +} + +export default async function Layout({ + children, + params, +}: { + children: React.ReactNode + params: { chainId: string; address: string } +}) { + const { chainId: _chainId, address } = params + const chainId = +_chainId as ChainId + const pool = await unstable_cache( + async () => getV3Pool({ chainId, address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )() + + if (!pool) { + return notFound(chainId) + } + + const headersList = headers() + const referer = headersList.get('referer') + return ( + <> + + + +
+
+ {children} +
+
+ + ) +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/[position]/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/[position]/page.tsx new file mode 100644 index 0000000000..399ab363c2 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/[position]/page.tsx @@ -0,0 +1,23 @@ +import { Container, LinkInternal } from '@sushiswap/ui' +import { V3PositionView } from 'src/ui/pool/V3PositionView' +import { ChainId, ChainKey } from 'sushi/chain' + +export default async function V3PositionsPage({ + params, +}: { params: { chainId: string; address: string; position: string } }) { + return ( + +
+ + ← View all positions + + +
+
+ ) +} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/positions/create/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/create/page.tsx similarity index 58% rename from apps/web/src/app/(evm)/pool/[id]/(landing)/positions/create/page.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/create/page.tsx index ba2ae4756d..2322d80584 100644 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/positions/create/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/create/page.tsx @@ -1,29 +1,26 @@ import { Container, LinkInternal } from '@sushiswap/ui' +import React from 'react' import { ConcentratedLiquidityProvider } from 'src/ui/pool/ConcentratedLiquidityProvider' import { NewPosition } from 'src/ui/pool/NewPosition' -import { isSushiSwapV3ChainId } from 'sushi/config' -import { getChainIdAddressFromId, unsanitize } from 'sushi/format' +import { ChainKey } from 'sushi' +import { SushiSwapV3ChainId } from 'sushi/config' export default async function PositionsCreatePage({ params, -}: { params: { id: string } }) { - const { chainId, address } = getChainIdAddressFromId(unsanitize(params.id)) - - if (!isSushiSwapV3ChainId(chainId)) { - throw new Error('This page only supports SushiSwap V3 pools') - } +}: { params: { address: string; chainId: string } }) { + const chainId = +params.chainId as SushiSwapV3ChainId return (
← Back - +
diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/page.tsx new file mode 100644 index 0000000000..fc09dfe42c --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/positions/page.tsx @@ -0,0 +1,34 @@ +import { V3Pool, getV3Pool } from '@sushiswap/graph-client/data-api' +import { Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { PoolsFiltersProvider } from 'src/ui/pool' +import { ConcentratedPositionsTable } from 'src/ui/pool/ConcentratedPositionsTable' + +export default async function ManageV3PoolPage({ + params, +}: { + params: { chainId: string; address: string } +}) { + const { chainId, address } = params + const pool = (await unstable_cache( + async () => await getV3Pool({ chainId: Number(chainId), address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )()) as NonNullable + + return ( + +
+ + + +
+
+ ) +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/layout.tsx new file mode 100644 index 0000000000..5d2a0a3f32 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/layout.tsx @@ -0,0 +1,36 @@ +import { + CardDescription, + CardHeader, + CardTitle, + Container, + LinkInternal, +} from '@sushiswap/ui' +import React from 'react' + +export default async function Layout({ + children, + params, +}: { + children: React.ReactNode + params: { chainId: string; address: string } +}) { + return ( +
+ + + ← Pool details + + + Available Strategies + + Choose one of the following strategies: + + + + {children} +
+ ) +} diff --git a/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/loading.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/loading.tsx similarity index 100% rename from apps/web/src/app/(evm)/pool/[id]/smart/(overview)/loading.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/loading.tsx diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/page.tsx new file mode 100644 index 0000000000..53d70d8b12 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/(overview)/page.tsx @@ -0,0 +1,35 @@ +import { getV3Pool, getVaults } from '@sushiswap/graph-client/data-api' +import { unstable_cache } from 'next/cache' +import { SteerCarousel } from 'src/ui/pool/Steer/SteerCarousel' +import { ChainId } from 'sushi/chain' +import notFound from '../../../../../not-found' + +export default async function VaultOverviewPage({ + params, +}: { + params: { chainId: string; address: string } +}) { + const { chainId: _chainId, address } = params + const chainId = +_chainId as ChainId + const pool = await unstable_cache( + async () => getV3Pool({ chainId, address }), + ['pool', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )() + + const vaults = await unstable_cache( + async () => getVaults({ chainId, poolAddress: address }), + ['vaults', `${chainId}:${address}`], + { + revalidate: 60 * 15, + }, + )() + + if (!pool || !vaults) { + return notFound(chainId) + } + + return +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/layout.tsx new file mode 100644 index 0000000000..c188de03f7 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/layout.tsx @@ -0,0 +1,51 @@ +import { getVault } from '@sushiswap/graph-client/data-api' +import { Container, LinkInternal } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { notFound } from 'next/navigation' +import React from 'react' + +export default async function Layout({ + children, + params, +}: { + children: React.ReactNode + params: { chainId: string; vault: string; address: string } +}) { + const vault = await unstable_cache( + async () => + await getVault({ + chainId: Number(params.chainId), + vaultAddress: params.vault, + }), + ['vault', `${params.chainId}:${params.vault}`], + { revalidate: 60 * 15 }, + )() + + if (!vault) { + notFound() + } + + return ( +
+ + {vault.isDeprecated && ( +
+
This vault is deprecated.
+
+ {"It will not accrue any fees and won't be readjusted."} +
+
+ )} + + ← Strategies + +
+ + {children} + +
+ ) +} diff --git a/apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/loading.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/loading.tsx similarity index 100% rename from apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/loading.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/loading.tsx diff --git a/apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/page.tsx similarity index 60% rename from apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/page.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/page.tsx index a2243c99dd..b6fc52a3af 100644 --- a/apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/[address]/smart/[vault]/page.tsx @@ -1,26 +1,24 @@ -import { getSteerVault } from '@sushiswap/client' -import { SteerVault } from '@sushiswap/client' import { - SteerChainId, - getTokenRatios, - getVaultPositions, -} from '@sushiswap/steer-sdk' + V3Pool, + VaultV1, + getV3Pool, + getVault, +} from '@sushiswap/graph-client/data-api' +import { getTokenRatios, getVaultPositions } from '@sushiswap/steer-sdk' import { Container } from '@sushiswap/ui' import formatDistanceStrict from 'date-fns/formatDistanceStrict' import formatDistanceToNow from 'date-fns/formatDistanceToNow' import { unstable_cache } from 'next/cache' -import { - SteerStrategyComponents, - SteerStrategyGeneric, -} from 'src/ui/pool/Steer/SteerStrategies' +import { SteerStrategyGeneric } from 'src/ui/pool/Steer/SteerStrategies' +import { SteerBaseStrategy } from 'src/ui/pool/Steer/SteerStrategies/SteerBaseStrategy' import { publicClientConfig } from 'sushi/config' import { Token } from 'sushi/currency' -import { formatNumber, unsanitize } from 'sushi/format' +import { formatNumber } from 'sushi/format' import { tickToPrice } from 'sushi/pool/sushiswap-v3' import { PublicClient, createPublicClient } from 'viem' function getPriceExtremes( - vault: SteerVault, + vault: VaultV1, ): SteerStrategyGeneric['priceExtremes'] { const token0 = new Token(vault.token0) const token1 = new Token(vault.token1) @@ -39,7 +37,7 @@ function getPriceExtremes( return { min: lowerPrice, max: upperPrice } } -function getAdjustment(vault: SteerVault): SteerStrategyGeneric['adjustment'] { +function getAdjustment(vault: VaultV1): SteerStrategyGeneric['adjustment'] { const next = formatDistanceToNow( (vault.lastAdjustmentTimestamp + vault.adjustmentFrequency) * 1000, { @@ -51,9 +49,9 @@ function getAdjustment(vault: SteerVault): SteerStrategyGeneric['adjustment'] { return { next, frequency } } -async function getGenerics(vault: SteerVault): Promise { +async function getGenerics(vault: VaultV1): Promise { const client = createPublicClient( - publicClientConfig[vault.pool.chainId as SteerChainId], + publicClientConfig[vault.chainId], ) as PublicClient const prices = await fetch( @@ -77,27 +75,40 @@ async function getGenerics(vault: SteerVault): Promise { export default async function SteerVaultPage({ params, -}: { params: { vaultId: string } }) { - const vaultId = unsanitize(params.vaultId) +}: { params: { chainId: string; vault: string; address: string } }) { + const pool = (await unstable_cache( + async () => + await getV3Pool({ + chainId: Number(params.chainId), + address: params.address, + }), + ['pool', `${params.chainId}:${params.address}`], + { revalidate: 60 * 15 }, + )()) as NonNullable - const vault = await unstable_cache( - () => getSteerVault(vaultId), - ['steer-vault', vaultId], + const vault = (await unstable_cache( + async () => + await getVault({ + chainId: Number(params.chainId), + vaultAddress: params.vault, + }), + ['vault', `${params.chainId}:${params.vault}`], { revalidate: 60 * 15 }, - )() + )()) as NonNullable + const generics = await unstable_cache( async () => await getGenerics(vault), - ['steer-vault-generics', vaultId], + ['steer-vault-generics', `${params.chainId}:${params.vault}`], { - revalidate: 60 * 5, + revalidate: 60 * 15, }, )() - const Component = SteerStrategyComponents[vault.strategy] + const Component = SteerBaseStrategy return ( - + ) } diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/add/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/add/layout.tsx new file mode 100644 index 0000000000..7a929e95e8 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/add/layout.tsx @@ -0,0 +1,39 @@ +import { Container, typographyVariants } from '@sushiswap/ui' + +import { BackButton } from 'src/ui/pool/BackButton' + +export const metadata = { + title: 'Pool 💦', +} + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + <> + +
+
+ +

+ Add Liquidity +

+
+

+ Create a new pool or create a liquidity position on an existing + pool. +

+
+
+
+
+ + {children} + +
+
+ + ) +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx new file mode 100644 index 0000000000..e2c8748604 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx @@ -0,0 +1,134 @@ +'use client' + +import { useRouter } from 'next/navigation' +import React, { FC, useMemo, useState } from 'react' +import { useTokenAmountDollarValues } from 'src/lib/hooks' +import { useConcentratedPositionInfo } from 'src/lib/wagmi/hooks/positions/hooks/useConcentratedPositionInfo' +import { ConcentratedLiquidityProvider } from 'src/ui/pool/ConcentratedLiquidityProvider' +import { + ConcentratedLiquidityURLStateProvider, + useConcentratedLiquidityURLState, +} from 'src/ui/pool/ConcentratedLiquidityURLStateProvider' +import { ConcentratedLiquidityWidget } from 'src/ui/pool/ConcentratedLiquidityWidget' +import { SelectFeeConcentratedWidget } from 'src/ui/pool/SelectFeeConcentratedWidget' +import { SelectNetworkWidget } from 'src/ui/pool/SelectNetworkWidget' +import { SelectPricesWidget } from 'src/ui/pool/SelectPricesWidget' +import { SelectTokensWidget } from 'src/ui/pool/SelectTokensWidget' +import { ChainKey, computeSushiSwapV3PoolAddress } from 'sushi' +import { + SUSHISWAP_V3_FACTORY_ADDRESS, + SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, + SushiSwapV3ChainId, + isWNativeSupported, +} from 'sushi/config' +import { tryParseAmount } from 'sushi/currency' +import { SWRConfig } from 'swr' +import { useAccount } from 'wagmi' + +export default function Page({ params }: { params: { chainId: string } }) { + return ( + + + + <_Add /> + + + + ) +} + +const _Add: FC = () => { + const { address } = useAccount() + const { + chainId, + token0, + token1, + setToken1, + setToken0, + feeAmount, + setFeeAmount, + tokensLoading, + tokenId, + switchTokens, + } = useConcentratedLiquidityURLState() + + const router = useRouter() + + const [_invert, _setInvert] = useState(false) + const { data: position } = useConcentratedPositionInfo({ + chainId, + token0, + tokenId, + token1, + }) + + const poolAddress = useMemo( + () => + token0 && token1 && feeAmount && chainId + ? computeSushiSwapV3PoolAddress({ + factoryAddress: SUSHISWAP_V3_FACTORY_ADDRESS[chainId], + tokenA: token0.wrapped, + tokenB: token1.wrapped, + fee: feeAmount, + }) + : undefined, + [chainId, feeAmount, token0, token1], + ) + + const fiatAmounts = useMemo( + () => [tryParseAmount('1', token0), tryParseAmount('1', token1)], + [token0, token1], + ) + const _fiatAmountsAsNumber = useTokenAmountDollarValues({ + chainId, + amounts: fiatAmounts, + }) + + return ( + <> + router.push(`/${ChainKey[chainId]}/pool/v3/add`)} + networks={SUSHISWAP_V3_SUPPORTED_CHAIN_IDS} + /> + + + + + + ) +} diff --git a/apps/web/src/app/(evm)/pool/fees/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/fees/layout.tsx similarity index 100% rename from apps/web/src/app/(evm)/pool/fees/layout.tsx rename to apps/web/src/app/(evm)/[chainId]/pool/v3/fees/layout.tsx diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/fees/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/fees/page.tsx new file mode 100644 index 0000000000..9b2dcfdb23 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/fees/page.tsx @@ -0,0 +1,30 @@ +import { getV3BasePools } from '@sushiswap/graph-client/data-api' +import { Card, Container } from '@sushiswap/ui' +import { unstable_cache } from 'next/cache' +import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' +import { V3FeesTable } from 'src/ui/pool/V3FeesTable' +import { SushiSwapV3ChainId } from 'sushi/config' + +export default async function Page({ + params, +}: { params: { chainId: string } }) { + const chainId = +params.chainId as SushiSwapV3ChainId + const pools = await unstable_cache( + async () => getV3BasePools({ chainId }), + ['operational-v3-pools', params.chainId], + { + revalidate: 60 * 15, + }, + )() + + return ( + +
+ +
+ + + +
+ ) +} diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/layout.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/layout.tsx new file mode 100644 index 0000000000..5ebb188540 --- /dev/null +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/layout.tsx @@ -0,0 +1,15 @@ +import { ChainId } from 'sushi/chain' +import { isSushiSwapV3ChainId } from 'sushi/config' +import notFound from '../../not-found' + +export default function Layout({ + children, + params, +}: { children: React.ReactNode; params: { chainId: string } }) { + const chainId = +params.chainId as ChainId + if (!isSushiSwapV3ChainId(chainId)) { + return notFound(chainId) + } + + return <>{children} +} diff --git a/apps/web/src/app/(evm)/pool/providers.tsx b/apps/web/src/app/(evm)/[chainId]/providers.tsx similarity index 100% rename from apps/web/src/app/(evm)/pool/providers.tsx rename to apps/web/src/app/(evm)/[chainId]/providers.tsx diff --git a/apps/web/src/app/(evm)/_common/header-elements.ts b/apps/web/src/app/(evm)/_common/header-elements.ts deleted file mode 100644 index bb2274abab..0000000000 --- a/apps/web/src/app/(evm)/_common/header-elements.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { - type NavigationElement, - NavigationElementDropdown, - NavigationElementType, -} from '@sushiswap/ui' -import { EXPLORE_NAVIGATION_LINKS } from 'src/app/_common/header-elements' - -const TOOLS_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ - { - title: 'Analytics', - href: '/analytics', - description: 'Find the best opportunities', - }, - { - title: 'Blog', - href: '/blog', - description: - 'Stay up to date with the latest product developments at Sushi.', - }, - { - title: 'Academy', - href: '/academy', - description: 'Everything you need to get up to speed with DeFi.', - }, - { - title: 'Forum & Proposals', - href: 'https://forum.sushi.com', - description: 'View and discuss proposals for SushiSwap.', - }, - { - title: 'Participate', - href: 'https://snapshot.org/#/sushigov.eth', - description: - 'As a Sushi holder, you can vote on proposals to shape the future of SushiSwap.', - }, -] - -const PARTNER_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ - { - title: 'Partner with Sushi', - href: '/partner', - description: 'Incentivize your token with Sushi rewards.', - }, - { - title: 'List enquiry', - href: '/tokenlist-request', - description: 'Get your token on our default token list.', - }, -] - -export const headerElements: NavigationElement[] = [ - { - title: 'Explore', - items: EXPLORE_NAVIGATION_LINKS, - show: 'mobile', - type: NavigationElementType.Dropdown, - }, - { - title: 'Swap', - href: '/swap', - show: 'desktop', - type: NavigationElementType.Single, - }, - { - title: 'Pools', - href: '/pool', - show: 'desktop', - type: NavigationElementType.Single, - }, - // { - // title: 'Bonds', - // href: '/bonds', - // show: 'desktop', - // type: NavigationElementType.Single, - // }, - { - title: 'Stake', - href: '/stake', - show: 'desktop', - type: NavigationElementType.Single, - }, - { - title: 'More', - items: TOOLS_NAVIGATION_LINKS, - show: 'desktop', - type: NavigationElementType.Dropdown, - }, - { - title: 'Partners', - items: PARTNER_NAVIGATION_LINKS, - show: 'desktop', - type: NavigationElementType.Dropdown, - }, -] diff --git a/apps/web/src/app/(evm)/_common/header-elements.tsx b/apps/web/src/app/(evm)/_common/header-elements.tsx new file mode 100644 index 0000000000..ffd9941fd6 --- /dev/null +++ b/apps/web/src/app/(evm)/_common/header-elements.tsx @@ -0,0 +1,72 @@ +import { + type NavigationElement, + NavigationElementType, + NavigationListItem, + NavigationMenuContent, + NavigationMenuItem, + NavigationMenuTrigger, + OnramperButton, +} from '@sushiswap/ui' +import { + EXPLORE_NAVIGATION_LINKS, + // MORE_NAVIGATION_LINKS, +} from 'src/app/_common/header-elements' +import { ChainId, ChainKey, isChainId } from 'sushi' + +export const headerElements = (chainId?: ChainId): NavigationElement[] => [ + { + title: 'Explore', + items: EXPLORE_NAVIGATION_LINKS(chainId), + show: 'mobile', + type: NavigationElementType.Dropdown, + }, + { + show: 'desktop', + type: NavigationElementType.Custom, + item: ( + + Trade + +
    + + The easiest way to trade. + + + + Onramp with fiat. + + +
+
+
+ ), + }, + { + title: 'Explore', + href: `/${ + isChainId(Number(chainId)) ? ChainKey[chainId as ChainId] : 'ethereum' + }/explore/pools`, + show: 'desktop', + type: NavigationElementType.Single, + }, + { + title: 'Pools', + href: `/${ + isChainId(Number(chainId)) ? ChainKey[chainId as ChainId] : 'ethereum' + }/pool`, + show: 'desktop', + type: NavigationElementType.Single, + }, + { + title: 'Stake', + href: '/stake', + show: 'desktop', + type: NavigationElementType.Single, + }, + // { + // title: 'More', + // items: MORE_NAVIGATION_LINKS, + // show: 'desktop', + // type: NavigationElementType.Dropdown, + // }, +] diff --git a/apps/web/src/app/(evm)/analytics/api/bentobox/route.ts b/apps/web/src/app/(evm)/analytics/api/bentobox/route.ts deleted file mode 100644 index 3159171c2d..0000000000 --- a/apps/web/src/app/(evm)/analytics/api/bentobox/route.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NextResponse } from 'next/server' -import { bentoBoxTokensSchema } from 'src/lib/schema' - -import { getBentoBoxTokens } from 'src/lib/graph' - -export const revalidate = 3600 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const tokenSymbols = searchParams.get('tokenSymbols') - const chainIds = searchParams.get('chainIds') - const result = bentoBoxTokensSchema.safeParse({ tokenSymbols, chainIds }) - if (!result.success) { - return new Response(result.error.message, { status: 422 }) - } - const tokens = await getBentoBoxTokens(result.data) - return NextResponse.json(tokens, { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }) -} diff --git a/apps/web/src/app/(evm)/analytics/api/charts/route.ts b/apps/web/src/app/(evm)/analytics/api/charts/route.ts deleted file mode 100644 index a75d1d89b9..0000000000 --- a/apps/web/src/app/(evm)/analytics/api/charts/route.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NextResponse } from 'next/server' - -import { getCharts } from 'src/lib/graph' - -export const revalidate = 3600 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const networks = searchParams.get('networks') as string - const data = await getCharts({ networks }) - return NextResponse.json(data, { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }) -} diff --git a/apps/web/src/app/(evm)/analytics/api/furoTokens/route.ts b/apps/web/src/app/(evm)/analytics/api/furoTokens/route.ts deleted file mode 100644 index f28b61b78c..0000000000 --- a/apps/web/src/app/(evm)/analytics/api/furoTokens/route.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NextResponse } from 'next/server' -import { getFuroTokens } from 'src/lib/graph' -import { furoTokensSchema } from 'src/lib/schema' - -export const revalidate = 3600 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const tokenSymbols = searchParams.get('tokenSymbols') - const chainIds = searchParams.get('chainIds') - const result = furoTokensSchema.safeParse({ tokenSymbols, chainIds }) - if (!result.success) { - return new Response(result.error.message, { status: 422 }) - } - const tokens = await getFuroTokens(result.data) - return NextResponse.json(tokens, { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }) -} diff --git a/apps/web/src/app/(evm)/analytics/api/pools/count/route.ts b/apps/web/src/app/(evm)/analytics/api/pools/count/route.ts deleted file mode 100644 index 261db7e93f..0000000000 --- a/apps/web/src/app/(evm)/analytics/api/pools/count/route.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { getPoolCount } from '@sushiswap/client' -import { PoolCountApiSchema } from '@sushiswap/client/api' -import { NextResponse } from 'next/server' - -export const revalidate = 3600 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const chainIds = searchParams.get('chainIds') - const isIncentivized = searchParams.get('isIncentivized') - const isWhitelisted = searchParams.get('isWhitelisted') - const tokenSymbols = searchParams.get('tokenSymbols') - const protocols = searchParams.get('protocols') - const result = PoolCountApiSchema.safeParse({ - chainIds, - isIncentivized, - isWhitelisted, - tokenSymbols, - protocols, - }) - if (!result.success) { - return new Response(result.error.message, { status: 422 }) - } - const count = await getPoolCount(result.data) - return NextResponse.json(count, { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }) -} diff --git a/apps/web/src/app/(evm)/analytics/api/pools/route.ts b/apps/web/src/app/(evm)/analytics/api/pools/route.ts deleted file mode 100644 index 67e71cd4ab..0000000000 --- a/apps/web/src/app/(evm)/analytics/api/pools/route.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { getPools } from '@sushiswap/client' -import { PoolsApiSchema } from '@sushiswap/client/api' -import { NextResponse } from 'next/server' - -export const revalidate = 3600 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const chainIds = searchParams.get('chainIds') - const isIncentivized = searchParams.get('isIncentivized') - const isWhitelisted = searchParams.get('isWhitelisted') - const tokenSymbols = searchParams.get('tokenSymbols') - const protocols = searchParams.get('protocols') - const cursor = searchParams.get('cursor') - const orderBy = searchParams.get('orderBy') - const orderDir = searchParams.get('orderDir') - const result = PoolsApiSchema.safeParse({ - chainIds, - isIncentivized, - isWhitelisted, - tokenSymbols, - protocols, - cursor, - orderBy, - orderDir, - }) - if (!result.success) { - return new Response(result.error.message, { status: 422 }) - } - const pools = await getPools(result.data) - return NextResponse.json(pools, { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }) -} diff --git a/apps/web/src/app/(evm)/analytics/header.tsx b/apps/web/src/app/(evm)/analytics/header.tsx deleted file mode 100644 index a1b95b2955..0000000000 --- a/apps/web/src/app/(evm)/analytics/header.tsx +++ /dev/null @@ -1,10 +0,0 @@ -'use client' - -import { Navigation } from '@sushiswap/ui' -import React, { FC } from 'react' - -import { headerElements } from '../_common/header-elements' - -export const Header: FC = () => { - return -} diff --git a/apps/web/src/app/(evm)/analytics/layout.tsx b/apps/web/src/app/(evm)/analytics/layout.tsx deleted file mode 100644 index 88546ace1f..0000000000 --- a/apps/web/src/app/(evm)/analytics/layout.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import { Container, LinkInternal, typographyVariants } from '@sushiswap/ui' -import { HotJar } from '@sushiswap/ui' - -import { Header } from './header' - -import { GlobalStatsCharts } from 'src/ui/analytics/global-stats-charts' - -import { PathnameButton } from 'src/ui/pool' - -export const metadata = { - title: 'Analytics', -} - -export default function AnalyticsLayout({ - children, -}: { children: React.ReactNode }) { - return ( - <> -
- -
- -
-

- Analytics. -

-

- Providing liquidity to a pool allows you to earn a percentage of - the pools traded volume as well as any extra rewards if the pool - is incentivized. -

-
-
- -
-
- -
- - - Pools - - - - - Sushi Pay - - - - - Sushi Vault - - -
-
-
-
- {children} -
-
-
-
- - - ) -} diff --git a/apps/web/src/app/(evm)/analytics/page.tsx b/apps/web/src/app/(evm)/analytics/page.tsx deleted file mode 100644 index 0c92c46c10..0000000000 --- a/apps/web/src/app/(evm)/analytics/page.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Container } from '@sushiswap/ui' -import { Suspense } from 'react' - -import { PoolsFiltersProvider } from 'src/ui/pool' -import { PoolsTable } from 'src/ui/pool/PoolsTable' -import { TableFiltersFarmsOnly } from 'src/ui/pool/TableFiltersFarmsOnly' -import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' -import { TableFiltersPoolType } from 'src/ui/pool/TableFiltersPoolType' -import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' -import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' - -export default function AnalyticsPage() { - return ( - - - -
- - - - - -
- -
-
-
- ) -} diff --git a/apps/web/src/app/(evm)/analytics/pay/page.tsx b/apps/web/src/app/(evm)/analytics/pay/page.tsx deleted file mode 100644 index 17ea446a52..0000000000 --- a/apps/web/src/app/(evm)/analytics/pay/page.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Container } from '@sushiswap/ui' -import React, { Suspense } from 'react' - -import { FuroTokenTable } from 'src/ui/analytics/furo-token-table' -import { PoolsFiltersProvider } from 'src/ui/pool' -import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' -import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' -import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' - -export default function PayPage() { - return ( - - - -
- - - -
- -
-
-
- ) -} diff --git a/apps/web/src/app/(evm)/analytics/vault/page.tsx b/apps/web/src/app/(evm)/analytics/vault/page.tsx deleted file mode 100644 index ee7f2e0695..0000000000 --- a/apps/web/src/app/(evm)/analytics/vault/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { Container } from '@sushiswap/ui' -import React, { Suspense } from 'react' - -import { BentoBoxTokenTable } from './table' - -import { PoolsFiltersProvider } from 'src/ui/pool' -import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' -import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' -import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' - -export default function VaultPage() { - return ( - - - -
- - - -
- -
-
-
- ) -} diff --git a/apps/web/src/app/(evm)/analytics/vault/table.tsx b/apps/web/src/app/(evm)/analytics/vault/table.tsx deleted file mode 100644 index a86ff3e386..0000000000 --- a/apps/web/src/app/(evm)/analytics/vault/table.tsx +++ /dev/null @@ -1,146 +0,0 @@ -'use client' - -import { - Badge, - Card, - CardContent, - CardHeader, - CardTitle, - Currency, - DataTable, - SkeletonText, -} from '@sushiswap/ui' -import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon' -import { - ColumnDef, - PaginationState, - SortingState, - TableState, -} from '@tanstack/react-table' -import React, { FC, useMemo, useState } from 'react' -import { formatNumber, formatUSD } from 'sushi/format' - -import { - BentoBoxToken, - GetBentoBoxTokenArgs, - useBentoBoxTokens, -} from './use-bentobox-tokens' - -import { usePoolFilters } from 'src/ui/pool' -import { BentoBoxChainId, isBentoBoxChainId } from 'sushi/config' - -const COLUMNS: ColumnDef[] = [ - { - id: 'tokenName', - header: 'Name', - cell: ({ - row: { - original: { token }, - }, - }) => ( -
-
- - } - > - - -
-
-

{token.symbol}

-

{token.name}

-
-
- ), - meta: { - skeleton: , - }, - }, - { - id: 'liquidity', - header: 'Liquidity', - cell: (props) => { - return formatNumber(props.row.original.liquidity) - }, - meta: { - skeleton: , - }, - }, - { - id: 'liquidityUSD', - header: 'Liquidity (USD)', - accessorFn: (row) => row.liquidityUSD, - cell: (props) => { - return formatUSD(props.row.original.liquidityUSD) - }, - meta: { - skeleton: , - }, - }, -] - -export const BentoBoxTokenTable: FC = () => { - const { chainIds, tokenSymbols } = usePoolFilters() - - const [sorting, setSorting] = useState([ - { id: 'liquidityUSD', desc: true }, - ]) - const [pagination, setPagination] = useState({ - pageIndex: 0, - pageSize: 10, - }) - - const args = useMemo( - () => ({ - chainIds: chainIds.filter(isBentoBoxChainId) as BentoBoxChainId[], - tokenSymbols, - }), - [chainIds, tokenSymbols], - ) - - const { data: bentoBoxTokens, isLoading } = useBentoBoxTokens(args) - - const data = useMemo(() => bentoBoxTokens || [], [bentoBoxTokens]) - - const state: Partial = useMemo(() => { - return { - sorting, - pagination, - } - }, [pagination, sorting]) - - return ( - - - - Tokens{' '} - {bentoBoxTokens?.length ? ( - - ({bentoBoxTokens?.length}) - - ) : null} - - - - - - - ) -} diff --git a/apps/web/src/app/(evm)/analytics/vault/use-bentobox-tokens.ts b/apps/web/src/app/(evm)/analytics/vault/use-bentobox-tokens.ts deleted file mode 100644 index 1ca5f728db..0000000000 --- a/apps/web/src/app/(evm)/analytics/vault/use-bentobox-tokens.ts +++ /dev/null @@ -1,71 +0,0 @@ -'use client' - -import { GetApiInputFromOutput, parseArgs } from '@sushiswap/client' -import type { BentoBoxRebases } from '@sushiswap/graph-client/bentobox' -import { useAllPrices } from '@sushiswap/react-query' -import { useMemo } from 'react' -import { Amount, Token } from 'sushi/currency' - -import { useQuery } from '@tanstack/react-query' -import { bentoBoxTokensSchema } from 'src/lib/schema' - -export type GetBentoBoxTokenArgs = GetApiInputFromOutput< - (typeof bentoBoxTokensSchema)['_input'], - (typeof bentoBoxTokensSchema)['_output'] -> - -export type BentoBoxToken = NonNullable< - ReturnType['data'] ->[number] - -export const getBentoBoxTokensUrl = (args: GetBentoBoxTokenArgs) => - `/analytics/api/bentobox${parseArgs(args)}` - -function useBentoBoxTokens(args: GetBentoBoxTokenArgs) { - const { data: rebases, isInitialLoading } = useQuery({ - queryKey: [getBentoBoxTokensUrl(args)], - queryFn: () => - fetch(getBentoBoxTokensUrl(args)).then((data) => data.json()), - }) - - const { data: prices, isLoading } = useAllPrices() - - return { - data: useMemo( - () => - prices && - rebases?.map((rebase) => { - const token = new Token({ - chainId: rebase.chainId, - decimals: rebase.token.decimals, - address: rebase.id.split(':')[1], - symbol: rebase.token.symbol, - name: rebase.token.name, - }) - - const liquidity = Amount.fromRawAmount(token, rebase.elastic) - - const price = prices?.[token.chainId]?.[token.address] - - return { - id: token.id, - token, - liquidity: parseInt(liquidity.toSignificant(6)), - liquidityUSD: price - ? parseInt( - liquidity - .multiply( - prices?.[token.chainId]?.[token.address].asFraction, - ) - .toSignificant(4), - ) - : 0, - } - }), - [rebases, prices], - ), - isLoading: isLoading || isInitialLoading, - } -} - -export { useBentoBoxTokens } diff --git a/apps/web/src/app/(evm)/api/campaign/taskon/core/route.ts b/apps/web/src/app/(evm)/api/campaign/taskon/core/route.ts deleted file mode 100644 index 0f00c65747..0000000000 --- a/apps/web/src/app/(evm)/api/campaign/taskon/core/route.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { getSushiV3Mints } from '@sushiswap/graph-client/sushi-v3' -import { NextRequest, NextResponse } from 'next/server' -import { ChainId } from 'sushi/chain' -import { getAddress } from 'viem' -import { z } from 'zod' - -const schema = z.object({ - address: z.coerce.string().transform((address) => getAddress(address)), -}) - -const poolAddress = '0xc1e92e02e12324b69ee0b29c6c6f471841d959ec' // CORE/BSSB - 1% - -export async function GET(request: NextRequest) { - const params = Object.fromEntries(request.nextUrl.searchParams.entries()) - - try { - const { address } = schema.parse(params) - - const mints = await getSushiV3Mints({ - chainId: ChainId.CORE, - where: { - origin: address, - pool: poolAddress, - }, - }) - - if (mints.length > 0) { - return NextResponse.json( - { result: { isValid: true } }, - { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }, - ) - } - } catch (_) {} - - return NextResponse.json( - { result: { isValid: false } }, - { - headers: { - 'Cache-Control': 'public, max-age=60, stale-while-revalidate=600', - }, - }, - ) -} diff --git a/apps/web/src/app/(evm)/bonds/header.tsx b/apps/web/src/app/(evm)/bonds/header.tsx index 6ac316f610..94558372a6 100644 --- a/apps/web/src/app/(evm)/bonds/header.tsx +++ b/apps/web/src/app/(evm)/bonds/header.tsx @@ -4,12 +4,14 @@ import { Navigation } from '@sushiswap/ui' import React, { FC } from 'react' import { SUPPORTED_CHAIN_IDS } from 'src/config' import { WagmiHeaderComponents } from 'src/lib/wagmi/components/wagmi-header-components' +import { useChainId } from 'wagmi' import { headerElements } from '../_common/header-elements' export const Header: FC = () => { + const chainId = useChainId() return ( } /> ) diff --git a/apps/web/src/app/(evm)/claims/components/Header.tsx b/apps/web/src/app/(evm)/claims/components/Header.tsx index 699acc9391..18bf5051d8 100644 --- a/apps/web/src/app/(evm)/claims/components/Header.tsx +++ b/apps/web/src/app/(evm)/claims/components/Header.tsx @@ -4,12 +4,14 @@ import { Navigation } from '@sushiswap/ui' import React, { FC } from 'react' import { SUPPORTED_CHAIN_IDS } from 'src/config' import { WagmiHeaderComponents } from 'src/lib/wagmi/components/wagmi-header-components' +import { useChainId } from 'wagmi' import { headerElements } from '../../_common/header-elements' export const Header: FC = () => { + const chainId = useChainId() return ( } /> ) diff --git a/apps/web/src/app/(evm)/pool/(landing)/migrate/page.tsx b/apps/web/src/app/(evm)/pool/(landing)/migrate/page.tsx deleted file mode 100644 index 02a4ad4dc9..0000000000 --- a/apps/web/src/app/(evm)/pool/(landing)/migrate/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react' - -import { MigrateTabContent } from 'src/ui/pool/MigrateTabContent' - -export default function MigratePage() { - return -} diff --git a/apps/web/src/app/(evm)/pool/(landing)/smart-pool/page.tsx b/apps/web/src/app/(evm)/pool/(landing)/smart-pool/page.tsx deleted file mode 100644 index db5c5e54de..0000000000 --- a/apps/web/src/app/(evm)/pool/(landing)/smart-pool/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { Container } from '@sushiswap/ui' -import React from 'react' - -import { SmartPoolsTable } from 'src/ui/pool/SmartPoolsTable' -import { TableFiltersFarmsOnly } from 'src/ui/pool/TableFiltersFarmsOnly' -import { TableFiltersNetwork } from 'src/ui/pool/TableFiltersNetwork' -import { TableFiltersPoolType } from 'src/ui/pool/TableFiltersPoolType' -import { TableFiltersResetButton } from 'src/ui/pool/TableFiltersResetButton' -import { TableFiltersSearchToken } from 'src/ui/pool/TableFiltersSearchToken' - -export default async function PoolPage() { - return ( - -
- - - - - -
- -
- ) -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/add/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/add/page.tsx deleted file mode 100644 index 388fe82c55..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/add/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import PoolPage from '../page' - -export default async function PoolPageAdd({ - params, -}: { params: { id: string } }) { - return -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/migrate/layout.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/migrate/layout.tsx deleted file mode 100644 index c0a62b1cdf..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/migrate/layout.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { Container } from '@sushiswap/ui' -import React from 'react' - -export default async function Layout({ - children, -}: { children: React.ReactNode; params: { id: string } }) { - return ( - <> - - {children} - - - ) -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/migrate/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/migrate/page.tsx deleted file mode 100644 index 63e5ed8984..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/migrate/page.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { getPool } from '@sushiswap/client' -import { LinkInternal } from '@sushiswap/ui' -import { unstable_cache } from 'next/cache' -import notFound from 'src/app/(evm)/pool/not-found' -import { - PoolPositionProvider, - PoolPositionRewardsProvider, - PoolPositionStakedProvider, -} from 'src/ui/pool' -import { ConcentratedLiquidityProvider } from 'src/ui/pool/ConcentratedLiquidityProvider' -import { MigrateTab } from 'src/ui/pool/MigrateTab' -import { unsanitize } from 'sushi' - -export default async function MigratePage({ - params, -}: { params: { id: string } }) { - const poolId = unsanitize(params.id) - const pool = await unstable_cache( - async () => getPool(poolId), - ['pool', poolId], - { - revalidate: 60 * 15, - }, - )() - - if (!pool) { - notFound() - } - - return ( -
- - ← Back - -
- - - - - - - - - -
-
- ) -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/page.tsx deleted file mode 100644 index 5cb48140af..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/page.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { getPool } from '@sushiswap/client' -import { unstable_cache } from 'next/cache' -import { notFound } from 'next/navigation' - -import { PoolPageV2 } from 'src/ui/pool/PoolPageV2' -import { PoolPageV3 } from 'src/ui/pool/PoolPageV3' -import { unsanitize } from 'sushi' - -export default async function PoolPage({ - params, -}: { - params: { id: string; tab: 'add' | 'remove' | 'unstake' | 'stake' } -}) { - const poolId = unsanitize(params.id) - const pool = await unstable_cache( - async () => await getPool(poolId), - ['pool', poolId], - { - revalidate: 60 * 15, - }, - )() - - // Rockstar C&D - if (!pool || pool.id === '42161:0x0a4f9962e24893a4a7567e52c1ce37d5482365de') { - notFound() - } - - if (pool.protocol === 'SUSHISWAP_V3') { - return - } - - return -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/positions/[positionId]/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/positions/[positionId]/page.tsx deleted file mode 100644 index 55d55d3fec..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/positions/[positionId]/page.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Container, LinkInternal } from '@sushiswap/ui' -import { PositionView } from 'src/ui/pool/PositionView' - -export default async function PositionsPage({ - params, -}: { params: { id: string; positionId: string } }) { - return ( - -
- - ← View all positions - - -
-
- ) -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/remove/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/remove/page.tsx deleted file mode 100644 index e53610eaba..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/remove/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import PoolPage from '../page' - -export default async function PoolPageRemove({ - params, -}: { params: { id: string } }) { - return -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/stake/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/stake/page.tsx deleted file mode 100644 index 1322612519..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/stake/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import PoolPage from '../page' - -export default async function PoolPageStake({ - params, -}: { params: { id: string } }) { - return -} diff --git a/apps/web/src/app/(evm)/pool/[id]/(landing)/unstake/page.tsx b/apps/web/src/app/(evm)/pool/[id]/(landing)/unstake/page.tsx deleted file mode 100644 index 45259e807f..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/(landing)/unstake/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import PoolPage from '../page' - -export default async function PoolPageUnstake({ - params, -}: { params: { id: string } }) { - return -} diff --git a/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/layout.tsx b/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/layout.tsx deleted file mode 100644 index 90e5efbffb..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/layout.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { getPool } from '@sushiswap/client' -import { - Breadcrumb, - CardDescription, - CardHeader, - CardTitle, - Container, - LinkInternal, -} from '@sushiswap/ui' -import { unstable_cache } from 'next/cache' -import { headers } from 'next/headers' -import { notFound } from 'next/navigation' -import React from 'react' -import { unsanitize } from 'sushi/format' - -import { PoolHeader } from 'src/ui/pool/PoolHeader' - -export default async function Layout({ - children, - params, -}: { children: React.ReactNode; params: { id: string } }) { - const poolId = unsanitize(params.id) - const pool = await unstable_cache( - async () => getPool(poolId), - ['pool', poolId], - { - revalidate: 60 * 15, - }, - )() - - if (!pool) { - notFound() - } - - const headersList = headers() - const referer = headersList.get('referer') - - return ( - <> - - - - - - -
-
-
- - - ← Pool details - - - Available Strategies - - Choose one of the following strategies: - - - - {children} -
-
-
- - ) -} diff --git a/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/page.tsx b/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/page.tsx deleted file mode 100644 index 6107f4340e..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/smart/(overview)/page.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { getPool, getSteerVaults } from '@sushiswap/client' -import { unstable_cache } from 'next/cache' -import notFound from 'src/app/(evm)/pool/not-found' -import { SteerCarousel } from 'src/ui/pool/Steer/SteerCarousel' -import type { ID } from 'sushi' -import { unsanitize } from 'sushi/format' - -export default async function VaultOverviewPage({ - params, -}: { params: { id: string } }) { - const poolId = unsanitize(params.id) as ID - const poolP = unstable_cache(async () => getPool(poolId), ['pool', poolId], { - revalidate: 60 * 15, - })() - - const vaultsP = unstable_cache( - async () => getSteerVaults({ poolId }), - ['pool', poolId], - { - revalidate: 60 * 15, - }, - )() - - const [pool, vaults] = await Promise.all([poolP, vaultsP]) - - if (!pool || !vaults) { - notFound() - } - - return -} diff --git a/apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/layout.tsx b/apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/layout.tsx deleted file mode 100644 index 4beedc6709..0000000000 --- a/apps/web/src/app/(evm)/pool/[id]/smart/[vaultId]/layout.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { getPool, getSteerVault } from '@sushiswap/client' -import { Breadcrumb, Container, LinkInternal } from '@sushiswap/ui' -import { unstable_cache } from 'next/cache' -import { headers } from 'next/headers' -import { notFound } from 'next/navigation' -import React from 'react' -import { PoolHeader } from 'src/ui/pool/PoolHeader' -import { unsanitize } from 'sushi/format' - -export default async function Layout({ - children, - params, -}: { - children: React.ReactNode - params: { id: string; vaultId: string } -}) { - const poolId = unsanitize(params.id) - const pool = await unstable_cache( - async () => getPool(poolId), - ['pool', poolId], - { - revalidate: 60 * 15, - }, - )() - - const vaultId = unsanitize(params.vaultId) - - const vault = await unstable_cache( - () => getSteerVault(vaultId), - ['steer-vault', vaultId], - { revalidate: 60 * 15 }, - )() - - if (!pool) { - notFound() - } - - const headersList = headers() - const referer = headersList.get('referer') - - return ( - <> - - - - - - -
-
- {' '} -
- - {vault.isDeprecated && ( -
-
This vault is deprecated.
-
- {"It will not accrue any fees and won't be readjusted."} -
-
- )} - - ← Strategies - -
- - {children} - -
-
-
- - ) -} diff --git a/apps/web/src/app/(evm)/pool/add/page.tsx b/apps/web/src/app/(evm)/pool/add/page.tsx deleted file mode 100644 index a3dc500e05..0000000000 --- a/apps/web/src/app/(evm)/pool/add/page.tsx +++ /dev/null @@ -1,213 +0,0 @@ -'use client' - -import React, { FC, useMemo, useState } from 'react' -import { useTokenAmountDollarValues } from 'src/lib/hooks' -import { useConcentratedPositionInfo } from 'src/lib/wagmi/hooks/positions/hooks/useConcentratedPositionInfo' -import { ConcentratedLiquidityProvider } from 'src/ui/pool/ConcentratedLiquidityProvider' -import { - ConcentratedLiquidityURLStateProvider, - useConcentratedLiquidityURLState, -} from 'src/ui/pool/ConcentratedLiquidityURLStateProvider' -import { ConcentratedLiquidityWidget } from 'src/ui/pool/ConcentratedLiquidityWidget' -import { SelectFeeConcentratedWidget } from 'src/ui/pool/SelectFeeConcentratedWidget' -import { SelectNetworkWidget } from 'src/ui/pool/SelectNetworkWidget' -import { SelectPricesWidget } from 'src/ui/pool/SelectPricesWidget' -import { SelectTokensWidget } from 'src/ui/pool/SelectTokensWidget' -import { ChainId, computeSushiSwapV3PoolAddress } from 'sushi' -import { - SUSHISWAP_V3_FACTORY_ADDRESS, - SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, - isWNativeSupported, -} from 'sushi/config' -import { tryParseAmount } from 'sushi/currency' -import { SWRConfig } from 'swr' -import { useAccount } from 'wagmi' - -export default function Page() { - return ( - - - - <_Add /> - - - - ) -} - -const _Add: FC = () => { - const { address } = useAccount() - const { - chainId, - token0, - token1, - setToken1, - setToken0, - setNetwork, - feeAmount, - setFeeAmount, - tokensLoading, - tokenId, - switchTokens, - } = useConcentratedLiquidityURLState() - - const [_invert, _setInvert] = useState(false) - const { data: position } = useConcentratedPositionInfo({ - chainId, - token0, - tokenId, - token1, - }) - - const poolAddress = useMemo( - () => - token0 && token1 && feeAmount && chainId - ? computeSushiSwapV3PoolAddress({ - factoryAddress: SUSHISWAP_V3_FACTORY_ADDRESS[chainId], - tokenA: token0.wrapped, - tokenB: token1.wrapped, - fee: feeAmount, - }) - : undefined, - [chainId, feeAmount, token0, token1], - ) - - const fiatAmounts = useMemo( - () => [tryParseAmount('1', token0), tryParseAmount('1', token1)], - [token0, token1], - ) - const _fiatAmountsAsNumber = useTokenAmountDollarValues({ - chainId, - amounts: fiatAmounts, - }) - - return ( - <> - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/* */} - {/* ) : (*/} - {/*
*/} - {/* )*/} - {/* }*/} - {/* >*/} - {/* */} - {/* {token0 && !tokensLoading ? (*/} - {/* */} - {/* ) : (*/} - {/*
*/} - {/* )}*/} - {/* {token1 && !tokensLoading ? (*/} - {/* */} - {/* ) : (*/} - {/*
*/} - {/* )}*/} - {/* */} - {/* */} - {/*
*/} - {/*
*/} - {/* {token0 && token1 ? (*/} - {/* <>*/} - {/*

*/} - {/* {token0.symbol}/{token1.symbol}*/} - {/*

*/} - {/*

*/} - {/* SushiSwap V3 • {feeAmount / 10000}%*/} - {/*

*/} - {/* */} - {/* ) : tokensLoading ? (*/} - {/* <>*/} - {/* */} - {/* */} - {/* */} - {/* ) : (*/} - {/* <>*/} - {/* )}*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/* Network*/} - {/*
*/} - {/* {Chain.from(chainId)?.name}*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/* Fee Tier*/} - {/*
{feeAmount / 10000}% Fee
*/} - {/*
*/} - {/*
*/} - {/* Pool Type*/} - {/*
Concentrated Liquidity
*/} - {/*
*/} - {/*
*/} - {/* Current Price*/} - {/* {!isInitialLoading && !pool ? (*/} - {/* N/A*/} - {/* ) : isInitialLoading ? (*/} - {/* */} - {/* ) : token0 && token1 && pool ? (*/} - {/*
*/} - {/* */} - {/*
*/} - {/* ) : null}*/} - {/*
*/} - {/*
*/} - {/*
*/} - - - - - - - ) -} diff --git a/apps/web/src/app/(evm)/pool/api/cors.ts b/apps/web/src/app/(evm)/pool/api/cors.ts deleted file mode 100644 index c4603e7685..0000000000 --- a/apps/web/src/app/(evm)/pool/api/cors.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const CORS = { - 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS', - 'Access-Control-Allow-Headers': 'Content-Type, Authorization', -} diff --git a/apps/web/src/app/(evm)/pool/api/graphPool/[id]/route.ts b/apps/web/src/app/(evm)/pool/api/graphPool/[id]/route.ts deleted file mode 100644 index 52ca7db3c9..0000000000 --- a/apps/web/src/app/(evm)/pool/api/graphPool/[id]/route.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NextResponse } from 'next/server' -import { getV2GraphPool } from 'src/lib/graph' -import { z } from 'zod' - -export const revalidate = 15 - -const schema = z.object({ - id: z.string(), -}) - -// uses thegraph, not the pools api -export async function GET( - _request: Request, - { params }: { params: { id: string } }, -) { - const result = schema.safeParse(params) - if (!result.success) { - return new Response(result.error.message, { status: 400 }) - } - - const pool = await getV2GraphPool(result.data.id) - return NextResponse.json(pool) -} diff --git a/apps/web/src/app/(evm)/pool/api/pools/[chainId]/[address]/route.ts b/apps/web/src/app/(evm)/pool/api/pools/[chainId]/[address]/route.ts deleted file mode 100644 index 8e9ac11ac9..0000000000 --- a/apps/web/src/app/(evm)/pool/api/pools/[chainId]/[address]/route.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { PoolApiSchema, getPoolFromDB } from '@sushiswap/client/api' -import { NextResponse } from 'next/server.js' -import { ChefType } from 'sushi' -import { CORS } from '../../../cors' - -export const revalidate = 15 - -export async function GET( - _request: Request, - { params }: { params: { chainId: string; address: string } }, -) { - const result = PoolApiSchema.safeParse({ - chainId: params.chainId, - address: params.address, - }) - - if (!result.success) { - return NextResponse.json(result.error.format(), { status: 400 }) - } - - let pool - - try { - pool = await getPoolFromDB(result.data).then((pool) => ({ - ...pool, - incentives: pool.incentives.sort((a) => - a.chefType === ChefType.MasterChefV2 ? -1 : 0, - ), - })) - } catch (error) { - console.error(error) - return NextResponse.json({ error: 'Failed to fetch pool' }, { status: 500 }) - } - - return NextResponse.json(pool, { - headers: CORS, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/pools/count/route.ts b/apps/web/src/app/(evm)/pool/api/pools/count/route.ts deleted file mode 100644 index 3d201af993..0000000000 --- a/apps/web/src/app/(evm)/pool/api/pools/count/route.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { PoolCountApiSchema, getPoolCountFromDB } from '@sushiswap/client/api' -import { NextResponse } from 'next/server.js' -import { CORS } from '../../cors' - -export const revalidate = 15 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const result = PoolCountApiSchema.safeParse(Object.fromEntries(searchParams)) - - if (!result.success) { - return NextResponse.json(result.error.format(), { status: 400 }) - } - - const count = await getPoolCountFromDB(result.data) - return NextResponse.json(count, { - headers: CORS, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/pools/route.ts b/apps/web/src/app/(evm)/pool/api/pools/route.ts deleted file mode 100644 index ada0f942db..0000000000 --- a/apps/web/src/app/(evm)/pool/api/pools/route.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { PoolsApiSchema, getPoolsFromDB } from '@sushiswap/client/api' -import { NextResponse } from 'next/server.js' -import { CORS } from '../cors' - -export const revalidate = 15 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const result = PoolsApiSchema.safeParse(Object.fromEntries(searchParams)) - - if (!result.success) { - return NextResponse.json(result.error.format(), { status: 400 }) - } - - const pools = await getPoolsFromDB(result.data) - - return NextResponse.json(pools, { - headers: CORS, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/steer-vault/[chainId]/[address]/route.ts b/apps/web/src/app/(evm)/pool/api/steer-vault/[chainId]/[address]/route.ts deleted file mode 100644 index b44c714d55..0000000000 --- a/apps/web/src/app/(evm)/pool/api/steer-vault/[chainId]/[address]/route.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { SteerVaultApiSchema, getSteerVaultFromDB } from '@sushiswap/client/api' -import { NextResponse } from 'next/server.js' -import { CORS } from '../../../cors' - -export const revalidate = 15 - -export async function GET( - _request: Request, - { params }: { params: { chainId: string; address: string } }, -) { - const result = SteerVaultApiSchema.safeParse({ - chainId: params.chainId, - address: params.address, - }) - - if (!result.success) { - return NextResponse.json(result.error.format(), { status: 400 }) - } - - const vault = await getSteerVaultFromDB(result.data) - return NextResponse.json(vault, { - headers: CORS, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/steer-vault/count/route.ts b/apps/web/src/app/(evm)/pool/api/steer-vault/count/route.ts deleted file mode 100644 index 1ad8323300..0000000000 --- a/apps/web/src/app/(evm)/pool/api/steer-vault/count/route.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - SteerVaultCountApiSchema, - getSteerVaultCountFromDB, -} from '@sushiswap/client/api' -import { NextResponse } from 'next/server.js' -import { CORS } from '../../cors' - -export const revalidate = 15 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const result = SteerVaultCountApiSchema.safeParse( - Object.fromEntries(searchParams), - ) - - if (!result.success) { - return NextResponse.json(result.error.format(), { status: 400 }) - } - - const count = await getSteerVaultCountFromDB(result.data) - return NextResponse.json(count, { - headers: CORS, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/steer-vault/route.ts b/apps/web/src/app/(evm)/pool/api/steer-vault/route.ts deleted file mode 100644 index da98b38e66..0000000000 --- a/apps/web/src/app/(evm)/pool/api/steer-vault/route.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - SteerVaultsApiSchema, - getSteerVaultsFromDB, -} from '@sushiswap/client/api' -import { NextResponse } from 'next/server.js' -import { CORS } from '../cors' - -export const revalidate = 15 - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const result = SteerVaultsApiSchema.safeParse( - Object.fromEntries(searchParams), - ) - - if (!result.success) { - return NextResponse.json(result.error.format(), { status: 400 }) - } - - const vaults = await getSteerVaultsFromDB(result.data) - return NextResponse.json(vaults, { - headers: CORS, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/user-with-pools/route.ts b/apps/web/src/app/(evm)/pool/api/user-with-pools/route.ts deleted file mode 100644 index b682cd12ae..0000000000 --- a/apps/web/src/app/(evm)/pool/api/user-with-pools/route.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { getPools } from '@sushiswap/client' -import type { PoolHasSteerVaults } from '@sushiswap/steer-sdk' -import { NextResponse } from 'next/server' -import { getUser, getV2GraphPools } from 'src/lib/graph' -import { ChainId } from 'sushi/chain' - -import { isSushiSwapV2ChainId } from 'sushi/config' -import type { - PoolBase, - PoolIfIncentivized, - PoolWithAprs, - SushiPositionStaked, - SushiPositionWithPool, -} from 'sushi/types' -import { Address } from 'viem' -import { z } from 'zod' -import { CORS } from '../cors' - -export const revalidate = 15 - -const schema = z.object({ - id: z - .string() - .refine((id) => id.startsWith('0x')) - .transform((id) => id.toLowerCase() as Address), - chainIds: z.nullable(z.string()).transform((chainIds) => - chainIds - ?.split(',') - .map((chainId) => Number(chainId) as ChainId) - .filter(isSushiSwapV2ChainId), - ), -}) - -export type UserWithPool = SushiPositionWithPool< - PoolHasSteerVaults, true>, - SushiPositionStaked -> - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const id = searchParams.get('id') - const chainIds = searchParams.get('chainIds') - - if (!id) return new Response('No user(id) provided', { status: 422 }) - const result = schema.safeParse({ id, chainIds }) - if (!result.success) { - return new Response(result.error.message, { status: 400 }) - } - const args = result.data - const data = await getUser(args) - const poolIds = data.map((position) => position.pool.id) - - if (poolIds.length === 0) { - return NextResponse.json([], { - status: 200, - headers: { - 'Cache-Control': 'public, max-age=15, stale-while-revalidate=600', - ...CORS, - }, - }) - } - - const [graphPoolsPromise, dbPoolsPromise] = await Promise.allSettled([ - getV2GraphPools(poolIds), - getPools({ - ids: poolIds, - }), - ]) - - const graphPools = - graphPoolsPromise.status === 'fulfilled' ? graphPoolsPromise.value : [] - const dbPools = - dbPoolsPromise.status === 'fulfilled' ? dbPoolsPromise.value : [] - - const userPositions = data - .map((position) => { - const dbPool = dbPools?.find((pool) => pool.id === position.pool.id) - const graphPool = graphPools?.find( - (graphPool) => graphPool.id === position.pool.id, - ) - - const pool: PoolWithAprs> | undefined = - dbPool || graphPool - ? { - ...graphPool!, - isIncentivized: dbPool?.isIncentivized ?? false, - wasIncentivized: dbPool?.wasIncentivized ?? false, - incentiveApr: dbPool?.incentiveApr ?? 0, - feeApr1h: dbPool?.feeApr1h ?? 0, - feeApr1d: dbPool?.feeApr1d ?? 0, - feeApr1w: dbPool?.feeApr1w ?? 0, - feeApr1m: dbPool?.feeApr1m ?? 0, - totalApr1h: dbPool?.totalApr1h ?? 0, - totalApr1d: dbPool?.totalApr1d ?? 0, - totalApr1w: dbPool?.totalApr1w ?? 0, - totalApr1m: dbPool?.totalApr1m ?? 0, - } - : undefined - - if (!pool) return undefined - - return { - ...position, - pool, - } - }) - .filter((pool): pool is NonNullable => pool !== undefined) - - return NextResponse.json(userPositions, { - headers: { - 'Cache-Control': 'public, max-age=15, stale-while-revalidate=600', - ...CORS, - }, - }) -} diff --git a/apps/web/src/app/(evm)/pool/api/user/route.ts b/apps/web/src/app/(evm)/pool/api/user/route.ts deleted file mode 100644 index 27d59468b5..0000000000 --- a/apps/web/src/app/(evm)/pool/api/user/route.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { NextResponse } from 'next/server' -import { getUser } from 'src/lib/graph' -import { ChainId } from 'sushi/chain' -import { isSushiSwapV2ChainId } from 'sushi/config' -import { Address } from 'viem' -import { z } from 'zod' -import { CORS } from '../cors' - -export const revalidate = 15 - -const schema = z.object({ - id: z - .string() - .refine((id) => id.startsWith('0x')) - .transform((id) => id.toLowerCase() as Address), - chainIds: z.nullable(z.string()).transform((chainIds) => - chainIds - ?.split(',') - .map((chainId) => Number(chainId) as ChainId) - .filter(isSushiSwapV2ChainId), - ), -}) - -// export const dynamic = 'auto' -// export const dynamicParams = true -// export const revalidate = false -// export const fetchCache = 'auto' -// export const runtime = 'nodejs' -// export const preferredRegion = 'auto' - -export async function GET(request: Request) { - const { searchParams } = new URL(request.url) - const id = searchParams.get('id') - const chainIds = searchParams.get('chainIds') - if (!id) return new Response(null, { status: 422 }) - const result = schema.safeParse({ id, chainIds }) - if (!result.success) { - return new Response(result.error.message, { status: 400 }) - } - const args = result.data - const data = await getUser(args) - - return NextResponse.json(data, { - headers: { - 'Cache-Control': 'public, max-age=15, stale-while-revalidate=600', - ...CORS, - }, - }) -} diff --git a/apps/web/src/app/(evm)/pool/error.tsx b/apps/web/src/app/(evm)/pool/error.tsx deleted file mode 100644 index 3d442b8007..0000000000 --- a/apps/web/src/app/(evm)/pool/error.tsx +++ /dev/null @@ -1,49 +0,0 @@ -'use client' - -import { ChevronRightIcon } from '@heroicons/react/20/solid' -import * as Sentry from '@sentry/nextjs' -import { Button, LinkInternal, typographyVariants } from '@sushiswap/ui' -import { useEffect } from 'react' - -export default function ErrorPage({ - error, -}: { error: Error & { digest?: string }; reset: () => void }) { - useEffect(() => { - // Log the error to sentry - Sentry.captureException(error) - }, [error]) - return ( -
-
-

- Something went wrong! -

-
- - -
-
-
- ) -} diff --git a/apps/web/src/app/(evm)/pool/loading.tsx b/apps/web/src/app/(evm)/pool/loading.tsx deleted file mode 100644 index 75da76e366..0000000000 --- a/apps/web/src/app/(evm)/pool/loading.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { Splash } from '@sushiswap/ui' -import React from 'react' - -export default function Loading() { - return -} diff --git a/apps/web/src/app/(evm)/pool/swr-config.tsx b/apps/web/src/app/(evm)/pool/swr-config.tsx deleted file mode 100644 index 7eaf2f26e0..0000000000 --- a/apps/web/src/app/(evm)/pool/swr-config.tsx +++ /dev/null @@ -1,7 +0,0 @@ -'use client' - -import { SWRConfig } from 'swr' - -export const SWRProvider = ({ children }: { children: React.ReactNode }) => { - return {children} -} diff --git a/apps/web/src/app/(evm)/stake/header.tsx b/apps/web/src/app/(evm)/stake/header.tsx index 6ac316f610..94558372a6 100644 --- a/apps/web/src/app/(evm)/stake/header.tsx +++ b/apps/web/src/app/(evm)/stake/header.tsx @@ -4,12 +4,14 @@ import { Navigation } from '@sushiswap/ui' import React, { FC } from 'react' import { SUPPORTED_CHAIN_IDS } from 'src/config' import { WagmiHeaderComponents } from 'src/lib/wagmi/components/wagmi-header-components' +import { useChainId } from 'wagmi' import { headerElements } from '../_common/header-elements' export const Header: FC = () => { + const chainId = useChainId() return ( } /> ) diff --git a/apps/web/src/app/(landing)/api/stats/route.ts b/apps/web/src/app/(landing)/api/stats/route.ts deleted file mode 100644 index 57d48cbb17..0000000000 --- a/apps/web/src/app/(landing)/api/stats/route.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { fetchMultichain } from '@sushiswap/graph-client/multichain' -import { getSushiV2Factory } from '@sushiswap/graph-client/sushi-v2' -import { getSushiV3Factory } from '@sushiswap/graph-client/sushi-v3' -import { NextResponse } from 'next/server' -import { DISABLED_ANALYTICS_CHAIN_IDS } from 'src/config' -import { ChainId } from 'sushi/chain' -import { - SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, -} from 'sushi/config' -import { SUSHI_ADDRESS } from 'sushi/currency' -import { formatNumber, formatUSD } from 'sushi/format' - -const getSushiPriceUSD = async () => { - const url = `https://api.sushi.com/price/v1/1/${ - SUSHI_ADDRESS[ChainId.ETHEREUM] - }` - const res = await fetch(url) - const json = await res.json() - return json -} - -interface ExchangeData { - tvlUSD: number - volumeUSD: number - pairCount: number -} - -const getV2Data = async () => { - const { data: factories } = await fetchMultichain({ - chainIds: SUSHISWAP_V2_SUPPORTED_CHAIN_IDS.filter( - (c) => - !DISABLED_ANALYTICS_CHAIN_IDS.includes( - c as (typeof DISABLED_ANALYTICS_CHAIN_IDS)[number], - ), - ), - fetch: getSushiV2Factory, - }) - - return { - v2: factories.reduce( - (acc, cur) => { - return { - tvlUSD: acc.tvlUSD + Number(cur.totalLiquidityUSD), - volumeUSD: acc.volumeUSD + Number(cur.totalVolumeUSD), - pairCount: acc.pairCount + Number(cur.poolCount), - } - }, - { - tvlUSD: 0, - volumeUSD: 0, - pairCount: 0, - }, - ), - } -} - -const getV3Data = async () => { - const { data: factories } = await fetchMultichain({ - chainIds: SUSHISWAP_V3_SUPPORTED_CHAIN_IDS.filter( - (c) => - !DISABLED_ANALYTICS_CHAIN_IDS.includes( - c as (typeof DISABLED_ANALYTICS_CHAIN_IDS)[number], - ), - ), - fetch: getSushiV3Factory, - }) - - return factories.reduce( - (acc, cur) => { - return { - tvlUSD: acc.tvlUSD + Number(cur.totalValueLockedUSD), - volumeUSD: acc.volumeUSD + Number(cur.totalVolumeUSD), - pairCount: acc.pairCount + Number(cur.poolCount), - } - }, - { - tvlUSD: 0, - volumeUSD: 0, - pairCount: 0, - }, - ) -} - -export const revalidate = 3600 - -export async function GET() { - const [sushiPrice, v2Data, v3Data] = await Promise.all([ - getSushiPriceUSD(), - getV2Data(), - getV3Data(), - ]) - - let totalTVL = Number(v2Data.v2.tvlUSD) + Number(v3Data.tvlUSD) - let totalVolume = Number(v2Data.v2.volumeUSD) + Number(v3Data.volumeUSD) - const totalPoolCount = Number(v2Data.v2.pairCount) + Number(v3Data.pairCount) - - totalTVL = totalTVL > 10_000_000_000 ? 0 : totalTVL - totalVolume = totalVolume > 5_000_000_000_000 ? 0 : totalVolume - - return NextResponse.json({ - stats: { - price: { - formatted: !sushiPrice ? '-' : formatUSD(sushiPrice), - number: Number(sushiPrice), - title: '$SUSHI Price', - decimalPlaces: 2, - }, - liquidity: { - formatted: !totalTVL ? '-' : formatUSD(totalTVL), - number: totalTVL, - title: 'Total Liquidity', - decimalPlaces: 0, - }, - volume: { - formatted: !totalVolume ? '-' : formatUSD(totalVolume), - number: totalVolume, - title: 'Total Volume', - decimalPlaces: 0, - }, - pairs: { - formatted: !totalPoolCount ? '-' : formatNumber(totalPoolCount), - number: totalPoolCount, - title: 'Total Pairs', - decimalPlaces: 0, - }, - }, - }) -} diff --git a/apps/web/src/app/(legal)/privacy-policy/layout.tsx b/apps/web/src/app/(legal)/privacy-policy/layout.tsx index da0c375419..b771b76604 100644 --- a/apps/web/src/app/(legal)/privacy-policy/layout.tsx +++ b/apps/web/src/app/(legal)/privacy-policy/layout.tsx @@ -9,7 +9,7 @@ export const metadata: Metadata = { export default function Layout({ children }: { children: React.ReactNode }) { return ( <> - +
{children}
) diff --git a/apps/web/src/app/(legal)/terms-of-service/layout.tsx b/apps/web/src/app/(legal)/terms-of-service/layout.tsx index f626c01e2b..f0c5216b2e 100644 --- a/apps/web/src/app/(legal)/terms-of-service/layout.tsx +++ b/apps/web/src/app/(legal)/terms-of-service/layout.tsx @@ -9,7 +9,7 @@ export const metadata: Metadata = { export default function Layout({ children }: { children: React.ReactNode }) { return ( <> - +
{children}
) diff --git a/apps/web/src/app/_common/header-elements.ts b/apps/web/src/app/_common/header-elements.ts index eb69745d1f..0360620aa4 100644 --- a/apps/web/src/app/_common/header-elements.ts +++ b/apps/web/src/app/_common/header-elements.ts @@ -1,14 +1,30 @@ -import type { NavigationElementDropdown } from '@sushiswap/ui' +import { + type NavigationElement, + type NavigationElementDropdown, + NavigationElementType, +} from '@sushiswap/ui' +import { ChainId, ChainKey, isChainId } from 'sushi' -export const EXPLORE_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ +export const EXPLORE_NAVIGATION_LINKS = ( + chainId?: ChainId, +): NavigationElementDropdown['items'] => [ { title: 'Swap', href: '/swap', description: 'The easiest way to trade.', }, + { + title: 'Explore', + href: `/${ + isChainId(Number(chainId)) ? ChainKey[chainId as ChainId] : 'ethereum' + }/explore/pools`, + description: 'Explore top pools.', + }, { title: 'Pools', - href: '/pools', + href: `/${ + isChainId(Number(chainId)) ? ChainKey[chainId as ChainId] : 'ethereum' + }/pool`, description: 'Earn fees by providing liquidity.', }, // { @@ -21,30 +37,56 @@ export const EXPLORE_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ href: '/stake', description: 'Earn protocol fees by staking SUSHI.', }, +] + +export const MORE_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ { - title: 'Analytics', - href: '/analytics', - description: 'Find the best opportunities', + title: 'Pay', + href: 'https://pay.sushi.com', + description: + 'Stream or create a vesting schedule with any ERC20 to any wallet.', }, { - title: 'Blog', - href: '/blog', + title: 'Bonds', + href: '/bonds', description: - 'Stay up to date with the latest product developments at Sushi.', + 'Buy discounted tokens with vesting to support projects in a sustainable manner.', }, +] + +export const headerElements = (chainId?: ChainId): NavigationElement[] => [ { - title: 'Academy', - href: '/academy', - description: 'Everything you need to get up to speed with DeFi.', + title: 'Explore', + items: EXPLORE_NAVIGATION_LINKS(chainId), + show: 'mobile', + type: NavigationElementType.Dropdown, }, { - title: 'Partner with Sushi', - href: '/partner', - description: 'Incentivize your token with Sushi rewards.', + title: 'Trade', + href: '/swap', + show: 'desktop', + type: NavigationElementType.Single, }, { - title: 'List enquiry', - href: '/tokenlist-request', - description: 'Get your token on our default token list.', + title: 'Explore', + href: `/${ + isChainId(Number(chainId)) ? ChainKey[chainId as ChainId] : 'ethereum' + }/explore/pools`, + show: 'desktop', + type: NavigationElementType.Single, + }, + { + title: 'Pools', + href: `/${ + isChainId(Number(chainId)) ? ChainKey[chainId as ChainId] : 'ethereum' + }/pool`, + show: 'desktop', + type: NavigationElementType.Single, + }, + { + title: 'Stake', + href: '/stake', + show: 'desktop', + type: NavigationElementType.Single, }, ] diff --git a/apps/web/src/app/partner/layout.tsx b/apps/web/src/app/partner/layout.tsx index b7b5bddcd3..9d331dde4e 100644 --- a/apps/web/src/app/partner/layout.tsx +++ b/apps/web/src/app/partner/layout.tsx @@ -1,6 +1,6 @@ import { Navigation } from '@sushiswap/ui' import { Metadata } from 'next' -import { headerElements } from '../(evm)/_common/header-elements' +import { headerElements } from '../_common/header-elements' export const metadata: Metadata = { title: 'Partner', @@ -9,7 +9,7 @@ export const metadata: Metadata = { export default function Layout({ children }: { children: React.ReactNode }) { return ( <> - +
{children}
) diff --git a/apps/web/src/lib/graph.ts b/apps/web/src/lib/graph.ts index 49aa029129..4935c61eb7 100644 --- a/apps/web/src/lib/graph.ts +++ b/apps/web/src/lib/graph.ts @@ -1,88 +1,11 @@ import { getRebases as _getRebases } from '@sushiswap/graph-client/bentobox' -import { getSushiDayDatas } from '@sushiswap/graph-client/composite/sushi-day-datas' -import { getSushiV2StakedUnstakedPositions } from '@sushiswap/graph-client/composite/sushi-v2-staked-unstaked-positions' +import { getV3BasePoolsByToken } from '@sushiswap/graph-client/data-api' import { getFuroTokens as _getFuroTokens } from '@sushiswap/graph-client/furo' import { fetchMultichain } from '@sushiswap/graph-client/multichain' -import { - SushiV2Pools, - getSushiV2Pool, - getSushiV2Pools, -} from '@sushiswap/graph-client/sushi-v2' -import { getSushiV3PoolsByTokenPair } from '@sushiswap/graph-client/sushi-v3' -import { AMM_SUPPORTED_CHAIN_IDS } from 'src/config' -import { - SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - SushiSwapV2ChainId, - isSushiSwapV2ChainId, - isSushiSwapV3ChainId, -} from 'sushi/config' +import { isSushiSwapV3ChainId } from 'sushi/config' import { getChainIdAddressFromId } from 'sushi/format' -import { Address } from 'viem' import { bentoBoxTokensSchema, furoTokensSchema } from './schema' -export async function getUser(args: { - id?: Address - chainIds?: SushiSwapV2ChainId[] -}) { - if (!args.id) return [] - - const { data } = await getSushiV2StakedUnstakedPositions({ - chainIds: args.chainIds || [...SUSHISWAP_V2_SUPPORTED_CHAIN_IDS], - id: args.id.toLowerCase() as Address, - }) - - return data -} - -export const getV2GraphPool = async (id: string) => { - const split = getChainIdAddressFromId(id) - - if (!isSushiSwapV2ChainId(split.chainId)) throw Error('Invalid chain id') - - const pool = await getSushiV2Pool( - { - chainId: split.chainId, - id: split.address, - }, - { - retries: 3, - }, - ) - - return pool -} - -export const getV2GraphPools = async (ids: string[]) => { - if (!ids.every((id) => id.includes(':'))) throw Error('Invalid pair ids') - - // Migrating to new format, graph-client uses the deprecated one - const addresses = ids.map((id) => id.split(':')[1]) as Address[] - - // PairsByIds would be better, not implemented though... - // Need to hack around - - const chainIds = Array.from( - new Set(ids.map((id) => Number(id.split(':')[0]))), - ) as SushiSwapV2ChainId[] - - const { data: pools } = await fetchMultichain({ - chainIds, - fetch: getSushiV2Pools, - variables: { - where: { - id_in: addresses, - }, - }, - }) - - return ( - pools - .map((pool) => ({ ...pool, id: `${pool.chainId}:${pool.address}` })) - // To prevent possible (although unlikely) collisions - .filter((pool) => ids.includes(pool.id)) as SushiV2Pools - ) -} - export const getV3PoolsByTokenPair = async ( tokenId0: string, tokenId1: string, @@ -98,7 +21,7 @@ export const getV3PoolsByTokenPair = async ( throw Error('Invalid chain id') } - const pools = await getSushiV3PoolsByTokenPair({ + const pools = await getV3BasePoolsByToken({ chainId: chainId0, token0: address0, token1: address1, @@ -168,44 +91,3 @@ export const getBentoBoxTokens = async ( throw new Error(error as string) } } - -export const getCharts = async (query?: { networks: string }) => { - const chainIds = query?.networks - ? JSON.parse(query.networks) - : AMM_SUPPORTED_CHAIN_IDS - - const { data: daySnapshots } = await getSushiDayDatas({ - chainIds, - }) - - const dateSnapshotMap = new Map() - - for (const snapshot of daySnapshots) { - const value = dateSnapshotMap.get(snapshot.date) - dateSnapshotMap.set( - snapshot.date, - value - ? [ - value[0] + Number(snapshot.liquidityUSD), - value[1] + Number(snapshot.volumeUSD), - ] - : [Number(snapshot.liquidityUSD), Number(snapshot.volumeUSD)], - ) - } - - // tvl x,y arrays - const tvl: [number[], number[]] = [[], []] - - // vol x,y arrays - const vol: [number[], number[]] = [[], []] - - dateSnapshotMap.forEach(([liquidity, volume], date) => { - tvl[0].push(date) - tvl[1].push(liquidity) - - vol[0].push(date) - vol[1].push(volume) - }) - - return [tvl, vol] -} diff --git a/apps/web/src/lib/hooks/api/index.ts b/apps/web/src/lib/hooks/api/index.ts index c1d0b781b7..b756e2fdf1 100644 --- a/apps/web/src/lib/hooks/api/index.ts +++ b/apps/web/src/lib/hooks/api/index.ts @@ -1,6 +1,7 @@ export * from './useCrossChainTrade' -export * from './useGraphPool' export * from './usePoolGraphData' +export * from './userSmartPools' export * from './useSkaleEuropaFaucet' export * from './useSushiV2UserPositions' -export * from './useV3PoolsWithFees' +export * from './useV2Pool' +export * from './useVault' diff --git a/apps/web/src/lib/hooks/api/useGraphPool.ts b/apps/web/src/lib/hooks/api/useGraphPool.ts deleted file mode 100644 index f0454d449c..0000000000 --- a/apps/web/src/lib/hooks/api/useGraphPool.ts +++ /dev/null @@ -1,81 +0,0 @@ -'use client' - -import { SushiV2Pool } from '@sushiswap/graph-client/sushi-v2' -import { useQuery } from '@tanstack/react-query' -import { useMemo } from 'react' -import type { PoolId } from 'sushi' -import { Amount } from 'sushi/currency' -import { getTokensFromPool } from '../useTokensFromPool' - -export function getGraphPoolUrl(poolId: string) { - return `/pools/api/graphPool/${poolId}` -} - -export const useGraphPool = (pool: PoolId) => { - const { - data: graphPool, - isLoading, - error, - } = useQuery({ - queryKey: [getGraphPoolUrl(pool.id)], - queryFn: async () => { - await import('sushi/bigint-serializer') - return fetch(getGraphPoolUrl(pool.id)) - .then((data) => data.text()) - .then(JSON.parse) - }, - }) - - const { token0, token1, liquidityToken } = useMemo(() => { - if (!graphPool) - return { - token0: undefined, - token1: undefined, - liquidityToken: undefined, - } - - return getTokensFromPool(graphPool) - }, [graphPool]) - - return useMemo(() => { - console.log('HERE >>>', token0, graphPool) - return { - isLoading, - error, - data: { - token0, - token1, - liquidityToken, - // liquidityNative: graphPool ? Number(graphPool?.reserveETH) : null, - liquidityUSD: graphPool ? Number(graphPool?.liquidityUSD) : null, - // liquidity1dChange: graphPool - // ? Number(graphPool?.liquidity1dChange ?? 0) - // : null, - // fees1d: graphPool ? Number(graphPool?.fees1d ?? 0) : null, - // fees1dChange: graphPool ? Number(graphPool?.fees1dChange ?? 0) : null, - // volume1d: graphPool ? Number(graphPool?.volume1d ?? 0) : null, - // volume1dChange: graphPool - // ? Number(graphPool?.volume1dChange ?? 0) - // : null, - // txCount1d: graphPool ? Number(graphPool?.txCount1d ?? 0) : null, - // txCount1dChange: graphPool - // ? Number(graphPool?.txCount1dChange ?? 0) - // : null, - // hourSnapshots: graphPool?.hourSnapshots ?? null, - // daySnapshots: graphPool?.daySnapshots ?? null, - reserve0: - token0 && graphPool - ? Amount.fromRawAmount(token0, graphPool.reserve0) - : null, - reserve1: - token1 && graphPool - ? Amount.fromRawAmount(token1, graphPool.reserve1) - : null, - totalSupply: - liquidityToken && graphPool - ? Amount.fromRawAmount(liquidityToken, graphPool.liquidity) - : null, - }, - } - }, [error, graphPool, isLoading, liquidityToken, token0, token1]) -} diff --git a/apps/web/src/lib/hooks/api/usePoolGraphData.ts b/apps/web/src/lib/hooks/api/usePoolGraphData.ts index 93fe5b7676..1acbeb86ee 100644 --- a/apps/web/src/lib/hooks/api/usePoolGraphData.ts +++ b/apps/web/src/lib/hooks/api/usePoolGraphData.ts @@ -1,66 +1,45 @@ 'use client' -import { getSushiHistoricPool } from '@sushiswap/graph-client/composite/sushi-historic-pool' +import { + getV2PoolBuckets, + getV3PoolBuckets, +} from '@sushiswap/graph-client/data-api' import { keepPreviousData, useQuery } from '@tanstack/react-query' -import { SushiSwapV2ChainId } from 'sushi/config' -import { Amount, Token } from 'sushi/currency' +import { SushiSwapProtocol } from 'sushi' +import { SushiSwapV2ChainId, SushiSwapV3ChainId } from 'sushi/config' interface UsePoolGraphDataParams { poolAddress: string - chainId: SushiSwapV2ChainId + chainId: SushiSwapV2ChainId | SushiSwapV3ChainId + protocol: SushiSwapProtocol enabled?: boolean } export const usePoolGraphData = ({ poolAddress, chainId, + protocol, enabled = true, }: UsePoolGraphDataParams) => { return useQuery({ queryKey: ['usePoolGraphData', { poolAddress, chainId }], queryFn: async () => { - const pair = await getSushiHistoricPool({ - chainId, - id: poolAddress, - }) - - if (pair) { - const token0 = new Token({ - chainId: pair.chainId, - address: pair.token0.address, - decimals: pair.token0.decimals, - symbol: pair.token0.symbol, - name: pair.token0.name, - }) - - const token1 = new Token({ - chainId: pair.chainId, - address: pair.token1.address, - decimals: pair.token1.decimals, - symbol: pair.token1.symbol, - name: pair.token1.name, - }) - - return { - token0, - token1, - swapFee: Number(pair.swapFee), - reserve0: Amount.fromRawAmount(token0, pair.reserve0), - reserve1: Amount.fromRawAmount(token1, pair.reserve1), - liquidityUSD: Number(pair.liquidityUSD), - liquidity1dChange: Number(pair.liquidityUSD1dChange), - fees1d: Number(pair.feesUSD1d), - fees1dChange: Number(pair.feesUSD1dChange), - volume1d: Number(pair.volumeUSD1d), - volume1dChange: Number(pair.volumeUSD1dChange), - txCount1d: Number(pair.txCount1d), - txCount1dChange: Number(pair.txCount1dChange), - hourSnapshots: pair.poolHourData, - daySnapshots: pair.poolDayData, - } - } - - return null + const buckets = + protocol === SushiSwapProtocol.SUSHISWAP_V2 + ? await getV2PoolBuckets({ + chainId, + address: poolAddress, + }) + : protocol === SushiSwapProtocol.SUSHISWAP_V3 + ? await getV3PoolBuckets({ + chainId, + address: poolAddress, + }) + : { + dayBuckets: [], + hourBuckets: [], + } + return buckets }, placeholderData: keepPreviousData, staleTime: 0, diff --git a/apps/web/src/lib/hooks/api/useSushiV2UserPositions.ts b/apps/web/src/lib/hooks/api/useSushiV2UserPositions.ts index 39c667ec93..67d0dd93bc 100644 --- a/apps/web/src/lib/hooks/api/useSushiV2UserPositions.ts +++ b/apps/web/src/lib/hooks/api/useSushiV2UserPositions.ts @@ -1,34 +1,19 @@ 'use client' -import { parseArgs } from '@sushiswap/client' -import type { GetSushiV2StakedUnstakedPositions } from '@sushiswap/graph-client/composite/sushi-v2-staked-unstaked-positions' +import { + GetV2Positions, + V2Position, + getV2Positions, +} from '@sushiswap/graph-client/data-api' import { useQuery } from '@tanstack/react-query' -import { UserWithPool } from 'src/app/(evm)/pool/api/user-with-pools/route' -import { ChainId } from 'sushi/chain' - -export interface GetUserArgs { - id?: string - chainIds?: ChainId[] -} - -export function getUserPositionsWithPoolsUrl( - args: GetSushiV2StakedUnstakedPositions, -) { - return `/pool/api/user-with-pools/${parseArgs(args)}` -} export function useSushiV2UserPositions( - args: GetSushiV2StakedUnstakedPositions, + args: Partial, shouldFetch = true, ) { - return useQuery({ - queryKey: [getUserPositionsWithPoolsUrl(args)], - queryFn: async () => { - await import('sushi/bigint-serializer') - return fetch(getUserPositionsWithPoolsUrl(args)) - .then((data) => data.text()) - .then(JSON.parse) - }, - enabled: Boolean(shouldFetch && args.id), + return useQuery({ + queryKey: ['v2-positions', args], + queryFn: async () => await getV2Positions(args as GetV2Positions), + enabled: Boolean(shouldFetch && args.chainId && args.user), }) } diff --git a/apps/web/src/lib/hooks/api/useV2Pool.ts b/apps/web/src/lib/hooks/api/useV2Pool.ts new file mode 100644 index 0000000000..810f23a251 --- /dev/null +++ b/apps/web/src/lib/hooks/api/useV2Pool.ts @@ -0,0 +1,61 @@ +'use client' + +import { useMemo } from 'react' +import 'sushi/bigint-serializer' +import { Amount } from 'sushi/currency' + +import { V2Pool, getV2Pool } from '@sushiswap/graph-client/data-api' +import { useQuery } from '@tanstack/react-query' +import { PoolId } from 'sushi' +import { stringify } from 'sushi/bigint-serializer' +import { getTokensFromPool } from '../useTokensFromPool' + +export const useV2Pool = (poolId: PoolId) => { + const { + data: pool, + isLoading, + error, + } = useQuery({ + queryKey: ['v2-pool', poolId], + queryFn: async () => { + const result = await getV2Pool({ + chainId: poolId.chainId, + address: poolId.address, + }) + return result + }, + queryKeyHashFn: stringify, + }) + + const { token0, token1, liquidityToken } = useMemo(() => { + if (!pool) + return { + token0: undefined, + token1: undefined, + liquidityToken: undefined, + } + + return getTokensFromPool(pool) + }, [pool]) + + return useMemo(() => { + return { + isLoading, + error, + data: { + token0, + token1, + liquidityToken, + liquidityUSD: pool ? Number(pool?.liquidityUSD) : null, + reserve0: + token0 && pool ? Amount.fromRawAmount(token0, pool.reserve0) : null, + reserve1: + token1 && pool ? Amount.fromRawAmount(token1, pool.reserve1) : null, + totalSupply: + liquidityToken && pool + ? Amount.fromRawAmount(liquidityToken, pool.liquidity) + : null, + }, + } + }, [error, pool, isLoading, liquidityToken, token0, token1]) +} diff --git a/apps/web/src/lib/hooks/api/useV3PoolsWithFees.ts b/apps/web/src/lib/hooks/api/useV3PoolsWithFees.ts deleted file mode 100644 index 5c6f9968bb..0000000000 --- a/apps/web/src/lib/hooks/api/useV3PoolsWithFees.ts +++ /dev/null @@ -1,33 +0,0 @@ -'use client' - -import { - GetSushiV3PoolsWithFees, - SushiV3PoolsWithFees, - getSushiV3PoolsWithFees, -} from '@sushiswap/graph-client/sushi-v3' -import { UseQueryOptions, useQuery } from '@tanstack/react-query' -import { Token } from 'sushi/currency' - -export type V3PoolsWithFees = Array< - Omit & { - token0: Token - token1: Token - } -> - -export const useV3PoolsWithFees = ( - params: GetSushiV3PoolsWithFees, - options?: Omit, 'queryFn' | 'queryKey'>, -) => - useQuery({ - queryKey: [params], - queryFn: async () => { - const pools = await getSushiV3PoolsWithFees(params) - return pools.map((pool) => ({ - ...pool, - token0: new Token(pool.token0), - token1: new Token(pool.token1), - })) - }, - ...options, - }) diff --git a/apps/web/src/lib/hooks/api/useVault.ts b/apps/web/src/lib/hooks/api/useVault.ts new file mode 100644 index 0000000000..0bf7caad5b --- /dev/null +++ b/apps/web/src/lib/hooks/api/useVault.ts @@ -0,0 +1,12 @@ +'use client' + +import { GetVault, VaultV1, getVault } from '@sushiswap/graph-client/data-api' +import { useQuery } from '@tanstack/react-query' + +export function useVault(args: GetVault, shouldFetch = true) { + return useQuery({ + queryKey: ['vault', args], + queryFn: async () => await getVault(args!), + enabled: Boolean(shouldFetch && args.chainId), + }) +} diff --git a/apps/web/src/lib/hooks/api/userSmartPools.ts b/apps/web/src/lib/hooks/api/userSmartPools.ts new file mode 100644 index 0000000000..d2792747d3 --- /dev/null +++ b/apps/web/src/lib/hooks/api/userSmartPools.ts @@ -0,0 +1,16 @@ +'use client' + +import { + GetSmartPools, + SmartPoolsV1, + getSmartPools, +} from '@sushiswap/graph-client/data-api' +import { useQuery } from '@tanstack/react-query' + +export function useSmartPools(args: GetSmartPools, shouldFetch = true) { + return useQuery({ + queryKey: ['smart-pools', args], + queryFn: async () => await getSmartPools(args), + enabled: Boolean(shouldFetch && args.chainId), + }) +} diff --git a/apps/web/src/lib/hooks/usePoolsByTokenPair.ts b/apps/web/src/lib/hooks/usePoolsByTokenPair.ts index 6bfcc9cf7d..d9abe25a7e 100644 --- a/apps/web/src/lib/hooks/usePoolsByTokenPair.ts +++ b/apps/web/src/lib/hooks/usePoolsByTokenPair.ts @@ -9,10 +9,7 @@ function usePoolsByTokenPair(tokenId0?: string, tokenId1?: string) { queryFn: () => { if (!tokenId0 || !tokenId1) return [] - return getV3PoolsByTokenPair( - tokenId0.toLowerCase(), - tokenId1.toLowerCase(), - ) + return getV3PoolsByTokenPair(tokenId0, tokenId1) }, enabled: !!tokenId0 && !!tokenId1, }) diff --git a/apps/web/src/lib/hooks/useTokensFromPool.ts b/apps/web/src/lib/hooks/useTokensFromPool.ts index 711b16e986..61843cd4c1 100644 --- a/apps/web/src/lib/hooks/useTokensFromPool.ts +++ b/apps/web/src/lib/hooks/useTokensFromPool.ts @@ -1,10 +1,14 @@ 'use client' import { useMemo } from 'react' -import type { PoolBase } from 'sushi' import { Native, Token } from 'sushi/currency' -export const getTokensFromPool = (pool: PoolBase) => { +export const getTokensFromPool = (pool: { + id: string + token0: { address: string; name: string; decimals: number; symbol: string } + token1: { address: string; name: string; decimals: number; symbol: string } + chainId: number +}) => { const _token0 = new Token({ address: pool.token0.address, name: pool.token0.name, @@ -44,7 +48,12 @@ export const getTokensFromPool = (pool: PoolBase) => { } } -export const useTokensFromPool = (pool: PoolBase) => { +export const useTokensFromPool = (pool: { + id: string + token0: { address: string; name: string; decimals: number; symbol: string } + token1: { address: string; name: string; decimals: number; symbol: string } + chainId: number +}) => { return useMemo(() => { return getTokensFromPool(pool) }, [pool]) diff --git a/apps/web/src/lib/stake/use-bar-chart-data.ts b/apps/web/src/lib/stake/use-bar-chart-data.ts index 434ce54d22..672d9b21f8 100644 --- a/apps/web/src/lib/stake/use-bar-chart-data.ts +++ b/apps/web/src/lib/stake/use-bar-chart-data.ts @@ -1,6 +1,6 @@ 'use client' -import { getSushiBarHistory } from '@sushiswap/graph-client/sushi-bar' +import { getSushiBarHistory } from '@sushiswap/graph-client/data-api' import { keepPreviousData, useQuery } from '@tanstack/react-query' export const useBarChartData = (enabled = true) => { diff --git a/apps/web/src/lib/stake/use-bar-data.ts b/apps/web/src/lib/stake/use-bar-data.ts index dd89f41ba1..73ae77c92d 100644 --- a/apps/web/src/lib/stake/use-bar-data.ts +++ b/apps/web/src/lib/stake/use-bar-data.ts @@ -1,12 +1,12 @@ 'use client' -import { getSushiBar } from '@sushiswap/graph-client/sushi-bar' +import { getSushiBarStats } from '@sushiswap/graph-client/data-api' import { keepPreviousData, useQuery } from '@tanstack/react-query' export const useBarData = (enabled = true) => { return useQuery({ queryKey: ['useBarData'], - queryFn: async () => await getSushiBar({}), + queryFn: async () => await getSushiBarStats({}), placeholderData: keepPreviousData, staleTime: 30000, gcTime: 86400000, // 24hs diff --git a/apps/web/src/lib/wagmi/components/header-network-selector.tsx b/apps/web/src/lib/wagmi/components/header-network-selector.tsx index 8161df5473..98c96a760a 100644 --- a/apps/web/src/lib/wagmi/components/header-network-selector.tsx +++ b/apps/web/src/lib/wagmi/components/header-network-selector.tsx @@ -11,7 +11,8 @@ export const HeaderNetworkSelector: FC<{ networks: ChainId[] selectedNetwork?: ChainId onChange?(chainId: ChainId): void -}> = ({ networks, selectedNetwork, onChange }) => { + hideNetworkName?: boolean +}> = ({ networks, selectedNetwork, onChange, hideNetworkName = false }) => { const { switchChainAsync } = useSwitchChain() const chainId = useChainId() @@ -49,7 +50,9 @@ export const HeaderNetworkSelector: FC<{ diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioDefaultView.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioDefaultView.tsx new file mode 100644 index 0000000000..1b6bb7dd06 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioDefaultView.tsx @@ -0,0 +1,157 @@ +import { + ArrowLeftOnRectangleIcon, + Cog6ToothIcon, + DocumentDuplicateIcon, + LinkIcon, +} from '@heroicons/react/24/outline' +import { UserCircleIcon } from '@heroicons/react/24/solid' +import { + Button, + ClipboardController, + IconButton, + LinkExternal, + SkeletonBox, + SkeletonCircle, +} from '@sushiswap/ui' +import Image from 'next/image' +import { Dispatch, FC, SetStateAction, useMemo, useState } from 'react' +import { SUPPORTED_CHAIN_IDS } from 'src/config' +import { HeaderNetworkSelector } from 'src/lib/wagmi/components/header-network-selector' +import { ChainId, chains, shortenAddress } from 'sushi' +import { useAccount, useDisconnect } from 'wagmi' +import { GetEnsNameReturnType } from 'wagmi/actions' +import { PortfolioView } from '.' +import { PortfolioClaimables } from './portfolio-claimables' +import { PortfolioPositions } from './portfolio-positions' +import { PortfolioTokens } from './portfolio-tokens' +import { PortfolioHistory } from './portolio-history' + +enum PortfolioTab { + Tokens = 'Tokens', + Positions = 'Positions', + Claimable = 'Claimable', + History = 'History', +} + +interface PortfolioDefaultProps { + ensName: GetEnsNameReturnType | undefined + isENSNameLoading: boolean + setView: Dispatch> +} + +export const PortfolioDefaultView: FC = ({ + setView, + ensName, + isENSNameLoading, +}) => { + const { connector, address, chainId } = useAccount() + const { disconnect } = useDisconnect() + + const [tab, setTab] = useState(PortfolioTab.Tokens) + + const content = useMemo(() => { + switch (tab) { + case PortfolioTab.Tokens: + return + case PortfolioTab.Positions: + return + case PortfolioTab.Claimable: + return + case PortfolioTab.History: + return + } + }, [tab]) + + return ( +
+
+
+
+ {connector ? ( + connector.icon ? ( + {connector.name} + ) : ( + + ) + ) : ( + + )} + {!address || isENSNameLoading ? ( + + ) : ensName ? ( +
+
{ensName}
+
+ {shortenAddress(address)} +
+
+ ) : ( + {shortenAddress(address)} + )} +
+
+ setView(PortfolioView.Settings)} + description="Settings" + name="Settings" + /> + + {({ setCopied, isCopied }) => ( + setCopied(address!)} + description={isCopied ? 'Copied!' : 'Copy Address'} + name="Copy" + /> + )} + + + + + disconnect()} + description="Disconnect" + name="Disconnect" + /> +
+
+ +
+
+ {Object.values(PortfolioTab).map((_tab) => ( + + ))} +
+ {content} +
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioInfoRow.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioInfoRow.tsx new file mode 100644 index 0000000000..99870d1da5 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioInfoRow.tsx @@ -0,0 +1,60 @@ +import { Badge } from '@sushiswap/ui' +import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon' +import Link from 'next/link' +import { FC, ReactElement } from 'react' +import { ChainId } from 'sushi/chain' + +interface PortfolioInfoRow { + id: string + chainId: ChainId + icon: ReactElement + leftContent: ReactElement + rightContent: ReactElement | null + href?: string + externalLink?: boolean +} + +export const PortfolioInfoRow: FC = (params) => { + const { id, href, externalLink = false } = params + + return href ? ( + + <_PortfolioInfoRow {...params} /> + + ) : ( +
+ <_PortfolioInfoRow {...params} /> +
+ ) +} + +const _PortfolioInfoRow: FC = ({ + chainId, + icon, + leftContent, + rightContent, +}) => { + return ( +
+
+ + } + > + {icon} + +
+
+
+ {leftContent} +
+
+ {rightContent} +
+
+
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioSettingsView.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioSettingsView.tsx new file mode 100644 index 0000000000..f2a0877799 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/PortfolioSettingsView.tsx @@ -0,0 +1,76 @@ +import { RadioGroup } from '@headlessui/react' +import { ArrowLeftIcon } from '@heroicons/react/20/solid' +import { MoonIcon, SunIcon } from '@heroicons/react/24/outline' +import { useLocalStorage } from '@sushiswap/hooks' +import { List } from '@sushiswap/ui' +import { classNames } from '@sushiswap/ui' +import { IconButton } from '@sushiswap/ui' +import { Switch } from '@sushiswap/ui' +import { useTheme } from 'next-themes' +import React, { Dispatch, FC, Fragment, SetStateAction } from 'react' +import { PortfolioView } from '.' + +interface PortfolioSettingsViewProps { + setView: Dispatch> +} + +const map = { + system: Auto, + light: , + dark: , +} + +export const PortfolioSettingsView: FC = ({ + setView, +}) => { + const { theme, setTheme } = useTheme() + const [showTestnets, setShowTestnets] = useLocalStorage('showTestnets', false) + + return ( +
+
+
+ setView(PortfolioView.Default)} + icon={ArrowLeftIcon} + name="Back" + /> +
+ Settings +
+
+ + Preferences + + + +
+ {Object.entries(map).map(([k, v], i) => ( + + {({ checked }) => ( + + )} + + ))} +
+
+
+ + + +
+
+
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/index.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/index.tsx new file mode 100644 index 0000000000..a042eef653 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/index.tsx @@ -0,0 +1,105 @@ +'use client' + +import { + Button, + Dialog, + DialogContent, + DialogTrigger, + Sheet, + SheetContent, + SheetTrigger, + cloudinaryFetchLoader, + useBreakpoint, +} from '@sushiswap/ui' +import { JazzIcon } from '@sushiswap/ui/icons/JazzIcon' +import Image from 'next/image' +import { FC, ReactNode, useMemo, useState } from 'react' +import { ChainId, shortenAddress } from 'sushi' +import { useAccount, useEnsAvatar, useEnsName } from 'wagmi' +import { ConnectButton } from '../connect-button' +import { PortfolioDefaultView } from './PortfolioDefaultView' +import { PortfolioSettingsView } from './PortfolioSettingsView' + +export enum PortfolioView { + Default = 'Default', + Settings = 'Settings', +} + +const ResponsivePortfolioWrapper: FC<{ + content: ReactNode + trigger: ReactNode + isSm: boolean +}> = ({ content, trigger, isSm }) => { + return isSm ? ( + + {trigger} + + {content} + + + ) : ( + + {trigger} + + {content} + + + ) +} + +export const UserPortfolio = () => { + const { isSm } = useBreakpoint('sm') + const { address } = useAccount() + const [view, setView] = useState(PortfolioView.Default) + + const { data: ensName, isLoading: isENSNameLoading } = useEnsName({ + chainId: ChainId.ETHEREUM, + address, + }) + + const { data: avatar } = useEnsAvatar({ + name: ensName || undefined, + chainId: ChainId.ETHEREUM, + }) + + const content = useMemo(() => { + switch (view) { + case PortfolioView.Settings: + return + default: + return ( + + ) + } + }, [view, ensName, isENSNameLoading]) + + if (!address) return + + return ( + + {avatar ? ( + ens-avatar + ) : ( + + )} + {shortenAddress(address)} + + } + content={content} + isSm={isSm} + /> + ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/PortfolioFarmClaimables.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/PortfolioFarmClaimables.tsx new file mode 100644 index 0000000000..ef0fcd6253 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/PortfolioFarmClaimables.tsx @@ -0,0 +1,80 @@ +import { PortfolioFarmClaim } from '@sushiswap/graph-client/data-api' +import { + AccordionContent, + AccordionItem, + AccordionTrigger, + FormattedNumber, +} from '@sushiswap/ui' +import { FC } from 'react' +import React from 'react' +import { ChainId, ChainKey } from 'sushi/chain' +import { formatUSD } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +interface PortfolioFarmClaimablesProps { + claimables: PortfolioFarmClaim[] +} + +export const PortfolioFarmClaimables: FC = ({ + claimables, +}) => ( + + + {`Farms (${claimables.length})`} + + + {claimables.map(({ position, token }) => ( + + } + leftContent={ + +
+ {token.name} +
+
+ {`${ + position.protocol === 'SUSHISWAP_V2' + ? 'V2' + : position.protocol === 'SUSHISWAP_V3' + ? 'V3' + : position.protocol + }-${position.swapFee * 100}%-${position.name.replace( + ' / ', + '-', + )}`} +
+
+ } + rightContent={ + +
+ {formatUSD(token.amountUSD)} +
+
+ {' '} + {token.symbol} +
+
+ } + /> + ))} +
+
+) diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/PortfolioFuroClaimables.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/PortfolioFuroClaimables.tsx new file mode 100644 index 0000000000..4b51abd824 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/PortfolioFuroClaimables.tsx @@ -0,0 +1,67 @@ +import { PortfolioFuroClaim } from '@sushiswap/graph-client/data-api' +import { + AccordionContent, + AccordionItem, + AccordionTrigger, + FormattedNumber, +} from '@sushiswap/ui' +import { FC } from 'react' +import React from 'react' +import { ChainId } from 'sushi/chain' +import { formatUSD } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +interface PortfolioFuroClaimablesProps { + claimables: PortfolioFuroClaim[] +} + +export const PortfolioFuroClaimables: FC = ({ + claimables, +}) => ( + + + {`Furo Streaming (${claimables.length})`} + + + {claimables.map(({ position, token }) => ( + + } + leftContent={ + +
+ {token.name} +
+
+ {position.name.toUpperCase()} +
+
+ } + rightContent={ + +
+ {formatUSD(token.amountUSD)} +
+
+ {' '} + {token.symbol} +
+
+ } + /> + ))} +
+
+) diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/index.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/index.tsx new file mode 100644 index 0000000000..3534d74363 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-claimables/index.tsx @@ -0,0 +1,100 @@ +import { + PortfolioFarmClaim, + getPortfolioClaimables, +} from '@sushiswap/graph-client/data-api' +import { Accordion, SkeletonCircle, SkeletonText } from '@sushiswap/ui' +import { useQuery } from '@tanstack/react-query' +import React, { useMemo } from 'react' +import { formatUSD } from 'sushi/format' +import { Address } from 'viem' +import { useAccount } from 'wagmi' +import { PortfolioFarmClaimables } from './PortfolioFarmClaimables' +import { PortfolioFuroClaimables } from './PortfolioFuroClaimables' + +function usePortfolioClaimables( + address: Address | undefined, + refetchInterval?: 600_000, +) { + return useQuery({ + queryKey: ['portfolio-claimables', address], + queryFn: async () => { + const id = address as string + const data = await getPortfolioClaimables({ id }) + return data + }, + enabled: !!address, + refetchInterval, + }) +} + +export const PortfolioClaimables = () => { + const { address } = useAccount() + const { data, isLoading } = usePortfolioClaimables(address) + + const farmClaimables: PortfolioFarmClaim[] = useMemo( + () => + data + ? [ + ...data.v2PositionClaimables, + ...data.v3PositionClaimables, + ...data.smartPositionClaimables, + ] + : [], + [data], + ) + + return ( +
+
+
+ Total Balance + {isLoading ? ( + + ) : ( +
+ {formatUSD(data!.totalUSD)} +
+ )} +
+
+ {isLoading ? ( +
+
+ +
+ {Array.from({ length: 12 }).map((_, i) => ( +
+ +
+
+ + +
+
+ + +
+
+
+ ))} +
+ ) : ( + + {farmClaimables.length ? ( + + ) : null} + {data?.furoClaimables.length ? ( + + ) : null} + + )} +
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioALMPositions.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioALMPositions.tsx new file mode 100644 index 0000000000..f3b754c666 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioALMPositions.tsx @@ -0,0 +1,66 @@ +import { PortfolioSmartPosition } from '@sushiswap/graph-client/data-api' +import { + AccordionContent, + AccordionItem, + AccordionTrigger, + Currency, +} from '@sushiswap/ui' +import React, { FC } from 'react' +import { ChainId, ChainKey } from 'sushi/chain' +import { formatUSD } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +interface PortfolioALMPositionsProps { + positions: PortfolioSmartPosition[] + href?: string +} + +export const PortfolioALMPositions: FC = ({ + positions, +}) => ( + + + {`Smart Positions (${positions.length})`} + + + {positions.map((position) => ( + + {position.token0.symbol} + {position.token1.symbol} + + } + leftContent={ + +
+ {position.name} +
+
{`V3-${ + position.swapFee * 100 + }%-${position.strategy}`}
+
+ } + rightContent={ + + {formatUSD(position.amountUSD)} + + } + /> + ))} +
+
+) diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioV2Positions.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioV2Positions.tsx new file mode 100644 index 0000000000..ab0fbc4b5d --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioV2Positions.tsx @@ -0,0 +1,63 @@ +import { PortfolioV2Position } from '@sushiswap/graph-client/data-api' +import { + AccordionContent, + AccordionItem, + AccordionTrigger, + Currency, +} from '@sushiswap/ui' +import React, { FC } from 'react' +import { ChainId, ChainKey } from 'sushi/chain' +import { formatUSD } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +interface PortfolioV2PositionssProps { + positions: PortfolioV2Position[] +} + +export const PortfolioV2Positions: FC = ({ + positions, +}) => ( + + + {`V2 Positions (${positions.length})`} + + + {positions.map((position) => ( + + {position.token0.symbol} + {position.token1.symbol} + + } + leftContent={ + +
+ {position.name} +
+
V2-0.30%
+
+ } + rightContent={ + + {formatUSD(position.amountUSD)} + + } + /> + ))} +
+
+) diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioV3Positions.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioV3Positions.tsx new file mode 100644 index 0000000000..257e14a952 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/PortfolioV3Positions.tsx @@ -0,0 +1,105 @@ +import { PortfolioV3Position } from '@sushiswap/graph-client/data-api' +import { + AccordionContent, + AccordionItem, + AccordionTrigger, + Currency, + classNames, +} from '@sushiswap/ui' +import { BagIcon } from '@sushiswap/ui/icons/BagIcon' +import React, { FC } from 'react' +import { ChainId, ChainKey } from 'sushi/chain' +import { formatUSD } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +interface PortfolioV3PositionsProps { + positions: PortfolioV3Position[] +} + +export const PortfolioV3Positions: FC = ({ + positions, +}) => ( + + + {`V3 Positions (${positions.length})`} + + + {positions.map((position) => ( + + {position.token0.symbol} + {position.token1.symbol} + + } + leftContent={ + +
+ {position.name} +
+
+
{`V3-${ + position.swapFee * 100 + }%`}
+
+
+ + {position.range === 'OUT_OF_RANGE' + ? 'Out of Range' + : position.range === 'IN_RANGE' + ? 'In Range' + : 'Unknown'} + +
+
+ + } + rightContent={ + +
+ {formatUSD(position.amountUSD)} +
+
+ + {formatUSD( + position.fees.reduce((sum, fee) => sum + fee.amountUSD, 0), + )} +
+
+ } + /> + ))} + + +) diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/index.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/index.tsx new file mode 100644 index 0000000000..151d64b43f --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-positions/index.tsx @@ -0,0 +1,94 @@ +import { getPortfolioPositions } from '@sushiswap/graph-client/data-api' +import { Accordion, SkeletonCircle, SkeletonText } from '@sushiswap/ui' +import { useQuery } from '@tanstack/react-query' +import React from 'react' +import { formatUSD } from 'sushi/format' +import { Address } from 'viem' +import { useAccount } from 'wagmi' +import { PortfolioALMPositions } from './PortfolioALMPositions' +import { PortfolioV2Positions } from './PortfolioV2Positions' +import { PortfolioV3Positions } from './PortfolioV3Positions' + +function usePortfolioPositions( + address: Address | undefined, + refetchInterval?: 600_000, +) { + return useQuery({ + queryKey: ['portfolio-positions', address], + queryFn: async () => { + const id = address as string + const data = await getPortfolioPositions({ id }) + return data + }, + enabled: !!address, + refetchInterval, + }) +} + +export const PortfolioPositions = () => { + const id = useAccount() + const { data, isLoading } = usePortfolioPositions(id.address) + + return ( +
+
+
+ Total Balance +
+ {isLoading ? ( + + ) : ( +
+ {formatUSD(data!.totalUSD)} +
+ )} +
+
+
+ {isLoading ? ( +
+
+ +
+ {Array.from({ length: 12 }).map((_, i) => ( +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+ ))} +
+ ) : ( + + {data?.v2Positions.length ? ( + + ) : null} + {data?.v3Positions.length ? ( + + ) : null} + {data?.smartPositions.length ? ( + + ) : null} + + )} +
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-tokens/PortfolioTokensList.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-tokens/PortfolioTokensList.tsx new file mode 100644 index 0000000000..5109f06d80 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-tokens/PortfolioTokensList.tsx @@ -0,0 +1,66 @@ +import { PortfolioWalletToken } from '@sushiswap/graph-client/data-api' +import { FormattedNumber, classNames } from '@sushiswap/ui' +import React, { FC } from 'react' +import { ChainId } from 'sushi/chain' +import { formatPercent, formatUSD } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +interface PortfolioTokensListProps { + tokens: PortfolioWalletToken[] +} + +export const PortfolioTokensList: FC = ({ + tokens, +}) => ( +
+ {tokens.map((token) => { + return ( + + } + leftContent={ + +
+ {token.name ?? token.symbol} +
+
+ {' '} + {token.symbol} +
+
+ } + rightContent={ + +
+ {formatUSD(token.amountUSD)} +
+
0 + ? 'text-green' + : token.price24hChange < 0 + ? 'text-red' + : 'text-muted-foreground', + )} + > + {`${token.price24hChange > 0 ? '+' : ''}${formatPercent( + token.price24hChange, + )}`} +
+
+ } + /> + ) + })} +
+) diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-tokens/index.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-tokens/index.tsx new file mode 100644 index 0000000000..fe52e3272e --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portfolio-tokens/index.tsx @@ -0,0 +1,92 @@ +import { getPortfolioWallet } from '@sushiswap/graph-client/data-api' +import { SkeletonCircle, SkeletonText, classNames } from '@sushiswap/ui' +import { useQuery } from '@tanstack/react-query' +import React from 'react' +import { formatPercent, formatUSD } from 'sushi/format' +import { Address } from 'viem' +import { useAccount } from 'wagmi' +import { PortfolioTokensList } from './PortfolioTokensList' + +function usePortfolioWallet( + address: Address | undefined, + refetchInterval?: 600_000, +) { + return useQuery({ + queryKey: ['portfolio-wallet', address], + queryFn: async () => { + const id = address as string + const data = await getPortfolioWallet({ id }) + return data + }, + enabled: !!address, + refetchInterval, + }) +} + +export const PortfolioTokens = () => { + const { address } = useAccount() + const { data, isLoading } = usePortfolioWallet(address) + + return ( +
+
+
+ Total Balance +
+ {isLoading ? ( + <> + + + + ) : ( + <> +
+ {formatUSD(data!.totalUSD)} +
+
0 + ? 'text-green' + : data!.amountUSD24Change < 0 + ? 'text-red' + : 'text-muted-foreground', + )} + > + {`${data!.amountUSD24Change > 0 ? '+' : ''}${formatUSD( + data!.amountUSD24Change, + )} (${formatPercent(data!.percentageChange24h)})`} +
+ + )} +
+
+
+ + {isLoading ? ( +
+ {Array.from({ length: 12 }).map((_, i) => ( +
+ +
+
+ + +
+
+ + +
+
+
+ ))} +
+ ) : data?.tokens.length ? ( + + ) : null} +
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioApproveTransaction.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioApproveTransaction.tsx new file mode 100644 index 0000000000..5bc7b5e30a --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioApproveTransaction.tsx @@ -0,0 +1,77 @@ +import { LockClosedIcon, Square2StackIcon } from '@heroicons/react/24/outline' +import { PortfolioTransaction } from '@sushiswap/graph-client/data-api' +import { ClipboardController, FormattedNumber, IconButton } from '@sushiswap/ui' +import { format, fromUnixTime } from 'date-fns' +import { FC } from 'react' +import React from 'react' +import { Chain, ChainId } from 'sushi/chain' +import { shortenHash } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +export const PortfolioApproveTransaction: FC<{ tx: PortfolioTransaction }> = ({ + tx, +}) => { + return ( + + +
+ } + leftContent={ + +
+ Approve +
+ + {({ setCopied, isCopied }) => ( +
+ TxHash: {shortenHash(tx.txHash)} + { + e.preventDefault() + setCopied(tx.txHash) + }} + /> +
+ )} +
+
+ } + rightContent={ + +
+ {tx.approve.logoUrl ? ( +
+ {tx.approve.symbol} +
+ ) : null} + + + {' '} + {tx.approve.symbol} + +
+
+ {format(fromUnixTime(tx.timestamp), 'yyyy/MM/dd HH:mm')} +
+
+ } + /> + ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioOtherTransaction.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioOtherTransaction.tsx new file mode 100644 index 0000000000..de018c7995 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioOtherTransaction.tsx @@ -0,0 +1,107 @@ +import { GlobeAltIcon, Square2StackIcon } from '@heroicons/react/24/outline' +import { PortfolioTransaction } from '@sushiswap/graph-client/data-api' +import { ClipboardController, FormattedNumber, IconButton } from '@sushiswap/ui' +import { SushiLiteIcon } from '@sushiswap/ui/icons/SushiLiteIcon' +import { format, fromUnixTime } from 'date-fns' +import React, { FC } from 'react' +import { Chain, ChainId } from 'sushi/chain' +import { shortenHash } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +export const PortfolioOtherTransaction: FC<{ tx: PortfolioTransaction }> = ({ + tx, +}) => { + return ( + + +
+ ) : ( +
+ +
+ ) + } + leftContent={ + +
+ {tx.functionName} +
+ + {({ setCopied, isCopied }) => ( +
+ TxHash: {shortenHash(tx.txHash)} + { + e.preventDefault() + setCopied(tx.txHash) + }} + /> +
+ )} +
+
+ } + rightContent={ + + {tx.sends.length ? ( +
+ {tx.sends[0].logoUrl ? ( +
+ {tx.sends[0].symbol} +
+ ) : null} + + + {'-'} + {' '} + {tx.sends[0].symbol} + +
+ ) : tx.receives.length ? ( +
+ {tx.receives[0].logoUrl ? ( +
+ {tx.receives[0].symbol} +
+ ) : null} + + + {' '} + {tx.receives[0].symbol} + +
+ ) : ( +
+ )} +
+ {format(fromUnixTime(tx.timestamp), 'yyyy/MM/dd HH:mm')} +
+ + } + /> + ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioReceiveTransaction.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioReceiveTransaction.tsx new file mode 100644 index 0000000000..65b49e3a59 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioReceiveTransaction.tsx @@ -0,0 +1,81 @@ +import { ArrowDownIcon, Square2StackIcon } from '@heroicons/react/24/outline' +import { PortfolioTransaction } from '@sushiswap/graph-client/data-api' +import { ClipboardController, FormattedNumber, IconButton } from '@sushiswap/ui' +import { format, fromUnixTime } from 'date-fns' +import { FC } from 'react' +import React from 'react' +import { Chain, ChainId } from 'sushi/chain' +import { shortenHash } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +export const PortfolioReceiveTransaction: FC<{ tx: PortfolioTransaction }> = ({ + tx, +}) => { + return ( + + +
+ } + leftContent={ + +
+ Receive +
+ + {({ setCopied, isCopied }) => ( +
+ TxHash: {shortenHash(tx.txHash)} + { + e.preventDefault() + setCopied(tx.txHash) + }} + /> +
+ )} +
+
+ } + rightContent={ + + {tx.receives.length ? ( +
+ {tx.receives[0].logoUrl ? ( +
+ {tx.receives[0].symbol} +
+ ) : null} + + + {' '} + {tx.receives[0].symbol} + +
+ ) : ( +
+ )} +
+ {format(fromUnixTime(tx.timestamp), 'yyyy/MM/dd HH:mm')} +
+ + } + /> + ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioSendTransaction.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioSendTransaction.tsx new file mode 100644 index 0000000000..8661269720 --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/PortfolioSendTransaction.tsx @@ -0,0 +1,82 @@ +import { ArrowUpIcon, Square2StackIcon } from '@heroicons/react/24/outline' +import { PortfolioTransaction } from '@sushiswap/graph-client/data-api' +import { ClipboardController, FormattedNumber, IconButton } from '@sushiswap/ui' +import { format, fromUnixTime } from 'date-fns' +import { FC } from 'react' +import React from 'react' +import { Chain, ChainId } from 'sushi/chain' +import { shortenHash } from 'sushi/format' +import { PortfolioInfoRow } from '../PortfolioInfoRow' + +export const PortfolioSendTransaction: FC<{ tx: PortfolioTransaction }> = ({ + tx, +}) => { + return ( + + +
+ } + leftContent={ + +
+ Send +
+ + {({ setCopied, isCopied }) => ( +
+ TxHash: {shortenHash(tx.txHash)} + { + e.preventDefault() + setCopied(tx.txHash) + }} + /> +
+ )} +
+
+ } + rightContent={ + + {tx.sends.length ? ( +
+ {tx.sends[0].logoUrl ? ( +
+ {tx.sends[0].symbol} +
+ ) : null} + + + {'-'} + {' '} + {tx.sends[0].symbol} + +
+ ) : ( +
+ )} +
+ {format(fromUnixTime(tx.timestamp), 'yyyy/MM/dd HH:mm')} +
+ + } + /> + ) +} diff --git a/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/index.tsx b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/index.tsx new file mode 100644 index 0000000000..00ecb3bc2f --- /dev/null +++ b/apps/web/src/lib/wagmi/components/user-portfolio/portolio-history/index.tsx @@ -0,0 +1,71 @@ +import { getPortfolioHistory } from '@sushiswap/graph-client/data-api' +import { SkeletonCircle, SkeletonText } from '@sushiswap/ui' +import { useQuery } from '@tanstack/react-query' +import { Address } from 'viem' +import { useAccount } from 'wagmi' +import { PortfolioApproveTransaction } from './PortfolioApproveTransaction' +import { PortfolioOtherTransaction } from './PortfolioOtherTransaction' +import { PortfolioReceiveTransaction } from './PortfolioReceiveTransaction' +import { PortfolioSendTransaction } from './PortfolioSendTransaction' + +function usePortfolioHistory( + address: Address | undefined, + refetchInterval?: 600_000, +) { + return useQuery({ + queryKey: ['portfolio-history', address], + queryFn: async () => { + const id = address as string + const data = await getPortfolioHistory({ id }) + return data + }, + enabled: !!address, + refetchInterval, + }) +} + +export const PortfolioHistory = () => { + const { address } = useAccount() + const { data, isLoading } = usePortfolioHistory(address) + + return ( +
+
+ {isLoading ? ( +
+ {Array.from({ length: 12 }).map((_, i) => ( +
+ +
+
+ + +
+
+ + +
+
+
+ ))} +
+ ) : ( + data?.map((tx) => + tx.category === 'APPROVE' ? ( + + ) : tx.category === 'SEND' ? ( + + ) : tx.category === 'RECEIVE' ? ( + + ) : ( + + ), + ) + )} +
+
+ ) +} diff --git a/apps/web/src/lib/wagmi/components/wagmi-header-components.tsx b/apps/web/src/lib/wagmi/components/wagmi-header-components.tsx index 7bc559a161..455b975829 100644 --- a/apps/web/src/lib/wagmi/components/wagmi-header-components.tsx +++ b/apps/web/src/lib/wagmi/components/wagmi-header-components.tsx @@ -11,7 +11,7 @@ import { import { useEffect } from 'react' import { useAccount } from 'wagmi' import { HeaderNetworkSelector } from './header-network-selector' -import { UserProfile } from './user-profile' +import { UserPortfolio } from './user-portfolio' interface WagmiHeaderComponentsProps { chainIds: ChainId[] @@ -42,7 +42,7 @@ export const WagmiHeaderComponents: React.FC = ({ return ( <> - + ) } diff --git a/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-deposit.ts b/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-deposit.ts index 11c0afc87a..643d2d332e 100644 --- a/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-deposit.ts +++ b/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-deposit.ts @@ -1,6 +1,5 @@ 'use client' -import { ChefType } from '@sushiswap/client' import { createErrorToast, createToast } from '@sushiswap/notifications' import { useCallback, useMemo } from 'react' import { masterChefV1Abi, masterChefV2Abi } from 'sushi/abi' @@ -15,7 +14,7 @@ import { } from 'wagmi' import { SendTransactionReturnType } from 'wagmi/actions' -import { ChainId } from 'sushi' +import { ChainId, ChefType } from 'sushi' import { useMasterChefContract } from './use-master-chef-contract' interface UseMasterChefDepositParams { diff --git a/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-withdraw.ts b/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-withdraw.ts index 88a6343271..7ed28839ba 100644 --- a/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-withdraw.ts +++ b/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef-withdraw.ts @@ -1,9 +1,8 @@ 'use client' -import { ChefType } from '@sushiswap/client' import { createErrorToast, createToast } from '@sushiswap/notifications' import { useCallback, useMemo } from 'react' -import { ChainId } from 'sushi' +import { ChainId, ChefType } from 'sushi' import { masterChefV1Abi, masterChefV2Abi, miniChefV2Abi } from 'sushi/abi' import { Amount, Token } from 'sushi/currency' import { UserRejectedRequestError } from 'viem' diff --git a/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef.ts b/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef.ts index 64ab0afb86..b442b9ad48 100644 --- a/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef.ts +++ b/apps/web/src/lib/wagmi/hooks/master-chef/use-master-chef.ts @@ -1,9 +1,9 @@ 'use client' -import { ChefType } from '@sushiswap/client' import { createErrorToast, createToast } from '@sushiswap/notifications' import { keepPreviousData, useQueryClient } from '@tanstack/react-query' import { useCallback, useEffect, useMemo } from 'react' +import { ChefType } from 'sushi' import { erc20Abi, masterChefV2Abi, miniChefV2Abi } from 'sushi/abi' import { ChainId } from 'sushi/chain' import { diff --git a/apps/web/src/lib/wagmi/hooks/master-chef/use-rewarder.ts b/apps/web/src/lib/wagmi/hooks/master-chef/use-rewarder.ts index fe9c488cd1..ad7e615cbf 100644 --- a/apps/web/src/lib/wagmi/hooks/master-chef/use-rewarder.ts +++ b/apps/web/src/lib/wagmi/hooks/master-chef/use-rewarder.ts @@ -1,8 +1,8 @@ 'use client' -import { ChefType } from '@sushiswap/client' import { keepPreviousData, useQueryClient } from '@tanstack/react-query' import { useEffect, useMemo } from 'react' +import { ChefType } from 'sushi' import { ChainId } from 'sushi/chain' import { Amount, Token } from 'sushi/currency' import { Address } from 'viem' diff --git a/apps/web/src/lib/wagmi/hooks/pools/actions/getConcentratedLiquidityPoolReserves.ts b/apps/web/src/lib/wagmi/hooks/pools/actions/getConcentratedLiquidityPoolReserves.ts index 41683391ff..968306336f 100644 --- a/apps/web/src/lib/wagmi/hooks/pools/actions/getConcentratedLiquidityPoolReserves.ts +++ b/apps/web/src/lib/wagmi/hooks/pools/actions/getConcentratedLiquidityPoolReserves.ts @@ -1,43 +1,30 @@ +import { V3Pool } from '@sushiswap/graph-client/data-api' import { getBalance } from '@wagmi/core' -import { SUSHISWAP_V3_FACTORY_ADDRESS, SushiSwapV3ChainId } from 'sushi/config' -import { Amount } from 'sushi/currency' -import { - SushiSwapV3Pool, - computeSushiSwapV3PoolAddress, -} from 'sushi/pool/sushiswap-v3' -import { PublicWagmiConfig } from '../../../config/public' +import { PublicWagmiConfig } from 'src/lib/wagmi/config/public' +import { Amount, Token } from 'sushi/currency' export const getConcentratedLiquidityPoolReserves = async ({ pool, - chainId, config, }: { - pool: SushiSwapV3Pool - chainId: SushiSwapV3ChainId + pool: V3Pool config: PublicWagmiConfig }) => { - const address = computeSushiSwapV3PoolAddress({ - factoryAddress: SUSHISWAP_V3_FACTORY_ADDRESS[chainId], - tokenA: pool.token0, - tokenB: pool.token1, - fee: pool.fee, - }) - const [balance1, balance2] = await Promise.all([ getBalance(config, { - address, + address: pool.address, chainId: pool.chainId, token: pool.token0.address, }), getBalance(config, { - address, + address: pool.address, chainId: pool.chainId, token: pool.token1.address, }), ]) return [ - Amount.fromRawAmount(pool.token0, balance1.value), - Amount.fromRawAmount(pool.token1, balance2.value), + Amount.fromRawAmount(new Token(pool.token0), balance1.value), + Amount.fromRawAmount(new Token(pool.token1), balance2.value), ] } diff --git a/apps/web/src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPoolReserves.ts b/apps/web/src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPoolReserves.ts index e1316d8fc0..4b648c159f 100644 --- a/apps/web/src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPoolReserves.ts +++ b/apps/web/src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPoolReserves.ts @@ -1,11 +1,11 @@ +import { V3Pool } from '@sushiswap/graph-client/data-api' import { useQuery } from '@tanstack/react-query' import { SushiSwapV3ChainId } from 'sushi/config' -import { SushiSwapV3Pool } from 'sushi/pool/sushiswap-v3' import { useConfig } from 'wagmi' import { getConcentratedLiquidityPoolReserves } from '../actions/getConcentratedLiquidityPoolReserves' interface UseConcentratedLiquidityPoolReserves { - pool: SushiSwapV3Pool | null | undefined + pool: V3Pool | null | undefined chainId: SushiSwapV3ChainId enabled?: boolean } @@ -23,7 +23,7 @@ export const useConcentratedLiquidityPoolReserves = ({ { token0: pool?.token0, token1: pool?.token1, - feeAmount: pool?.fee, + feeAmount: pool?.swapFee, chainId, }, ], @@ -31,7 +31,6 @@ export const useConcentratedLiquidityPoolReserves = ({ if (pool) { return getConcentratedLiquidityPoolReserves({ pool, - chainId, config, }) } diff --git a/apps/web/src/lib/wagmi/hooks/steer/useSteerAccountPositionsExtended.ts b/apps/web/src/lib/wagmi/hooks/steer/useSteerAccountPositionsExtended.ts index c20dc4bebf..7ac30fa160 100644 --- a/apps/web/src/lib/wagmi/hooks/steer/useSteerAccountPositionsExtended.ts +++ b/apps/web/src/lib/wagmi/hooks/steer/useSteerAccountPositionsExtended.ts @@ -1,35 +1,41 @@ -import { useSteerVaults } from '@sushiswap/client/hooks' import { useAllPrices } from '@sushiswap/react-query' +import { useMemo } from 'react' +import { useSmartPools } from 'src/lib/hooks/api/userSmartPools' +import { ChainId, ID } from 'sushi' import { Amount, Token } from 'sushi/currency' import { Address } from 'viem' - -import { STEER_SUPPORTED_CHAIN_IDS } from '@sushiswap/steer-sdk' -import { useMemo } from 'react' import { useSteerAccountPositions } from './useSteerAccountPosition' interface UseSteerAccountPositionsExtended { account: Address | undefined enabled?: boolean - chainIds?: number[] + chainId: ChainId } export type SteerAccountPositionExtended = NonNullable< ReturnType['data'] >[0] +export type SteerAccountPositionVault = NonNullable< + ReturnType['data'] +>[0]['vault'] + export const useSteerAccountPositionsExtended = ({ account, enabled = true, - chainIds = [...STEER_SUPPORTED_CHAIN_IDS], + chainId, }: UseSteerAccountPositionsExtended) => { const { data: prices, isInitialLoading: isPricesLoading } = useAllPrices() - const { data: vaults, isLoading: isVaultsLoading } = useSteerVaults({ - args: { chainIds }, - shouldFetch: Boolean(enabled && account), - }) + const { data: smartPools, isLoading: isVaultsLoading } = useSmartPools( + { chainId }, + Boolean(enabled && account), + ) - const vaultIds = useMemo(() => vaults?.map((el) => el.id), [vaults]) + const vaultIds = useMemo( + () => smartPools?.map((el) => el.id as ID) ?? [], + [smartPools], + ) const { data: positions, isLoading } = useSteerAccountPositions({ account, @@ -38,12 +44,12 @@ export const useSteerAccountPositionsExtended = ({ }) const data = useMemo(() => { - if (!vaults || !positions) return undefined + if (!smartPools || !positions) return undefined return positions.flatMap((position) => { if (position.steerTokenBalance <= 0n) return [] - const vault = vaults.find((vault) => vault.id === position.id) + const vault = smartPools.find((vault) => vault.id === position.id) if (!vault) return [] @@ -75,7 +81,7 @@ export const useSteerAccountPositionsExtended = ({ totalAmountUSD: token0AmountUSD + token1AmountUSD, } }) - }, [vaults, prices, positions]) + }, [smartPools, prices, positions]) return { data, diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts index 199a4c913c..d1d3be9ad8 100644 --- a/apps/web/src/middleware.ts +++ b/apps/web/src/middleware.ts @@ -1,12 +1,17 @@ import { type NextRequest, NextResponse } from 'next/server' -import { chainShortNameToChainId } from 'sushi/chain' +import { getChainInfo } from 'sushi/chain' export const config = { - matcher: ['/swap/:path*', '/pool/:path*', '/pools/:path*'], + matcher: [ + '/swap/:path*', + '/:chainId/explore/:path*', + '/:chainId/pool/:path*', + '/:chainId/positions/:path*', + '/:chainId/migrate', + '/:chainId/rewards', + ], } -const shortNameIdRegexp = new RegExp(/(\w+):0x.*?(?=(?:\/|$))/) - export async function middleware(req: NextRequest) { const { pathname, searchParams, search } = req.nextUrl if (pathname === '/swap' && search !== '') { @@ -43,33 +48,16 @@ export async function middleware(req: NextRequest) { } } - if (pathname.startsWith('/pool')) { - if (pathname === '/pool/add' && search === '') { - const url = req.nextUrl.clone() - url.search = '?fromCurrency=NATIVE' - return NextResponse.redirect(url) - } - - if (pathname === '/pool/add/v2' && search === '') { - const url = req.nextUrl.clone() - url.pathname = '/add/v2/1' - return NextResponse.redirect(url) - } - - // Matches paths that include /arb1:0x1234abcd/, starts and ends after '/' - const match = pathname.match(shortNameIdRegexp) - if (match?.length) { - const pairId = pathname.match(shortNameIdRegexp)?.[0] as string - const [chainShortName, address] = pairId.split(':') - const chainId = String(chainShortNameToChainId[chainShortName]) - - // Already rewritten / invalid chainShortName - if (chainId === 'undefined') return NextResponse.next() + const networkNameMatch = pathname.match( + /([\w-]+)(?=\/explore|\/pool|\/positions|\/rewards|\/migrate)/, + ) + if (networkNameMatch?.length) { + const { chainId, networkName } = getChainInfo(networkNameMatch[0]) + if (!chainId) return NextResponse.next() - const url = req.nextUrl.clone() - url.pathname = pathname.replace(pairId, `${chainId}:${address}`) + const url = req.nextUrl.clone() + url.pathname = pathname.replace(networkName, chainId.toString()) - return NextResponse.redirect(url) - } + return NextResponse.rewrite(url) } } diff --git a/apps/web/src/ui/analytics/furo-token-table.tsx b/apps/web/src/ui/analytics/furo-token-table.tsx deleted file mode 100644 index f980fd5ec6..0000000000 --- a/apps/web/src/ui/analytics/furo-token-table.tsx +++ /dev/null @@ -1,136 +0,0 @@ -'use client' - -import { - Badge, - Card, - CardContent, - CardHeader, - CardTitle, - Currency, - DataTable, - SkeletonText, -} from '@sushiswap/ui' -import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon' -import { ColumnDef, PaginationState, SortingState } from '@tanstack/react-table' -import React, { FC, useMemo, useState } from 'react' -import { formatNumber, formatUSD } from 'sushi/format' - -import { isFuroChainId } from 'sushi/config' -import { - FuroToken, - GetFuroTokenArgs, - useFuroTokens, -} from '../../lib/analytics/use-furo-tokens' -import { usePoolFilters } from '../pool' - -const COLUMNS: ColumnDef[] = [ - { - id: 'tokenName', - header: 'Name', - cell: ({ - row: { - original: { token }, - }, - }) => ( -
-
- - } - > - - -
-
-

{token.symbol}

-

{token.name}

-
-
- ), - meta: { - skeleton: , - }, - }, - { - id: 'liquidity', - header: 'Liquidity', - cell: (props) => { - const liquidity = formatNumber(props.row.original.liquidity) - return liquidity === 'NaN' ? '0' : liquidity - }, - meta: { - skeleton: , - }, - }, - { - id: 'liquidityUSD', - header: 'Liquidity (USD)', - accessorFn: (row) => row.liquidityUSD, - cell: (props) => { - return formatUSD(props.row.original.liquidityUSD) - }, - meta: { - skeleton: , - }, - }, -] -export const FuroTokenTable: FC = () => { - const { chainIds, tokenSymbols } = usePoolFilters() - - const [sorting, setSorting] = useState([ - { id: 'liquidityUSD', desc: true }, - ]) - const [pagination, setPagination] = useState({ - pageIndex: 0, - pageSize: 10, - }) - - const args = useMemo( - () => ({ - chainIds: chainIds.filter(isFuroChainId), - tokenSymbols, - }), - [chainIds, tokenSymbols], - ) - - const { data: furoTokens, isLoading } = useFuroTokens(args) - - const data = useMemo(() => furoTokens || [], [furoTokens]) - - return ( - - - - Tokens{' '} - {furoTokens?.length ? ( - - ({furoTokens?.length}) - - ) : null} - - - - - - - ) -} diff --git a/apps/web/src/ui/analytics/global-stats-charts.tsx b/apps/web/src/ui/analytics/global-stats-charts.tsx deleted file mode 100644 index 2900057515..0000000000 --- a/apps/web/src/ui/analytics/global-stats-charts.tsx +++ /dev/null @@ -1,154 +0,0 @@ -'use client' - -import { FC, useCallback, useState } from 'react' -import useSWR from 'swr' - -import { PlusCircleIcon } from '@heroicons/react/20/solid' -import { - Button, - Card, - CardHeader, - Chip, - Command, - CommandGroup, - CommandItem, - Popover, - PopoverContent, - PopoverTrigger, - Separator, -} from '@sushiswap/ui' -import { CheckIcon } from '@sushiswap/ui/icons/CheckIcon' -import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon' -import { Chain, ChainId } from 'sushi/chain' -import { ANALYTICS_CHAIN_IDS } from '../../config' -import { TVLChart } from './tvl-chart' -import { VolumeChart } from './volume-chart' - -const isAllThenNone = (chainIds: number[]) => - ANALYTICS_CHAIN_IDS.length === chainIds.length ? [] : chainIds - -const fetcher = ({ url, chainIds }: { url: string; chainIds: ChainId[] }) => { - const _url = new URL(url, window.location.origin) - _url.searchParams.set( - 'networks', - JSON.stringify(chainIds.length > 0 ? chainIds : ANALYTICS_CHAIN_IDS), - ) - - return fetch(_url.href) - .then((res) => res.json()) - .catch((e) => console.log(JSON.stringify(e))) -} - -export const GlobalStatsCharts: FC = () => { - const [open, setOpen] = useState(false) - const [localValue, setValues] = useState( - isAllThenNone(ANALYTICS_CHAIN_IDS), - ) - const { data } = useSWR( - { url: '/analytics/api/charts', chainIds: localValue }, - fetcher, - ) - - const onClick = useCallback( - (chainId: ChainId) => { - let _newValues: number[] - if (localValue.includes(chainId)) { - _newValues = localValue.filter((el) => el !== chainId) - } else { - _newValues = [...(localValue ?? []), chainId] - } - setValues(_newValues) - }, - [localValue], - ) - - return ( -
- - -
- Filter by - - - - - - - - {ANALYTICS_CHAIN_IDS.map((chainId) => ( - - onClick(+currentValue as ChainId) - } - className="py-2 pl-8 pr-2" - > - {localValue.includes(chainId) ? ( - - - - ) : null} - - {Chain.from(chainId)?.name} - - ))} - - - - -
-
-
- - -
-
-
- ) -} diff --git a/apps/web/src/ui/analytics/token-page-header.tsx b/apps/web/src/ui/analytics/token-page-header.tsx deleted file mode 100644 index 23f67ee4c6..0000000000 --- a/apps/web/src/ui/analytics/token-page-header.tsx +++ /dev/null @@ -1,59 +0,0 @@ -// 'use client' - -// import { Bundle, Token as GraphToken } from '@sushiswap/graph-client' -// import { Button } from '@sushiswap/ui' -// import { Chip } from '@sushiswap/ui' -// import { Currency } from '@sushiswap/ui' -// import { useRouter } from 'next/router' -// import { FC } from 'react' -// import { formatUSD } from 'sushi/format' -// import useSWR from 'swr' -// import { getAddress } from 'viem' - -// import { useTokenFromToken } from '../../lib/hooks/useTokenFromToken' - -// interface TokenHeader { -// token: GraphToken -// } -// export const TokenHeader: FC = ({ token }) => { -// const router = useRouter() -// const _token = useTokenFromToken(token) -// const { data: bundles } = useSWR('/analytics/api/bundles', (url) => -// fetch(url).then((response) => response.json()), -// ) - -// const price = formatUSD( -// token.derivedETH * bundles?.[token.chainId]?.ethPrice, -// ) - -// return ( -//
-//
-//
-//
-// -//
-// -// {_token.name} -// -// {_token.symbol} -//
-// -// {price.includes('NaN') ? '$0.00' : price} -// -//
-// -//
-// ) -// } diff --git a/apps/web/src/ui/analytics/token-page-information.tsx b/apps/web/src/ui/analytics/token-page-information.tsx deleted file mode 100644 index b092859fd6..0000000000 --- a/apps/web/src/ui/analytics/token-page-information.tsx +++ /dev/null @@ -1,89 +0,0 @@ -// 'use client' - -// import { ExternalLinkIcon } from '@heroicons/react-v1/solid' -// import { Token as GraphToken } from '@sushiswap/graph-client' -// import { ClipboardController, LinkExternal } from '@sushiswap/ui' -// import { Currency } from '@sushiswap/ui' -// import { -// Table, -// TableBody, -// TableCell, -// TableHead, -// TableHeader, -// TableRow, -// } from '@sushiswap/ui' -// import { FC } from 'react' -// import { Chain } from 'sushi/chain' -// import { shortenAddress } from 'sushi/format' - -// import { useTokenFromToken } from '../../lib/hooks/useTokenFromToken' - -// interface TokenInformation { -// token: GraphToken -// } - -// export const TokenInformation: FC = ({ token }) => { -// const _token = useTokenFromToken(token) -// const chain = Chain.from(_token.chainId) as Chain - -// return ( -//
-//

Token Information

-// -// -// -//
Symbol
-//
-// -//
Name
-//
-// -//
Address
-//
-// -//
Action
-//
-//
-// -// -// -//

-// {_token.symbol} -//

-//
-// -//
-// -//

-// {_token.name} -//

-//
-//
-// -// -// {({ setCopied }) => ( -// setCopied(_token.wrapped.address)} -// onKeyDown={() => setCopied(_token.wrapped.address)} -// className="text-sm font-medium" -// > -// {shortenAddress(_token.wrapped.address)} -// -// )} -// -// -// -// -//

View

-// -//
-//
-//
-//
-//
-//
-// ) -// } diff --git a/apps/web/src/ui/analytics/token-page-pairs.tsx b/apps/web/src/ui/analytics/token-page-pairs.tsx deleted file mode 100644 index 1852a9db27..0000000000 --- a/apps/web/src/ui/analytics/token-page-pairs.tsx +++ /dev/null @@ -1,140 +0,0 @@ -// 'use client' - -// import { usePools } from '@sushiswap/client/hooks' -// import { Token as GraphToken } from '@sushiswap/graph-client' -// import { LinkExternal, LinkInternal } from '@sushiswap/ui' -// import { Currency } from '@sushiswap/ui' -// import { -// Table, -// TableBody, -// TableCell, -// TableHead, -// TableHeader, -// TableRow, -// } from '@sushiswap/ui' -// import React, { FC } from 'react' -// import chains from 'sushi/chain' -// import { Native, Token } from 'sushi/currency' -// import { formatPercent, formatUSD } from 'sushi/format' -// import { useSWRConfig } from 'swr' - -// interface TokenPairs { -// token: GraphToken -// } - -// export const TokenPairs: FC = ({ token }) => { -// const { data: pools } = usePools({ -// args: { ids: [...token.pairBase.map(({ pair }) => pair.id), ...token.pairQuote.map(({ pair }) => pair.id)] }, -// swrConfig: useSWRConfig(), -// }) - -// return ( -//
-//

Trending Pairs

-// -// -// -//
Name
-//
-// -//
TVL
-//
-// -//
Volume (7d)
-//
-// -//
APY
-//
-//
-// -// {pools && -// token.pairs.map(({ pair }, i) => { -// const _pool = pools.find((pool) => pool.id === pair.id) - -// const [token0, token1] = [ -// pair.token0.id === Native.onChain(token.chainId).wrapped.address -// ? Native.onChain(token.chainId) -// : new Token({ -// address: pair.token0.id, -// chainId: pair.chainId, -// decimals: Number(pair.token0.decimals), -// symbol: pair.token0.symbol, -// }), -// pair.token1.id === Native.onChain(token.chainId).wrapped.address -// ? Native.onChain(token.chainId) -// : new Token({ -// address: pair.token1.id, -// chainId: pair.chainId, -// decimals: Number(pair.token1.decimals), -// symbol: pair.token1.symbol, -// }), -// ] - -// const liquidityUSD = formatUSD(pair.liquidityUSD) -// const volume1w = formatUSD(pair.volume1w) - -// return ( -// -// -// -//
-// -// -// -// -// -//

-// {token0.symbol}{' '} -// /{' '} -// {token1.symbol} -//

-//
-//
-//
-//
-// -// -//

-// {liquidityUSD.includes('NaN') ? '$0.00' : liquidityUSD} -//

-//
-//
-// -// -//

-// {volume1w.includes('NaN') ? '$0.00' : volume1w} -//

-//
-//
-// -// -//

-// {formatPercent(pair.feeApr)}{' '} -// {/*{pool && pool.incentives.length > 0 && pool.incentiveApr > 0 && (*/} -// {/* */} -// {/*)}*/} -//

-//
-//
-//
-// ) -// })} -//
-//
-//
-// ) -// } diff --git a/apps/web/src/ui/analytics/token-page-stats.tsx b/apps/web/src/ui/analytics/token-page-stats.tsx deleted file mode 100644 index 38228a739a..0000000000 --- a/apps/web/src/ui/analytics/token-page-stats.tsx +++ /dev/null @@ -1,42 +0,0 @@ -// import { Token as GraphToken } from '@sushiswap/graph-client' -// import { FC } from 'react' -// import { formatUSD } from 'sushi/format' - -// interface TokenStatsProps { -// token: GraphToken -// } - -// export const TokenStats: FC = ({ token }) => { -// const tvl = formatUSD(token.liquidityUSD) -// const volume = formatUSD(token.volumeUSD) -// const fees = formatUSD(token.feesUSD) - -// return ( -//
-//
-//

Liquidity

-//

-// {tvl.includes('NaN') ? '$0.00' : tvl} -//

-//
-//
-//

Volume

-//

-// {volume.includes('NaN') ? '$0.00' : volume} -//

-//
-//
-//

Fees

-//

-// {fees.includes('NaN') ? '$0.00' : fees} -//

-//
-//
-//

Market Cap

-//

-// {fees.includes('NaN') ? '$0.00' : fees} -//

-//
-//
-// ) -// } diff --git a/apps/web/src/ui/analytics/token-table.tsx b/apps/web/src/ui/analytics/token-table.tsx deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/web/src/ui/analytics/tvl-chart.tsx b/apps/web/src/ui/analytics/tvl-chart.tsx deleted file mode 100644 index c48ca756b4..0000000000 --- a/apps/web/src/ui/analytics/tvl-chart.tsx +++ /dev/null @@ -1,276 +0,0 @@ -'use client' - -import { - CardContent, - CardDescription, - CardHeader, - CardTitle, - SkeletonBox, - SkeletonText, - Toggle, - classNames, -} from '@sushiswap/ui' -import format from 'date-fns/format' -import { FC, useCallback, useMemo, useState } from 'react' -import { formatUSD } from 'sushi/format' -import tailwindConfig from 'tailwind.config.js' -import resolveConfig from 'tailwindcss/resolveConfig' - -import ReactEchartsCore from 'echarts-for-react' -import { EChartsOption } from 'echarts-for-react/lib/types' -import 'echarts/lib/chart/bar' -import 'echarts/lib/chart/line' -import 'echarts/lib/component/tooltip' -import 'echarts/lib/component/visualMap' -import echarts from 'echarts/lib/echarts' -import 'echarts/lib/visual/seriesColor' - -const tailwind = resolveConfig(tailwindConfig) - -enum TvlChartPeriod { - Day = 0, - Week = 1, - Month = 2, - Year = 3, - All = 4, -} - -const chartTimespans: Record = { - [TvlChartPeriod.Day]: 86400 * 1000, - [TvlChartPeriod.Week]: 604800 * 1000, - [TvlChartPeriod.Month]: 2629746 * 1000, - [TvlChartPeriod.Year]: 31556952 * 1000, - [TvlChartPeriod.All]: Infinity, -} - -export const TVLChart: FC<{ x: number[]; y: number[] }> = ({ x, y }) => { - const [chartPeriod, setChartPeriod] = useState( - TvlChartPeriod.Month, - ) - - const [xData, yData] = useMemo(() => { - const currentDate = Math.round(Date.now()) - const predicates = x?.map( - (x) => x * 1000 >= currentDate - chartTimespans[chartPeriod], - ) - return [ - x?.filter((_x, i) => predicates[i]).reverse(), - y?.filter((_y, i) => predicates[i]).reverse(), - ] - }, [chartPeriod, x, y]) - - // Transient update for performance - const onMouseOver = useCallback( - ({ name, value }: { name: number; value: number }) => { - const valueNodes = document.getElementsByClassName('hoveredItemValueTVL') - const nameNodes = document.getElementsByClassName('hoveredItemNameTVL') - - valueNodes[0].innerHTML = formatUSD(value) - nameNodes[0].innerHTML = format( - new Date(name * 1000), - 'dd MMM yyyy HH:mm', - ) - }, - [], - ) - - const DEFAULT_OPTION: EChartsOption = useMemo( - () => ({ - tooltip: { - trigger: 'axis', - extraCssText: 'z-index: 1000', - responsive: true, - // @ts-ignore - backgroundColor: tailwind.theme.colors.slate['700'], - textStyle: { - // @ts-ignore - color: tailwind.theme.colors.slate['50'], - fontSize: 12, - fontWeight: 600, - }, - axisPointer: { - lineStyle: { - type: 'dashed', - }, - }, - formatter: (params: any) => { - onMouseOver({ name: params[0].name, value: params[0].value }) - - const date = new Date(Number(params[0].name * 1000)) - return `
- ${formatUSD( - params[0].value, - )} - ${ - date instanceof Date && !Number.isNaN(date?.getTime()) - ? format(date, 'dd MMM yyyy HH:mm') - : '' - } -
` - }, - borderWidth: 0, - }, - toolbox: { - show: false, - }, - grid: { - top: 0, - left: 0, - right: 0, - bottom: 0, - }, - dataZoom: { - show: false, - start: 0, - end: 100, - }, - visualMap: { - show: false, - // @ts-ignore - color: [tailwind.theme.colors.blue['500']], - }, - xAxis: [ - { - show: false, - type: 'category', - boundaryGap: true, - data: xData, - }, - ], - yAxis: [ - { - show: false, - type: 'value', - scale: true, - name: 'Volume', - max: 'dataMax', - min: 'dataMin', - }, - ], - series: [ - { - name: 'Volume', - type: 'line', - xAxisIndex: 0, - yAxisIndex: 0, - itemStyle: { - color: 'blue', - normal: { - barBorderRadius: 2, - }, - }, - areaStyle: { - // @ts-ignore - color: tailwind.theme.colors.blue['500'], - }, - animationEasing: 'elasticOut', - animationDelayUpdate: (idx: number) => idx * 2, - data: yData, - }, - ], - }), - [onMouseOver, xData, yData], - ) - - return ( -
- - - Total value locked (TVL){' '} -
- setChartPeriod(TvlChartPeriod.Week)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.Week - ? 'text-blue' - : 'text-slate-500', - )} - > - 1W - - setChartPeriod(TvlChartPeriod.Month)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.Month - ? 'text-blue' - : 'text-slate-500', - )} - > - 1M - - setChartPeriod(TvlChartPeriod.Year)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.Year - ? 'text-blue' - : 'text-slate-500', - )} - > - 1Y - - setChartPeriod(TvlChartPeriod.All)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.All - ? 'text-blue' - : 'text-slate-500', - )} - > - ALL - -
-
-
- - - {yData?.length ? ( - - {formatUSD(yData[yData.length - 1])} - - ) : ( - - )} - - - {xData?.length ? ( -
- {format( - new Date(xData[xData.length - 1] * 1000), - 'dd MMM yyyy HH:mm', - )} -
- ) : ( - - )} -
-
- - {xData ? ( - - ) : ( - - )} - -
- ) -} diff --git a/apps/web/src/ui/analytics/volume-chart.tsx b/apps/web/src/ui/analytics/volume-chart.tsx deleted file mode 100644 index aafa38856c..0000000000 --- a/apps/web/src/ui/analytics/volume-chart.tsx +++ /dev/null @@ -1,268 +0,0 @@ -'use client' - -import { - CardContent, - CardDescription, - CardHeader, - CardTitle, - SkeletonBox, - SkeletonText, - Toggle, - classNames, -} from '@sushiswap/ui' -import format from 'date-fns/format' -import ReactECharts from 'echarts-for-react' -import { EChartsOption } from 'echarts-for-react/lib/types' -import { FC, useCallback, useMemo, useState } from 'react' -import { formatUSD } from 'sushi/format' -import tailwindConfig from 'tailwind.config.js' -import resolveConfig from 'tailwindcss/resolveConfig' - -const tailwind = resolveConfig(tailwindConfig) - -enum TvlChartPeriod { - Day = 0, - Week = 1, - Month = 2, - Year = 3, - All = 4, -} - -const chartTimespans: Record = { - [TvlChartPeriod.Day]: 86400 * 1000, - [TvlChartPeriod.Week]: 604800 * 1000, - [TvlChartPeriod.Month]: 2629746 * 1000, - [TvlChartPeriod.Year]: 31556952 * 1000, - [TvlChartPeriod.All]: Infinity, -} - -export const VolumeChart: FC<{ x: number[]; y: number[] }> = ({ x, y }) => { - const [chartPeriod, setChartPeriod] = useState( - TvlChartPeriod.Month, - ) - - const [xData, yData] = useMemo(() => { - const currentDate = Math.round(Date.now()) - const predicates = x?.map( - (x) => x * 1000 >= currentDate - chartTimespans[chartPeriod], - ) - return [ - x?.filter((_x, i) => predicates[i]).reverse(), - y?.filter((_y, i) => predicates[i]).reverse(), - ] - }, [chartPeriod, x, y]) - - // Transient update for performance - const onMouseOver = useCallback( - ({ name, value }: { name: number; value: number }) => { - const valueNodes = document.getElementsByClassName( - 'hoveredItemValueVolume', - ) - const nameNodes = document.getElementsByClassName('hoveredItemNameVolume') - - valueNodes[0].innerHTML = formatUSD(value) - nameNodes[0].innerHTML = format( - new Date(name * 1000), - 'dd MMM yyyy HH:mm', - ) - }, - [], - ) - - const DEFAULT_OPTION: EChartsOption = useMemo( - () => ({ - tooltip: { - trigger: 'axis', - extraCssText: 'z-index: 1000', - responsive: true, - // @ts-ignore - backgroundColor: tailwind.theme.colors.slate['700'], - textStyle: { - // @ts-ignore - color: tailwind.theme.colors.slate['50'], - fontSize: 12, - fontWeight: 600, - }, - axisPointer: { - lineStyle: { - type: 'dashed', - }, - }, - formatter: (params: any) => { - onMouseOver({ name: params[0].name, value: params[0].value }) - - const date = new Date(Number(params[0].name * 1000)) - return `
- ${formatUSD( - params[0].value, - )} - ${ - date instanceof Date && !Number.isNaN(date?.getTime()) - ? format(date, 'dd MMM yyyy HH:mm') - : '' - } -
` - }, - borderWidth: 0, - }, - toolbox: { - show: false, - }, - grid: { - top: 0, - left: 0, - right: 0, - bottom: 0, - }, - dataZoom: { - show: false, - start: 0, - end: 100, - }, - visualMap: { - show: false, - // @ts-ignore - color: [tailwind.theme.colors.blue['500']], - }, - xAxis: [ - { - show: false, - type: 'category', - boundaryGap: true, - data: xData, - }, - ], - yAxis: [ - { - show: false, - type: 'value', - scale: true, - name: 'Volume', - max: 'dataMax', - min: 'dataMin', - }, - ], - series: [ - { - name: 'Volume', - type: 'bar', - xAxisIndex: 0, - yAxisIndex: 0, - barWidth: '70%', - itemStyle: { - color: 'blue', - normal: { - barBorderRadius: 2, - }, - }, - areaStyle: { - // @ts-ignore - color: tailwind.theme.colors.blue['500'], - }, - animationEasing: 'elasticOut', - animationDelayUpdate: (idx: number) => idx * 2, - data: yData, - }, - ], - }), - [onMouseOver, xData, yData], - ) - - return ( -
- - - Volume -
- setChartPeriod(TvlChartPeriod.Week)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.Week - ? 'text-blue' - : 'text-slate-500', - )} - > - 1W - - setChartPeriod(TvlChartPeriod.Month)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.Month - ? 'text-blue' - : 'text-slate-500', - )} - > - 1M - - setChartPeriod(TvlChartPeriod.Year)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.Year - ? 'text-blue' - : 'text-slate-500', - )} - > - 1Y - - setChartPeriod(TvlChartPeriod.All)} - className={classNames( - 'font-semibold text-sm', - chartPeriod === TvlChartPeriod.All - ? 'text-blue' - : 'text-slate-500', - )} - > - ALL - -
-
-
- - - {yData?.length ? ( - - {formatUSD(yData[yData.length - 1])} - - ) : ( - - )} - - - {xData?.length ? ( -
- {format( - new Date(xData[xData.length - 1] * 1000), - 'dd MMM yyyy HH:mm', - )} -
- ) : ( - - )} -
-
- - {xData ? ( - - ) : ( - - )} - -
- ) -} diff --git a/apps/web/src/ui/explore/global-stats-charts.tsx b/apps/web/src/ui/explore/global-stats-charts.tsx new file mode 100644 index 0000000000..3314a9800e --- /dev/null +++ b/apps/web/src/ui/explore/global-stats-charts.tsx @@ -0,0 +1,37 @@ +import { getAnalyticsDayBuckets } from '@sushiswap/graph-client/data-api' +import { unstable_cache } from 'next/cache' +import { FC, Suspense } from 'react' +import { ChainId } from 'sushi/chain' +import { GlobalStatsLoading } from './global-stats-loading' +import { TVLChart } from './tvl-chart' +import { VolumeChart } from './volume-chart' + +export const GlobalStatsCharts: FC<{ chainId: ChainId }> = ({ chainId }) => { + return ( + }> + <_GlobalStatsCharts chainId={chainId} /> + + ) +} + +const _GlobalStatsCharts: FC<{ chainId: ChainId }> = async ({ chainId }) => { + const dayBuckets = await unstable_cache( + async () => + getAnalyticsDayBuckets({ + chainId, + }), + ['dayBuckets', `${chainId}`], + { + revalidate: 60 * 15, + }, + )() + + return !dayBuckets.v2.length && !dayBuckets.v3.length ? ( + + ) : ( +
+ + +
+ ) +} diff --git a/apps/web/src/ui/explore/global-stats-loading.tsx b/apps/web/src/ui/explore/global-stats-loading.tsx new file mode 100644 index 0000000000..aa58d40ca1 --- /dev/null +++ b/apps/web/src/ui/explore/global-stats-loading.tsx @@ -0,0 +1,24 @@ +import { SkeletonChart, SkeletonText } from '@sushiswap/ui' + +export const GlobalStatsLoading = () => { + return ( +
+
+
+ TVL + + +
+ +
+
+
+ Volume + + +
+ +
+
+ ) +} diff --git a/apps/web/src/ui/explore/tvl-chart.tsx b/apps/web/src/ui/explore/tvl-chart.tsx new file mode 100644 index 0000000000..c6ac7ea006 --- /dev/null +++ b/apps/web/src/ui/explore/tvl-chart.tsx @@ -0,0 +1,220 @@ +'use client' + +import { AnalyticsDayBuckets } from '@sushiswap/graph-client/data-api' +import format from 'date-fns/format' +import ReactEcharts from 'echarts-for-react' +import { EChartsOption } from 'echarts-for-react/lib/types' +import echarts from 'echarts/lib/echarts' +import { useTheme } from 'next-themes' +import { FC, useCallback, useMemo } from 'react' +import { formatUSD } from 'sushi/format' + +export const TVLChart: FC<{ data: AnalyticsDayBuckets }> = ({ data }) => { + const { resolvedTheme } = useTheme() + + const [v2, v3, combinedTVL, currentDate] = useMemo(() => { + const xData = (data.v2.length > data.v3.length ? data.v2 : data.v3).map( + (data) => data.date * 1000, + ) + + const v2 = xData + .map((xData, i) => [xData, data.v2[i]?.liquidityUSD ?? 0]) + .reverse() + const v3 = xData + .map((xData, i) => [xData, data.v3[i]?.liquidityUSD ?? 0]) + .reverse() + const combinedTVL = v2[v2.length - 1][1] + v3[v3.length - 1][1] + + const currentDate = xData[0] + + return [v2, v3, combinedTVL, currentDate] + }, [data]) + + const zIndex = useMemo(() => { + const v2Sum = v2.reduce((sum, [_, value]) => sum + value, 0) + const v3Sum = v3.reduce((sum, [_, value]) => sum + value, 0) + + if (v2Sum < v3Sum) { + return { v2: 2, v3: 1 } + } else { + return { v2: 1, v3: 2 } + } + }, [v2, v3]) + + const onMouseOver = useCallback((params: { data: number[] }[]) => { + const tvlNode = document.getElementById('hoveredTVL') + const v2TVLNode = document.getElementById('hoveredV2TVL') + const v3TVLNode = document.getElementById('hoveredV3TVL') + const dateNode = document.getElementById('hoveredTVLDate') + + if (tvlNode) + tvlNode.innerHTML = formatUSD(params[0].data[1] + params[1].data[1]) + if (dateNode) + dateNode.innerHTML = format( + new Date(params[0].data[0]), + 'dd MMM yyyy HH:mm aa', + ) + if (v2TVLNode) + v2TVLNode.innerHTML = params[0].data[1] + ? formatUSD(params[0].data[1]) + : 'v2' + if (v3TVLNode) + v3TVLNode.innerHTML = params[1].data[1] + ? formatUSD(params[1].data[1]) + : 'v3' + }, []) + + const onMouseLeave = useCallback(() => { + const tvlNode = document.getElementById('hoveredTVL') + const v2TVLNode = document.getElementById('hoveredV2TVL') + const v3TVLNode = document.getElementById('hoveredV3TVL') + const dateNode = document.getElementById('hoveredTVLDate') + + if (tvlNode) tvlNode.innerHTML = formatUSD(combinedTVL) + if (dateNode) + dateNode.innerHTML = format(new Date(currentDate), 'dd MMM yyyy HH:mm aa') + if (v2TVLNode) v2TVLNode.innerHTML = 'v2' + if (v3TVLNode) v3TVLNode.innerHTML = 'v3' + }, [combinedTVL, currentDate]) + + const DEFAULT_OPTION: EChartsOption = useMemo( + () => ({ + tooltip: { + trigger: 'axis', + formatter: onMouseOver, + }, + color: ['#3B7EF6', '#A755DD'], + grid: { + top: 0, + left: 0, + right: 0, + }, + xAxis: [ + { + type: 'time', + splitLine: { + show: false, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLabel: { + hideOverlap: true, + showMinLabel: true, + showMaxLabel: true, + color: resolvedTheme === 'dark' ? 'white' : 'black', + formatter: (value: number, index: number) => { + const date = new Date(value) + const label = `${date.toLocaleString('en-US', { + month: 'short', + })} ${date.getDate()}\n${date.getFullYear()}` + + return index === 0 + ? `{min|${label}}` + : value > v2?.[v2.length - 2]?.[0] + ? `{max|${label}}` + : label + }, + padding: [0, 10, 0, 10], + rich: { + min: { + padding: [0, 10, 0, 50], + }, + max: { + padding: [0, 50, 0, 10], + }, + }, + }, + }, + ], + yAxis: [ + { + show: false, + }, + ], + series: [ + { + name: 'v2', + type: 'line', + stack: 'v2', + smooth: true, + lineStyle: { + width: 0, + }, + showSymbol: false, + areaStyle: { + color: '#3B7EF6', + opacity: 1, + }, + data: v2, + z: zIndex.v2, + }, + { + name: 'v3', + type: 'line', + stack: 'v3', + smooth: true, + lineStyle: { + width: 0, + }, + showSymbol: false, + areaStyle: { + color: '#A755DD', + opacity: 1, + }, + data: v3, + z: zIndex.v3, + }, + ], + }), + [onMouseOver, v2, v3, zIndex, resolvedTheme], + ) + + return ( +
+
+ TVL +
+
+
+ {formatUSD(combinedTVL)} +
+
+
+ {format(new Date(currentDate), 'MMM dd yyyy HH:mm aa')} +
+
+
+
+
+ + v2 + + +
+
+ + v3 + + +
+
+
+
+ +
+ ) +} diff --git a/apps/web/src/ui/explore/volume-chart.tsx b/apps/web/src/ui/explore/volume-chart.tsx new file mode 100644 index 0000000000..2af22b3ed1 --- /dev/null +++ b/apps/web/src/ui/explore/volume-chart.tsx @@ -0,0 +1,186 @@ +'use client' + +import { AnalyticsDayBuckets } from '@sushiswap/graph-client/data-api' +import format from 'date-fns/format' +import ReactECharts from 'echarts-for-react' +import { EChartsOption } from 'echarts-for-react/lib/types' +import echarts from 'echarts/lib/echarts' +import { useTheme } from 'next-themes' +import { FC, useCallback, useMemo } from 'react' +import { formatUSD } from 'sushi/format' + +export const VolumeChart: FC<{ data: AnalyticsDayBuckets }> = ({ data }) => { + const { resolvedTheme } = useTheme() + + const [v2, v3, totalVolume] = useMemo(() => { + const xData = (data.v2.length > data.v3.length ? data.v2 : data.v3) + .slice(0, 30) + .map((data) => data.date * 1000) + + const v2 = xData + .map((xData, i) => [xData, data.v2[i]?.volumeUSD ?? 0]) + .reverse() + const v3 = xData + .map((xData, i) => [xData, data.v3[i]?.volumeUSD ?? 0]) + .reverse() + const totalVolume = xData.reduce( + (sum, _, i) => sum + v2[i][1] + v3[i][1], + 0, + ) + + return [v2, v3, totalVolume] + }, [data]) + + const onMouseOver = useCallback((params: { data: number[] }[]) => { + const volumeNode = document.getElementById('hoveredVolume') + const v2VolumeNode = document.getElementById('hoveredV2Volume') + const v3VolumeNode = document.getElementById('hoveredV3Volume') + const dateNode = document.getElementById('hoveredVolumeDate') + + if (volumeNode) + volumeNode.innerHTML = formatUSD(params[0].data[1] + params[1].data[1]) + if (dateNode) + dateNode.innerHTML = format( + new Date(params[0].data[0]), + 'dd MMM yyyy HH:mm aa', + ) + if (v2VolumeNode) + v2VolumeNode.innerHTML = params[0].data[1] + ? formatUSD(params[0].data[1]) + : 'v2' + if (v3VolumeNode) + v3VolumeNode.innerHTML = params[1].data[1] + ? formatUSD(params[1].data[1]) + : 'v3' + }, []) + + const onMouseLeave = useCallback(() => { + const volumeNode = document.getElementById('hoveredVolume') + const v2VolumeNode = document.getElementById('hoveredV2Volume') + const v3VolumeNode = document.getElementById('hoveredV3Volume') + const dateNode = document.getElementById('hoveredVolumeDate') + + if (volumeNode) volumeNode.innerHTML = formatUSD(totalVolume) + if (dateNode) dateNode.innerHTML = 'Past month' + if (v2VolumeNode) v2VolumeNode.innerHTML = 'v2' + if (v3VolumeNode) v3VolumeNode.innerHTML = 'v3' + }, [totalVolume]) + + const DEFAULT_OPTION: EChartsOption = useMemo( + () => ({ + tooltip: { + trigger: 'axis', + formatter: onMouseOver, + }, + grid: { + top: 0, + left: 0, + right: 0, + }, + xAxis: [ + { + type: 'time', + splitLine: { + show: false, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLabel: { + hideOverlap: true, + showMinLabel: true, + showMaxLabel: true, + color: resolvedTheme === 'dark' ? 'white' : 'black', + formatter: (value: number, index: number) => { + const label = format(new Date(value), 'MMM d') + return index === 0 + ? `{min|${label}}` + : value > v2?.[v2.length - 2]?.[0] + ? `{max|${label}}` + : label + }, + padding: [0, 10, 0, 10], + rich: { + min: { + padding: [0, 10, 0, 50], + }, + max: { + padding: [0, 50, 0, 10], + }, + }, + }, + }, + ], + yAxis: [ + { + show: false, + }, + ], + series: [ + { + name: 'v2', + type: 'bar', + stack: 'a', + data: v2, + itemStyle: { color: '#3B7EF6', barBorderRadius: [0, 0, 2, 2] }, + }, + { + name: 'v3', + type: 'bar', + stack: 'a', + data: v3, + itemStyle: { color: '#A755DD', barBorderRadius: [2, 2, 0, 0] }, + }, + ], + }), + [onMouseOver, resolvedTheme, v2, v3], + ) + + return ( +
+
+ Volume +
+
+
+ {formatUSD(totalVolume)} +
+
+
+ Past month +
+
+
+
+
+ + v2 + + +
+
+ + v3 + + +
+
+
+
+ +
+ ) +} diff --git a/apps/web/src/ui/pool/AddSectionLegacy.tsx b/apps/web/src/ui/pool/AddSectionLegacy.tsx index 72033ad0d3..e045d876bf 100644 --- a/apps/web/src/ui/pool/AddSectionLegacy.tsx +++ b/apps/web/src/ui/pool/AddSectionLegacy.tsx @@ -1,6 +1,5 @@ 'use client' -import { Pool } from '@sushiswap/client' import { useIsMounted } from '@sushiswap/hooks' import { Button } from '@sushiswap/ui' import { FC, useCallback, useMemo, useState } from 'react' @@ -10,6 +9,7 @@ import { SushiSwapV2ChainId } from 'sushi/config' import { tryParseAmount } from 'sushi/currency' import { useTokensFromPool } from '../../lib/hooks' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { getSushiSwapRouterContractConfig } from 'src/lib/wagmi/hooks/contracts/useSushiSwapRouter' import { SushiSwapV2PoolState, @@ -20,7 +20,7 @@ import { CheckerProvider } from 'src/lib/wagmi/systems/Checker/Provider' import { AddSectionReviewModalLegacy } from './AddSectionReviewModalLegacy' import { AddSectionWidget } from './AddSectionWidget' -export const AddSectionLegacy: FC<{ pool: Pool }> = ({ pool: _pool }) => { +export const AddSectionLegacy: FC<{ pool: V2Pool }> = ({ pool: _pool }) => { const chainId = _pool.chainId as SushiSwapV2ChainId const isMounted = useIsMounted() const { token0, token1 } = useTokensFromPool(_pool) diff --git a/apps/web/src/ui/pool/AddSectionMyPosition.tsx b/apps/web/src/ui/pool/AddSectionMyPosition.tsx index b4c07155b3..1dfde2befd 100644 --- a/apps/web/src/ui/pool/AddSectionMyPosition.tsx +++ b/apps/web/src/ui/pool/AddSectionMyPosition.tsx @@ -1,4 +1,3 @@ -import { Pool } from '@sushiswap/client' import { classNames } from '@sushiswap/ui' import { Currency as UICurrency } from '@sushiswap/ui' import React, { FC } from 'react' @@ -6,10 +5,11 @@ import { incentiveRewardToToken } from 'src/lib/functions' import { ChainId } from 'sushi/chain' import { formatPercent } from 'sushi/format' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { AddSectionMyPositionStaked } from './AddSectionMyPositionStaked' import { AddSectionMyPositionUnstaked } from './AddSectionMyPositionUnstaked' -export const AddSectionMyPosition: FC<{ pool: Pool }> = ({ pool }) => { +export const AddSectionMyPosition: FC<{ pool: V2Pool }> = ({ pool }) => { return (
diff --git a/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx b/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx index d5ead893fb..ea8059cd43 100644 --- a/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx +++ b/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx @@ -35,6 +35,7 @@ import { } from 'src/lib/wagmi/hooks/utils/hooks/useTransactionDeadline' import { useApproved } from 'src/lib/wagmi/systems/Checker/Provider' import { gasMargin, slippageAmount } from 'sushi/calculate' +import { ChainKey } from 'sushi/chain' import { SushiSwapV2ChainId } from 'sushi/config' import { BentoBoxChainId } from 'sushi/config' import { Amount, Type } from 'sushi/currency' @@ -496,7 +497,7 @@ export const AddSectionReviewModalLegacy: FC = testId="incentivize-confirmation-modal" successMessage="Successfully added liquidity" buttonText="Go to pool" - buttonLink={`/pools/${chainId}:${poolAddress}`} + buttonLink={`/${ChainKey[chainId]}/pools/v2/${poolAddress}`} txHash={data} /> diff --git a/apps/web/src/ui/pool/AddSectionStake.tsx b/apps/web/src/ui/pool/AddSectionStake.tsx index 3de1f9a94d..e0e4e9895e 100644 --- a/apps/web/src/ui/pool/AddSectionStake.tsx +++ b/apps/web/src/ui/pool/AddSectionStake.tsx @@ -1,18 +1,15 @@ 'use client' -import { ChefType, Pool } from '@sushiswap/client' -import { usePool } from '@sushiswap/client/hooks' import { useIsMounted } from '@sushiswap/hooks' -import { Button } from '@sushiswap/ui' -import { Dots } from '@sushiswap/ui' +import { Button, Dots } from '@sushiswap/ui' import { FC, useMemo, useState } from 'react' import { APPROVE_TAG_STAKE } from 'src/lib/constants' -import { useGraphPool } from 'src/lib/hooks' +import { useV2Pool } from 'src/lib/hooks' import { ChainId } from 'sushi/chain' import { tryParseAmount } from 'sushi/currency' import { ZERO } from 'sushi/math' -import { useSWRConfig } from 'swr' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { getMasterChefContractConfig } from 'src/lib/wagmi/hooks/master-chef/use-master-chef-contract' import { useMasterChefDeposit } from 'src/lib/wagmi/hooks/master-chef/use-master-chef-deposit' import { Checker } from 'src/lib/wagmi/systems/Checker' @@ -20,22 +17,21 @@ import { useApproved, withCheckerRoot, } from 'src/lib/wagmi/systems/Checker/Provider' +import { ChefType } from 'sushi' import { AddSectionStakeWidget } from './AddSectionStakeWidget' interface AddSectionStakeProps { - pool: Pool + pool: V2Pool chefType: ChefType title?: string farmId: number } -export const AddSectionStake: FC<{ poolId: string; title?: string }> = ({ - poolId, - title, -}) => { +export const AddSectionStake: FC<{ + pool: V2Pool + title?: string +}> = ({ pool, title }) => { const isMounted = useIsMounted() - const { data: pool } = usePool({ args: poolId, swrConfig: useSWRConfig() }) - if (!pool) return <> if (!pool?.incentives || pool.incentives.length === 0 || !isMounted) @@ -57,7 +53,7 @@ const _AddSectionStake: FC = withCheckerRoot( const [value, setValue] = useState('') const { data: { reserve1, reserve0, liquidityToken }, - } = useGraphPool(pool) + } = useV2Pool(pool) const amounts = useMemo(() => { return [tryParseAmount(value, liquidityToken)] diff --git a/apps/web/src/ui/pool/ConcentratedLiquidityURLStateProvider.tsx b/apps/web/src/ui/pool/ConcentratedLiquidityURLStateProvider.tsx index e59a813f22..6a30d047c3 100644 --- a/apps/web/src/ui/pool/ConcentratedLiquidityURLStateProvider.tsx +++ b/apps/web/src/ui/pool/ConcentratedLiquidityURLStateProvider.tsx @@ -10,22 +10,13 @@ import { SushiSwapV3FeeAmount, currencyFromShortCurrencyName, isShortCurrencyName, - isSushiSwapV3ChainId, isWNativeSupported, } from 'sushi/config' import { Native, Token, Type } from 'sushi/currency' import { isAddress } from 'viem' -import { useChainId } from 'wagmi' import { z } from 'zod' export const queryParamsSchema = z.object({ - chainId: z.coerce - .number() - .int() - .gte(0) - .lte(2 ** 256) - .optional() - .transform((chainId) => chainId as SushiSwapV3ChainId | undefined), fromCurrency: z.nullable(z.string()).transform((value) => value ?? 'NATIVE'), toCurrency: z.nullable(z.string()).transform((value) => value ?? 'SUSHI'), feeAmount: z.coerce @@ -48,7 +39,6 @@ type State = { token1: Type | undefined tokensLoading: boolean feeAmount: SushiSwapV3FeeAmount - setNetwork(chainId: SushiSwapV3ChainId): void setToken0(currency: Type): void setToken1(currency: Type): void setFeeAmount(feeAmount: SushiSwapV3FeeAmount): void @@ -61,6 +51,7 @@ export const ConcentratedLiquidityUrlStateContext = createContext( interface ConcentratedLiquidityURLStateProvider { children: ReactNode | ((state: State) => ReactNode) + chainId: SushiSwapV3ChainId supportedNetworks?: ChainId[] } @@ -83,43 +74,28 @@ const getTokenFromUrl = ( } } -const getChainIdFromUrl = ( - urlChainId: ChainId | undefined, - connectedChainId: ChainId | undefined, -): SushiSwapV3ChainId => { - let chainId: SushiSwapV3ChainId = ChainId.ETHEREUM - if (urlChainId && isSushiSwapV3ChainId(urlChainId)) { - chainId = urlChainId - } else if (connectedChainId && isSushiSwapV3ChainId(connectedChainId)) { - chainId = connectedChainId - } - return chainId -} - export const ConcentratedLiquidityURLStateProvider: FC< ConcentratedLiquidityURLStateProvider -> = ({ children, supportedNetworks = SUSHISWAP_V3_SUPPORTED_CHAIN_IDS }) => { +> = ({ + children, + chainId, + supportedNetworks = SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, +}) => { const { push } = useRouter() const pathname = usePathname() const searchParams = useSearchParams()! - const { - chainId: chainIdFromUrl, - fromCurrency, - toCurrency, - feeAmount, - tokenId, - } = queryParamsSchema.parse({ - chainId: searchParams.get('chainId'), - fromCurrency: searchParams.get('fromCurrency'), - toCurrency: searchParams.get('toCurrency'), - feeAmount: searchParams.get('feeAmount'), - tokenId: searchParams.get('tokenId'), - }) - const chainId = useChainId() + const { fromCurrency, toCurrency, feeAmount, tokenId } = + queryParamsSchema.parse({ + fromCurrency: searchParams.get('fromCurrency'), + toCurrency: searchParams.get('toCurrency'), + feeAmount: searchParams.get('feeAmount'), + tokenId: searchParams.get('tokenId'), + }) - const tmp = getChainIdFromUrl(chainIdFromUrl, chainId as ChainId) - const _chainId = supportedNetworks?.includes(tmp) ? tmp : ChainId.ETHEREUM + const _chainId = supportedNetworks?.includes(chainId) + ? chainId + : ChainId.ETHEREUM const { data: tokenFrom, isInitialLoading: isTokenFromLoading } = useTokenWithCache({ @@ -156,29 +132,6 @@ export const ConcentratedLiquidityURLStateProvider: FC< token1 = undefined } - const setNetwork = (chainId: SushiSwapV3ChainId) => { - const fromCurrency = - state.token0?.chainId === chainId - ? state.token0.isNative - ? 'NATIVE' - : state.token0.wrapped.address - : 'NATIVE' - const toCurrency = - state.token1?.chainId === chainId - ? state.token1.isNative - ? 'NATIVE' - : state.token1.wrapped.address - : undefined - - const _searchParams = new URLSearchParams( - Array.from(searchParams.entries()), - ) - _searchParams.set('chainId', chainId.toString()) - _searchParams.set('fromCurrency', fromCurrency) - if (toCurrency) _searchParams.set('toCurrency', toCurrency) - void push(`${pathname}?${_searchParams.toString()}`, { scroll: false }) - } - const setToken0 = (currency: Type) => { const same = currency.wrapped.address === token1?.wrapped.address const _fromCurrency = currency.isNative @@ -187,7 +140,6 @@ export const ConcentratedLiquidityURLStateProvider: FC< const _searchParams = new URLSearchParams( Array.from(searchParams.entries()), ) - _searchParams.set('chainId', currency.chainId.toString()) _searchParams.set('fromCurrency', _fromCurrency) if (toCurrency) { _searchParams.set( @@ -205,7 +157,6 @@ export const ConcentratedLiquidityURLStateProvider: FC< const _searchParams = new URLSearchParams( Array.from(searchParams.entries()), ) - _searchParams.set('chainId', currency.chainId.toString()) _searchParams.set('toCurrency', _toCurrency) if (fromCurrency) { _searchParams.set( @@ -246,7 +197,6 @@ export const ConcentratedLiquidityURLStateProvider: FC< tokensLoading: isTokenFromLoading || isTokenToLoading, setToken0, setToken1, - setNetwork, setFeeAmount, switchTokens, } diff --git a/apps/web/src/ui/pool/ConcentratedPositionsTable/ConcentratedPositionsTable.tsx b/apps/web/src/ui/pool/ConcentratedPositionsTable/ConcentratedPositionsTable.tsx index 4b1b316273..bd4fba27e0 100644 --- a/apps/web/src/ui/pool/ConcentratedPositionsTable/ConcentratedPositionsTable.tsx +++ b/apps/web/src/ui/pool/ConcentratedPositionsTable/ConcentratedPositionsTable.tsx @@ -15,10 +15,8 @@ import { ColumnDef, PaginationState, Row } from '@tanstack/react-table' import React, { FC, ReactNode, useCallback, useMemo, useState } from 'react' import { useConcentratedLiquidityPositions } from 'src/lib/wagmi/hooks/positions/hooks/useConcentratedLiquidityPositions' import { ConcentratedLiquidityPositionWithV3Pool } from 'src/lib/wagmi/hooks/positions/types' -import { - SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, - SushiSwapV3ChainId, -} from 'sushi/config' +import { ChainId, ChainKey } from 'sushi' +import { isSushiSwapV3ChainId } from 'sushi/config' import { useAccount } from 'wagmi' import { usePoolFilters } from '../PoolsFiltersProvider' import { @@ -38,8 +36,8 @@ const COLUMNS = [ const tableState = { sorting: [{ id: 'positionSize', desc: true }] } interface ConcentratedPositionsTableProps { - chainId?: SushiSwapV3ChainId - poolId?: string + chainId: ChainId + poolAddress?: string onRowClick?(row: ConcentratedLiquidityPositionWithV3Pool): void hideNewSmartPositionButton?: boolean hideNewPositionButton?: boolean @@ -49,17 +47,16 @@ export const ConcentratedPositionsTable: FC = ({ chainId, onRowClick, - poolId, + poolAddress, hideNewSmartPositionButton = true, hideNewPositionButton = false, }) => { const { address } = useAccount() - const { chainIds: filterChainIds, tokenSymbols } = usePoolFilters() + const { tokenSymbols } = usePoolFilters() const [hide, setHide] = useState(true) const chainIds = useMemo(() => { - if (chainId) return [chainId] as SushiSwapV3ChainId[] - return [...SUSHISWAP_V3_SUPPORTED_CHAIN_IDS] + return isSushiSwapV3ChainId(chainId) ? [chainId] : [] }, [chainId]) const [paginationState, setPaginationState] = useState({ @@ -70,17 +67,12 @@ export const ConcentratedPositionsTable: FC = const { data: positions, isInitialLoading } = useConcentratedLiquidityPositions({ account: address, - chainIds: chainIds, + chainIds, }) const _positions = useMemo(() => { const _tokenSymbols = tokenSymbols?.filter((el) => el !== '') || [] return (positions || []) - ?.filter((el) => - filterChainIds.includes( - el.chainId as (typeof filterChainIds)[number], - ), - ) .filter((el) => _tokenSymbols.length > 0 ? _tokenSymbols.some((symbol) => { @@ -94,10 +86,12 @@ export const ConcentratedPositionsTable: FC = .filter((el) => { return ( (hide ? el.liquidity !== 0n : true) && - (poolId ? el.address.toLowerCase() === poolId.toLowerCase() : true) + (poolAddress + ? el.address.toLowerCase() === poolAddress.toLowerCase() + : true) ) }) - }, [tokenSymbols, positions, filterChainIds, hide, poolId]) + }, [tokenSymbols, positions, hide, poolAddress]) const rowRenderer = useCallback( ( @@ -142,7 +136,7 @@ export const ConcentratedPositionsTable: FC = {!hideNewSmartPositionButton ? (
)}
diff --git a/apps/web/src/ui/pool/PoolMyRewards.tsx b/apps/web/src/ui/pool/PoolMyRewards.tsx index cbd57cda76..83d7bf2135 100644 --- a/apps/web/src/ui/pool/PoolMyRewards.tsx +++ b/apps/web/src/ui/pool/PoolMyRewards.tsx @@ -1,6 +1,5 @@ 'use client' -import { Pool } from '@sushiswap/client' import { Button } from '@sushiswap/ui' import { Card, @@ -16,12 +15,13 @@ import { import { FC } from 'react' import { formatUSD } from 'sushi/format' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { Checker } from 'src/lib/wagmi/systems/Checker' import { type ChainId } from 'sushi/chain' import { usePoolPositionRewards } from './PoolPositionRewardsProvider' interface PoolMyRewardsProps { - pool: Pool + pool: V2Pool } export const PoolMyRewards: FC = ({ pool }) => { diff --git a/apps/web/src/ui/pool/PoolPageV2.tsx b/apps/web/src/ui/pool/PoolPageV2.tsx index bc8409694e..09310082fc 100644 --- a/apps/web/src/ui/pool/PoolPageV2.tsx +++ b/apps/web/src/ui/pool/PoolPageV2.tsx @@ -1,67 +1,36 @@ import { Container, Separator } from '@sushiswap/ui' -import { ManageV2LiquidityCard } from 'src/ui/pool/ManageV2LiquidityCard' import { PoolTransactionsV2 } from 'src/ui/pool/PoolTransactionsV2' -import { getPool } from '@sushiswap/client' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { FC } from 'react' -import { SushiSwapV2ChainId } from 'sushi/config' import { PoolChartV2 } from './PoolChartV2' import { PoolComposition } from './PoolComposition' -import { PoolMyRewards } from './PoolMyRewards' -import { PoolPosition } from './PoolPosition' -import { PoolPositionProvider } from './PoolPositionProvider' -import { PoolPositionRewardsProvider } from './PoolPositionRewardsProvider' -import { PoolPositionStakedProvider } from './PoolPositionStakedProvider' import { PoolRewards } from './PoolRewards' import { PoolStats } from './PoolStats' import { UnknownTokenAlert } from './UnknownTokenAlert' interface PoolPageV2 { - pool: Awaited> - tab: 'add' | 'remove' | 'unstake' | 'stake' + pool: Awaited } -export const PoolPageV2: FC = ({ pool, tab }) => { +export const PoolPageV2: FC = ({ pool }) => { return ( -
-
-
- -
-
- - - - - - - - -
+
+
+
-
- +
+ + + {pool.isIncentivized ? : null}
-
-
- -
-
- - - {pool.isIncentivized ? : null} -
-
-
- -
-
+
+ +
+ ) } diff --git a/apps/web/src/ui/pool/PoolPageV3.tsx b/apps/web/src/ui/pool/PoolPageV3.tsx index 7380375f2a..84c93e7af9 100644 --- a/apps/web/src/ui/pool/PoolPageV3.tsx +++ b/apps/web/src/ui/pool/PoolPageV3.tsx @@ -1,40 +1,33 @@ 'use client' -import { getPool } from '@sushiswap/client' +import { V3Pool } from '@sushiswap/graph-client/data-api' import { useConcentratedLiquidityPoolStats } from '@sushiswap/react-query' -import { CardLabel, Separator, SkeletonText, classNames } from '@sushiswap/ui' -import { Container, LinkInternal, Message } from '@sushiswap/ui' import { Card, CardContent, CardCurrencyAmountItem, CardDescription, CardHeader, + CardLabel, CardTitle, + Container, + LinkInternal, + Message, + Separator, + SkeletonText, + classNames, } from '@sushiswap/ui' -import { Toggle } from '@sushiswap/ui' -import React, { FC, useState } from 'react' +import { FC } from 'react' import { useTokenAmountDollarValues } from 'src/lib/hooks' -import { useConcentratedLiquidityPool } from 'src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPool' import { useConcentratedLiquidityPoolReserves } from 'src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPoolReserves' -import { SushiSwapV3ChainId } from 'sushi/config' +import { ChainKey } from 'sushi' import { formatUSD } from 'sushi/format' -import { Address } from 'viem' import { ConcentratedLiquidityProvider } from './ConcentratedLiquidityProvider' -import { ConcentratedPositionsTable } from './ConcentratedPositionsTable' import { PoolRewardDistributionsCard } from './PoolRewardDistributionsCard' import { PoolTransactionsV3 } from './PoolTransactionsV3' -import { PoolsFiltersProvider } from './PoolsFiltersProvider' -import { StatisticsCharts } from './StatisticsChart' +import { StatisticsChartsV3 } from './StatisticsChartV3' -enum Granularity { - Day = 0, - Week = 1, -} - -const PoolPageV3: FC<{ pool: Awaited> }> = ({ - pool, -}) => { +const PoolPageV3: FC<{ pool: V3Pool }> = ({ pool }) => { return ( @@ -42,26 +35,17 @@ const PoolPageV3: FC<{ pool: Awaited> }> = ({ ) } -const Pool: FC<{ pool: Awaited> }> = ({ pool }) => { - const { id } = pool - const [_chainId, address] = id.split(':') - const chainId = +_chainId as SushiSwapV3ChainId - const [granularity, setGranularity] = useState(Granularity.Day) +const Pool: FC<{ pool: V3Pool }> = ({ pool }) => { + const { chainId, address } = pool const { data: poolStats } = useConcentratedLiquidityPoolStats({ chainId, address, }) - const { data: cPool } = useConcentratedLiquidityPool({ - chainId, - token0: poolStats?.token0, - token1: poolStats?.token1, - feeAmount: poolStats?.feeAmount, - }) const { data: reserves, isLoading: isReservesLoading } = useConcentratedLiquidityPoolReserves({ - pool: cPool, + pool, chainId, }) const fiatValues = useTokenAmountDollarValues({ chainId, amounts: reserves }) @@ -70,7 +54,7 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => {
{pool.hasEnabledSteerVault && ( - + {`This pool has been activated to leverage our smart pool feature. Smart pools are designed to optimize the allocation of liquidity within customized price ranges, thereby improving trading efficiency. They achieve this by enhancing liquidity depth around the current price, which results in higher fee earnings for liquidity @@ -79,25 +63,15 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => { To create a smart pool position, click{' '} here )} - - - -
- -
- +
@@ -124,24 +98,6 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => {
Statistics -
- setGranularity(Granularity.Day)} - > - 24H - - setGranularity(Granularity.Week)} - > - 1W - -
@@ -151,29 +107,16 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => { Volume {poolStats ? (
- {formatUSD( - granularity === Granularity.Week - ? poolStats.volumeUSD1w - : poolStats.volumeUSD1d ?? 0, - )}{' '} + {formatUSD(poolStats.volumeUSD1d ?? 0)}{' '} 0 + poolStats['volumeUSD1dChange'] > 0 ? 'text-green' : 'text-red', )} > - ( - {poolStats[ - granularity === Granularity.Week - ? 'volumeUSD1wChange' - : 'volumeUSD1dChange' - ].toFixed(2)} + ({poolStats['volumeUSD1dChange'].toFixed(2)} %)
@@ -185,29 +128,16 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => { Fees {poolStats ? (
- {formatUSD( - granularity === Granularity.Week - ? poolStats.feesUSD1w - : poolStats.feesUSD1d ?? 0, - )}{' '} + {formatUSD(poolStats.feesUSD1d ?? 0)}{' '} 0 + poolStats['feesUSD1dChange'] > 0 ? 'text-green' : 'text-red', )} > - ( - {poolStats[ - granularity === Granularity.Week - ? 'feesUSD1wChange' - : 'feesUSD1dChange' - ].toFixed(2)} + ({poolStats['feesUSD1dChange'].toFixed(2)} %)
@@ -224,7 +154,7 @@ const Pool: FC<{ pool: Awaited> }> = ({ pool }) => {
- +
) diff --git a/apps/web/src/ui/pool/PoolPosition.tsx b/apps/web/src/ui/pool/PoolPosition.tsx index 49a1fcae22..3824497c60 100644 --- a/apps/web/src/ui/pool/PoolPosition.tsx +++ b/apps/web/src/ui/pool/PoolPosition.tsx @@ -1,6 +1,5 @@ 'use client' -import { Pool } from '@sushiswap/client' import { Card, CardContent, @@ -11,6 +10,7 @@ import { import { FC } from 'react' import { formatUSD } from 'sushi/format' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { SkeletonText } from '@sushiswap/ui' import { ConnectButton } from 'src/lib/wagmi/components/connect-button' import { useAccount } from 'wagmi' @@ -20,7 +20,7 @@ import { PoolPositionStakedDesktop } from './PoolPositionStakedDesktop' import { usePoolPositionStaked } from './PoolPositionStakedProvider' interface PoolPositionProps { - pool: Pool + pool: V2Pool } const PoolPositionDisconnected: FC = () => { diff --git a/apps/web/src/ui/pool/PoolPositionDesktop.tsx b/apps/web/src/ui/pool/PoolPositionDesktop.tsx index 858bbf361a..8506041e25 100644 --- a/apps/web/src/ui/pool/PoolPositionDesktop.tsx +++ b/apps/web/src/ui/pool/PoolPositionDesktop.tsx @@ -1,12 +1,12 @@ -import { Pool } from '@sushiswap/client' import { CardCurrencyAmountItem, CardGroup, CardLabel } from '@sushiswap/ui' import { FC } from 'react' import { formatUSD } from 'sushi/format' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { usePoolPosition } from './PoolPositionProvider' interface PoolPositionProps { - pool: Pool + pool: V2Pool } export const PoolPositionDesktop: FC = () => { diff --git a/apps/web/src/ui/pool/PoolPositionProvider.tsx b/apps/web/src/ui/pool/PoolPositionProvider.tsx index 808719a82e..1341d5fe7b 100644 --- a/apps/web/src/ui/pool/PoolPositionProvider.tsx +++ b/apps/web/src/ui/pool/PoolPositionProvider.tsx @@ -1,15 +1,15 @@ 'use client' +import { V2Pool, V3Pool } from '@sushiswap/graph-client/data-api' import { FC, ReactNode, createContext, useContext, useMemo } from 'react' import { - useGraphPool, + getTokensFromPool, useTokenAmountDollarValues, useUnderlyingTokenBalanceFromPool, } from 'src/lib/hooks' import { useBalanceWeb3 } from 'src/lib/wagmi/hooks/balances/useBalanceWeb3' import { ChainId } from 'sushi/chain' import { Amount, Type } from 'sushi/currency' -import type { PoolId } from 'sushi/types' import { useAccount } from 'wagmi' interface PoolPositionContext { @@ -25,15 +25,34 @@ interface PoolPositionContext { const Context = createContext(undefined) export const PoolPositionProvider: FC<{ - pool: PoolId + pool: NonNullable children: ReactNode watch?: boolean }> = ({ pool, children }) => { const { address: account } = useAccount() - const { - data: { reserve0, reserve1, totalSupply, liquidityToken }, - } = useGraphPool(pool) + const { liquidityToken, reserve0, reserve1, totalSupply } = useMemo(() => { + if (!pool) + return { + token0: undefined, + token1: undefined, + liquidityToken: undefined, + } + + const { token0, token1, liquidityToken } = getTokensFromPool(pool) + + return { + liquidityToken, + reserve0: + token0 && pool ? Amount.fromRawAmount(token0, pool.reserve0) : null, + reserve1: + token1 && pool ? Amount.fromRawAmount(token1, pool.reserve1) : null, + totalSupply: + liquidityToken && pool + ? Amount.fromRawAmount(liquidityToken, pool.liquidity) + : null, + } + }, [pool]) const { data: balance, diff --git a/apps/web/src/ui/pool/PoolPositionRewardsProvider.tsx b/apps/web/src/ui/pool/PoolPositionRewardsProvider.tsx index 0557938dc3..9701b8d14a 100644 --- a/apps/web/src/ui/pool/PoolPositionRewardsProvider.tsx +++ b/apps/web/src/ui/pool/PoolPositionRewardsProvider.tsx @@ -1,6 +1,5 @@ 'use client' -import { ChefType } from '@sushiswap/client' import { FC, ReactNode, createContext, useContext, useMemo } from 'react' import { incentiveRewardToToken } from 'src/lib/functions' import { useTokenAmountDollarValues, useTokensFromPool } from 'src/lib/hooks' @@ -11,7 +10,12 @@ import { } from 'src/lib/wagmi/hooks/master-chef/use-rewarder' import { ChainId } from 'sushi/chain' import { Amount, Token } from 'sushi/currency' -import type { Incentive, PoolBase, PoolWithIncentives } from 'sushi/types' +import type { + ChefType, + Incentive, + PoolBase, + PoolWithIncentives, +} from 'sushi/types' import { useAccount } from 'wagmi' interface PoolPositionRewardsContext { diff --git a/apps/web/src/ui/pool/PoolPositionStakedDesktop.tsx b/apps/web/src/ui/pool/PoolPositionStakedDesktop.tsx index 16bc5367ac..f4ba98a8c1 100644 --- a/apps/web/src/ui/pool/PoolPositionStakedDesktop.tsx +++ b/apps/web/src/ui/pool/PoolPositionStakedDesktop.tsx @@ -1,12 +1,12 @@ -import { Pool } from '@sushiswap/client' import { CardCurrencyAmountItem, CardGroup, CardLabel } from '@sushiswap/ui' import { FC } from 'react' import { formatUSD } from 'sushi/format' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { usePoolPositionStaked } from './PoolPositionStakedProvider' interface PoolPositionStakedDesktopProps { - pool: Pool + pool: V2Pool } export const PoolPositionStakedDesktop: FC = ({ diff --git a/apps/web/src/ui/pool/PoolPositionStakedProvider.tsx b/apps/web/src/ui/pool/PoolPositionStakedProvider.tsx index 8b5c4db0d0..63e9a6faa4 100644 --- a/apps/web/src/ui/pool/PoolPositionStakedProvider.tsx +++ b/apps/web/src/ui/pool/PoolPositionStakedProvider.tsx @@ -1,14 +1,14 @@ 'use client' -import { ChefType } from '@sushiswap/client' +import { V2Pool, V3Pool } from '@sushiswap/graph-client/data-api' import { FC, ReactNode, createContext, useContext, useMemo } from 'react' import { - useGraphPool, + getTokensFromPool, useTokenAmountDollarValues, useUnderlyingTokenBalanceFromPool, } from 'src/lib/hooks' import { useMasterChef } from 'src/lib/wagmi/hooks/master-chef/use-master-chef' -import type { PoolId, PoolWithIncentives } from 'sushi' +import type { ChefType } from 'sushi' import { ChainId } from 'sushi/chain' import { Amount, Currency, Token } from 'sushi/currency' @@ -27,7 +27,7 @@ interface PoolPositionStakedContext { const Context = createContext(undefined) interface PoolPositionStakedProviderProps { - pool: PoolWithIncentives + pool: V2Pool | V3Pool children: ReactNode watch?: boolean } @@ -66,7 +66,7 @@ export const PoolPositionStakedProvider: FC = } interface _PoolPositionStakedProviderProps { - pool: PoolId + pool: V2Pool | V3Pool children: ReactNode farmId: number chefType: ChefType @@ -80,9 +80,28 @@ const _PoolPositionStakedProvider: FC<_PoolPositionStakedProviderProps> = ({ chefType, children, }) => { - const { - data: { reserve0, reserve1, totalSupply, liquidityToken }, - } = useGraphPool(pool) + const { liquidityToken, reserve0, reserve1, totalSupply } = useMemo(() => { + if (!pool) + return { + token0: undefined, + token1: undefined, + liquidityToken: undefined, + } + + const { token0, token1, liquidityToken } = getTokensFromPool(pool) + + return { + liquidityToken, + reserve0: + token0 && pool ? Amount.fromRawAmount(token0, pool.reserve0) : null, + reserve1: + token1 && pool ? Amount.fromRawAmount(token1, pool.reserve1) : null, + totalSupply: + liquidityToken && pool + ? Amount.fromRawAmount(liquidityToken, pool.liquidity) + : null, + } + }, [pool]) const { balance, isLoading, isError, isWritePending, isWriteError } = useMasterChef({ diff --git a/apps/web/src/ui/pool/PoolQuickHoverTooltip.tsx b/apps/web/src/ui/pool/PoolQuickHoverTooltip.tsx index 5304660922..06a5aba86a 100644 --- a/apps/web/src/ui/pool/PoolQuickHoverTooltip.tsx +++ b/apps/web/src/ui/pool/PoolQuickHoverTooltip.tsx @@ -1,16 +1,18 @@ import { PlusIcon, UserCircleIcon } from '@heroicons/react-v1/solid' -import { Pool, Protocol } from '@sushiswap/client' +import { V2Pool, V3Pool } from '@sushiswap/graph-client/data-api' + import { LinkInternal } from '@sushiswap/ui' import { Button } from '@sushiswap/ui' import { Currency } from '@sushiswap/ui' import { List } from '@sushiswap/ui' import React, { FC } from 'react' import { incentiveRewardToToken } from 'src/lib/functions' +import { SushiSwapProtocol } from 'sushi' import { ChainId } from 'sushi/chain' import { formatNumber, formatPercent } from 'sushi/format' interface PoolQuickHoverTooltipProps { - row: Pool + row: V2Pool | V3Pool } export const PoolQuickHoverTooltip: FC = ({ @@ -36,7 +38,7 @@ export const PoolQuickHoverTooltip: FC = ({ - {row.protocol === Protocol.SUSHISWAP_V3 && ( + {row.protocol === SushiSwapProtocol.SUSHISWAP_V3 && ( diff --git a/apps/web/src/ui/pool/PoolRewardDistributionsCard.tsx b/apps/web/src/ui/pool/PoolRewardDistributionsCard.tsx index 7204397130..804effb795 100644 --- a/apps/web/src/ui/pool/PoolRewardDistributionsCard.tsx +++ b/apps/web/src/ui/pool/PoolRewardDistributionsCard.tsx @@ -1,6 +1,5 @@ 'use client' -import { Pool } from '@sushiswap/client' import { useAngleRewards } from '@sushiswap/react-query' import { Button, @@ -20,11 +19,12 @@ import { ChainId } from 'sushi/chain' import { Native } from 'sushi/currency' import { getAddress } from 'viem' +import { V3Pool } from '@sushiswap/graph-client/data-api' import { isAngleEnabledChainId } from 'sushi/config' import { DistributionDataTable } from './DistributionDataTable' interface PoolRewardDistributionsCardParams { - pool: Pool + pool: V3Pool } export const PoolRewardDistributionsCard: FC< diff --git a/apps/web/src/ui/pool/PoolRewards.tsx b/apps/web/src/ui/pool/PoolRewards.tsx index 2492305fb0..b3e384aa4e 100644 --- a/apps/web/src/ui/pool/PoolRewards.tsx +++ b/apps/web/src/ui/pool/PoolRewards.tsx @@ -1,21 +1,22 @@ 'use client' -import { Pool } from '@sushiswap/client' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { + Card, CardContent, CardCurrencyAmountItem, + CardDescription, CardGroup, CardHeader, CardLabel, CardTitle, } from '@sushiswap/ui' -import { Card, CardDescription } from '@sushiswap/ui' -import React, { FC } from 'react' +import { FC } from 'react' import { incentiveRewardToToken } from 'src/lib/functions' import { ChainId } from 'sushi/chain' import { tryParseAmount } from 'sushi/currency' -export const PoolRewards: FC<{ pool: Pool }> = ({ pool }) => { +export const PoolRewards: FC<{ pool: V2Pool }> = ({ pool }) => { const incentives = pool.incentives.filter( (incentive) => incentive.rewardPerDay > 0, ) diff --git a/apps/web/src/ui/pool/PoolStats.tsx b/apps/web/src/ui/pool/PoolStats.tsx index a937817a39..ab6bf5f7ef 100644 --- a/apps/web/src/ui/pool/PoolStats.tsx +++ b/apps/web/src/ui/pool/PoolStats.tsx @@ -1,6 +1,6 @@ 'use client' -import { Pool } from '@sushiswap/client' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { Card, CardContent, @@ -9,22 +9,14 @@ import { CardTitle, classNames, } from '@sushiswap/ui' -import { SkeletonText } from '@sushiswap/ui' import { FC } from 'react' -import { usePoolGraphData } from 'src/lib/hooks' -import { SushiSwapV2ChainId } from 'sushi/config' import { formatNumber, formatPercent, formatUSD } from 'sushi/format' interface PoolStats { - pool: Pool + pool: V2Pool } export const PoolStats: FC = ({ pool }) => { - const { data, isLoading } = usePoolGraphData({ - poolAddress: pool.address, - chainId: pool.chainId as SushiSwapV2ChainId, - }) - return ( @@ -34,78 +26,70 @@ export const PoolStats: FC = ({ pool }) => {
Liquidity - {isLoading ? ( - - ) : data ? ( + {pool ? (
- {formatUSD(data.liquidityUSD ?? 0)}{' '} + {formatUSD(pool.liquidityUSD ?? 0)}{' '} 0 ? 'text-green' : 'text-red', + pool.liquidityUSD1dChange > 0 ? 'text-green' : 'text-red', )} > - {data.liquidity1dChange > 0 ? '+' : '-'} - {formatPercent(Math.abs(data.liquidity1dChange))} + {pool.liquidityUSD1dChange > 0 ? '+' : '-'} + {formatPercent(Math.abs(pool.liquidityUSD1dChange))}
) : null}
Volume (24h) - {data ? ( + {pool ? (
- {formatUSD(data.volume1d ?? 0)}{' '} + {formatUSD(pool.volumeUSD1d ?? 0)}{' '} 0 ? 'text-green' : 'text-red', + pool.volumeUSD1dChange > 0 ? 'text-green' : 'text-red', )} > - {data.volume1dChange > 0 ? '+' : '-'} - {formatPercent(Math.abs(data.volume1dChange))} + {pool.volumeUSD1dChange > 0 ? '+' : '-'} + {formatPercent(Math.abs(pool.volumeUSD1dChange))}
- ) : isLoading ? ( - ) : null}
Fees (24h) - {data ? ( + {pool ? (
- {formatUSD(data.fees1d ?? 0)}{' '} + {formatUSD(pool.feesUSD1d ?? 0)}{' '} 0 ? 'text-green' : 'text-red', + pool.feesUSD1dChange > 0 ? 'text-green' : 'text-red', )} > - {data.fees1dChange > 0 ? '+' : '-'} - {formatPercent(Math.abs(data.fees1dChange))} + {pool.feesUSD1dChange > 0 ? '+' : '-'} + {formatPercent(Math.abs(pool.feesUSD1dChange))}
- ) : isLoading ? ( - ) : null}
Transactions (24h) - {data ? ( + {pool ? (
- {formatNumber(data.txCount1d).replace('.00', '')}{' '} + {formatNumber(pool.txCount1d).replace('.00', '')}{' '} 0 ? 'text-green' : 'text-red', + pool.txCount1dChange > 0 ? 'text-green' : 'text-red', )} > - {data.txCount1dChange > 0 ? '+' : '-'} - {formatPercent(Math.abs(data.txCount1dChange))} + {pool.txCount1dChange > 0 ? '+' : '-'} + {formatPercent(Math.abs(pool.txCount1dChange))}
- ) : isLoading ? ( - ) : null}
diff --git a/apps/web/src/ui/pool/PoolTransactionsV2.tsx b/apps/web/src/ui/pool/PoolTransactionsV2.tsx index f0671bca49..1b81ece81f 100644 --- a/apps/web/src/ui/pool/PoolTransactionsV2.tsx +++ b/apps/web/src/ui/pool/PoolTransactionsV2.tsx @@ -1,26 +1,26 @@ 'use client' -import { Pool } from '@sushiswap/client' import { Card, CardContent, CardHeader, CardTitle, DataTable, + Toggle, } from '@sushiswap/ui' -import { Toggle } from '@sushiswap/ui' import { useQuery } from '@tanstack/react-query' import { PaginationState } from '@tanstack/react-table' -import React, { FC, useMemo, useState } from 'react' +import { FC, useMemo, useState } from 'react' import { Chain, ChainId } from 'sushi/chain' import { SushiSwapV2ChainId, isSushiSwapV2ChainId } from 'sushi/config' import { + V2Pool, getSushiV2Burns, getSushiV2Mints, getSushiV2Swaps, - getSushiV2Transactions, -} from '@sushiswap/graph-client/sushi-v2' +} from '@sushiswap/graph-client/data-api' + import { TX_AMOUNT_IN_V2_COLUMN, TX_AMOUNT_OUT_V2_COLUMN, @@ -42,56 +42,10 @@ interface UseTransactionsV2Opts { skip?: number } -const fetchAll = async ( - poolId: string, - chainId: SushiSwapV2ChainId, - opts: UseTransactionsV2Opts, -) => { - const transactions = await getSushiV2Transactions({ - chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { - or: [ - { - mints_: { - pair: poolId.toLowerCase(), - }, - }, - { - burns_: { - pair: poolId.toLowerCase(), - amount0_not: null, - amount1_not: null, - sender_not: null, - }, - }, - { - swaps_: { - pair: poolId.toLowerCase(), - }, - }, - ], - }, - orderBy: 'timestamp', - orderDirection: 'desc', - }) - - return transactions -} - -const fetchMints = async ( - poolId: string, - chainId: SushiSwapV2ChainId, - opts: UseTransactionsV2Opts, -) => { +const fetchMints = async (address: string, chainId: SushiSwapV2ChainId) => { const mints = await getSushiV2Mints({ chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { pair: poolId.toLowerCase() }, - orderBy: 'timestamp', - orderDirection: 'desc', + address, }) return mints.map((mint) => ({ @@ -102,24 +56,10 @@ const fetchMints = async ( })) } -const fetchBurns = async ( - poolId: string, - chainId: SushiSwapV2ChainId, - opts: UseTransactionsV2Opts, -) => { +const fetchBurns = async (address: string, chainId: SushiSwapV2ChainId) => { const burns = await getSushiV2Burns({ chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { - pair: poolId.toLowerCase(), - // TODO: disbled for now, according to the types this can never be null so not sure if we need it anymore - // amount0_not: null, - // amount1_not: null, - // sender_not: null, - }, - orderBy: 'timestamp', - orderDirection: 'desc', + address, }) return burns.map((burn) => ({ @@ -130,18 +70,10 @@ const fetchBurns = async ( })) } -const fetchSwaps = async ( - poolId: string, - chainId: SushiSwapV2ChainId, - opts: UseTransactionsV2Opts, -) => { +const fetchSwaps = async (address: string, chainId: SushiSwapV2ChainId) => { const swaps = await getSushiV2Swaps({ chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { pair: poolId.toLowerCase() }, - orderBy: 'timestamp', - orderDirection: 'desc', + address, }) return swaps.map((swap) => ({ @@ -155,7 +87,7 @@ const fetchSwaps = async ( // Will only support the last 1k txs // The fact that there are different subtransactions aggregated under one transaction makes paging a bit difficult function useTransactionsV2( - pool: Pool | undefined | null, + pool: V2Pool | undefined | null, poolId: string, opts: UseTransactionsV2Opts, ) { @@ -166,23 +98,20 @@ function useTransactionsV2( if (!pool || !isSushiSwapV2ChainId(chainId)) return [] - let transactions: Awaited> + let transactions switch (opts.type) { - case 'All': - transactions = await fetchAll(poolId, chainId, opts) + case TransactionType.Burn: + transactions = await fetchBurns(poolId, chainId) break case TransactionType.Mint: - transactions = await fetchMints(poolId, chainId, opts) - break - case TransactionType.Burn: - transactions = await fetchBurns(poolId, chainId, opts) + transactions = await fetchMints(poolId, chainId) break case TransactionType.Swap: - transactions = await fetchSwaps(poolId, chainId, opts) + transactions = await fetchSwaps(poolId, chainId) break default: - transactions = await fetchAll(poolId, chainId, opts) + transactions = await fetchSwaps(poolId, chainId) } if (!transactions.length) return [] @@ -225,7 +154,9 @@ function useTransactionsV2( return [...mints, ...burns, ...swaps] .flatMap((subtransaction) => ({ - pool, + symbol0: pool.token0.symbol, + symbol1: pool.token1.symbol, + chainId, txHash: transaction.id, createdAtTimestamp: Number(transaction.createdAtTimestamp), createdAtBlock: Number(transaction.createdAtBlock), @@ -244,7 +175,7 @@ function useTransactionsV2( type Transaction = NonNullable['data']>[0] interface PoolTransactionsV2Props { - pool: Pool | undefined | null + pool: V2Pool | undefined | null poolId: string } @@ -322,7 +253,7 @@ const PoolTransactionsV2: FC = ({ pool, poolId }) => { - Chain.from(row.pool.chainId)?.getTxUrl(row.txHash) ?? '' + Chain.from(row.chainId)?.getTxUrl(row.txHash) ?? '' } loading={isLoading} columns={COLUMNS} diff --git a/apps/web/src/ui/pool/PoolTransactionsV3.tsx b/apps/web/src/ui/pool/PoolTransactionsV3.tsx index 0cd4aeb187..0ca2325476 100644 --- a/apps/web/src/ui/pool/PoolTransactionsV3.tsx +++ b/apps/web/src/ui/pool/PoolTransactionsV3.tsx @@ -1,17 +1,16 @@ 'use client' -import { Pool } from '@sushiswap/client' import { Card, CardContent, CardHeader, CardTitle, DataTable, + Toggle, } from '@sushiswap/ui' -import { Toggle } from '@sushiswap/ui' import { useQuery } from '@tanstack/react-query' import { PaginationState } from '@tanstack/react-table' -import React, { FC, useMemo, useState } from 'react' +import { FC, useMemo, useState } from 'react' import { Chain, ChainId } from 'sushi/chain' import { SushiSwapV3ChainId, isSushiSwapV3ChainId } from 'sushi/config' @@ -20,8 +19,9 @@ import { getSushiV3Collects, getSushiV3Mints, getSushiV3Swaps, - getSushiV3Transactions, -} from '@sushiswap/graph-client/sushi-v3' +} from '@sushiswap/graph-client/data-api' + +import { V3Pool } from '@sushiswap/graph-client/data-api' import { TX_AMOUNT_IN_V3_COLUMN, TX_AMOUNT_OUT_V3_COLUMN, @@ -44,58 +44,10 @@ interface UseTransactionsV3Opts { skip?: number } -const fetchAll = async ( - poolId: string, - chainId: SushiSwapV3ChainId, - opts: UseTransactionsV3Opts, -) => { - const transactions = await getSushiV3Transactions({ - chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { - or: [ - { - mints_: { - pool: poolId.toLowerCase(), - }, - }, - { - burns_: { - pool: poolId.toLowerCase(), - }, - }, - { - swaps_: { - pool: poolId.toLowerCase(), - }, - }, - { - collects_: { - pool: poolId.toLowerCase(), - }, - }, - ], - }, - orderBy: 'timestamp', - orderDirection: 'desc', - }) - - return transactions -} - -const fetchMints = async ( - poolId: string, - chainId: SushiSwapV3ChainId, - opts: UseTransactionsV3Opts, -) => { +const fetchMints = async (address: string, chainId: SushiSwapV3ChainId) => { const mints = await getSushiV3Mints({ + address, chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { pool: poolId.toLowerCase() }, - orderBy: 'timestamp', - orderDirection: 'desc', }) return mints.map((mint) => ({ @@ -107,18 +59,10 @@ const fetchMints = async ( })) } -const fetchBurns = async ( - poolId: string, - chainId: SushiSwapV3ChainId, - opts: UseTransactionsV3Opts, -) => { +const fetchBurns = async (address: string, chainId: SushiSwapV3ChainId) => { const burns = await getSushiV3Burns({ chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { pool: poolId.toLowerCase() }, - orderBy: 'timestamp', - orderDirection: 'desc', + address, }) return burns.map((burn) => ({ @@ -130,18 +74,10 @@ const fetchBurns = async ( })) } -const fetchSwaps = async ( - poolId: string, - chainId: SushiSwapV3ChainId, - opts: UseTransactionsV3Opts, -) => { +const fetchSwaps = async (address: string, chainId: SushiSwapV3ChainId) => { const swaps = await getSushiV3Swaps({ chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { pool: poolId.toLowerCase() }, - orderBy: 'timestamp', - orderDirection: 'desc', + address, }) return swaps.map((swap) => ({ @@ -153,18 +89,10 @@ const fetchSwaps = async ( })) } -const fetchCollects = async ( - poolId: string, - chainId: SushiSwapV3ChainId, - opts: UseTransactionsV3Opts, -) => { +const fetchCollects = async (address: string, chainId: SushiSwapV3ChainId) => { const collects = await getSushiV3Collects({ chainId, - first: opts.first, - skip: opts?.skip ?? 0, - where: { pool: poolId.toLowerCase() }, - orderBy: 'timestamp', - orderDirection: 'desc', + address, }) return collects.map((collect) => ({ @@ -179,7 +107,7 @@ const fetchCollects = async ( // Will only support the last 1k txs // The fact that there are different subtransactions aggregated under one transaction makes paging a bit difficult function useTransactionsV3( - pool: Pool | undefined | null, + pool: V3Pool | undefined | null, poolId: string, opts: UseTransactionsV3Opts, ) { @@ -190,26 +118,23 @@ function useTransactionsV3( if (!pool || !isSushiSwapV3ChainId(chainId)) return [] - let transactions: Awaited> = [] + let transactions = [] switch (opts.type) { - case 'All': - transactions = await fetchAll(poolId, chainId, opts) - break case TransactionTypeV3.Mint: - transactions = await fetchMints(poolId, chainId, opts) + transactions = await fetchMints(poolId, chainId) break case TransactionTypeV3.Burn: - transactions = await fetchBurns(poolId, chainId, opts) + transactions = await fetchBurns(poolId, chainId) break case TransactionTypeV3.Swap: - transactions = await fetchSwaps(poolId, chainId, opts) + transactions = await fetchSwaps(poolId, chainId) break case TransactionTypeV3.Collect: - transactions = await fetchCollects(poolId, chainId, opts) + transactions = await fetchCollects(poolId, chainId) break default: - transactions = await fetchAll(poolId, chainId, opts) + transactions = await fetchSwaps(poolId, chainId) } if (!transactions.length) return [] @@ -278,7 +203,7 @@ type TransactionV3 = NonNullable< >[0] interface PoolTransactionsV3Props { - pool: Pool | undefined | null + pool: V3Pool | undefined | null poolId: string } diff --git a/apps/web/src/ui/pool/PoolsFiltersProvider.tsx b/apps/web/src/ui/pool/PoolsFiltersProvider.tsx index 624fc28c32..665bd6c499 100644 --- a/apps/web/src/ui/pool/PoolsFiltersProvider.tsx +++ b/apps/web/src/ui/pool/PoolsFiltersProvider.tsx @@ -1,6 +1,6 @@ 'use client' -import { Protocol, parseArgs } from '@sushiswap/client' +import { parseArgs } from '@sushiswap/client' import { useRouter } from 'next/navigation' import { Dispatch, @@ -11,7 +11,7 @@ import { useContext, useMemo, } from 'react' -import { AMM_SUPPORTED_CHAIN_IDS, isSupportedChainId } from 'src/config' +import { SushiSwapProtocol } from 'sushi' import { z } from 'zod' import { useTypedSearchParams } from '../../lib/hooks' @@ -32,20 +32,11 @@ export const poolFiltersSchema = z.object({ tokenSymbols: z.coerce.string().transform((symbols) => { return symbols.split(',').filter((symbol) => symbol !== '') }), - chainIds: z.coerce - .string() - .default(AMM_SUPPORTED_CHAIN_IDS.join(',')) - .transform((chainIds) => - chainIds !== null && chainIds !== ',' - ? chainIds.split(',').map((chainId) => Number(chainId)) - : AMM_SUPPORTED_CHAIN_IDS, - ) - .transform((chainIds) => chainIds.filter(isSupportedChainId)), protocols: z .string() .transform((protocols) => protocols !== null && protocols !== ',' - ? (protocols.split(',') as Protocol[]) + ? (protocols.split(',') as SushiSwapProtocol[]) : [], ), farmsOnly: z @@ -60,20 +51,18 @@ export const PoolsFiltersProvider: FC = ({ children, }) => { const urlFilters = useTypedSearchParams(poolFiltersSchema.partial()) - const { tokenSymbols, chainIds, protocols, farmsOnly, smartPoolsOnly } = - urlFilters + const { tokenSymbols, protocols, farmsOnly, smartPoolsOnly } = urlFilters return ( ({ tokenSymbols: tokenSymbols ? tokenSymbols : [], - chainIds: chainIds ? chainIds : AMM_SUPPORTED_CHAIN_IDS, protocols: protocols ? protocols : POOL_TYPES, farmsOnly: farmsOnly ? farmsOnly : false, smartPoolsOnly: smartPoolsOnly ? smartPoolsOnly : false, }), - [chainIds, farmsOnly, protocols, tokenSymbols, smartPoolsOnly], + [farmsOnly, protocols, tokenSymbols, smartPoolsOnly], )} > {children} diff --git a/apps/web/src/ui/pool/PoolsTable.tsx b/apps/web/src/ui/pool/PoolsTable.tsx index 4f0be23ba9..4a110e5454 100644 --- a/apps/web/src/ui/pool/PoolsTable.tsx +++ b/apps/web/src/ui/pool/PoolsTable.tsx @@ -1,23 +1,26 @@ 'use client' +import { Slot } from '@radix-ui/react-slot' +import { TopPools } from '@sushiswap/graph-client/data-api' + import { UploadIcon } from '@heroicons/react-v1/outline' import { DownloadIcon } from '@heroicons/react-v1/solid' -import { ArrowDownRightIcon } from '@heroicons/react/20/solid' import { + ArrowDownRightIcon, EllipsisHorizontalIcon, GiftIcon, LightBulbIcon, MinusIcon, PlusIcon, } from '@heroicons/react/24/outline' -import { Slot } from '@radix-ui/react-slot' -import { GetPoolsArgs } from '@sushiswap/client' import { + Badge, Button, Card, CardHeader, CardTitle, Chip, + Currency, DataTable, DropdownMenu, DropdownMenuContent, @@ -27,51 +30,170 @@ import { DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, - Loader, SkeletonText, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '@sushiswap/ui' +import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon' import { ColumnDef, Row, SortingState, TableState } from '@tanstack/react-table' import Link from 'next/link' import React, { FC, ReactNode, useCallback, useMemo, useState } from 'react' -import InfiniteScroll from 'react-infinite-scroll-component' -import { Native } from 'sushi/currency' -import { useSWRConfig } from 'swr' - -import { usePoolCount, usePoolsInfinite } from '@sushiswap/client/hooks' -import { PoolHasSteerVaults } from '@sushiswap/steer-sdk' +import { ChainId, ChainKey } from 'sushi/chain' import { isAngleEnabledChainId } from 'sushi/config' -import { - PoolBase, - PoolHistory, - PoolIfIncentivized, - unnestPool, -} from 'sushi/types' +import { Native, Token } from 'sushi/currency' +import { formatNumber, formatUSD } from 'sushi/format' +import { SushiSwapProtocol } from 'sushi/types' +import { ProtocolBadge } from './PoolNameCell' import { usePoolFilters } from './PoolsFiltersProvider' -import { - APR_COLUMN, - FEES_COLUMN, - NAME_COLUMN_POOL, - TVL_COLUMN, - VOLUME_1D_COLUMN, - VOLUME_1M_COLUMN, - VOLUME_1W_COLUMN, -} from './columns' - -type RequiredPool = PoolHasSteerVaults< - PoolIfIncentivized> -> +import { APR_COLUMN, TVL_COLUMN, VOLUME_1D_COLUMN } from './columns' const COLUMNS = [ - NAME_COLUMN_POOL, + { + id: 'name', + header: 'Name', + + cell: (props) => { + const [token0, token1] = useMemo( + () => [ + new Token({ + chainId: props.row.original.chainId, + address: props.row.original.token0Address, + decimals: 0, + }), + new Token({ + chainId: props.row.original.chainId, + address: props.row.original.token1Address, + decimals: 0, + }), + ], + [props.row.original], + ) + + return ( +
+
+ {token0 && token1 ? ( + + } + > + + + + + + ) : null} +
+
+ + {props.row.original.name} +
+ +
+ + + + { + ProtocolBadge[ + props.row.original.protocol as SushiSwapProtocol + ] + } + + +

Protocol version

+
+
+
+ + + +
+ {formatNumber(props.row.original.swapFee * 100)}% +
+
+ +

Swap fee

+
+
+
+ {props.row.original.isIncentivized && ( + + + +
+ 🧑‍🌾{' '} +
+
+ +

Farm rewards available

+
+
+
+ )} + {props.row.original.isSmartPool && ( + + + +
+ 💡 +
+
+ +

Smart Pool available

+
+
+
+ )} +
+
+
+ ) + }, + size: 300, + meta: { + skeleton: , + }, + }, TVL_COLUMN, VOLUME_1D_COLUMN, - VOLUME_1W_COLUMN, - VOLUME_1M_COLUMN, - FEES_COLUMN, + { + id: 'feeUSD1d', + header: 'Fees (24h)', + accessorFn: (row) => row.feeUSD1d, + sortingFn: ({ original: rowA }, { original: rowB }) => + rowA.feeUSD1d - rowB.feeUSD1d, + cell: (props) => + formatUSD(props.row.original.feeUSD1d).includes('NaN') + ? '$0.00' + : formatUSD(props.row.original.feeUSD1d), + meta: { + skeleton: , + }, + }, + { + id: 'txCount1d', + header: 'Transaction Count (24h)', + accessorFn: (row) => row.txCount1d, + sortingFn: ({ original: rowA }, { original: rowB }) => + rowA.txCount1d - rowB.txCount1d, + cell: (props) => props.row.original.txCount1d, + meta: { + skeleton: , + }, + }, APR_COLUMN, { id: 'actions', @@ -85,7 +207,7 @@ const COLUMNS = [ - {row.original.token0.symbol} / {row.original.token1.symbol} + {row.original.name} SushiSwap V3 @@ -97,7 +219,7 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}`} + href={`/${row.original.chainId}/pool/v3/${row.original.address}`} > Pool details @@ -108,7 +230,7 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}/positions/create`} + href={`/${row.original.chainId}/pool/v3/${row.original.address}/positions/create`} > Create position @@ -116,16 +238,16 @@ const COLUMNS = [ - + e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}/smart`} + href={`/${row.original.chainId}/pool/v3/${row.original.address}/smart`} >

- {!row.original.hasEnabledSteerVault + {!row.original.isSmartPool ? 'No Steer vaults available for this pool' : `Smart pools optimize liquidity allocation within custom price ranges, enhancing trading efficiency by providing deeper liquidity around the current price, increasing Liquidity Providers (LP) fee earnings.`} @@ -167,18 +289,18 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/incentivize?chainId=${ + href={`/${ row.original.chainId - }&fromCurrency=${ - row.original.token0.address === + }/pool/incentivize?fromCurrency=${ + row.original.token0Address === Native.onChain(row.original.chainId).wrapped.address ? 'NATIVE' - : row.original.token0.address + : row.original.token0Address }&toCurrency=${ - row.original.token1.address === + row.original.token1Address === Native.onChain(row.original.chainId).wrapped.address ? 'NATIVE' - : row.original.token1.address + : row.original.token1Address }&feeAmount=${row.original.swapFee * 10_000 * 100}`} > @@ -207,7 +329,7 @@ const COLUMNS = [ - {row.original.token0.symbol} / {row.original.token1.symbol} + {row.original.name} {row.original.protocol === 'SUSHISWAP_V2' && ( SushiSwap V2 @@ -221,7 +343,7 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}/add`} + href={`/${row.original.chainId}/pool/v2/${row.original.address}/add`} > Add liquidity @@ -232,7 +354,7 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}/remove`} + href={`/${row.original.chainId}/pool/v2/${row.original.address}/remove`} > Remove liquidity @@ -253,7 +375,7 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}/stake`} + href={`/${row.original.chainId}/pool/v2/${row.original.address}/stake`} > Stake @@ -274,7 +396,7 @@ const COLUMNS = [ onClick={(e) => e.stopPropagation()} shallow={true} className="flex items-center" - href={`/pool/${row.original.id}/unstake`} + href={`/${row.original.chainId}/pool/v2/${row.original.address}/unstake`} > Unstake @@ -288,67 +410,52 @@ const COLUMNS = [ disableLink: true, skeleton: , }, - } satisfies ColumnDef, -] as ColumnDef[] + } satisfies ColumnDef, +] as ColumnDef[] -interface PositionsTableProps { - onRowClick?(row: RequiredPool): void +interface PoolsTableProps { + pools?: TopPools + isLoading?: boolean + onRowClick?(row: TopPools[number]): void } -export const PoolsTable: FC = ({ onRowClick }) => { - const { chainIds, tokenSymbols, protocols, farmsOnly, smartPoolsOnly } = +export const PoolsTable: FC = ({ + pools, + isLoading = false, + onRowClick, +}) => { + const { tokenSymbols, protocols, farmsOnly, smartPoolsOnly } = usePoolFilters() + const [sorting, setSorting] = useState([ { id: 'liquidityUSD', desc: true }, ]) - const sortingId = useMemo(() => { - switch (sorting[0]?.id) { - case 'volumeUSD1d': - return 'volume1d' - case 'volumeUSD1w': - return 'volume1w' - case 'volumeUSD1m': - return 'volume1m' - default: - return sorting[0]?.id - } - }, [sorting]) + const data = useMemo( + () => + pools?.flat()?.filter((pool) => { + if ( + tokenSymbols.length && + !tokenSymbols.some((tokenSymbol) => + pool.name.toLowerCase().includes(tokenSymbol.toLowerCase()), + ) + ) + return false - const args = useMemo(() => { - return { - chainIds: chainIds, - tokenSymbols, - isIncentivized: farmsOnly || undefined, // will filter farms out if set to false, undefined will be filtered out by the parser - hasEnabledSteerVault: smartPoolsOnly || undefined, // will filter smart pools out if set to false, undefined will be filtered out by the parser - isWhitelisted: true, // can be added to filters later, need to put it here so fallback works - orderBy: sortingId, - orderDir: sorting[0] ? (sorting[0].desc ? 'desc' : 'asc') : 'desc', - protocols, - } - }, [ - chainIds, - tokenSymbols, - farmsOnly, - smartPoolsOnly, - sorting, - sortingId, - protocols, - ]) + if ( + protocols.length && + !protocols.some((protocol) => pool.protocol === protocol) + ) + return false - const { - data: pools, - isValidating, - setSize, - } = usePoolsInfinite({ args, shouldFetch: true, swrConfig: useSWRConfig() }) + if (smartPoolsOnly && !pool.isSmartPool) return false - const { data: poolCount } = usePoolCount({ - args, - shouldFetch: true, - swrConfig: useSWRConfig(), - }) + if (farmsOnly && !pool.isIncentivized) return false - const data = useMemo(() => pools?.flat() || [], [pools]) + return true + }) || [], + [pools, tokenSymbols, protocols, farmsOnly, smartPoolsOnly], + ) const state: Partial = useMemo(() => { return { @@ -361,7 +468,7 @@ export const PoolsTable: FC = ({ onRowClick }) => { }, [data?.length, sorting]) const rowRenderer = useCallback( - (row: Row, rowNode: ReactNode) => { + (row: Row, rowNode: ReactNode) => { if (onRowClick) return ( = ({ onRowClick }) => { ) return ( - setSize((prev) => prev + 1)} - hasMore={data.length < (poolCount?.count || 0)} - loader={ -

- -
- } - > - - - - Pools{' '} - {poolCount?.count ? ( - - ({poolCount.count}) - - ) : null} - - - - `/pool/${unnestPool(row).chainId}%3A${unnestPool(row).address}` - } - rowRenderer={rowRenderer} - columns={COLUMNS} - data={data} - /> - - + + + + Pools{' '} + {data.length ? ( + + ({data.length}) + + ) : null} + + + + `/${ChainKey[row.chainId]}/pool/${ + row.protocol === SushiSwapProtocol.SUSHISWAP_V2 ? 'v2' : 'v3' + }/${row.address}` + } + rowRenderer={rowRenderer} + columns={COLUMNS} + data={data} + /> + ) } diff --git a/apps/web/src/ui/pool/PositionCard.tsx b/apps/web/src/ui/pool/PositionCard.tsx index a92144ca26..4fe55635c4 100644 --- a/apps/web/src/ui/pool/PositionCard.tsx +++ b/apps/web/src/ui/pool/PositionCard.tsx @@ -1,3 +1,4 @@ +import { V2Position } from '@sushiswap/graph-client/data-api' import { LinkInternal } from '@sushiswap/ui' import { Button } from '@sushiswap/ui' import { Currency } from '@sushiswap/ui' @@ -9,13 +10,12 @@ import { TooltipTrigger, } from '@sushiswap/ui' import React, { FC } from 'react' -import { UserWithPool } from 'src/app/(evm)/pool/api/user-with-pools/route' import { useTokensFromPool } from 'src/lib/hooks' import { Chain } from 'sushi/chain' import { formatPercent, formatUSD } from 'sushi/format' interface PositionCard { - position: UserWithPool + position: V2Position } export const PositionCardSkeleton = () => { diff --git a/apps/web/src/ui/pool/PositionCardList.tsx b/apps/web/src/ui/pool/PositionCardList.tsx index 6e22ce649e..88f380c679 100644 --- a/apps/web/src/ui/pool/PositionCardList.tsx +++ b/apps/web/src/ui/pool/PositionCardList.tsx @@ -1,29 +1,33 @@ +import { V2Position } from '@sushiswap/graph-client/data-api' import React, { FC, ReactNode } from 'react' -import type { UserWithPool } from 'src/app/(evm)/pool/api/user-with-pools/route' import { useSushiV2UserPositions } from 'src/lib/hooks' -import { SUSHISWAP_V2_SUPPORTED_CHAIN_IDS } from 'sushi/config' +import { ChainId } from 'sushi/chain' import { useAccount } from 'wagmi' interface PositionCardList { + chainId: ChainId children({ positions, isLoading, }: { - positions: UserWithPool[] + positions: V2Position[] isLoading: boolean }): ReactNode } -const value = (position: UserWithPool) => +const value = (position: V2Position) => (Number(position.unstakedBalance + position.stakedBalance) / Number(position.pool.liquidity)) * Number(position.pool.liquidityUSD) -export const PositionCardList: FC = ({ children }) => { +export const PositionCardList: FC = ({ + children, + chainId, +}) => { const { address } = useAccount() const { data: userPositions, isLoading } = useSushiV2UserPositions({ - id: address!, - chainIds: SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, + user: address, + chainId, }) return ( diff --git a/apps/web/src/ui/pool/PositionQuickHoverTooltip.tsx b/apps/web/src/ui/pool/PositionQuickHoverTooltip.tsx index dc258dd58d..a81d7c1387 100644 --- a/apps/web/src/ui/pool/PositionQuickHoverTooltip.tsx +++ b/apps/web/src/ui/pool/PositionQuickHoverTooltip.tsx @@ -1,21 +1,15 @@ import { ArrowDownIcon, MinusIcon, PlusIcon } from '@heroicons/react-v1/solid' +import { V2Pool, V3Pool } from '@sushiswap/graph-client/data-api' import { Button } from '@sushiswap/ui' import { Currency } from '@sushiswap/ui' import { LinkInternal } from '@sushiswap/ui' import { List } from '@sushiswap/ui' import React, { FC, useCallback } from 'react' +import { ChainId } from 'sushi/chain' import { formatPercent, formatUSD } from 'sushi/format' import { ZERO } from 'sushi/math' - -import type { - PoolBase, - PoolWithAprs, - PoolWithIncentives, - SushiPositionStaked, - SushiPositionWithPool, -} from 'sushi' -import { ChainId } from 'sushi/chain' import { useAccount, useSwitchChain } from 'wagmi' + import { PoolPositionProvider, usePoolPosition } from './PoolPositionProvider' import { PoolPositionRewardsProvider, @@ -27,19 +21,17 @@ import { } from './PoolPositionStakedProvider' interface PositionQuickHoverTooltipProps { - row: SushiPositionStaked< - SushiPositionWithPool>> - > + pool: NonNullable } export const PositionQuickHoverTooltip: FC = ({ - row, + pool, }) => { return ( - - - - <_PositionQuickHoverTooltip row={row} /> + + + + <_PositionQuickHoverTooltip pool={pool} /> @@ -47,7 +39,7 @@ export const PositionQuickHoverTooltip: FC = ({ } const _PositionQuickHoverTooltip: FC = ({ - row, + pool, }) => { const { switchChain } = useSwitchChain() const { chain } = useAccount() @@ -63,12 +55,12 @@ const _PositionQuickHoverTooltip: FC = ({ usePoolPositionRewards() const _harvest = useCallback(() => { - if (row.pool.chainId !== chain?.id) { - switchChain?.({ chainId: row.pool.chainId as ChainId }) + if (pool.chainId !== chain?.id) { + switchChain?.({ chainId: pool.chainId as ChainId }) } else if (harvest) { harvest() } - }, [chain?.id, harvest, row.pool.chainId, switchChain]) + }, [chain?.id, harvest, pool.chainId, switchChain]) return (
@@ -80,21 +72,18 @@ const _PositionQuickHoverTooltip: FC = ({ • Rewards + Fees - {formatPercent(row.pool.totalApr1d)}{' '} + {formatPercent(pool.totalApr1d)}{' '} - {formatPercent(row.pool.incentiveApr)} +{' '} - {formatPercent(row.pool.feeApr1d)} + {formatPercent(pool.incentiveApr)} + {formatPercent(pool.feeApr1d)}
@@ -108,7 +97,7 @@ const _PositionQuickHoverTooltip: FC = ({
- {row.pool.incentives && pendingRewards.length > 0 && ( + {pool.incentives && pendingRewards.length > 0 && ( <> Pending rewards @@ -184,7 +173,7 @@ const _PositionQuickHoverTooltip: FC = ({ - {row.pool.incentives && + {pool.incentives && stakedUnderlying0?.greaterThan(ZERO) && stakedUnderlying1?.greaterThan(ZERO) && ( diff --git a/apps/web/src/ui/pool/PositionsTab.tsx b/apps/web/src/ui/pool/PositionsTab.tsx index 3c466694f6..245b66b373 100644 --- a/apps/web/src/ui/pool/PositionsTab.tsx +++ b/apps/web/src/ui/pool/PositionsTab.tsx @@ -9,8 +9,9 @@ import { TabsList, TabsTrigger, } from '@sushiswap/ui' -import React, { useState } from 'react' +import React, { FC, useState } from 'react' +import { ChainId, ChainKey } from 'sushi/chain' import { ConcentratedPositionsTable } from './ConcentratedPositionsTable/ConcentratedPositionsTable' import { PositionsTable } from './PositionsTable' import { SmartPositionsTable } from './SmartPositionsTable' @@ -52,7 +53,7 @@ const ITEMS: { id: string; value: string; children: React.ReactNode }[] = [ }, ] -export const PositionsTab = () => { +export const PositionsTab: FC<{ chainId: ChainId }> = ({ chainId }) => { const [tab, setTab] = useState('v3') return ( @@ -86,13 +87,21 @@ export const PositionsTab = () => {
- + - `/pool/${row.pool.id}`} /> + + `/${ChainKey[chainId]}/pool/v2/${row.pool.address}/add` + } + /> - +
diff --git a/apps/web/src/ui/pool/PositionsTable.tsx b/apps/web/src/ui/pool/PositionsTable.tsx index 22867e8ce3..dd1c67b332 100644 --- a/apps/web/src/ui/pool/PositionsTable.tsx +++ b/apps/web/src/ui/pool/PositionsTable.tsx @@ -1,13 +1,11 @@ -import { Card, CardHeader, CardTitle, DataTable } from '@sushiswap/ui' -import { Slot } from '@sushiswap/ui' +import { Card, CardHeader, CardTitle, DataTable, Slot } from '@sushiswap/ui' import { DisplayColumnDef, PaginationState, Row } from '@tanstack/react-table' -import React, { FC, ReactNode, useCallback, useMemo, useState } from 'react' +import { FC, ReactNode, useCallback, useMemo, useState } from 'react' import { useSushiV2UserPositions } from 'src/lib/hooks' -import { SUSHISWAP_V2_SUPPORTED_CHAIN_IDS } from 'sushi/config' -import type { UserWithPool } from 'src/app/(evm)/pool/api/user-with-pools/route' +import { V2Position } from '@sushiswap/graph-client/data-api' +import { ChainId } from 'sushi' import { useAccount } from 'wagmi' -import { usePoolFilters } from './PoolsFiltersProvider' import { APR_COLUMN, NAME_COLUMN_POOL, VALUE_COLUMN } from './columns' // ! Column types have to be checked manually @@ -15,56 +13,39 @@ const COLUMNS = [ NAME_COLUMN_POOL, VALUE_COLUMN, APR_COLUMN, -] as DisplayColumnDef[] +] as DisplayColumnDef[] interface PositionsTableProps { - onRowClick?(row: UserWithPool): void - rowLink?(row: UserWithPool): string + chainId: ChainId + onRowClick?(row: V2Position): void + rowLink?(row: V2Position): string } const tableState = { sorting: [{ id: 'value', desc: true }] } export const PositionsTable: FC = ({ + chainId, onRowClick, rowLink, }) => { const { address } = useAccount() - const { chainIds, tokenSymbols } = usePoolFilters() const [paginationState, setPaginationState] = useState({ pageIndex: 0, pageSize: 10, }) - const { data: positions, isLoading } = useSushiV2UserPositions( - { - id: address!, - chainIds: SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - }, - !!address, - ) + const { data: positions, isLoading } = useSushiV2UserPositions({ + user: address, + chainId, + }) const _positions = useMemo(() => { if (!positions) return [] - - const _tokenSymbols = tokenSymbols?.filter((el) => el !== '') || [] - const searchFiltered = positions.filter((el) => - _tokenSymbols.length > 0 - ? _tokenSymbols.some((symbol) => { - return [el.pool?.token0.symbol, el.pool?.token1.symbol].includes( - symbol.toUpperCase(), - ) - }) - : true, - ) - - const chainFiltered = searchFiltered.filter((el) => - chainIds.includes(el.pool.chainId as (typeof chainIds)[number]), - ) - return chainFiltered - }, [positions, tokenSymbols, chainIds]) + return positions + }, [positions]) const rowRenderer = useCallback( - (row: Row, rowNode: ReactNode) => { + (row: Row, rowNode: ReactNode) => { if (onRowClick) return ( = ({ My Positions{' '} - ({_positions.length}) + ({positions?.length ?? 0}) diff --git a/apps/web/src/ui/pool/RemoveSectionLegacy.tsx b/apps/web/src/ui/pool/RemoveSectionLegacy.tsx index 0a17bff32b..f1234df8b0 100644 --- a/apps/web/src/ui/pool/RemoveSectionLegacy.tsx +++ b/apps/web/src/ui/pool/RemoveSectionLegacy.tsx @@ -1,6 +1,5 @@ 'use client' -import { Pool } from '@sushiswap/client' import { SlippageToleranceStorageKey, TTLStorageKey, @@ -29,6 +28,7 @@ import { Amount, Native } from 'sushi/currency' import { Percent } from 'sushi/math' import { SendTransactionReturnType, encodeFunctionData } from 'viem' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { PermitInfo, PermitType, @@ -66,7 +66,7 @@ const REMOVE_V2_LIQUIDITY_PERMIT_INFO: PermitInfo = { } interface RemoveSectionLegacyProps { - pool: Pool + pool: V2Pool } export const RemoveSectionLegacy: FC = diff --git a/apps/web/src/ui/pool/RemoveSectionUnstake.tsx b/apps/web/src/ui/pool/RemoveSectionUnstake.tsx index 211ac7bf47..8f1ba9c392 100644 --- a/apps/web/src/ui/pool/RemoveSectionUnstake.tsx +++ b/apps/web/src/ui/pool/RemoveSectionUnstake.tsx @@ -1,7 +1,5 @@ 'use client' -import { ChefType, Pool } from '@sushiswap/client' -import { usePool } from '@sushiswap/client/hooks' import { useIsMounted } from '@sushiswap/hooks' import { Card, @@ -20,23 +18,23 @@ import { Dots } from '@sushiswap/ui' import { FC, useMemo, useState } from 'react' import { ChainId } from 'sushi/chain' import { ZERO } from 'sushi/math' -import { useSWRConfig } from 'swr' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { useMasterChefWithdraw } from 'src/lib/wagmi/hooks/master-chef/use-master-chef-withdraw' import { Checker } from 'src/lib/wagmi/systems/Checker' import { withCheckerRoot } from 'src/lib/wagmi/systems/Checker/Provider' +import { ChefType } from 'sushi' import { usePoolPositionStaked } from './PoolPositionStakedProvider' interface AddSectionStakeProps { chainId: ChainId - pool: Pool + pool: V2Pool chefType: ChefType farmId: number } -export const RemoveSectionUnstake: FC<{ poolId: string }> = ({ poolId }) => { +export const RemoveSectionUnstake: FC<{ pool: V2Pool }> = ({ pool }) => { const isMounted = useIsMounted() - const { data: pool } = usePool({ args: poolId, swrConfig: useSWRConfig() }) if (!pool) return <> @@ -45,7 +43,7 @@ export const RemoveSectionUnstake: FC<{ poolId: string }> = ({ poolId }) => { return ( <_RemoveSectionUnstake - chainId={pool.chainId as ChainId} + chainId={pool.chainId} pool={pool} chefType={pool.incentives[0].chefType} farmId={Number(pool.incentives[0].pid)} diff --git a/apps/web/src/ui/pool/RewardsSection.tsx b/apps/web/src/ui/pool/RewardsSection.tsx index bda147dd27..b4f56f93d2 100644 --- a/apps/web/src/ui/pool/RewardsSection.tsx +++ b/apps/web/src/ui/pool/RewardsSection.tsx @@ -35,7 +35,7 @@ const COLUMNS = [ export const RewardsSection: FC = () => { const { address } = useAccount() - const { chainIds, tokenSymbols } = usePoolFilters() + const { tokenSymbols } = usePoolFilters() const { data, isInitialLoading } = useAngleRewardsMultipleChains({ chainIds: ANGLE_SUPPORTED_CHAIN_IDS, account: address, @@ -58,28 +58,24 @@ export const RewardsSection: FC = () => { const positions = useMemo(() => { const _tokenSymbols = tokenSymbols?.filter((el) => el !== '') || [] - return (data ?? []) - .filter((el) => - chainIds.includes(el.chainId as (typeof chainIds)[number]), - ) - .flatMap((el) => { - return Object.values(el.pools ?? {}) - .filter( - (el) => - (el?.userBalanceToken0 ?? 0) + (el?.userBalanceToken1 ?? 0) > 0 || - Object.keys(el.rewardsPerToken).length > 0, - ) - .filter((el) => - _tokenSymbols.length > 0 - ? _tokenSymbols.some((symbol) => { - return [el.token0.symbol, el.token1.symbol].includes( - symbol.toUpperCase(), - ) - }) - : true, - ) - }) - }, [chainIds, tokenSymbols, data]) + return (data ?? []).flatMap((el) => { + return Object.values(el.pools ?? {}) + .filter( + (el) => + (el?.userBalanceToken0 ?? 0) + (el?.userBalanceToken1 ?? 0) > 0 || + Object.keys(el.rewardsPerToken).length > 0, + ) + .filter((el) => + _tokenSymbols.length > 0 + ? _tokenSymbols.some((symbol) => { + return [el.token0.symbol, el.token1.symbol].includes( + symbol.toUpperCase(), + ) + }) + : true, + ) + }) + }, [tokenSymbols, data]) const rowLink = useCallback((row: AngleRewardsPool) => { return `/pool/${row.id}` diff --git a/apps/web/src/ui/pool/SelectNetworkWidget.tsx b/apps/web/src/ui/pool/SelectNetworkWidget.tsx index f6f1b72181..0647436ed6 100644 --- a/apps/web/src/ui/pool/SelectNetworkWidget.tsx +++ b/apps/web/src/ui/pool/SelectNetworkWidget.tsx @@ -6,7 +6,7 @@ import React, { FC, memo } from 'react' import { ChainId, chainName } from 'sushi/chain' interface SelectNetworkWidgetProps { - networks: ChainId[] + networks: readonly ChainId[] selectedNetwork: ChainId onSelect(chainId: ChainId): void title?: string diff --git a/apps/web/src/ui/pool/SmartPoolsTable.tsx b/apps/web/src/ui/pool/SmartPoolsTable.tsx index 374827f908..5485f61785 100644 --- a/apps/web/src/ui/pool/SmartPoolsTable.tsx +++ b/apps/web/src/ui/pool/SmartPoolsTable.tsx @@ -10,7 +10,7 @@ import { MinusIcon, PlusIcon, } from '@heroicons/react/24/outline' -import { SteerVaults } from '@sushiswap/client' +import { SmartPoolsV1 } from '@sushiswap/graph-client/data-api' import { Badge, Button, @@ -45,17 +45,15 @@ import { SortingState, TableState, } from '@tanstack/react-table' -import React, { useMemo, useState } from 'react' -import { Native, Token, unwrapToken } from 'sushi/currency' -import { formatPercent, formatUSD } from 'sushi/format' - -import { useSteerVaults } from '@sushiswap/client/hooks' import Link from 'next/link' +import React, { FC, useMemo, useState } from 'react' import { isAngleEnabledChainId } from 'sushi/config' +import { Native, Token, unwrapToken } from 'sushi/currency' +import { formatPercent, formatUSD } from 'sushi/format' +import { SushiSwapProtocol } from 'sushi/types' import { APRHoverCard } from './APRHoverCard' import { ProtocolBadge } from './PoolNameCell' import { usePoolFilters } from './PoolsFiltersProvider' -import { SteerStrategyConfig } from './Steer/constants' const COLUMNS = [ { @@ -112,7 +110,7 @@ const COLUMNS = [ - {ProtocolBadge[original.pool.protocol]} + {ProtocolBadge[original.protocol as SushiSwapProtocol]}

Protocol version

@@ -123,7 +121,7 @@ const COLUMNS = [
- {formatPercent(original.pool.swapFee)} + {formatPercent(original.swapFee)}
@@ -131,7 +129,7 @@ const COLUMNS = [
- {original.pool.isIncentivized && ( + {original.isIncentivized && ( @@ -194,7 +192,7 @@ const COLUMNS = [ -

{SteerStrategyConfig[original.strategy].description}

+

{original.description}

@@ -206,21 +204,21 @@ const COLUMNS = [ { id: 'liquidityUSD', header: 'TVL', - accessorFn: (row) => row.reserveUSD, + accessorFn: (row) => row.vaultLiquidityUSD, cell: ({ row: { original } }) => ( - {formatUSD(original.pool.liquidityUSD).includes('NaN') + {formatUSD(original.liquidityUSD).includes('NaN') ? '$0.00' - : formatUSD(original.pool.liquidityUSD)} + : formatUSD(original.liquidityUSD)} - {formatUSD(original.reserveUSD).includes('NaN') + {formatUSD(original.vaultLiquidityUSD).includes('NaN') ? '$0.00' - : formatUSD(original.reserveUSD)} + : formatUSD(original.vaultLiquidityUSD)} @@ -237,11 +235,11 @@ const COLUMNS = [ { id: 'fees1d', header: 'Fees (24h)', - accessorFn: (row) => row.pool.feesUSD1d, + accessorFn: (row) => row.feeUSD1d, cell: (props) => - formatUSD(props.row.original.pool.feesUSD1d).includes('NaN') + formatUSD(props.row.original.feeUSD1d).includes('NaN') ? '$0.00' - : formatUSD(props.row.original.pool.feesUSD1d), + : formatUSD(props.row.original.feeUSD1d), meta: { skeleton: , }, @@ -249,18 +247,15 @@ const COLUMNS = [ { id: 'totalApr1d', header: 'APR (24h)', - accessorFn: (row) => (row.apr1d + row.pool.incentiveApr) * 100, + accessorFn: (row) => (row.feeApr1d + row.incentiveApr) * 100, cell: (props) => { - const totalAPR = - (props.row.original.apr1d + props.row.original.pool.incentiveApr) * 100 - return (
- {formatPercent(props.row.original.pool.totalApr1d)} + {formatPercent(props.row.original.feeAndIncentiveApr1d)} @@ -269,11 +264,20 @@ const COLUMNS = [ - {formatPercent(totalAPR / 100)} + {formatPercent(props.row.original.stakedAndIncentiveApr1d)}
@@ -286,7 +290,7 @@ const COLUMNS = [ { id: 'actions', cell: ({ row }) => - row.original.pool.protocol === 'SUSHISWAP_V3' ? ( + row.original.protocol === 'SUSHISWAP_V3' ? ( { /> No network found. - {AMM_SUPPORTED_CHAIN_IDS.map((chainId) => ( + {chainIds.map((_chainId) => ( - onClick(+value.split('__')[1] as (typeof chainIds)[number]) - } + key={_chainId} + value={_chainId.toString()} + onSelect={onClick} className="py-2 pl-8 pr-2" > - {values.includes(chainId) ? ( + {chainId === _chainId ? ( { ) : null} - {Chain.from(chainId)?.name} + {Chain.from(_chainId)?.name} ))} diff --git a/apps/web/src/ui/pool/TableFiltersPoolType.tsx b/apps/web/src/ui/pool/TableFiltersPoolType.tsx index 2be1a94e1b..2e4cb4410a 100644 --- a/apps/web/src/ui/pool/TableFiltersPoolType.tsx +++ b/apps/web/src/ui/pool/TableFiltersPoolType.tsx @@ -1,7 +1,6 @@ 'use client' import { PlusCircleIcon } from '@heroicons/react/24/outline' -import { Protocol } from '@sushiswap/client' import { useMutationObserver } from '@sushiswap/hooks' import { Chip, @@ -21,23 +20,23 @@ import { Command, CommandGroup, CommandItem } from '@sushiswap/ui' import { CheckIcon } from '@sushiswap/ui/icons/CheckIcon' import React, { FC, useCallback, useState, useTransition } from 'react' +import { SushiSwapProtocol } from 'sushi' import { PROTOCOL_MAP } from '../../lib/constants' import { usePoolFilters, useSetPoolFilters } from './PoolsFiltersProvider' -export const POOL_TYPES = [Protocol.SUSHISWAP_V3, Protocol.SUSHISWAP_V2] +export const POOL_TYPES = [ + SushiSwapProtocol.SUSHISWAP_V3, + SushiSwapProtocol.SUSHISWAP_V2, +] const POOL_DESCRIPTIONS = { - [Protocol.SUSHISWAP_V3]: + [SushiSwapProtocol.SUSHISWAP_V3]: 'A pool type known as concentrated liquidity, which maximizes capital efficiency by providing the liquidity in a pre-defined range around the current price of the pair. If a user’s position moves out of range, it will not be capturing fees and will need to adjust their range or wait for the price to return to it.', - [Protocol.SUSHISWAP_V2]: + [SushiSwapProtocol.SUSHISWAP_V2]: 'The traditional pool type with a fixed fee of .30% that utilizes a constant product formula to ensure a 50/50 composition of each asset in the pool.', - [Protocol.BENTOBOX_STABLE]: - 'A customizable pool type with a user-defined fee tier that is best suited for like-kind assets (eg. stablecoin pairs, ETH/stETH) that efficiently captures fees and utilizes a constant product formula to ensure a 50/50 composition of each asset in the pool.', - [Protocol.BENTOBOX_CLASSIC]: - 'A customizable pool type with a user-defined fee tier that utilizes a constant product formula to ensure a 50/50 composition of each asset in the pool.', } -const isAllThenNone = (protocols: Protocol[]) => +const isAllThenNone = (protocols: SushiSwapProtocol[]) => protocols.length === POOL_TYPES.length ? [] : protocols export const TableFiltersPoolType: FC = () => { @@ -45,16 +44,18 @@ export const TableFiltersPoolType: FC = () => { const [open, setOpen] = useState(false) const { protocols } = usePoolFilters() const setFilters = useSetPoolFilters() - const [peekedProtocol, setPeekedProtocol] = React.useState( + const [peekedProtocol, setPeekedProtocol] = React.useState( POOL_TYPES[0], ) - const [localValue, setValues] = useState(isAllThenNone(protocols)) + const [localValue, setValues] = useState( + isAllThenNone(protocols), + ) const values = pending ? localValue : isAllThenNone(protocols) const protocolHandler = useCallback( - (item: Protocol) => { - let _newValues: Protocol[] + (item: SushiSwapProtocol) => { + let _newValues: SushiSwapProtocol[] if (values?.includes(item)) { _newValues = values.filter((el) => el !== item) } else { @@ -140,7 +141,7 @@ export const TableFiltersPoolType: FC = () => { protocol={el} onPeek={(protocol) => setPeekedProtocol(protocol)} onSelect={() => - protocolHandler(el.toUpperCase() as Protocol) + protocolHandler(el.toUpperCase() as SushiSwapProtocol) } /> ))} @@ -154,10 +155,10 @@ export const TableFiltersPoolType: FC = () => { } interface ProtocolItemProps { - protocol: Protocol + protocol: SushiSwapProtocol onSelect: () => void - selected: Protocol[] - onPeek: (model: Protocol) => void + selected: SushiSwapProtocol[] + onPeek: (model: SushiSwapProtocol) => void } const ProtocolItem: FC = ({ diff --git a/apps/web/src/ui/pool/TableFiltersResetButton.tsx b/apps/web/src/ui/pool/TableFiltersResetButton.tsx index f30399298a..52282c2432 100644 --- a/apps/web/src/ui/pool/TableFiltersResetButton.tsx +++ b/apps/web/src/ui/pool/TableFiltersResetButton.tsx @@ -4,29 +4,21 @@ import { XMarkIcon } from '@heroicons/react/24/solid' import { Button } from '@sushiswap/ui' import React, { FC, useCallback, useMemo, useState, useTransition } from 'react' -import { AMM_SUPPORTED_CHAIN_IDS } from '../../config' import { usePoolFilters, useSetPoolFilters } from './PoolsFiltersProvider' import { POOL_TYPES } from './TableFiltersPoolType' export const TableFiltersResetButton: FC = () => { const [isPending, startTransition] = useTransition() - const { protocols, chainIds, tokenSymbols, farmsOnly, smartPoolsOnly } = + const { protocols, tokenSymbols, farmsOnly, smartPoolsOnly } = usePoolFilters() const setFilters = useSetPoolFilters() - const networks = useMemo( - () => (AMM_SUPPORTED_CHAIN_IDS.length === chainIds.length ? [] : chainIds), - [chainIds], - ) const types = useMemo( () => (protocols.length === POOL_TYPES.length ? [] : protocols), [protocols], ) const [show, setShow] = useState( - (types?.length ?? 0) + - (networks?.length ?? 0) + - (tokenSymbols?.length ?? 0) > - 0 || + (types?.length ?? 0) + (tokenSymbols?.length ?? 0) > 0 || farmsOnly || smartPoolsOnly, ) @@ -36,7 +28,6 @@ export const TableFiltersResetButton: FC = () => { startTransition(() => { setFilters({ protocols: undefined, - chainIds: undefined, tokenSymbols: undefined, farmsOnly: undefined, smartPoolsOnly: undefined, @@ -47,10 +38,7 @@ export const TableFiltersResetButton: FC = () => { if ( isPending ? show - : (types?.length ?? 0) + - (networks?.length ?? 0) + - (tokenSymbols?.length ?? 0) > - 0 || + : (types?.length ?? 0) + (tokenSymbols?.length ?? 0) > 0 || farmsOnly || smartPoolsOnly ) { diff --git a/apps/web/src/ui/pool/UnknownTokenAlert.tsx b/apps/web/src/ui/pool/UnknownTokenAlert.tsx index da4115678e..0e854a49e0 100644 --- a/apps/web/src/ui/pool/UnknownTokenAlert.tsx +++ b/apps/web/src/ui/pool/UnknownTokenAlert.tsx @@ -1,6 +1,6 @@ 'use client' -import { Pool } from '@sushiswap/client' +import { V2Pool } from '@sushiswap/graph-client/data-api' import { useCustomTokens } from '@sushiswap/hooks' import { Message } from '@sushiswap/ui' import { FC, useMemo } from 'react' @@ -9,10 +9,10 @@ import { ChainId } from 'sushi/chain' import { shortenAddress } from 'sushi/format' interface UnknownTokenAlert { - pool: Pool + pool: V2Pool } -const tokenName = (token: Pool['token0']) => +const tokenName = (token: V2Pool['token0']) => token.name ? `${token.name} (${token.symbol})` : shortenAddress(token.address) export const UnknownTokenAlert: FC = ({ pool }) => { diff --git a/apps/web/src/app/(evm)/pool/fees/page.tsx b/apps/web/src/ui/pool/V3FeesTable.tsx similarity index 76% rename from apps/web/src/app/(evm)/pool/fees/page.tsx rename to apps/web/src/ui/pool/V3FeesTable.tsx index e7ebd2d553..597cce7cc7 100644 --- a/apps/web/src/app/(evm)/pool/fees/page.tsx +++ b/apps/web/src/ui/pool/V3FeesTable.tsx @@ -1,10 +1,9 @@ 'use client' +import { V3BasePool } from '@sushiswap/graph-client/data-api' import { Badge, Button, - Card, - Container, Currency, DataTable, SkeletonCircle, @@ -18,19 +17,23 @@ import { import { NetworkIcon } from '@sushiswap/ui/icons/NetworkIcon' import { ColumnDef, SortingState, TableState } from '@tanstack/react-table' import { FC, MouseEventHandler, useCallback, useMemo, useState } from 'react' -import { V3PoolsWithFees, useV3PoolsWithFees } from 'src/lib/hooks' import { ProtocolBadge } from 'src/ui/pool/PoolNameCell' -import { Address, Chain } from 'sushi' +import { Address, Chain, ChainId } from 'sushi' import { uniswapV3PoolAbi } from 'sushi/abi' -import { SushiSwapV3ChainId, isSushiSwapV3ChainId } from 'sushi/config' +import { Token } from 'sushi/currency' import { formatNumber, formatUSD } from 'sushi/format' import { - useChainId, + useSwitchChain, useWaitForTransactionReceipt, useWriteContract, } from 'wagmi' -const NAME_COLUMN_POOL: ColumnDef = { +type V3Pool = Omit & { + token0: Token + token1: Token +} + +const NAME_COLUMN_POOL: ColumnDef = { id: 'name', header: 'Name', @@ -110,7 +113,7 @@ const NAME_COLUMN_POOL: ColumnDef = { size: 300, } -const TVL_COLUMN: ColumnDef = { +const TVL_COLUMN: ColumnDef = { id: 'liquidityUSD', header: 'TVL', accessorFn: (row) => row.liquidityUSD, @@ -125,7 +128,7 @@ const TVL_COLUMN: ColumnDef = { }, } -const VOLUME_COLUMN: ColumnDef = { +const VOLUME_COLUMN: ColumnDef = { id: 'volumeUSD', header: 'Volume', accessorFn: (row) => row.volumeUSD, @@ -140,7 +143,11 @@ const VOLUME_COLUMN: ColumnDef = { }, } -const EnableProtocolFeeButton: FC<{ pool: Address }> = ({ pool }) => { +const EnableProtocolFeeButton: FC<{ pool: Address; chainId: ChainId }> = ({ + pool, + chainId, +}) => { + const { switchChainAsync } = useSwitchChain() const { data: txHash, writeContract, isPending } = useWriteContract() const { isLoading, isSuccess } = useWaitForTransactionReceipt({ hash: txHash, @@ -149,14 +156,17 @@ const EnableProtocolFeeButton: FC<{ pool: Address }> = ({ pool }) => { const onClick: MouseEventHandler = useCallback( (e) => { e.preventDefault() - writeContract({ - address: pool, - abi: uniswapV3PoolAbi, - functionName: 'setFeeProtocol', - args: [4, 4], - }) + switchChainAsync({ chainId }).then(() => + writeContract({ + address: pool, + abi: uniswapV3PoolAbi, + functionName: 'setFeeProtocol', + args: [4, 4], + chainId, + }), + ) }, - [writeContract, pool], + [writeContract, pool, chainId, switchChainAsync], ) return isSuccess ? ( @@ -173,18 +183,21 @@ const EnableProtocolFeeButton: FC<{ pool: Address }> = ({ pool }) => { ) } -const PROTOCOL_FEE_COLUMN: ColumnDef = { +const PROTOCOL_FEE_COLUMN: ColumnDef = { id: 'isProtocolFeeEnabled', header: 'Fees Enabled', accessorFn: (row) => row.volumeUSD, sortingFn: ({ original: rowA }, { original: rowB }) => - +rowA.isProtocolFeeEnabled - +rowB.isProtocolFeeEnabled, + +rowA.isProtocolFeeEnabled! - +rowB.isProtocolFeeEnabled!, cell: (props) => (
{props.row.original.isProtocolFeeEnabled ? ( '✅' ) : ( - + )}
), @@ -200,21 +213,23 @@ const COLUMNS = [ PROTOCOL_FEE_COLUMN, ] -export default function Page() { - const chainId = useChainId() - - const { data: pools, isLoading } = useV3PoolsWithFees( - { - chainId: chainId as SushiSwapV3ChainId, - }, - { enabled: isSushiSwapV3ChainId(chainId), staleTime: Infinity }, - ) - +export const V3FeesTable: FC<{ pools: V3BasePool[]; chainId: ChainId }> = ({ + pools, + chainId, +}) => { const [sorting, setSorting] = useState([ { id: 'liquidityUSD', desc: true }, ]) - const data = useMemo(() => pools?.flat() || [], [pools]) + const data: V3Pool[] = useMemo( + () => + pools?.map((pool) => ({ + ...pool, + token0: new Token(pool.token0), + token1: new Token(pool.token1), + })) ?? [], + [pools], + ) const state: Partial = useMemo(() => { return { @@ -227,19 +242,13 @@ export default function Page() { }, [data.length, sorting]) return ( - - - - Chain.from(chainId).getAccountUrl(row.address) - } - /> - - + Chain.from(chainId).getAccountUrl(row.address)} + /> ) } diff --git a/apps/web/src/ui/pool/PositionView.tsx b/apps/web/src/ui/pool/V3PositionView.tsx similarity index 98% rename from apps/web/src/ui/pool/PositionView.tsx rename to apps/web/src/ui/pool/V3PositionView.tsx index efd6463927..6ba5920f52 100644 --- a/apps/web/src/ui/pool/PositionView.tsx +++ b/apps/web/src/ui/pool/V3PositionView.tsx @@ -40,7 +40,7 @@ import { useConcentratedLiquidityPositionsFromTokenId } from 'src/lib/wagmi/hook import { useTokenWithCache } from 'src/lib/wagmi/hooks/tokens/useTokenWithCache' import { getDefaultTTL } from 'src/lib/wagmi/hooks/utils/hooks/useTransactionDeadline' import { Checker } from 'src/lib/wagmi/systems/Checker' -import { Chain } from 'sushi/chain' +import { Chain, ChainKey } from 'sushi/chain' import { SushiSwapV3ChainId, isAngleEnabledChainId } from 'sushi/config' import { Amount, unwrapToken } from 'sushi/currency' import { formatPercent, formatUSD } from 'sushi/format' @@ -63,13 +63,12 @@ import { ConcentratedLiquidityRemoveWidget } from './ConcentratedLiquidityRemove import { ConcentratedLiquidityWidget } from './ConcentratedLiquidityWidget' import { DistributionDataTable } from './DistributionDataTable' -const Component: FC<{ id: string }> = ({ id }) => { +const Component: FC<{ chainId: string; address: string; position: string }> = ({ + chainId: _chainId, + address: poolId, + position: tokenId, +}) => { const { address } = useAccount() - const [_chainId, poolId, tokenId] = id.split('%3A') as [ - SushiSwapV3ChainId, - string, - string, - ] const chainId = Number(_chainId) as SushiSwapV3ChainId const [invert, setInvert] = useState(false) @@ -688,7 +687,9 @@ const Component: FC<{ id: string }> = ({ id }) => { Anyone can add distributions to this pool.{' '} {_token0 && _token1 ? ( = ({ id }) => { ) } -export const PositionView = ({ params }: { params: { id: string } }) => { +export const V3PositionView = ({ + params: { chainId, address, position }, +}: { params: { chainId: string; address: string; position: string } }) => { return ( - + ) } diff --git a/apps/web/src/ui/pool/columns.tsx b/apps/web/src/ui/pool/columns.tsx index 3dc34fa428..a1cba00464 100644 --- a/apps/web/src/ui/pool/columns.tsx +++ b/apps/web/src/ui/pool/columns.tsx @@ -1,4 +1,4 @@ -import { SushiV2StakedUnstakedPosition } from '@sushiswap/graph-client/composite/sushi-v2-staked-unstaked-positions' +import { V2Position } from '@sushiswap/graph-client/data-api' import { AngleRewardsPool } from '@sushiswap/react-query' import { PoolHasSteerVaults } from '@sushiswap/steer-sdk' import { @@ -253,7 +253,7 @@ export const NETWORK_COLUMN = { meta: { skeleton: , }, -} as const satisfies ColumnDef +} as const satisfies ColumnDef export const APR_COLUMN = { id: 'totalApr1d', @@ -399,8 +399,8 @@ export const TX_AMOUNT_IN_V2_COLUMN = ( } />{' '} {row.original.amount0In !== '0' - ? row.original.pool.token0.symbol - : row.original.pool.token1.symbol} + ? row.original.symbol0 + : row.original.symbol1}
) case TransactionType.Mint: @@ -408,7 +408,7 @@ export const TX_AMOUNT_IN_V2_COLUMN = ( return ( {' '} - {row.original.pool.token0.symbol} + {row.original.symbol0} ) } @@ -436,8 +436,8 @@ export const TX_AMOUNT_OUT_V2_COLUMN = ( ).toPrecision(2)} />{' '} {row.original.amount0Out !== '0' - ? row.original.pool.token0.symbol - : row.original.pool.token1.symbol} + ? row.original.symbol0 + : row.original.symbol1} ) case TransactionType.Mint: @@ -445,7 +445,7 @@ export const TX_AMOUNT_OUT_V2_COLUMN = ( return ( {' '} - {row.original.pool.token1.symbol} + {row.original.symbol1} ) } diff --git a/apps/web/src/ui/stake/SushiBarProvider.tsx b/apps/web/src/ui/stake/SushiBarProvider.tsx index aea14c893a..721abafda7 100644 --- a/apps/web/src/ui/stake/SushiBarProvider.tsx +++ b/apps/web/src/ui/stake/SushiBarProvider.tsx @@ -23,8 +23,14 @@ export const SushiBarProvider: FC<{ const [sushiBalance, totalSupply, apy] = useMemo( () => [ - tryParseAmount(data?.sushiSupply, SUSHI[ChainId.ETHEREUM]), - tryParseAmount(data?.xSushiSupply, XSUSHI[ChainId.ETHEREUM]), + tryParseAmount( + (data?.sushiSupply ?? 0).toString(), + SUSHI[ChainId.ETHEREUM], + ), + tryParseAmount( + (data?.xSushiSupply ?? 0).toString(), + XSUSHI[ChainId.ETHEREUM], + ), data && data?.apr1m !== undefined ? Number(data.apr1m) * 12 : undefined, ], [data], diff --git a/apps/web/test/helpers/pool.ts b/apps/web/test/helpers/pool.ts index 9a721d7ea4..7375632941 100644 --- a/apps/web/test/helpers/pool.ts +++ b/apps/web/test/helpers/pool.ts @@ -46,7 +46,7 @@ interface AddV2LiquidityArgs { amount0: string amount1: string } -const BASE_URL = 'http://localhost:3000/pool' +const BASE_URL = 'http://localhost:3000' export class PoolPage extends BaseActions { readonly chainId: number @@ -260,13 +260,11 @@ export class PoolPage extends BaseActions { tokenB: fakeToken, fee: SushiSwapV3FeeAmount.HIGH, }) - const removeLiquidityUrl = BASE_URL.concat( - `/${this.chainId}:${poolAddress}`, + const url = BASE_URL.concat( + `/${this.chainId.toString()}/pool/v3/${poolAddress.toLowerCase()}/positions`, ) - await this.page.goto(removeLiquidityUrl) - await this.page.goto(BASE_URL) + await this.page.goto(url) await this.connect() - await this.page.locator('[testdata-id=my-positions-button]').click() const concentratedPositionTableSelector = this.page.locator( '[testdata-id=concentrated-positions-loading-0]', @@ -278,7 +276,6 @@ export class PoolPage extends BaseActions { ) await expect(firstPositionSelector).toBeVisible() await firstPositionSelector.click() - const removeLiquidityTabSelector = this.page.locator( '[testdata-id=remove-tab]', ) @@ -313,10 +310,11 @@ export class PoolPage extends BaseActions { tokenA: this.nativeToken.wrapped, tokenB: fakeToken, }) - const removeLiquidityUrl = BASE_URL.concat( - `/${this.chainId}:${poolAddress}/remove`, + + const url = BASE_URL.concat( + `/${this.chainId.toString()}/pool/v2/${poolAddress.toLowerCase()}/remove`, ) - await this.page.goto(removeLiquidityUrl) + await this.page.goto(url) await this.connect() await this.switchNetwork(this.chainId) @@ -421,108 +419,126 @@ export class PoolPage extends BaseActions { console.error('>>>>>>>>> UNKNOWN PROTOCOL') throw Error('Unknown protocol') } - - const mockPool = { - id: `${this.chainId}:${address}`.toLowerCase(), - address: address.toLowerCase(), - name: `${tokenA.symbol}-${tokenB.symbol}`, - chainId: this.chainId, - protocol, - swapFee: fee / (protocol === 'SUSHISWAP_V3' ? 1000000 : 10000), - twapEnabled: false, - totalSupply: '83920283456658325128353', - liquidityUSD: '0', - volumeUSD: '0', - feeApr1h: 0, - feeApr1d: 0, - feeApr1w: 0, - feeApr1m: 0, - totalApr1h: 0, - totalApr1d: 0, - totalApr1w: 0, - totalApr1m: 0, - incentiveApr: 0, - isIncentivized: false, - wasIncentivized: false, - fees1h: '0', - fees1d: '0', - fees1w: '0', - fees1m: '0', - feesChange1h: 0, - feesChange1d: 0, - feesChange1w: 0, - feesChange1m: 0, - volume1h: '0', - volume1d: '0', - volume1w: '0', - volume1m: '0', - volumeChange1h: 0, - volumeChange1d: 0, - volumeChange1w: 0, - volumeChange1m: 0, - liquidityUSDChange1h: 0, - liquidityUSDChange1d: 0, - liquidityUSDChange1w: 0, - liquidityUSDChange1m: 0, - isBlacklisted: false, - token0: { - id: `${tokenA.chainId}:${tokenA.address}`.toLowerCase(), - address: tokenA.address.toLowerCase(), - name: tokenA.name, - symbol: tokenA.symbol, - decimals: tokenA.decimals, - chainId: tokenA.chainId, - }, - token1: { - id: `${tokenB.chainId}:${tokenB.address}`.toLowerCase(), - address: tokenB.address.toLowerCase(), - name: tokenB.name, - symbol: tokenB.symbol, - decimals: tokenB.decimals, - chainId: tokenB.chainId, - }, - incentives: [], - hadEnabledSteerVault: false, - hasEnabledSteerVault: false, - steerVaults: [], - } - - // console.log({ url: request.url.toLowerCase() }) - - if (request.url.toLowerCase().endsWith('/pool/api/pools')) { - // console.log('RETURN POOLS MOCK') - - return new Response(JSON.stringify([mockPool]), { - headers: { - 'Content-Type': 'application/json', - }, - }) - } else if ( - request.url - .toLowerCase() - .endsWith(`/pool/api/pools/${this.chainId}/${address}`.toLowerCase()) - ) { - // console.log('RETURN POOL MOCK') + const mockPool = + protocol === 'SUSHISWAP_V2' + ? { + data: { + v2Pool: { + id: `${this.chainId}:${address}`.toLowerCase(), + chainId: this.chainId, + name: 'WMATIC / FT', + address, + createdAt: '1630455405', + protocol, + // swapFee: fee / (protocol === 'SUSHISWAP_V3' ? 1000000 : 10000), + swapFee: fee / 10000, + + token0: { + id: `${tokenA.chainId}:${tokenA.address}`.toLowerCase(), + address: tokenA.address.toLowerCase(), + name: tokenA.name, + symbol: tokenA.symbol, + decimals: tokenA.decimals, + chainId: tokenA.chainId, + }, + token1: { + id: `${tokenB.chainId}:${tokenB.address}`.toLowerCase(), + address: tokenB.address.toLowerCase(), + name: tokenB.name, + symbol: tokenB.symbol, + decimals: tokenB.decimals, + chainId: tokenB.chainId, + }, + source: 'SUBGRAPH', + reserve0: '14632715635223519232', + reserve1: '66374911905262165000000', + liquidity: '736541498034438406144', + volumeUSD: 56162969.922308594, + liquidityUSD: 71429.02585542823, + token0Price: 0.0002204555187373958, + token1Price: 4536.062448004257, + volumeUSD1d: 1444.4034653156996, + feeUSD1d: 4.333210395940114, + txCount1d: 104, + feeApr1d: 0.022142564252791732, + totalApr1d: 0.022142564252791732, + volumeUSD1dChange: -0.43870093251068154, + feeUSD1dChange: -0.4387009325124158, + txCount1dChange: -0.11864406779661019, + liquidityUSD1dChange: 0.01395086513190713, + incentiveApr: 0, + isIncentivized: false, + wasIncentivized: false, + incentives: [], + }, + }, + } + : { + data: { + v3Pool: { + id: `${this.chainId}:${address}`.toLowerCase(), + chainId: this.chainId, + name: 'WMATIC / FT', + address, + createdAt: '1630455405', + protocol, + swapFee: fee / 1_000_000, + + token0: { + id: `${tokenA.chainId}:${tokenA.address}`.toLowerCase(), + address: tokenA.address.toLowerCase(), + name: tokenA.name, + symbol: tokenA.symbol, + decimals: tokenA.decimals, + chainId: tokenA.chainId, + }, + token1: { + id: `${tokenB.chainId}:${tokenB.address}`.toLowerCase(), + address: tokenB.address.toLowerCase(), + name: tokenB.name, + symbol: tokenB.symbol, + decimals: tokenB.decimals, + chainId: tokenB.chainId, + }, + source: 'SUBGRAPH', + reserve0: '97138000822798992', + reserve1: '251532847196719', + liquidity: '190259449333200569961', + sqrtPrice: '77543082754135133119551574769', + tick: '-430', + observationIndex: '0', + feeGrowthGlobal0X128: '1913748811595781336300706674643883', + feeGrowthGlobal1X128: '1490989199114543008131607233327172', + volumeUSD: 124770.3303415501, + liquidityUSD: 327.7942814599597, + token0Price: 1.0439339999465262, + token1Price: 0.9579149640218858, + volumeUSD1d: 0, + feeUSD1d: 0, + txCount1d: 0, + feeApr1d: 0, + totalApr1d: 0, + volumeUSD1dChange: 0, + feeUSD1dChange: 0, + txCount1dChange: 0, + liquidityUSD1dChange: 0, + incentiveApr: 0, + hadSmartPool: false, + hasSmartPool: false, + isIncentivized: false, + wasIncentivized: false, + incentives: [], + vaults: [], + }, + }, + } + + if (request.url.toLowerCase().endsWith('/graphql')) { return new Response(JSON.stringify(mockPool), { headers: { 'Content-Type': 'application/json', }, }) - } else if ( - request.url - .toLowerCase() - .endsWith('/pool/api/pools/count'.toLowerCase()) - ) { - // console.log('RETURN POOL COUNT MOCK') - return new Response(JSON.stringify({ count: 1 }), { - headers: { - 'Content-Type': 'application/json', - }, - }) - } else if ( - request.url.toLowerCase().endsWith('/pool/api/graphPools'.toLowerCase()) - ) { - console.log('RETURN GRAPH POOLS MOCK') } }) } diff --git a/apps/web/test/playwright.config.ts b/apps/web/test/playwright.config.ts index d559fc4aee..369c2faa2a 100644 --- a/apps/web/test/playwright.config.ts +++ b/apps/web/test/playwright.config.ts @@ -21,8 +21,8 @@ const config: PlaywrightTestConfig = { // quiet: !!process.env.CI, quiet: true, testMatch: [ - 'simple.test.ts', 'pool.test.ts', + 'simple.test.ts', // 'smart.test.ts', // 'cross-chain.test.ts', ], diff --git a/apps/web/test/pool/pool.test.ts b/apps/web/test/pool/pool.test.ts index 341cdea61e..c59d2afc45 100644 --- a/apps/web/test/pool/pool.test.ts +++ b/apps/web/test/pool/pool.test.ts @@ -14,13 +14,7 @@ import { interceptAnvil } from 'test/intercept-anvil' const NATIVE_TOKEN = Native.onChain(chainId) let FAKE_TOKEN: Token - -// let MOCK_TOKEN_1_DP: Token -// let MOCK_TOKEN_6_DP: Token -// let MOCK_TOKEN_8_DP: Token -// let MOCK_TOKEN_18_DP: Token - -const BASE_URL = 'http://localhost:3000/pool' +const BASE_URL = 'http://localhost:3000' test.beforeAll(async () => { // console.log('beforeAll pool tests') @@ -32,30 +26,6 @@ test.beforeAll(async () => { symbol: 'FT', decimals: 18, }) - // MOCK_TOKEN_1_DP = await createERC20({ - // chainId: CHAIN_ID, - // name: 'MOCK_TOKEN_1_DP', - // symbol: '1_DP', - // decimals: 1, - // }) - // MOCK_TOKEN_6_DP = await createERC20({ - // chainId: CHAIN_ID, - // name: 'MOCK_TOKEN_6_DP', - // symbol: '6_DP', - // decimals: 6, - // }) - // MOCK_TOKEN_8_DP = await createERC20({ - // chainId: CHAIN_ID, - // name: 'MOCK_TOKEN_8_DP', - // symbol: '8_DP', - // decimals: 8, - // }) - // MOCK_TOKEN_18_DP = await createERC20({ - // chainId: CHAIN_ID, - // name: 'MOCK_TOKEN_18_DP', - // symbol: '18_DP', - // decimals: 18, - // }) } catch (error) { console.error( 'error creating fake token', @@ -98,57 +68,22 @@ test.beforeEach(async ({ page, next }) => { console.error('error mockking token api', error) } - // TEMP: Mock V2 POOL.. - await page.route( - 'http://localhost:3000/pools/api/graphPool/137:0x74c9bcd8a09d8b80a5654ccd6d338965f6937789', - // 'http://localhost:3000/pools/api/graphPool/137:0x0b65273d824393e2f43357a4096e5ebd17c89629', - async (route) => { + try { + await page.route(`**/price/v1/${chainId}`, async (route) => { + // const response = await route.fetch() + // const json = await response.json() await route.fulfill({ - json: { - id: '137:0x74c9bcd8a09d8b80a5654ccd6d338965f6937789', - address: '0x74c9bcd8a09d8b80a5654ccd6d338965f6937789', - chainId: 137, - name: `WMATIC-FT`, - swapFee: 0.003, - protocol: 'SUSHISWAP_V2', - reserve0: { - __type: 'bigint', - value: '1000000000000000000', - }, - reserve1: { - __type: 'bigint', - value: '1000000000000000000', - }, - liquidity: { - __type: 'bigint', - value: '1000000000000000000', - }, - liquidityUSD: 3537005.8867114577, - volumeUSD: 2636950185.8613586, - feesUSD: 7910850.557584076, - token0: { - id: '137:0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', - address: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', - chainId: 137, - decimals: 18, - name: 'Wrapped Matic', - symbol: 'WMATIC', - }, - token1: FAKE_TOKEN, - token0Price: 5779.222968513871, - token1Price: 0.00017303364231630437, - txCount: 4058470, - }, + json: {}, }) - }, - ) + }) + } catch (error) { + console.error('error mockking token api', error) + } await page.route('http://localhost:3000/api/**/*', async (route) => { await route.abort() }) - await page.route('http://localhost:3000/pool/api/**/*', async (route) => { - await route.abort() - }) + try { await interceptAnvil(page, next) } catch (error) { @@ -168,7 +103,7 @@ test.describe('V3', () => { next, }) => { test.slow() - const url = BASE_URL.concat('/add').concat(`?chainId=${chainId}`) + const url = BASE_URL.concat(`/${chainId.toString()}/pool/v3/add`) const poolPage = new PoolPage(page, chainId) await poolPage.mockPoolApi( @@ -202,7 +137,7 @@ test.describe('V3', () => { amountBelongsToToken0: false, }) - await poolPage.removeLiquidityV3(FAKE_TOKEN) + await poolPage.removeLiquidityV3(FAKE_TOKEN) // TODO: enable once you can determine what the position ID will be }) }) @@ -213,7 +148,7 @@ test.describe('V2', () => { test.slow() const poolPage = new PoolPage(page, chainId) - const url = BASE_URL.concat(`/add/v2/${chainId}`) + const url = BASE_URL.concat(`/${chainId.toString()}/pool/v2/add`) await poolPage.goTo(url) await poolPage.connect() await poolPage.switchNetwork(chainId) diff --git a/apps/web/test/pool/smart.test.ts b/apps/web/test/pool/smart.test.ts deleted file mode 100644 index 7e939ff602..0000000000 --- a/apps/web/test/pool/smart.test.ts +++ /dev/null @@ -1,162 +0,0 @@ -// import { -// Page, -// // NextFixture, -// expect, -// test, -// } from 'next/experimental/testmode/playwright.js' -// import { SupportedChainId } from 'src/config' -// import { ChainId } from 'sushi/chain' -// import { prepareERC20Balance as setupERC20Balance } from 'test/erc20' -// import { interceptAnvil } from 'test/intercept-anvil' - -// if (typeof process.env.NEXT_PUBLIC_CHAIN_ID !== 'string') { -// new Error('NEXT_PUBLIC_CHAIN_ID not set') -// } -// const BASE_URL = 'http://localhost:3000/pool' - -// const CHAIN_ID = Number( -// process.env.NEXT_PUBLIC_CHAIN_ID as string, -// ) as SupportedChainId - -// test.beforeEach(async ({ page }) => { -// test.skip(CHAIN_ID !== ChainId.POLYGON) - -// try { -// await interceptAnvil(page) -// } catch (error) { -// console.error('error intercepting anvil', error) -// } -// await setupERC20Balance({ -// chainId: CHAIN_ID, -// }) -// }) - -// test.beforeEach(async ({ page, next }) => { -// page.on('pageerror', (error) => { -// console.error(error) -// }) - -// next.onFetch(() => { -// return 'continue' -// }) - -// await page.goto(BASE_URL) -// await switchNetwork(page, CHAIN_ID) -// }) - -// test.afterAll(async () => {}) -// test.afterEach(async () => {}) - -// // TODO: need to setup config to target specific pools depending on the network, however, the user need to change as well if more networks are added - -// test('Create and remove smart pool position', async ({ page }) => { -// test.slow() -// await addSmartPoolPosition(page) -// await page.goto(BASE_URL) -// await removeSmartPoolPosition(page) -// }) - -// async function addSmartPoolPosition(page: Page) { -// const poolId = '137-0x3361bf42cca22dc5fe37c7bd2c6a7284db440dfc' -// await page.locator('[testdata-id=smart-pools-button]').click() - -// const smartPoolRowLocator = page.locator( -// `[testdata-id=smart-pools-table-${poolId}]`, -// ) -// await expect(smartPoolRowLocator).toBeVisible() -// await smartPoolRowLocator.click() - -// await page.locator('[testdata-id=add-liquidity-token0-input]').fill('0.00005') - -// const approveToken0Locator = page.locator( -// '[testdata-id=approve-erc20-0-button]', -// ) -// await expect(approveToken0Locator).toBeVisible() -// await expect(approveToken0Locator).toBeEnabled() -// await approveToken0Locator.click() - -// const approveToken1Locator = page.locator( -// '[testdata-id=approve-erc20-1-button]', -// ) -// await expect(approveToken1Locator).toBeVisible() -// await expect(approveToken1Locator).toBeEnabled() -// await approveToken1Locator.click() - -// const reviewLocator = page.locator( -// '[testdata-id=add-steer-liquidity-preview-button]', -// ) -// await expect(reviewLocator).toBeVisible() -// await expect(reviewLocator).toBeEnabled() -// await reviewLocator.click() - -// const confirmLocator = page.locator( -// '[testdata-id=confirm-add-liquidity-button]', -// ) -// await expect(confirmLocator).toBeVisible() -// await expect(confirmLocator).toBeEnabled() -// await confirmLocator.click() - -// const expectedText = '(Successfully added liquidity to the .* smart pool)' -// const regex = new RegExp(expectedText) -// await expect(page.getByText(regex)).toBeVisible() -// } - -// async function removeSmartPoolPosition(page: Page) { -// // FIXME: Currently disabled until we can make the smart positions table show the position. -// // await page.locator('[testdata-id=my-positions-button]').click() -// // await page.locator('[testdata-id=sushiswap-smart]').click() - -// // const concentratedPositionTableSelector = page.locator( -// // '[testdata-id=smart-positions-loading-0]', -// // ) -// // await expect(concentratedPositionTableSelector).not.toBeVisible() - -// // const firstPositionSelector = page.locator( -// // '[testdata-id=smart-positions-0-0-td]', -// // ) -// // await expect(firstPositionSelector).toBeVisible() -// // await firstPositionSelector.click() - -// const poolId = '137-0x3361bf42cca22dc5fe37c7bd2c6a7284db440dfc' -// await page.locator('[testdata-id=smart-pools-button]').click() -// await switchNetwork(page, CHAIN_ID) - -// const smartPoolRowLocator = page.locator( -// `[testdata-id=smart-pools-table-${poolId}]`, -// ) -// await expect(smartPoolRowLocator).toBeVisible() -// await smartPoolRowLocator.click() - -// const removeLiquidityTabSelector = page.locator('[testdata-id=remove-tab]') -// await expect(removeLiquidityTabSelector).toBeVisible() -// await removeLiquidityTabSelector.click() - -// await page.locator('[testdata-id=liquidity-max-button]').click() - -// const removeLiquidityLocator = page.locator( -// '[testdata-id=remove-or-add-steer-liquidity-button]', -// ) - -// await expect(removeLiquidityLocator).toBeVisible() -// await expect(removeLiquidityLocator).toBeEnabled() -// await removeLiquidityLocator.click() - -// const regex = new RegExp( -// '(Successfully removed liquidity from the .* smart pool)', -// ) -// await expect(page.getByText(regex)).toBeVisible() -// } - -// async function switchNetwork(page: Page, chainId: number) { -// const networkSelector = page.locator('[testdata-id=network-selector-button]') -// await expect(networkSelector).toBeVisible() -// await expect(networkSelector).toBeEnabled() -// await networkSelector.click() - -// const networkToSelect = page.locator( -// `[testdata-id=network-selector-${chainId}]`, -// ) -// await expect(networkToSelect).toBeVisible() -// await expect(networkToSelect).toBeEnabled() -// await networkToSelect.click() -// } diff --git a/jobs/pool/.env b/jobs/pool/.env deleted file mode 100644 index c2cd65d2b8..0000000000 --- a/jobs/pool/.env +++ /dev/null @@ -1,3 +0,0 @@ -# !! THIS FILE IS COMMITED TO THE REPO - -NEXT_PUBLIC_EVM_APP_BASE_URL="https://www.sushi.com/" \ No newline at end of file diff --git a/jobs/pool/.gitignore b/jobs/pool/.gitignore deleted file mode 100644 index 1e18f275e9..0000000000 --- a/jobs/pool/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!.env \ No newline at end of file diff --git a/jobs/pool/Dockerfile b/jobs/pool/Dockerfile deleted file mode 100644 index 2d9de3657b..0000000000 --- a/jobs/pool/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM node:20-alpine - -# Install git and pnpm -RUN apk add --no-cache git libc6-compat grep python3 py3-setuptools make g++ -RUN npm install -g pnpm@9.4.0 turbo@2.0.5 - -# Do ARG stuff -ARG SCRIPT_PATH="./" -ENV SCRIPT_PATH ${SCRIPT_PATH} - -ARG TURBO_TOKEN -ARG TURBO_TEAM - -# Copy the repo into the build context -WORKDIR /workdir/repo -COPY . . - -RUN ls - -# Prune unneeded packages -# Need to pull the package name from the path -RUN turbo prune --out-dir=../pruned --scope=$(pnpm list --depth -1 --parseable --long --filter "./$SCRIPT_PATH" | grep -oP '(?<=\:)(.*(?=@))') - -WORKDIR /workdir/pruned -# Can delete the previous workdir, won't be needed anymore -RUN rm -rf /workdir/repo - -RUN HUSKY=0 pnpm install -RUN pnpm exec turbo run build --filter="./$SCRIPT_PATH" - -# Delete store path since it's now unneeded, to reduce image size -RUN rm -rf $(pnpm store path) - -EXPOSE 8080/tcp -CMD pnpm exec turbo run start --only --filter="./$SCRIPT_PATH" \ No newline at end of file diff --git a/jobs/pool/README.md b/jobs/pool/README.md deleted file mode 100644 index 9dcca285db..0000000000 --- a/jobs/pool/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Pool job - -## Usage - -### Pools - -First time seed, set `FIRST_TIME_SEED` to true to speed things up. Otherwise ignore the env - -```bash -FIRST_TIME_SEED=true pnpm ts-node --esm --swc ./src/pools.ts -``` - -### Incentives - -```bash -pnpm ts-node --esm --swc ./src/incentives.ts -``` - -### Volume - -```bash -pnpm ts-node --esm --swc ./src/volume.ts -``` - -``` -http://localhost:8080/?target=incentives -``` \ No newline at end of file diff --git a/jobs/pool/cloudbuild.yaml b/jobs/pool/cloudbuild.yaml deleted file mode 100644 index e1b83a59e7..0000000000 --- a/jobs/pool/cloudbuild.yaml +++ /dev/null @@ -1,41 +0,0 @@ -steps: - - name: gcr.io/cloud-builders/docker - args: - - build - - '--build-arg' - - 'SCRIPT_PATH=./jobs/pool' - - '-t' - - 'gcr.io/$PROJECT_ID/$TRIGGER_NAME:latest' - - '-f' - - './jobs/pool/Dockerfile' - - . - dir: /workspace - id: Build Docker Image - - name: gcr.io/cloud-builders/docker - args: - - push - - 'gcr.io/$PROJECT_ID/$TRIGGER_NAME:latest' - id: Push Docker Image - - name: gcr.io/google.com/cloudsdktool/cloud-sdk - env: - - 'DATABASE_URL=${_DATABASE_URL}' - - 'SUSHI_GRAPH_KEY=${_SUSHI_GRAPH_KEY}' - - 'DRPC_ID=${_DRPC_ID}' - args: - - run - - deploy - - scripts-earn - - '--image' - - 'gcr.io/$PROJECT_ID/$TRIGGER_NAME:latest' - - '--region' - - us-central1 - - '--set-env-vars=DATABASE_URL=$_DATABASE_URL' - - '--set-env-vars=SUSHI_GRAPH_KEY=$_SUSHI_GRAPH_KEY' - - '--set-env-vars=DRPC_ID=$_DRPC_ID' - id: Update Cloud Run Service - entrypoint: gcloud -timeout: 3600s -images: - - 'gcr.io/$PROJECT_ID/$TRIGGER_NAME:latest' -options: - machineType: E2_HIGHCPU_8 \ No newline at end of file diff --git a/jobs/pool/package.json b/jobs/pool/package.json deleted file mode 100644 index 1e0ff1aff6..0000000000 --- a/jobs/pool/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@sushiswap/pool-job", - "version": "0.0.0", - "private": true, - "description": "Pool jobs", - "keywords": [ - "pool", - "job" - ], - "homepage": "https://www.sushi.com", - "repository": { - "type": "git", - "url": "https://github.com/sushiswap/sushiswap.git", - "directory": "jobs/pools" - }, - "license": "MIT", - "type": "module", - "main": "dist/index.js", - "module": "dist/index.mjs", - "source": "src/index.ts", - "typings": "dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "check": "tsc --pretty --noEmit", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "server": "tsx src/server.ts", - "start": "tsx src/server.ts" - }, - "dependencies": { - "@ethersproject/address": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@sushiswap/bonds-sdk": "workspace:*", - "@sushiswap/client": "workspace:*", - "@sushiswap/database": "workspace:*", - "@sushiswap/graph-client": "workspace:*", - "@sushiswap/steer-sdk": "workspace:*", - "@wagmi/core": "2.13.1", - "@whatwg-node/fetch": "0.8.4", - "connect-timeout": "1.9.0", - "date-fns": "2.29.3", - "ethers": "5.7.2", - "express": "4.18.2", - "lodash.zip": "4.2.0", - "sushi": "workspace:*", - "tsx": "^4.7.1", - "viem": "2.18.6", - "zod": "3.23.8" - }, - "devDependencies": { - "@sushiswap/jest-config": "workspace:*", - "@swc/core": "1.4.2", - "@swc/helpers": "0.5.6", - "@tsconfig/esm": "1.0.4", - "@tsconfig/node18": "18.2.2", - "@types/connect-timeout": "0.0.36", - "@types/express": "4.17.15", - "@types/lodash.zip": "4.2.7", - "dotenv": "16.0.3", - "typescript": "5.4.5" - } -} diff --git a/jobs/pool/src/config.ts b/jobs/pool/src/config.ts deleted file mode 100644 index 06b01e7c30..0000000000 --- a/jobs/pool/src/config.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { ChainId } from 'sushi/chain' -import { Address } from 'viem' - -export const MINICHEF_ADDRESS: Record = { - [ChainId.POLYGON]: '0x0769fd68dFb93167989C6f7254cd0D766Fb2841F', - [ChainId.GNOSIS]: '0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3', - [ChainId.HARMONY]: '0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287', - [ChainId.ARBITRUM]: '0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3', - [ChainId.CELO]: '0x8084936982D089130e001b470eDf58faCA445008', - [ChainId.MOONRIVER]: '0x3dB01570D97631f69bbb0ba39796865456Cf89A5', - [ChainId.FUSE]: '0x182CD0C6F1FaEc0aED2eA83cd0e160c8Bd4cb063', - [ChainId.FANTOM]: '0xf731202A3cf7EfA9368C2d7bD613926f7A144dB5', - [ChainId.MOONBEAM]: '0x011E52E4E40CF9498c79273329E8827b21E2e581', - [ChainId.KAVA]: '0xf731202A3cf7EfA9368C2d7bD613926f7A144dB5', - [ChainId.METIS]: '0x1334c8e873E1cae8467156e2A81d1C8b566B2da1', - [ChainId.BOBA]: '0x75f52766A6a23F736edEfCD69dfBE6153a48c3F3', - [ChainId.ARBITRUM_NOVA]: '0xC09756432dAD2FF50B2D40618f7B04546DD20043', - [ChainId.BTTC]: '0xC09756432dAD2FF50B2D40618f7B04546DD20043', - [ChainId.OPTIMISM]: '0xB25157bF349295a7Cd31D1751973f426182070D6', - [ChainId.AVALANCHE]: '0xe11252176CEDd4a493Aec9767192C06A04A6B04F', - [ChainId.BSC]: '0x5219C5E32b9FFf87F29d5A833832c29134464aaa', -} - -export const MASTERCHEF_ADDRESS: Record = { - [ChainId.ETHEREUM]: '0xc2EdaD668740f1aA35E4D8f227fB8E17dcA888Cd', - // [ChainId.ROPSTEN]: '0x80C7DD17B01855a6D2347444a0FCC36136a314de', - // [ChainId.RINKEBY]: '0x80C7DD17B01855a6D2347444a0FCC36136a314de', - // [ChainId.GÖRLI]: '0x80C7DD17B01855a6D2347444a0FCC36136a314de', - // [ChainId.KOVAN]: '0x80C7DD17B01855a6D2347444a0FCC36136a314de', -} - -export const MASTERCHEF_V2_ADDRESS: Record = { - [ChainId.ETHEREUM]: '0xEF0881eC094552b2e128Cf945EF17a6752B4Ec5d', -} diff --git a/jobs/pool/src/etl/incentive/index.ts b/jobs/pool/src/etl/incentive/index.ts deleted file mode 100644 index 69f0204069..0000000000 --- a/jobs/pool/src/etl/incentive/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './load.js' -export * from './transform.js' diff --git a/jobs/pool/src/etl/incentive/load.ts b/jobs/pool/src/etl/incentive/load.ts deleted file mode 100644 index 1c326131cf..0000000000 --- a/jobs/pool/src/etl/incentive/load.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Prisma } from '@sushiswap/database' -import { performance } from 'perf_hooks' -import { client } from 'src/lib/prisma' - -/** - * Merges(Create/Update) incentives. - * Using this wrapper function because createMany() has better performance than upsert(), speeds up the initial seeding. - * @param client - * @param incentives - */ -export async function mergeIncentives( - incentivesToCreate: Prisma.IncentiveCreateManyInput[], - incentivesToUpdate: Prisma.IncentiveCreateManyInput[], -) { - const incentivesAlreadyExist = await hasIncentives() - if (incentivesAlreadyExist) { - await updateIncentives(incentivesToUpdate) - await createIncentives(incentivesToCreate) - } else { - await createIncentives(incentivesToCreate) - } -} - -async function updateIncentives(incentives: Prisma.IncentiveCreateManyInput[]) { - if (incentives.length === 0) { - return - } - console.log(`LOAD - Preparing to update ${incentives.length} incentives`) - - const incentivesToUpdate = incentives.map((incentive) => { - return client.incentive.update({ - select: { - id: true, - }, - where: { - id: incentive.id, - }, - data: { - apr: incentive.apr, - rewardPerDay: incentive.rewardPerDay, - }, - }) - }) - - const startTime = performance.now() - const updatedIncentives = await Promise.all(incentivesToUpdate) - const endTime = performance.now() - - console.log( - `LOAD - Updated ${updatedIncentives.length} incentives. (${( - (endTime - startTime) / - 1000 - ).toFixed(1)}s) `, - ) -} - -async function createIncentives(incentives: Prisma.IncentiveCreateManyInput[]) { - if (incentives.length === 0) { - return - } - - let count = 0 - const batchSize = 500 - const startTime = performance.now() - - for (let i = 0; i < incentives.length; i += batchSize) { - const created = await client.incentive.createMany({ - data: incentives.slice(i, i + batchSize), - skipDuplicates: true, - }) - console.log(`LOAD - Batched and created ${created.count} incentives`) - count += created.count - } - const endTime = performance.now() - console.log( - `LOAD - Created ${count} incentives. (${( - (endTime - startTime) / - 1000 - ).toFixed(1)}s)`, - ) -} - -async function hasIncentives() { - const count = await client.incentive.count() - return count > 0 -} diff --git a/jobs/pool/src/etl/incentive/transform.ts b/jobs/pool/src/etl/incentive/transform.ts deleted file mode 100644 index 4dcc03c538..0000000000 --- a/jobs/pool/src/etl/incentive/transform.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Prisma } from '@sushiswap/database' -import { client } from 'src/lib/prisma' - -/** - * Filters token incentives to only include the ones that are new or have changed. - * @param client - * @param incentives - * @returns - */ -export async function filterIncentives( - incentives: Prisma.IncentiveCreateManyInput[], -): Promise<{ - incentivesToCreate: Prisma.IncentiveCreateManyInput[] - incentivesToUpdate: Prisma.IncentiveCreateManyInput[] -}> { - const incentiveSelect = Prisma.validator()({ - id: true, - apr: true, - rewardPerDay: true, - }) - - const incentiveFound = await client.incentive.findMany({ - select: incentiveSelect, - }) - - const poolsFound = await client.sushiPool.findMany({ - where: { id: { in: incentives.map((incentive) => incentive.poolId) } }, - select: { id: true }, - }) - const foundPools = poolsFound.map((pool) => pool.id) - - const rewardTokensFound = await client.token.findMany({ - where: { - id: { in: incentives.map((incentive) => incentive.rewardTokenId) }, - }, - select: { id: true }, - }) - const foundRewardTokens = rewardTokensFound.map((token) => token.id) - - let missingTokens = 0 - const missingPoolIds: Record = {} - let missingPools = 0 - const incentivesToCreate = incentives.filter((incentive) => { - const incentiveExists = incentiveFound.find((i) => i.id === incentive.id) - if (!foundRewardTokens.includes(incentive.rewardTokenId)) { - missingTokens += 1 - return false - } - if (!incentiveExists) { - if (!foundPools.includes(incentive.poolId)) { - missingPools += 1 - if (!missingPoolIds[incentive.chainId]) { - missingPoolIds[incentive.chainId] = [] - } - missingPoolIds[incentive.chainId].push(incentive.poolId) - return false - } - return true - } - return false - }) - if (missingPools) - console.log(`Missing pools, skipping incentives: ${missingPools}`) - if (missingTokens) - console.log(`Missing tokens, skipping incentives: ${missingTokens}`) - if (missingPools > 0) { - Object.entries(missingPoolIds).forEach(([chainId, poolIds]) => { - console.log(`Missing pools on chain ${chainId}, count: ${poolIds.length}`) - }) - } - let incentivesAlreadyUpToDate = 0 - const incentivesToUpdate = incentives.filter((incentive) => { - const incentiveExists = incentiveFound.find((i) => i.id === incentive.id) - if (!incentiveExists) { - return false - } - if ( - incentive.apr !== incentiveExists.apr || - incentive.rewardPerDay !== incentiveExists.rewardPerDay - ) { - return true - } else { - incentivesAlreadyUpToDate++ - } - return false - }) - - console.log( - `TRANSFORM - Filtering incentives\n - ${incentivesToCreate.length} incentives should be created.\n - ${incentivesAlreadyUpToDate} incentives are already up to date.\n - ${incentivesToUpdate.length} incentives should be updated.\n`, - ) - - return { incentivesToCreate, incentivesToUpdate } -} diff --git a/jobs/pool/src/etl/pool/index.ts b/jobs/pool/src/etl/pool/index.ts deleted file mode 100644 index 46b942b746..0000000000 --- a/jobs/pool/src/etl/pool/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './load.js' diff --git a/jobs/pool/src/etl/pool/load.ts b/jobs/pool/src/etl/pool/load.ts deleted file mode 100644 index 23cfe72cf1..0000000000 --- a/jobs/pool/src/etl/pool/load.ts +++ /dev/null @@ -1,595 +0,0 @@ -import { Prisma } from '@sushiswap/database' -import { performance } from 'perf_hooks' -import { client } from 'src/lib/prisma' - -function clipDecimal(value: any) { - if (Number(value) >= 1e32) { - return 1e32 - } - return value -} - -export async function upsertPools(pools: Prisma.SushiPoolCreateManyInput[]) { - if (pools.length === 0) return - const poolsWithIncentives = await client.sushiPool.findMany({ - where: { - id: { - in: pools.map((pool) => pool.id), - }, - }, - select: { - id: true, - incentives: true, - }, - }) - - const poolsToCreate: Prisma.SushiPoolCreateManyInput[] = [] - const poolsToUpdate: Prisma.SushiPoolCreateManyInput[] = [] - - for (const pool of pools) { - const existingPools = poolsWithIncentives.find((p) => p.id === pool.id) - if (existingPools) { - if (!existingPools.incentives) { - poolsToUpdate.push(pool) - continue - } - - const totalIncentiveApr = existingPools.incentives.reduce( - (total, incentive) => { - return total + incentive.apr - }, - 0, - ) - poolsToUpdate.push({ - ...pool, - totalApr1h: (pool.feeApr1h ?? 0) + totalIncentiveApr, - totalApr1d: (pool.feeApr1d ?? 0) + totalIncentiveApr, - totalApr1w: (pool.feeApr1w ?? 0) + totalIncentiveApr, - totalApr1m: (pool.feeApr1m ?? 0) + totalIncentiveApr, - }) - continue - } - poolsToCreate.push(pool) - } - - const feeApr1h = poolsToUpdate - .filter((p) => p.feeApr1h !== undefined) - .map((update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.feeApr1h}`) - const feeApr1hQuery = feeApr1h.length - ? Prisma.sql`feeApr1h = CASE - ${Prisma.join(feeApr1h, ' ')} - ELSE feeApr1h - END,` - : Prisma.empty - const feeApr1d = poolsToUpdate - .filter((p) => p.feeApr1d !== undefined) - .map((update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.feeApr1d}`) - const feeApr1dQuery = feeApr1d.length - ? Prisma.sql`feeApr1d = CASE - ${Prisma.join(feeApr1d, ' ')} - ELSE feeApr1d - END,` - : Prisma.empty - const feeApr1w = poolsToUpdate - .filter((p) => p.feeApr1w !== undefined) - .map((update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.feeApr1w}`) - const feeApr1wQuery = feeApr1w.length - ? Prisma.sql`feeApr1w = CASE - ${Prisma.join(feeApr1w, ' ')} - ELSE feeApr1w - END,` - : Prisma.empty - const feeApr1m = poolsToUpdate - .filter((p) => p.feeApr1m) - .map((update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.feeApr1m}`) - const feeApr1mQuery = feeApr1m.length - ? Prisma.sql`feeApr1m = CASE - ${Prisma.join(feeApr1m, ' ')} - ELSE feeApr1m - END,` - : Prisma.empty - const totalApr1h = poolsToUpdate - .filter((p) => p.totalApr1h !== undefined) - .map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.totalApr1h}`, - ) - const totalApr1hQuery = totalApr1h.length - ? Prisma.sql`totalApr1h = CASE - ${Prisma.join(totalApr1h, ' ')} - ELSE totalApr1h - END,` - : Prisma.empty - const totalApr1d = poolsToUpdate - .filter((p) => p.totalApr1d !== undefined) - .map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.totalApr1d}`, - ) - const totalApr1dQuery = totalApr1d.length - ? Prisma.sql`totalApr1d = CASE - ${Prisma.join(totalApr1d, ' ')} - ELSE totalApr1d - END,` - : Prisma.empty - const totalApr1w = poolsToUpdate - .filter((p) => p.totalApr1w !== undefined) - .map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.totalApr1w}`, - ) - const totalApr1wQuery = totalApr1w.length - ? Prisma.sql`totalApr1w = CASE - ${Prisma.join(totalApr1w, ' ')} - ELSE totalApr1w - END,` - : Prisma.empty - const totalApr1m = poolsToUpdate - .filter((p) => p.totalApr1m) - .map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.totalApr1m}`, - ) - const totalApr1mQuery = totalApr1m.length - ? Prisma.sql`totalApr1w = CASE - ${Prisma.join(totalApr1m, ' ')} - ELSE totalApr1w - END,` - : Prisma.empty - const fees1h = poolsToUpdate - .filter((p) => p.fees1h !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.fees1h)}`, - ) - const fees1hQuery = fees1h.length - ? Prisma.sql`fees1h = CASE - ${Prisma.join(fees1h, ' ')} - ELSE fees1h - END,` - : Prisma.empty - const fees1d = poolsToUpdate - .filter((p) => p.fees1d !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.fees1d)}`, - ) - const fees1dQuery = fees1d.length - ? Prisma.sql`fees1d = CASE - ${Prisma.join(fees1d, ' ')} - ELSE fees1d - END,` - : Prisma.empty - const fees1w = poolsToUpdate - .filter((p) => p.fees1w !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.fees1w)}`, - ) - const fees1wQuery = fees1w.length - ? Prisma.sql`fees1w = CASE - ${Prisma.join(fees1w, ' ')} - ELSE fees1w - END,` - : Prisma.empty - const fees1m = poolsToUpdate - .filter((p) => p.fees1m !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.fees1m)}`, - ) - const fees1mQuery = fees1m.length - ? Prisma.sql`fees1m = CASE - ${Prisma.join(fees1m, ' ')} - ELSE fees1m - END,` - : Prisma.empty - const volume1h = poolsToUpdate - .filter((p) => p.volume1h !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.volume1h)}`, - ) - const volume1hQuery = volume1h.length - ? Prisma.sql`volume1h = CASE - ${Prisma.join(volume1h, ' ')} - ELSE volume1h - END,` - : Prisma.empty - const volume1d = poolsToUpdate - .filter((p) => p.volume1d !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.volume1d)}`, - ) - const volume1dQuery = volume1d.length - ? Prisma.sql`volume1d = CASE - ${Prisma.join(volume1d, ' ')} - ELSE volume1d - END,` - : Prisma.empty - const volume1w = poolsToUpdate - .filter((p) => p.volume1w !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.volume1w)}`, - ) - const volume1wQuery = volume1w.length - ? Prisma.sql`volume1w = CASE - ${Prisma.join(volume1w, ' ')} - ELSE volume1w - END,` - : Prisma.empty - const volume1m = poolsToUpdate - .filter((p) => p.volume1m !== undefined) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal(update.volume1m)}`, - ) - const volume1mQuery = volume1m.length - ? Prisma.sql`volume1m = CASE - ${Prisma.join(volume1m, ' ')} - ELSE volume1m - END,` - : Prisma.empty - const liquidityUSDChange1h = poolsToUpdate - .filter((p) => p.liquidityUSDChange1h) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.liquidityUSDChange1h}`, - ) - const liquidityUSDChange1hQuery = liquidityUSDChange1h.length - ? Prisma.sql`liquidityUSDChange1h = CASE - ${Prisma.join(liquidityUSDChange1h, ' ')} - ELSE liquidityUSDChange1h - END,` - : Prisma.empty - const liquidityUSDChange1d = poolsToUpdate - .filter((p) => p.liquidityUSDChange1d) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.liquidityUSDChange1d}`, - ) - const liquidityUSDChange1dQuery = liquidityUSDChange1d.length - ? Prisma.sql`liquidityUSDChange1d = CASE - ${Prisma.join(liquidityUSDChange1d, ' ')} - ELSE liquidityUSDChange1d - END,` - : Prisma.empty - const liquidityUSDChange1w = poolsToUpdate - .filter((p) => p.liquidityUSDChange1w) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.liquidityUSDChange1w}`, - ) - const liquidityUSDChange1wQuery = liquidityUSDChange1w.length - ? Prisma.sql`liquidityUSDChange1w = CASE - ${Prisma.join(liquidityUSDChange1w, ' ')} - ELSE liquidityUSDChange1w - END,` - : Prisma.empty - const liquidityUSDChange1m = poolsToUpdate - .filter((p) => p.liquidityUSDChange1m) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.liquidityUSDChange1m}`, - ) - const liquidityUSDChange1mQuery = liquidityUSDChange1m.length - ? Prisma.sql`liquidityUSDChange1m = CASE - ${Prisma.join(liquidityUSDChange1m, ' ')} - ELSE liquidityUSDChange1m - END,` - : Prisma.empty - const volumeChange1h = poolsToUpdate - .filter((p) => p.volumeChange1h) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.volumeChange1h}`, - ) - const volumeChange1hQuery = volumeChange1h.length - ? Prisma.sql`volumeChange1h = CASE - ${Prisma.join(volumeChange1h, ' ')} - ELSE volumeChange1h - END,` - : Prisma.empty - const volumeChange1d = poolsToUpdate - .filter((p) => p.volumeChange1d) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.volumeChange1d}`, - ) - const volumeChange1dQuery = volumeChange1d.length - ? Prisma.sql`volumeChange1d = CASE - ${Prisma.join(volumeChange1d, ' ')} - ELSE volumeChange1d - END,` - : Prisma.empty - const volumeChange1w = poolsToUpdate - .filter((p) => p.volumeChange1w) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.volumeChange1w}`, - ) - const volumeChange1wQuery = volumeChange1w.length - ? Prisma.sql`volumeChange1w = CASE - ${Prisma.join(volumeChange1w, ' ')} - ELSE volumeChange1w - END,` - : Prisma.empty - const volumeChange1m = poolsToUpdate - .filter((p) => p.volumeChange1m) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.volumeChange1m}`, - ) - const volumeChange1mQuery = volumeChange1m.length - ? Prisma.sql`volumeChange1m = CASE - ${Prisma.join(volumeChange1m, ' ')} - ELSE volumeChange1m - END,` - : Prisma.empty - const feesChange1h = poolsToUpdate - .filter((p) => p.feesChange1h) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.feesChange1h}`, - ) - const feesChange1hQuery = feesChange1h.length - ? Prisma.sql`feesChange1h = CASE - ${Prisma.join(feesChange1h, ' ')} - ELSE feesChange1h - END,` - : Prisma.empty - const feesChange1d = poolsToUpdate - .filter((p) => p.feesChange1d) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.feesChange1d}`, - ) - const feesChange1dQuery = feesChange1d.length - ? Prisma.sql`feesChange1d = CASE - ${Prisma.join(feesChange1d, ' ')} - ELSE feesChange1d - END,` - : Prisma.empty - const feesChange1w = poolsToUpdate - .filter((p) => p.feesChange1w) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.feesChange1w}`, - ) - const feesChange1wQuery = feesChange1w.length - ? Prisma.sql`feesChange1w = CASE - ${Prisma.join(feesChange1w, ' ')} - ELSE feesChange1w - END,` - : Prisma.empty - const feesChange1m = poolsToUpdate - .filter((p) => p.feesChange1m) - .map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.feesChange1m}`, - ) - const feesChange1mQuery = feesChange1m.length - ? Prisma.sql`feesChange1m = CASE - ${Prisma.join(feesChange1m, ' ')} - ELSE feesChange1m - END,` - : Prisma.empty - - const query = - poolsToUpdate.length && - Prisma.sql` - UPDATE SushiPool - SET - reserve0 = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserve0}`, - ), - ' ', - )} - ELSE reserve0 - END, - reserve1 = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserve1}`, - ), - ' ', - )} - ELSE reserve1 - END, - totalSupply = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.totalSupply}`, - ), - ' ', - )} - ELSE totalSupply - END, - liquidityUSD = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal( - update.liquidityUSD, - )}`, - ), - ' ', - )} - ELSE liquidityUSD - END, - feesUSD = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal( - update.feesUSD, - )}`, - ), - ' ', - )} - ELSE feesUSD - END, - liquidityNative = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal( - update.liquidityNative, - )}`, - ), - ' ', - )} - ELSE liquidityNative - END, - volumeUSD = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal( - update.volumeUSD, - )}`, - ), - ' ', - )} - ELSE volumeUSD - END, - volumeNative = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${clipDecimal( - update.volumeNative, - )}`, - ), - ' ', - )} - ELSE volumeNative - END, - token0Price = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.token0Price}`, - ), - ' ', - )} - ELSE token0Price - END, - token1Price = CASE - ${Prisma.join( - poolsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.token1Price}`, - ), - ' ', - )} - ELSE token1Price - END, - ${feeApr1hQuery} - ${feeApr1dQuery} - ${feeApr1wQuery} - ${feeApr1mQuery} - ${totalApr1hQuery} - ${totalApr1dQuery} - ${totalApr1wQuery} - ${totalApr1mQuery} - ${fees1hQuery} - ${fees1dQuery} - ${fees1wQuery} - ${fees1mQuery} - ${volume1hQuery} - ${volume1dQuery} - ${volume1wQuery} - ${volume1mQuery} - ${liquidityUSDChange1hQuery} - ${liquidityUSDChange1dQuery} - ${liquidityUSDChange1wQuery} - ${liquidityUSDChange1mQuery} - ${volumeChange1hQuery} - ${volumeChange1dQuery} - ${volumeChange1wQuery} - ${volumeChange1mQuery} - ${feesChange1hQuery} - ${feesChange1dQuery} - ${feesChange1wQuery} - ${feesChange1mQuery} - updatedAt = NOW() - WHERE id IN (${Prisma.join(poolsToUpdate.map((update) => update.id))}); - ` - - try { - const [updated, created] = await Promise.all([ - poolsToUpdate.length ? client.$executeRaw`${query}` : Promise.resolve(0), - client.sushiPool.createMany({ - data: poolsToCreate, - skipDuplicates: true, - }), - ]) - - console.error( - `LOAD - Updated ${updated} and created ${created.count} pools. `, - ) - } catch (e) { - console.log(e) - } -} - -export async function updatePoolsWithIncentivesTotalApr() { - const startTime = performance.now() - - const updatedPoolsCount = await client.$executeRaw` - UPDATE - SushiPool p - SET - totalApr1h = COALESCE((SELECT SUM(i.apr) FROM Incentive i WHERE i.poolId = p.id), 0) + COALESCE(p.feeApr1h, 0), - totalApr1d = COALESCE((SELECT SUM(i.apr) FROM Incentive i WHERE i.poolId = p.id), 0) + COALESCE(p.feeApr1d, 0), - totalApr1w = COALESCE((SELECT SUM(i.apr) FROM Incentive i WHERE i.poolId = p.id), 0) + COALESCE(p.feeApr1w, 0), - totalApr1m = COALESCE((SELECT SUM(i.apr) FROM Incentive i WHERE i.poolId = p.id), 0) + COALESCE(p.feeApr1m, 0), - incentiveApr = COALESCE((SELECT SUM(i.apr) FROM Incentive i WHERE i.poolId = p.id), 0), - isIncentivized = COALESCE((SELECT MAX(i.rewardPerDay > 0) FROM Incentive i WHERE i.poolId = p.id), false), - wasIncentivized = true - WHERE - EXISTS (SELECT 1 FROM Incentive i WHERE i.poolId = p.id); -` - - const endTime = performance.now() - - console.log( - `LOAD - Updated ${updatedPoolsCount} pools with total APR (${( - (endTime - startTime) / - 1000 - ).toFixed(1)}s) `, - ) -} - -export async function updatePoolsWithSteerVaults() { - const startTime = performance.now() - - const poolsUpdatedCount = await client.$executeRaw` - UPDATE - SushiPool p - SET - hasEnabledSteerVault = COALESCE( - (SELECT MAX(sv.isEnabled) FROM SteerVault sv WHERE sv.poolId = p.id), - false - ), - hadEnabledSteerVault = COALESCE( - (SELECT MAX(sv.isEnabled OR sv.wasEnabled) FROM SteerVault sv WHERE sv.poolId = p.id), - false - ) - WHERE - EXISTS (SELECT 1 FROM SteerVault sv WHERE sv.poolId = p.id AND (sv.isEnabled OR sv.wasEnabled)); - ` - - const endTime = performance.now() - - console.log( - `LOAD - Updated ${poolsUpdatedCount} pools with steer vaults (${( - (endTime - startTime) / - 1000 - ).toFixed(1)}s) `, - ) -} diff --git a/jobs/pool/src/etl/steer/index.ts b/jobs/pool/src/etl/steer/index.ts deleted file mode 100644 index 46b942b746..0000000000 --- a/jobs/pool/src/etl/steer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './load.js' diff --git a/jobs/pool/src/etl/steer/load.ts b/jobs/pool/src/etl/steer/load.ts deleted file mode 100644 index ad33a4181a..0000000000 --- a/jobs/pool/src/etl/steer/load.ts +++ /dev/null @@ -1,412 +0,0 @@ -import { Prisma } from '@sushiswap/database' -import { client } from 'src/lib/prisma' - -export async function upsertVaults(vaults: Prisma.SteerVaultCreateManyInput[]) { - const vaultTokens = vaults.flatMap((vault) => [ - vault.token0Id, - vault.token1Id, - ]) - const dbTokens = ( - await client.token.findMany({ - select: { - id: true, - }, - where: { - id: { - in: vaultTokens, - }, - }, - }) - ).map((token) => token.id) - - const vaultPools = vaults.map((vault) => vault.poolId) - const dbPools = ( - await client.sushiPool.findMany({ - select: { - id: true, - }, - where: { - id: { - in: vaultPools, - }, - }, - }) - ).map((pool) => pool.id) - - const vaultsToUpdate = vaults.filter( - (vault) => - dbTokens.includes(vault.token0Id) && - dbTokens.includes(vault.token1Id) && - dbPools.includes(vault.poolId), - ) - - if (vaultsToUpdate.length === 0) return - - const query = Prisma.sql` - UPDATE SteerVault - SET - poolId = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.poolId}`, - ), - ' ', - )} - ELSE poolId - END, - chainId = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.chainId}`, - ), - ' ', - )} - ELSE chainId - END, - feeTier = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.feeTier}`, - ), - ' ', - )} - ELSE feeTier - END, - apr = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.apr}`, - ), - ' ', - )} - ELSE apr - END, - apr1d = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.apr1d}`, - ), - ' ', - )} - ELSE apr1d - END, - apr1w = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.apr1w}`, - ), - ' ', - )} - ELSE apr1w - END, - apr1m = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.apr1m}`, - ), - ' ', - )} - ELSE apr1m - END, - apr1y = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.apr1y}`, - ), - ' ', - )} - ELSE apr1y - END, - token0Id = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.token0Id}`, - ), - ' ', - )} - ELSE token0Id - END, - reserve0 = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserve0}`, - ), - ' ', - )} - ELSE reserve0 - END, - reserve0USD = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserve0USD}`, - ), - ' ', - )} - ELSE reserve0USD - END, - fees0 = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.fees0}`, - ), - ' ', - )} - ELSE fees0 - END, - fees0USD = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.fees0USD}`, - ), - ' ', - )} - ELSE fees0USD - END, - token1Id = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.token1Id}`, - ), - ' ', - )} - ELSE token1Id - END, - reserve1 = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserve1}`, - ), - ' ', - )} - ELSE reserve1 - END, - reserve1USD = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserve1USD}`, - ), - ' ', - )} - ELSE reserve1USD - END, - fees1 = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.fees1}`, - ), - ' ', - )} - ELSE fees1 - END, - fees1USD = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.fees1USD}`, - ), - ' ', - )} - ELSE fees1USD - END, - reserveUSD = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.reserveUSD}`, - ), - ' ', - )} - ELSE reserveUSD - END, - feesUSD = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.feesUSD}`, - ), - ' ', - )} - ELSE feesUSD - END, - strategy = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.strategy}`, - ), - ' ', - )} - ELSE strategy - END, - description = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.description}`, - ), - ' ', - )} - ELSE description - END, - state = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.state}`, - ), - ' ', - )} - ELSE state - END, - performanceFee = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.performanceFee}`, - ), - ' ', - )} - ELSE performanceFee - END, - lowerTick = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.lowerTick}`, - ), - ' ', - )} - ELSE lowerTick - END, - upperTick = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.upperTick}`, - ), - ' ', - )} - ELSE upperTick - END, - adjustmentFrequency = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.adjustmentFrequency}`, - ), - ' ', - )} - ELSE adjustmentFrequency - END, - lastAdjustmentTimestamp = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.lastAdjustmentTimestamp}`, - ), - ' ', - )} - ELSE lastAdjustmentTimestamp - END, - creator = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.creator}`, - ), - ' ', - )} - ELSE creator - END, - admin = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => Prisma.sql`WHEN id = ${update.id} THEN ${update.admin}`, - ), - ' ', - )} - ELSE admin - END, - manager = CASE - ${Prisma.join( - vaultsToUpdate.map( - (update) => - Prisma.sql`WHEN id = ${update.id} THEN ${update.manager}`, - ), - ' ', - )} - ELSE manager - END, - updatedAt = NOW() - WHERE id IN (${Prisma.join( - vaultsToUpdate.map((update) => Prisma.sql`${update.id}`), - )}); - ` - - const [updated, created] = await Promise.all([ - vaultsToUpdate.length ? client.$executeRaw`${query}` : Promise.resolve(0), - client.steerVault.createMany({ - data: vaultsToUpdate, - skipDuplicates: true, - }), - ]) - - const currentVaults = await client.steerVault.findMany({ - select: { - id: true, - }, - where: { - isEnabled: true, - wasEnabled: false, - }, - }) - - await client.steerVault.updateMany({ - where: { - id: { in: currentVaults.map((vault) => vault.id) }, - }, - data: { - wasEnabled: true, - }, - }) - - console.log(`LOAD - Updated ${updated} and created ${created.count} vaults. `) -} - -export async function enableVaults(vaultIds: string[]) { - const enabled = await client.steerVault.updateMany({ - data: { - isEnabled: true, - wasEnabled: true, - }, - where: { id: { in: vaultIds } }, - }) - - console.log(`LOAD - Enabled ${enabled.count} vaults.`) -} - -export async function deprecateVaults(vaultIds: string[]) { - const deprecated = await client.steerVault.updateMany({ - data: { - apr: 0, - apr1d: 0, - apr1w: 0, - apr1m: 0, - apr1y: 0, - isDeprecated: true, - isEnabled: false, - }, - where: { id: { in: vaultIds } }, - }) - - console.log(`LOAD - Deprecated ${deprecated.count} vaults.`) -} diff --git a/jobs/pool/src/etl/token/load.ts b/jobs/pool/src/etl/token/load.ts deleted file mode 100644 index 99e57a0f15..0000000000 --- a/jobs/pool/src/etl/token/load.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Prisma } from '@sushiswap/database' -import { client } from 'src/lib/prisma' -import { ChainId } from 'sushi' -import { Address } from 'viem' - -export async function createTokens(tokens: Prisma.TokenCreateManyInput[]) { - if (tokens.length === 0) { - return - } - const created = await client.token.createMany({ - data: tokens, - skipDuplicates: true, - }) - if (created.count > 0) { - console.log(`LOAD - Created ${created.count} tokens. `) - } -} - -export async function getMissingTokens( - tokens: { chainId: ChainId; address: Address }[], -) { - if (tokens.length === 0) { - return [] - } - const tokensFound = await client.token.findMany({ - select: { - id: true, - name: true, - symbol: true, - }, - where: { - id: { - in: tokens.map( - (token) => `${token.chainId}:${token.address.toLowerCase()}`, - ), - }, - }, - }) - - return tokens - .filter( - (token) => - !tokensFound.find( - (createdToken) => - createdToken.id === - `${token.chainId}:${token.address.toLowerCase()}`, - ), - ) - .map((token) => ({ - address: token.address, - chainId: token.chainId, - })) -} diff --git a/jobs/pool/src/incentives.ts b/jobs/pool/src/incentives.ts deleted file mode 100644 index c8a03a2796..0000000000 --- a/jobs/pool/src/incentives.ts +++ /dev/null @@ -1,144 +0,0 @@ -import 'dotenv/config' -import './lib/wagmi.js' - -import { Prisma } from '@sushiswap/database' -import { performance } from 'perf_hooks' -import { ChainId } from 'sushi/chain' - -import { MINICHEF_SUPPORTED_CHAIN_IDS } from 'sushi/config' -import { filterIncentives } from './etl/incentive/index.js' -import { mergeIncentives } from './etl/incentive/load.js' -import { updatePoolsWithIncentivesTotalApr } from './etl/pool/index.js' -import { createTokens } from './etl/token/load.js' -import { getMasterChefV1, getMasterChefV2, getMinichef } from './lib/index.js' -import { ChefReturn } from './lib/types.js' - -export async function execute() { - try { - console.log('Preparing to load farms/incentives') - const startTime = performance.now() - - // EXTRACT - const farms = await extract() - console.log(`EXTRACT - Extracted farms from ${farms.length} chains.`) - - // TRANSFORM - const { incentivesToCreate, incentivesToUpdate, tokens } = - await transform(farms) - - // LOAD - await createTokens(tokens) - await mergeIncentives(incentivesToCreate, incentivesToUpdate) - await updatePoolsWithIncentivesTotalApr() - - const endTime = performance.now() - console.log( - `COMPLETE - Script ran for ${((endTime - startTime) / 1000).toFixed( - 1, - )} seconds. `, - ) - } catch (e) { - console.error(e) - } -} - -async function extract() { - const minichefsP = MINICHEF_SUPPORTED_CHAIN_IDS.map((chainId) => - getMinichef(chainId), - ) - const masterChefV1P = getMasterChefV1() - const masterChefV2P = getMasterChefV2() - - const [masterChefV1, masterChefV2, ...minichefs] = await Promise.all([ - masterChefV1P, - masterChefV2P, - ...minichefsP, - ]) - const combined = [ - { - chainId: ChainId.ETHEREUM, - farms: { ...masterChefV1.farms, ...masterChefV2.farms }, - }, - ...minichefs, - ] - - const totalFarms = combined.reduce( - (acc, { farms }) => acc + (farms ? Object.keys(farms).length : 0), - 0, - ) - let totalIncentives = 0 - for (const combination of combined) { - if (combination.farms) { - const incentiveCount = Object.entries(combination.farms).reduce( - (acc, [, farm]) => acc + farm.incentives.length, - 0, - ) - totalIncentives += incentiveCount - console.log( - `Chain ID: ${combination.chainId}. Farms: ${ - Object.keys(combination.farms).length - }, incentives: ${incentiveCount}`, - ) - } else { - console.error(`Chain ID: ${combination.chainId}. Error.`) - } - } - console.log( - `Total farms: ${totalFarms}, total incentives: ${totalIncentives}`, - ) - return combined -} - -async function transform(data: ChefReturn[]): Promise<{ - incentivesToCreate: Prisma.IncentiveCreateManyInput[] - incentivesToUpdate: Prisma.IncentiveCreateManyInput[] - tokens: Prisma.TokenCreateManyInput[] -}> { - const tokens: Prisma.TokenCreateManyInput[] = [] - const incentives = data.flatMap((farm) => { - const chainId = farm.chainId - return Object.entries(farm.farms ?? []).flatMap(([poolAddress, farm]) => { - return farm.incentives.flatMap((incentive) => { - tokens.push( - Prisma.validator()({ - id: chainId - .toString() - .concat(':') - .concat(incentive.rewardToken.address.toLowerCase()), - address: incentive.rewardToken.address.toLowerCase(), - chainId: chainId, - name: incentive.rewardToken.name, - symbol: incentive.rewardToken.symbol, - decimals: incentive.rewardToken.decimals, - }), - ) - return Prisma.validator()({ - id: poolAddress.concat(':').concat(incentive.rewarder.address), - chainId: chainId, - chefType: farm.chefType, - apr: - Number.isNaN(incentive.apr) || incentive.apr === Infinity - ? 0 - : incentive.apr, - rewardTokenId: chainId - .toString() - .concat(':') - .concat(incentive.rewardToken.address.toLowerCase()), - rewardPerDay: incentive.rewardPerDay, - poolId: chainId - .toString() - .concat(':') - .concat(poolAddress.toLowerCase()), - pid: farm.id, - rewarderAddress: incentive.rewarder.address.toLowerCase(), - rewarderType: incentive.rewarder.type, - }) - }) - }) - }) - - const { incentivesToCreate, incentivesToUpdate } = - await filterIncentives(incentives) - - return { incentivesToCreate, incentivesToUpdate, tokens } -} diff --git a/jobs/pool/src/lib/chefs/index.ts b/jobs/pool/src/lib/chefs/index.ts deleted file mode 100644 index c07916fc50..0000000000 --- a/jobs/pool/src/lib/chefs/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './masterChefV1/index.js' -export * from './masterChefV2/index.js' -export * from './minichef/index.js' diff --git a/jobs/pool/src/lib/chefs/masterChefV1/fetchers.ts b/jobs/pool/src/lib/chefs/masterChefV1/fetchers.ts deleted file mode 100644 index 84006a4dc2..0000000000 --- a/jobs/pool/src/lib/chefs/masterChefV1/fetchers.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { readContract, readContracts } from '@wagmi/core' -import { masterChefV1Abi } from 'sushi/abi' -import { ChainId } from 'sushi/chain' - -import { config } from 'src/lib/wagmi.js' -import { MASTERCHEF_ADDRESS } from 'sushi/config' - -export async function getPoolLength() { - const poolLengthCall = { - address: MASTERCHEF_ADDRESS[ChainId.ETHEREUM], - chainId: ChainId.ETHEREUM, - abi: masterChefV1Abi, - functionName: 'poolLength', - } as const - - return readContract(config, poolLengthCall) -} - -export async function getTotalAllocPoint() { - const totalAllocPointCall = { - address: MASTERCHEF_ADDRESS[ChainId.ETHEREUM], - chainId: ChainId.ETHEREUM, - abi: masterChefV1Abi, - functionName: 'totalAllocPoint', - } as const - - return readContract(config, totalAllocPointCall) -} - -export async function getPoolInfos(poolLength: bigint) { - const poolInfoCalls = [...Array(Number(poolLength))].map( - (_, i) => - ({ - address: MASTERCHEF_ADDRESS[ChainId.ETHEREUM], - args: [BigInt(i)], - chainId: ChainId.ETHEREUM, - abi: masterChefV1Abi, - functionName: 'poolInfo', - }) as const, - ) - - return readContracts(config, { - allowFailure: false, - contracts: poolInfoCalls, - }).then((results) => - results.flatMap((result) => ({ - lpToken: result[0], - allocPoint: result[1], - lastRewardBlock: result[2], - accSushiPerShare: result[3], - })), - ) -} diff --git a/jobs/pool/src/lib/chefs/masterChefV1/index.ts b/jobs/pool/src/lib/chefs/masterChefV1/index.ts deleted file mode 100644 index 6b9b7dec02..0000000000 --- a/jobs/pool/src/lib/chefs/masterChefV1/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { daysInYear, secondsInDay } from 'date-fns/constants' -import { ChainId } from 'sushi/chain' -import { SUSHI } from 'sushi/currency' - -import { MASTERCHEF_ADDRESS } from 'sushi/config' -import { SECONDS_BETWEEN_BLOCKS } from 'sushi/config/subgraph' -import { getPairs, getTokenBalancesOf, getTokens } from '../../common/index.js' -import type { ChefReturn, Farm } from '../../types.js' -import { getPoolInfos, getPoolLength, getTotalAllocPoint } from './fetchers.js' - -const SUSHI_PER_BLOCK = 100 - -export async function getMasterChefV1(): Promise { - const [ - poolLength, - totalAllocPoint, - [{ derivedUSD: sushiPriceUSD }], - averageBlockTime, - ] = await Promise.all([ - getPoolLength(), - getTotalAllocPoint(), - getTokens([SUSHI[ChainId.ETHEREUM].address], ChainId.ETHEREUM), - SECONDS_BETWEEN_BLOCKS[ChainId.ETHEREUM], - ]) - - const blocksPerDay = averageBlockTime ? secondsInDay / averageBlockTime : 0 - const sushiPerDay = SUSHI_PER_BLOCK * blocksPerDay - console.log( - `MasterChefV1 - pools: ${poolLength}, sushiPerDay: ${sushiPerDay}, averageBlockTime: ${averageBlockTime}, totalAllocPoint: ${totalAllocPoint}`, - ) - - const poolInfos = await getPoolInfos(poolLength) - - const [pairs, lpBalances] = await Promise.all([ - getPairs( - poolInfos.map((pool) => pool.lpToken), - ChainId.ETHEREUM, - ), - getTokenBalancesOf( - poolInfos.map((pool) => pool.lpToken), - MASTERCHEF_ADDRESS[ChainId.ETHEREUM], - ChainId.ETHEREUM, - ), - ]) - - return { - chainId: ChainId.ETHEREUM, - farms: poolInfos.reduce>((acc, farm, i) => { - const pair = pairs.find((pair) => pair.id === farm.lpToken.toLowerCase()) - const lpBalance = lpBalances.find( - ({ token }) => token === farm.lpToken, - )?.balance - if (!pair || !lpBalance) return acc - - let rewardPerDay = - sushiPerDay * (Number(farm.allocPoint) / Number(totalAllocPoint)) - - // Edge case for virtually disabled rewards - if (rewardPerDay < 0.000001) rewardPerDay = 0 - - const rewardPerYearUSD = daysInYear * rewardPerDay * sushiPriceUSD - - const incentives: Farm['incentives'] = [ - { - apr: - rewardPerYearUSD / - ((pair.liquidityUSD * lpBalance) / pair.totalSupply), - rewardPerDay: rewardPerDay, - rewardToken: { - address: SUSHI[ChainId.ETHEREUM].address, - name: SUSHI[ChainId.ETHEREUM].name ?? '', - decimals: SUSHI[ChainId.ETHEREUM].decimals ?? 18, - symbol: SUSHI[ChainId.ETHEREUM].symbol ?? '', - }, - rewarder: { - address: MASTERCHEF_ADDRESS[ChainId.ETHEREUM], - type: 'Primary', - }, - }, - ] - - acc[farm.lpToken.toLowerCase()] = { - id: i, - incentives: incentives, - chefType: 'MasterChefV1', - poolType: pair.type, - } - return acc - }, {}), - } -} diff --git a/jobs/pool/src/lib/chefs/masterChefV2/fetchers.ts b/jobs/pool/src/lib/chefs/masterChefV2/fetchers.ts deleted file mode 100644 index d1c97142c3..0000000000 --- a/jobs/pool/src/lib/chefs/masterChefV2/fetchers.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { readContract, readContracts } from '@wagmi/core' -import { masterChefV2Abi } from 'sushi/abi' -import { ChainId } from 'sushi/chain' - -import { getMasterChefV2Rewarders } from '@sushiswap/graph-client/master-chef-v2' -import { config } from 'src/lib/wagmi.js' -import { MASTERCHEF_V2_ADDRESS } from '../../../config.js' - -export async function getPoolLength() { - const poolLengthCall = { - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - chainId: ChainId.ETHEREUM, - abi: masterChefV2Abi, - functionName: 'poolLength', - } as const - - return readContract(config, poolLengthCall) -} - -export async function getTotalAllocPoint() { - return readContract(config, { - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - chainId: ChainId.ETHEREUM, - abi: masterChefV2Abi, - functionName: 'totalAllocPoint', - } as const) -} - -export async function getSushiPerBlock() { - return readContract(config, { - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - chainId: ChainId.ETHEREUM, - abi: masterChefV2Abi, - functionName: 'sushiPerBlock', - } as const) -} - -export async function getPoolInfos(poolLength: number) { - const poolInfoCalls = [...Array(poolLength)].map( - (_, i) => - ({ - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - args: [BigInt(i)], - chainId: ChainId.ETHEREUM, - abi: masterChefV2Abi, - functionName: 'poolInfo', - }) as const, - ) - - const poolInfos = await readContracts(config, { - allowFailure: false, - contracts: poolInfoCalls, - }) - - return poolInfos.map((poolInfo) => ({ - accSushiPerShare: poolInfo[0], - lastRewardBlock: poolInfo[1], - allocPoint: poolInfo[2], - })) -} - -export async function getLpTokens(poolLength: number) { - const lpTokenCalls = [...Array(poolLength)].map( - (_, i) => - ({ - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - args: [BigInt(i)], - chainId: ChainId.ETHEREUM, - abi: masterChefV2Abi, - functionName: 'lpToken', - }) as const, - ) - - return readContracts(config, { - allowFailure: false, - contracts: lpTokenCalls, - }) -} - -export async function getRewarders(poolLength: number) { - const rewarderCalls = [...Array(poolLength)].map( - (_, i) => - ({ - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - args: [BigInt(i)], - chainId: ChainId.ETHEREUM, - abi: masterChefV2Abi, - functionName: 'rewarder', - }) as const, - ) - - return readContracts(config, { - allowFailure: false, - contracts: rewarderCalls, - }) -} - -export async function getRewarderInfos() { - const rewarders = await getMasterChefV2Rewarders({}) - - return rewarders.map((rewarder) => ({ - id: rewarder.id, - rewardToken: rewarder.address, - rewardPerSecond: BigInt(rewarder.rewardPerSecond), - })) -} diff --git a/jobs/pool/src/lib/chefs/masterChefV2/index.ts b/jobs/pool/src/lib/chefs/masterChefV2/index.ts deleted file mode 100644 index 00a34bc12b..0000000000 --- a/jobs/pool/src/lib/chefs/masterChefV2/index.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { daysInYear, secondsInDay } from 'date-fns/constants' -import { ChainId } from 'sushi/chain' -import { SUSHI } from 'sushi/currency' - -import { SECONDS_BETWEEN_BLOCKS } from 'sushi/config/subgraph' -import { MASTERCHEF_V2_ADDRESS } from '../../../config.js' -import { - divBigIntToNumber, - getPairs, - getTokenBalancesOf, - getTokens, -} from '../../common/index.js' -import type { ChefReturn, Farm } from '../../types.js' -import { - getLpTokens, - getPoolInfos, - getPoolLength, - getRewarderInfos, - getRewarders, - getSushiPerBlock, - getTotalAllocPoint, -} from './fetchers.js' - -export async function getMasterChefV2(): Promise { - const [ - poolLength, - totalAllocPoint, - sushiPerBlock, - rewarderInfos, - averageBlockTime, - ] = await Promise.all([ - getPoolLength(), - getTotalAllocPoint(), - getSushiPerBlock(), - getRewarderInfos(), - SECONDS_BETWEEN_BLOCKS[ChainId.ETHEREUM], - ]) - - console.log( - `MasterChefV2 - pools: ${poolLength}, sushiPerBlock: ${sushiPerBlock}, averageBlockTime: ${averageBlockTime}, rewarderInfos: ${rewarderInfos.length}, totalAllocPoint: ${totalAllocPoint}`, - ) - - const [poolInfos, lpTokens, rewarders, tokens] = await Promise.all([ - getPoolInfos(Number(poolLength)), - getLpTokens(Number(poolLength)), - getRewarders(Number(poolLength)), - getTokens( - [ - ...rewarderInfos.map((rewarder) => rewarder.rewardToken), - SUSHI[ChainId.ETHEREUM].address, - ], - ChainId.ETHEREUM, - ), - ]) - - const [pairs, lpBalances] = await Promise.all([ - getPairs(lpTokens, ChainId.ETHEREUM), - getTokenBalancesOf( - lpTokens, - MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - ChainId.ETHEREUM, - ), - ]) - - const pools = [...Array(Number(poolLength)).keys()].map((_, i) => ({ - id: i, - poolInfo: poolInfos[i], - lpBalance: lpBalances.find(({ token }) => token === lpTokens[i])?.balance, - pair: pairs.find((pair) => pair.id === lpTokens?.[i]?.toLowerCase()), - rewarder: rewarderInfos.find( - (rewarderInfo) => rewarderInfo.id === rewarders?.[i]?.toLowerCase(), - ), - })) - - const blocksPerDay = averageBlockTime ? secondsInDay / averageBlockTime : 0 - const sushiPerDay = - divBigIntToNumber(sushiPerBlock, SUSHI[ChainId.ETHEREUM].decimals) * - blocksPerDay - const sushiPriceUSD = - tokens.find( - (tokenPrice) => - tokenPrice.id === SUSHI[ChainId.ETHEREUM].address.toLowerCase(), - )?.derivedUSD ?? 0 - - return { - chainId: ChainId.ETHEREUM, - farms: pools.reduce>((acc, pool) => { - if (!pool.pair || !pool.lpBalance || !pool.poolInfo) return acc - - let sushiRewardPerDay = - sushiPerDay * - (Number(pool.poolInfo.allocPoint) / Number(totalAllocPoint)) - - // Edge case for virtually disabled rewards - if (sushiRewardPerDay < 0.000001) sushiRewardPerDay = 0 - - const sushiRewardPerYearUSD = - daysInYear * sushiRewardPerDay * sushiPriceUSD - - const stakedLiquidityUSD = - (pool.pair.liquidityUSD * pool.lpBalance) / pool.pair.totalSupply - - const incentives: Farm['incentives'] = [ - { - apr: sushiRewardPerYearUSD / stakedLiquidityUSD, - rewardPerDay: sushiRewardPerDay, - rewardToken: { - address: SUSHI[ChainId.ETHEREUM].address, - name: SUSHI[ChainId.ETHEREUM].name ?? '', - decimals: SUSHI[ChainId.ETHEREUM].decimals ?? 18, - symbol: SUSHI[ChainId.ETHEREUM].symbol ?? '', - }, - rewarder: { - address: MASTERCHEF_V2_ADDRESS[ChainId.ETHEREUM], - type: 'Primary', - }, - }, - ] - - if (pool.rewarder) { - const token = tokens.find( - (token) => token.id === pool.rewarder?.rewardToken, - ) - if (token) { - let rewardPerSecond = 0 - - switch (pool.rewarder.id.toLowerCase()) { - case '0x0000000000000000000000000000000000000000': { - break - } - // LIDO rewarder (rewards have ended) - case '0x75ff3dd673ef9fc459a52e1054db5df2a1101212': { - break - } - // ALCX rewarder (second on subgraph = block irl) - case '0xd101479ce045b903ae14ec6afa7a11171afb5dfa': - case '0x7519c93fc5073e15d89131fd38118d73a72370f8': { - rewardPerSecond = divBigIntToNumber( - pool.rewarder.rewardPerSecond / 12n, - token.decimals, - ) - break - } - // Convex rewarder (rewards have ended) - case '0x9e01aac4b3e8781a85b21d9d9f848e72af77b362': - case '0x1fd97b5e5a257b0b9b9a42a96bb8870cbdd1eb79': { - break - } - default: { - rewardPerSecond = divBigIntToNumber( - pool.rewarder.rewardPerSecond, - token.decimals, - ) - } - } - - const rewardPerDay = secondsInDay * rewardPerSecond - const rewardPerYearUSD = daysInYear * rewardPerDay * token.derivedUSD - - incentives.push({ - apr: rewardPerYearUSD / stakedLiquidityUSD, - rewardPerDay: rewardPerDay, - rewardToken: { - address: pool.rewarder.rewardToken, - name: token.name, - decimals: token.decimals, - symbol: token.symbol, - }, - rewarder: { - address: pool.rewarder.id, - type: 'Secondary', - }, - }) - } - } - - acc[pool.pair.id] = { - id: pool.id, - incentives: incentives, - chefType: 'MasterChefV2', - poolType: pool.pair.type, - } - - return acc - }, {}), - } -} diff --git a/jobs/pool/src/lib/chefs/minichef/fetchers.ts b/jobs/pool/src/lib/chefs/minichef/fetchers.ts deleted file mode 100644 index 9a21e260eb..0000000000 --- a/jobs/pool/src/lib/chefs/minichef/fetchers.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { readContract, readContracts } from '@wagmi/core' -import zip from 'lodash.zip' -import { complexRewarderTimeAbi, miniChefAbi } from 'sushi/abi' -import { ChainId } from 'sushi/chain' - -import { getMiniChefRewarders } from '@sushiswap/graph-client/mini-chef' -import { config } from 'src/lib/wagmi.js' -import { MiniChefChainId } from 'sushi/config' -import { Address } from 'viem' -import { MINICHEF_ADDRESS } from '../../../config.js' - -export async function getPoolLength(chainId: ChainId) { - const poolLengthCall = { - address: MINICHEF_ADDRESS[chainId], - chainId: chainId, - abi: miniChefAbi, - functionName: 'poolLength', - } as const - - return readContract(config, poolLengthCall) -} - -export async function getTotalAllocPoint(chainId: ChainId) { - const totalAllocPointCall = { - address: MINICHEF_ADDRESS[chainId], - chainId: chainId, - abi: miniChefAbi, - functionName: 'totalAllocPoint', - } as const - - return readContract(config, totalAllocPointCall) -} - -export async function getSushiPerSecond(chainId: ChainId) { - const sushiPerSecondCall = { - address: MINICHEF_ADDRESS[chainId], - chainId: chainId, - abi: miniChefAbi, - functionName: 'sushiPerSecond', - } as const - - return readContract(config, sushiPerSecondCall) -} - -export async function getPoolInfos(poolLength: bigint, chainId: ChainId) { - const poolInfoCalls = [...Array(Number(poolLength))].map( - (_, i) => - ({ - address: MINICHEF_ADDRESS[chainId], - args: [BigInt(i)], - chainId: chainId, - abi: miniChefAbi, - functionName: 'poolInfo', - }) as const, - ) - - return readContracts(config, { - allowFailure: true, - contracts: poolInfoCalls, - }).then((results) => - results.map(({ result }) => - result - ? { - accSushiPerShare: result[0], - lastRewardTime: result[1], - allocPoint: result[2], - } - : undefined, - ), - ) -} - -export async function getLpTokens(poolLength: bigint, chainId: ChainId) { - const lpTokenCalls = [...Array(Number(poolLength))].map( - (_, i) => - ({ - address: MINICHEF_ADDRESS[chainId], - args: [BigInt(i)], - chainId: chainId, - abi: miniChefAbi, - functionName: 'lpToken', - }) as const, - ) - - return readContracts(config, { - allowFailure: true, - contracts: lpTokenCalls, - }).then((results) => results.map(({ result }) => result)) -} - -export async function getRewarders(poolLength: bigint, chainId: ChainId) { - const rewarderCalls = [...Array(Number(poolLength))].map( - (_, i) => - ({ - address: MINICHEF_ADDRESS[chainId], - args: [BigInt(i)], - chainId: chainId, - abi: miniChefAbi, - functionName: 'rewarder', - }) as const, - ) - - return readContracts(config, { - allowFailure: true, - contracts: rewarderCalls, - }).then((results) => results.map(({ result }) => result)) -} - -export async function getRewarderInfos(chainId: MiniChefChainId) { - const rewarders = await getMiniChefRewarders({ chainId }) - console.log(`Retrieved ${rewarders.length} rewarders from ${chainId}`) - - return Promise.all( - rewarders.map(async (rewarder) => { - try { - // single-rewarders, no need to fetch anything for those, can just return - const blacklist: Record = { - [ChainId.POLYGON]: [ - '0xb52b4b6779553a89e7f5f6f1d463595d88e88822', - '0x0fc98e524095f7a0f09eb9786beba120060f8004', - '0x9e21698426a29c32d7c0fdaeb7723c9856ba9ac7', - '0x71581bf0ce397f50f87cc2490146d30a1e686461', - '0x4db1c6364924b90310d68948fc7a3121fa9edf10', - '0x99246001c6e458c63052fb4e3d04df6bd932a6a7', - '0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0', - '0x78b8abe9e6bf27d3ea68da096921b77efcfd389c', - ], - [ChainId.ARBITRUM]: [ - '0x9c37b0b498da78830284afdcb534c3350b52e744', - '0x948bfbb7bdb7e74ec8ed0859c79502408bee4de1', - '0xec932d20ba851ac26630835771476dc2d1a3ac8d', - '0xf6348d37950c79b9f7b02b4d97e04db7dea855ae', - '0x1a9c20e2b0ac11ebecbdca626bba566c4ce8e606', - '0xae961a7d116bfd9b2534ad27fe4d178ed188c87a', - '0x3c61b93b64f59b5091a11a071083598ee8b5cb64', - '0x1a140bed2ec8ce72ee3723d18fd5d50851e455fd', - '0xccc3760a0a315937877687bc99df4edb0f7315b4', - '0x294eadcc534084c1333dc99e1afcf3e92c5c1297', - '0xb873813f710093cbc17836297a6fefcfc6989faf', - '0xa15a0789112d9aa7e40e76bfaa39ae36cc0aad3c', - ], - [ChainId.GNOSIS]: [ - '0xb291149e478dbdd2cd2528ad4088ee5c8376df1e', - '0xc375411c6597f692add6a7a3ad5b3c38626b0f26', - ], - [ChainId.ARBITRUM_NOVA]: [ - '0x3f505b5cff05d04f468db65e27e72ec45a12645f', - '0x840ecabcad4d6b8d25a9bb853ae32eac467e017b', - '0x16ac10499ad2712a847641996e0aab97e90305fa', - '0x948bfbb7bdb7e74ec8ed0859c79502408bee4de1', - '0x3f505b5cff05d04f468db65e27e72ec45a12645f', - ], - } - - if ( - blacklist[chainId]?.includes(rewarder.id) || - rewarder.id === '0x0000000000000000000000000000000000000000' - ) { - return { - id: rewarder.id as Address, - rewardToken: rewarder.address, - rewardPerSecond: BigInt(rewarder.rewardPerSecond), - } - } - - const poolLength = await getPoolLength(chainId) - - const poolIds = - poolLength !== 0n ? [...Array(Number(poolLength)).keys()] : [] - - const poolInfoCalls = poolIds.map( - (_, i) => - ({ - address: rewarder.id as Address, - args: [BigInt(i)], - chainId: chainId, - abi: complexRewarderTimeAbi, - functionName: 'poolInfo', - }) as const, - ) - - const poolInfos = await readContracts(config, { - allowFailure: true, - contracts: poolInfoCalls, - }) - - const zipped = zip(poolIds, poolInfos) - const successful = zipped - .filter(([, poolInfo]) => poolInfo?.result) - .map(([poolId, poolInfo]) => [poolId, poolInfo!.result!] as const) - - return { - id: rewarder.id, - pools: successful.map(([id, [, , allocPoint]]) => ({ - // Minichef pool ID - id, - allocPoint: Number(allocPoint), - })), - totalAllocPoint: successful.reduce((acc, [, [, , allocPoint]]) => { - acc += allocPoint - return acc - }, 0n), - rewardToken: rewarder.address, - rewardPerSecond: BigInt(rewarder.rewardPerSecond), - } - } catch (error) { - console.log('error', chainId, rewarder.id, error) - - // so that the script doesn't fail on new should-be-blacklisted pools - return { - id: rewarder.id, - rewardToken: rewarder.address, - rewardPerSecond: BigInt(rewarder.rewardPerSecond), - } - } - }), - ) -} diff --git a/jobs/pool/src/lib/chefs/minichef/index.ts b/jobs/pool/src/lib/chefs/minichef/index.ts deleted file mode 100644 index 5e9971e3ec..0000000000 --- a/jobs/pool/src/lib/chefs/minichef/index.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { daysInYear, secondsInDay } from 'date-fns/constants' -import { ChainId } from 'sushi/chain' -import { SUSHI, SUSHI_ADDRESS } from 'sushi/currency' - -import { MiniChefChainId } from 'sushi/config' -import { MINICHEF_ADDRESS } from '../../../config.js' -import { - divBigIntToNumber, - getPairs, - getTokenBalancesOf, - getTokens, -} from '../../common/index.js' -import type { ChefReturn, Farm } from '../../types.js' -import { - getLpTokens, - getPoolInfos, - getPoolLength, - getRewarderInfos, - getRewarders, - getSushiPerSecond, - getTotalAllocPoint, -} from './fetchers.js' - -export async function getMinichef( - chainId: MiniChefChainId, -): Promise { - try { - if (!(chainId in SUSHI)) { - return { chainId, farms: null } - } - - const [ - poolLength, - totalAllocPoint, - sushiPerSecond, - rewarderInfos, - [{ derivedUSD: sushiPriceUSD }], - ] = await Promise.all([ - getPoolLength(chainId), - getTotalAllocPoint(chainId), - getSushiPerSecond(chainId), - getRewarderInfos(chainId), - getTokens([SUSHI_ADDRESS[ChainId.ETHEREUM]], ChainId.ETHEREUM), - ]) - const sushiPerDay = - secondsInDay * - divBigIntToNumber( - sushiPerSecond, - SUSHI[chainId as keyof typeof SUSHI]?.decimals ?? 18, - ) - - console.log( - `MiniChef ${chainId} - pools: ${poolLength}, sushiPerDay: ${sushiPerDay}, rewarderInfos: ${rewarderInfos.length}, totalAllocPoint: ${totalAllocPoint}`, - ) - - const [poolInfos, lpTokens, rewarders, tokens] = await Promise.all([ - getPoolInfos(poolLength, chainId), - getLpTokens(poolLength, chainId), - getRewarders(poolLength, chainId), - getTokens( - rewarderInfos.map((rewarder) => rewarder?.rewardToken), - chainId, - ), - ]) - - const [pairs, lpBalances] = await Promise.all([ - getPairs(lpTokens.filter(Boolean) as string[], chainId), - getTokenBalancesOf( - lpTokens.filter(Boolean) as string[], - MINICHEF_ADDRESS[chainId], - chainId, - ), - ]) - - const pools = [...Array(Number(poolLength))].map((_, i) => { - return { - id: i, - poolInfo: poolInfos[i], - lpBalance: lpBalances.find(({ token }) => token === lpTokens[i]) - ?.balance, - pair: pairs.find((pair) => pair.id === lpTokens?.[i]?.toLowerCase()), - rewarder: rewarderInfos.find( - (rewarderInfo) => rewarderInfo.id === rewarders?.[i]?.toLowerCase(), - ), - } - }) - - return { - chainId, - farms: pools.reduce>((acc, pool) => { - if (!pool.pair || typeof pool.lpBalance !== 'number' || !pool.poolInfo) - return acc - - let sushiRewardPerDay = - sushiPerDay * - (Number(pool.poolInfo.allocPoint) / Number(totalAllocPoint)) - - // Edge case for virtually disabled rewards - if (sushiRewardPerDay < 0.000001) sushiRewardPerDay = NaN - - const sushiRewardPerYearUSD = - daysInYear * sushiRewardPerDay * sushiPriceUSD - - const stakedLiquidityUSD = - (pool.pair.liquidityUSD * pool.lpBalance) / pool.pair.totalSupply - - const incentives: Farm['incentives'] = [] - - if (!Number.isNaN(sushiRewardPerDay)) { - incentives.push({ - apr: sushiRewardPerYearUSD / stakedLiquidityUSD, - rewardPerDay: sushiRewardPerDay, - rewardToken: { - address: SUSHI[chainId as keyof typeof SUSHI]?.address ?? '', - name: SUSHI[chainId as keyof typeof SUSHI]?.name ?? '', - decimals: SUSHI[chainId as keyof typeof SUSHI]?.decimals ?? 18, - symbol: SUSHI[chainId as keyof typeof SUSHI]?.symbol ?? '', - }, - rewarder: { - address: MINICHEF_ADDRESS[chainId], - type: 'Primary', - }, - }) - } - - if (pool.rewarder) { - const token = tokens.find( - (token) => token.id === pool.rewarder?.rewardToken, - ) - - if (token) { - let rewardPerSecond = 0 - // Multipool rewarder - if (pool.rewarder.pools) { - const poolInfo = pool.rewarder.pools.find( - (rewaderPool) => rewaderPool.id === pool.id, - ) - - if (poolInfo) { - // poolInfo.allocPoint.div(masterChefV2.totalAllocPoint).times(masterChefV2.sushiPerDay) - rewardPerSecond = - (poolInfo.allocPoint / - Number(pool.rewarder.totalAllocPoint)) * - divBigIntToNumber( - pool.rewarder.rewardPerSecond, - token.decimals, - ) - } - - // Singlepool rewarder - } else { - rewardPerSecond = divBigIntToNumber( - pool.rewarder.rewardPerSecond, - token.decimals, - ) - } - - // Edge case for virtually disabled rewards - if (rewardPerSecond < 0.000001) sushiRewardPerDay = NaN - - if (!Number.isNaN(rewardPerSecond)) { - const rewardPerDay = secondsInDay * rewardPerSecond - const rewardPerYearUSD = - daysInYear * rewardPerDay * token.derivedUSD - - incentives.push({ - apr: rewardPerYearUSD / stakedLiquidityUSD, - rewardPerDay: rewardPerDay, - rewardToken: { - address: pool.rewarder.rewardToken, - name: token.name, - decimals: token.decimals, - symbol: token.symbol, - }, - rewarder: { - address: pool.rewarder.id, - type: 'Secondary', - }, - }) - } - } - } - - acc[pool.pair.id] = { - id: pool.id, - incentives: incentives, - chefType: 'MiniChef', - poolType: pool.pair.type, - } - - return acc - }, {}), - } - } catch (e) { - console.log(chainId, e) - return { chainId, farms: null } - } -} diff --git a/jobs/pool/src/lib/common/index.ts b/jobs/pool/src/lib/common/index.ts deleted file mode 100644 index 25cf97f017..0000000000 --- a/jobs/pool/src/lib/common/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './pairs.js' -export * from './tokens.js' -export * from './utils.js' diff --git a/jobs/pool/src/lib/common/pairs.ts b/jobs/pool/src/lib/common/pairs.ts deleted file mode 100644 index 8cd8f543e8..0000000000 --- a/jobs/pool/src/lib/common/pairs.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { getSushiV2Pools } from '@sushiswap/graph-client/sushi-v2' -import { SushiSwapV2ChainId } from 'sushi/config' -import { Address } from 'viem' -import type { Farm } from '../types.js' -import { divBigIntToNumber } from './utils.js' - -interface Pair { - id: string - totalSupply: number - liquidityUSD: number - type: Farm['poolType'] -} - -async function getExchangePairs( - ids: string[], - chainId: SushiSwapV2ChainId, -): Promise { - const pairs = await getSushiV2Pools( - { - chainId, - first: ids.length, - where: { id_in: ids.map((id) => id.toLowerCase() as Address) }, - }, - { retries: 3 }, - ) - return pairs.map((pair) => { - return { - id: pair.address.toLowerCase(), - totalSupply: divBigIntToNumber(BigInt(pair.liquidity), 18), - liquidityUSD: pair.liquidityUSD, - type: 'Legacy', - } - }) -} - -export async function getPairs(ids: string[], chainId: SushiSwapV2ChainId) { - return await getExchangePairs(ids, chainId) -} diff --git a/jobs/pool/src/lib/common/tokens.ts b/jobs/pool/src/lib/common/tokens.ts deleted file mode 100644 index 0ea5d7300e..0000000000 --- a/jobs/pool/src/lib/common/tokens.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { readContracts } from '@wagmi/core' -import { Chain, ChainId } from 'sushi/chain' - -import { getSushiV2Tokens } from '@sushiswap/graph-client/sushi-v2' -import { SushiSwapV2ChainId } from 'sushi/config' -import { Address, erc20Abi } from 'viem' -import { getTokenPrices } from '../price.js' -import { config } from '../wagmi.js' -import { divBigIntToNumber } from './utils.js' - -interface Token { - id: string - symbol: string - name: string - decimals: number - liquidity: number - derivedUSD: number -} - -const getExchangeTokens = async ( - ids: string[], - chainId: SushiSwapV2ChainId, -): Promise => { - const [tokens, tokenPrices] = await Promise.all([ - getSushiV2Tokens( - { - chainId, - where: { id_in: ids.map((id) => id.toLowerCase() as Address) }, - }, - { retries: 3 }, - ), - getTokenPrices({ chainId }), - ]) - - return tokens.map((token) => ({ - id: token.address.toLowerCase(), - symbol: token.symbol, - name: token.name, - decimals: Number(token.decimals), - liquidity: Number(token.totalLiquidity), - derivedUSD: tokenPrices[token.address] || 0, - })) -} - -export const getTokens = async (ids: string[], chainId: SushiSwapV2ChainId) => { - return await getExchangeTokens(ids, chainId) -} - -export async function getTokenBalancesOf( - _tokens: string[], - address: string, - chainId: ChainId, -) { - // not fully erc20, farm not active - const tokens = _tokens.filter( - (token) => token !== '0x0c810E08fF76E2D0beB51B10b4614b8f2b4438F9', - ) - - const balanceOfCalls = tokens.map( - (token) => - ({ - address: token as Address, - args: [address as Address], - chainId: chainId, - abi: erc20Abi, - functionName: 'balanceOf', - }) as const, - ) - - const decimalCalls = tokens.map( - (token) => - ({ - address: token as Address, - chainId: chainId, - abi: erc20Abi, - functionName: 'decimals', - }) as const, - ) - - const [balancesOf, decimals] = await Promise.all([ - readContracts(config, { - allowFailure: true, - contracts: balanceOfCalls, - }), - readContracts(config, { - allowFailure: true, - contracts: decimalCalls, - }), - ]) - - return tokens - .map((token, i) => { - const balance = balancesOf[i].result - const decimal = decimals[i].result - - if ( - balance === null || - balance === undefined || - decimal === null || - decimal === undefined - ) { - console.log( - `Balance / decimal fetch failed for ${token} on ${ - Chain.from(chainId)?.shortName - }`, - ) - return null - } - - return { - token, - // so that we don't need to seed new pairs - balance: balance === 0n ? 1 : divBigIntToNumber(balance, decimal), - } - }) - .filter((token): token is NonNullable => Boolean(token)) -} diff --git a/jobs/pool/src/lib/common/utils.ts b/jobs/pool/src/lib/common/utils.ts deleted file mode 100644 index d2a08e0946..0000000000 --- a/jobs/pool/src/lib/common/utils.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { formatUnits } from 'viem' - -export const divBigIntToNumber = (value: bigint, decimals: number): number => - Number(formatUnits(value, decimals)) - -/** - * Formula source: http://www.linked8.com/blog/158-apy-to-apr-and-apr-to-apy-calculation-methodologies - * - * @param apr {Number} APR as percentage (ie. 5.82) - * @param frequency {Number} Compounding frequency (times a year) - * @returns {Number} APY as percentage (ie. 6 for APR of 5.82%) - */ -export const aprToApy = (apr: number | string, frequency: number) => - ((1 + Number(apr) / 100 / frequency) ** frequency - 1) * 100 diff --git a/jobs/pool/src/lib/index.ts b/jobs/pool/src/lib/index.ts deleted file mode 100644 index 42e2cffb79..0000000000 --- a/jobs/pool/src/lib/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './chefs/index.js' -export * from './common/index.js' -export * from './wagmi.js' diff --git a/jobs/pool/src/lib/price.ts b/jobs/pool/src/lib/price.ts deleted file mode 100644 index 2873a093b5..0000000000 --- a/jobs/pool/src/lib/price.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { ChainId } from 'sushi/chain' - -export async function getTokenPrices({ - chainId, -}: { - chainId: ChainId -}): Promise> { - return fetch(`https://api.sushi.com/price/v1/${chainId}`) - .then((res) => res.json()) - .then((prices: Record) => - Object.entries(prices).reduce( - (acc, [key, value]) => { - acc[key.toLowerCase()] = value - return acc - }, - {}, - ), - ) - .catch((e) => { - console.error('Error fetching token prices', chainId, e) - throw e - }) -} diff --git a/jobs/pool/src/lib/prisma.ts b/jobs/pool/src/lib/prisma.ts deleted file mode 100644 index 5175c68b5b..0000000000 --- a/jobs/pool/src/lib/prisma.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { createDirectClient } from '@sushiswap/database' - -export const client = await createDirectClient() diff --git a/jobs/pool/src/lib/types.ts b/jobs/pool/src/lib/types.ts deleted file mode 100644 index f1e00448e5..0000000000 --- a/jobs/pool/src/lib/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ChainId } from 'sushi/chain' - -export interface Farm { - id: number - incentives: { - apr: number - rewardPerDay: number - rewardToken: { - address: string - name: string - decimals: number - symbol: string - } - rewarder: { - address: string - type: 'Primary' | 'Secondary' - } - }[] - chefType: 'MasterChefV1' | 'MasterChefV2' | 'MiniChef' - poolType: 'Legacy' | 'Trident' | 'Kashi' | 'Unknown' -} - -export interface ChefReturn { - chainId: ChainId - farms: Record | null -} diff --git a/jobs/pool/src/lib/wagmi.ts b/jobs/pool/src/lib/wagmi.ts deleted file mode 100644 index 81cc731f00..0000000000 --- a/jobs/pool/src/lib/wagmi.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { createConfig } from '@wagmi/core' -import { publicChains, publicTransports } from 'sushi/config' - -export const config = createConfig({ - chains: publicChains, - transports: publicTransports, - batch: { - multicall: { - wait: 64, - }, - }, -} as const satisfies Parameters[0]) diff --git a/jobs/pool/src/merkl-incentives.ts b/jobs/pool/src/merkl-incentives.ts deleted file mode 100644 index 85cc71632d..0000000000 --- a/jobs/pool/src/merkl-incentives.ts +++ /dev/null @@ -1,434 +0,0 @@ -import 'dotenv/config' -import './lib/wagmi.js' - -import { ChefType, Prisma, RewarderType } from '@sushiswap/database' -import { fetchToken } from '@wagmi/core' -import { fetch } from '@whatwg-node/fetch' -import { performance } from 'perf_hooks' -import { ChainId } from 'sushi/chain' - -import { ID, getIdFromChainIdAddress } from 'sushi' -import { Address, getAddress } from 'viem' -import { filterIncentives } from './etl/incentive/index.js' -import { mergeIncentives } from './etl/incentive/load.js' -import { updatePoolsWithIncentivesTotalApr } from './etl/pool/index.js' -import { createTokens, getMissingTokens } from './etl/token/load.js' -import { client } from './lib/prisma.js' -import { config } from './lib/wagmi.js' - -const TEST_TOKENS = [{ name: 'Angle Merkl', symbol: 'anglaMerkl' }] -const isTestToken = (token: TokenSuccess) => - TEST_TOKENS.every( - (testToken) => - testToken.name === token.token.name || - testToken.symbol === token.token.symbol, - ) - -const isTokenSuccessResponse = ( - token: TokenSuccess | TokenError, -): token is TokenSuccess => token.status === 'ok' -const isTokenErrorResponse = ( - token: TokenSuccess | TokenError, -): token is TokenError => token.status === 'error' - -type MerklResponse = { - [chainId: string]: ChainData -} - -type ChainData = { - pools: { - [poolId: string]: Pool - } -} - -type Pool = { - amm: number - ammAlgo: number - ammAlgoName: string - ammName: string - aprs: Record // Changed from array to Record - chainId: number - decimalsToken0: number - decimalsToken1: number - disputeLive: boolean - distributionData: MerklDistribution[] - endOfDisputePeriod: number - meanAPR: number - pool: string - poolBalanceToken0: number - poolBalanceToken1: number - poolFee: number - poolTotalLiquidity: number - rewardsPerToken: Record // Update this type based on the actual structure - symbolToken0: string - symbolToken1: string - tick: number - token0: string - token1: string - tvl: number -} - -type MerklDistribution = { - amount: number - apr: number - blacklist: string[] - breakdown: Record // Adjust the type based on the actual structure - decimalsRewardToken: number - endTimestamp: number - id: string - isBoosted: boolean - isLive: boolean - isMock: boolean - isOutOfRangeIncentivized: boolean - propFees: number - propToken0: number - propToken1: number - rewardToken: string - startTimestamp: number - symbolRewardToken: string - unclaimed: number - whitelist: string[] -} - -type PriceResponse = { - [token: string]: number -} - -type PriceMap = { - [chainId: number]: PriceResponse -} - -type TokenSuccess = { - status: 'ok' - chainId: number - token: Prisma.TokenCreateManyInput -} - -type TokenError = { - status: 'error' - chainId: number - token: { - id: string - } -} - -const MERKL_SUPPORTED_NETWORKS = [ - ChainId.ETHEREUM, - ChainId.OPTIMISM, - ChainId.BASE, - ChainId.BSC, - ChainId.GNOSIS, - ChainId.POLYGON, - ChainId.ARBITRUM, - ChainId.CELO, - ChainId.AVALANCHE, - ChainId.POLYGON_ZKEVM, - ChainId.THUNDERCORE, - ChainId.CORE, - ChainId.BLAST, - ChainId.SCROLL, - ChainId.LINEA, - ChainId.SKALE_EUROPA, - ChainId.ROOTSTOCK, -] - -export async function execute() { - try { - console.log('Preparing to load merkl farms/incentives') - const startTime = performance.now() - - // EXTRACT - const merkls = await extract() - console.log('EXTRACT - Extracted merkl incentives.') - const prices = ( - await Promise.all( - MERKL_SUPPORTED_NETWORKS.map((chainId) => - fetch(`https://api.sushi.com/price/v1/${chainId}`).then( - (data) => data.json() as Promise, - ), - ), - ) - ).reduce((acc: PriceMap, prices: PriceResponse, index: number) => { - const chainId = MERKL_SUPPORTED_NETWORKS[index] - acc[chainId] = Object.keys(prices).reduce((result, key) => { - result[key.toLowerCase()] = prices[key] - return result - }, {} as PriceResponse) - return acc - }, {}) - - const merklsWithMissingTvls = await addMissingTvls(merkls) - - // TRANSFORM - const { incentivesToCreate, incentivesToUpdate, tokens } = await transform( - merklsWithMissingTvls, - prices, - ) - - console.log( - `TRANSFORM - ${incentivesToCreate.length} incentives to create, ${incentivesToUpdate.length} incentives to update, ${tokens.length} tokens to create.`, - ) - - // LOAD - await createTokens(tokens) - await mergeIncentives(incentivesToCreate, incentivesToUpdate) - await updatePoolsWithIncentivesTotalApr() - - const endTime = performance.now() - console.log( - `COMPLETE - Script ran for ${((endTime - startTime) / 1000).toFixed( - 1, - )} seconds. `, - ) - } catch (e) { - console.error(e) - } -} - -async function addMissingTvls(merkls: MerklResponse) { - const withTvls: MerklResponse = {} - - const poolIdsWithMissingTvl = Object.entries(merkls).reduce( - (acc, [chainId, { pools }]) => { - Object.entries(pools).forEach(([address, pool]) => { - if (pool.tvl === null) { - acc.push( - getIdFromChainIdAddress( - Number(chainId), - address.toLowerCase() as Address, - ), - ) - } - }) - - return acc - }, - [] as ID[], - ) - - const poolsWithMissingTvl = await client.sushiPool.findMany({ - select: { - id: true, - liquidityUSD: true, - }, - where: { - id: { - in: poolIdsWithMissingTvl, - }, - }, - }) - - Object.entries(merkls).forEach(([chainId, { pools }]) => { - withTvls[chainId] = { pools: {} } - - Object.entries(pools).forEach(([_address, pool]) => { - const address = getAddress(_address) - - const poolId = getIdFromChainIdAddress(Number(chainId), address) - const poolWithTvl = poolsWithMissingTvl.find((pool) => pool.id === poolId) - if (poolWithTvl) { - withTvls[chainId].pools[address] = { - ...pool, - tvl: poolWithTvl.liquidityUSD.toNumber(), - } - } else { - withTvls[chainId].pools[address] = pool - } - }) - }) - - return withTvls -} - -async function extract() { - const response = await fetch('https://api.angle.money/v2/merkl') - if (response.status !== 200) { - throw new Error('Failed to fetch merkl incentives.') - } - const merkls = await response.json() - - return merkls as MerklResponse -} - -async function transform( - response: MerklResponse, - prices: PriceMap, -): Promise<{ - incentivesToCreate: Prisma.IncentiveCreateManyInput[] - incentivesToUpdate: Prisma.IncentiveCreateManyInput[] - tokens: Prisma.TokenCreateManyInput[] -}> { - let incentives: Prisma.IncentiveCreateManyInput[] = [] - const tokensToCreate: Prisma.TokenCreateManyInput[] = [] - const rewardTokens: Map = - new Map() - - const pools: { address: string; pool: Pool }[] = [] - - for (const [chainId, value] of Object.entries(response)) { - if ((MERKL_SUPPORTED_NETWORKS as number[]).includes(Number(chainId))) { - const chainPools = Object.entries(value.pools).map(([address, pool]) => ({ - address, - pool, - })) - pools.push(...chainPools) - } - } - - const sushiPools = pools.filter((item) => item.pool.ammName === 'SushiSwapV3') - - if ( - response === undefined || - sushiPools === undefined || - sushiPools.length === 0 - ) { - return { incentivesToCreate: [], incentivesToUpdate: [], tokens: [] } - } - - sushiPools.forEach(({ address, pool }) => { - if (pool.distributionData.length > 0) { - const rewardsByToken: Map = new Map() - // Group rewards by token - for (const distributionData of pool.distributionData) { - if (!rewardsByToken.has(distributionData.rewardToken)) { - rewardsByToken.set(distributionData.rewardToken, []) - } - rewardsByToken.get(distributionData.rewardToken)!.push(distributionData) - } - - for (const [token, rewards] of rewardsByToken) { - const rewardPerDay = rewards.reduce((acc, distData) => { - if ( - !distData.isLive || - distData.isMock || - !(MERKL_SUPPORTED_NETWORKS as number[]).includes(pool.chainId) || - distData.whitelist.length > 0 - ) { - return acc - } - const duration = distData.endTimestamp - distData.startTimestamp - const durationInDays = duration / 86400 - const amountPerDay = distData.amount / durationInDays - return acc + amountPerDay - }, 0) - - const price = prices[pool.chainId][token.toLowerCase()] ?? 0 - const rewardPerYearUSD = 365 * rewardPerDay * price - const apr = pool.tvl ? rewardPerYearUSD / pool.tvl : 0 - - const incentive = Prisma.validator()({ - id: address - .toLowerCase() - .concat(':') - .concat(token.toLowerCase()) - .concat(':') - .concat('merkl'), - chainId: pool.chainId, - chefType: ChefType.Merkl, - apr: Number.isNaN(apr) || apr === Infinity ? 0 : apr, - rewardTokenId: pool.chainId - .toString() - .concat(':') - .concat(token.toLowerCase()), - rewardPerDay: rewardPerDay, - poolId: pool.chainId - .toString() - .concat(':') - .concat(address.toLowerCase()), - pid: 0, // Does not exist for merkl - rewarderAddress: '0x0000000000000000000000000000000000000000', - rewarderType: RewarderType.Primary, - }) - incentives.push(incentive) - rewardTokens.set(`${pool.chainId}:${token.toLowerCase()}`, { - chainId: pool.chainId as ChainId, - address: token.toLowerCase() as Address, - }) - } - } - }) - - const missingTokens = await getMissingTokens( - Array.from(rewardTokens.values()), - ) - if (missingTokens.length > 0) { - const tokens = await Promise.all( - missingTokens.map((token) => fetchTokenFromContract(token)), - ) - const validTokens = tokens - .filter(isTokenSuccessResponse) - .map((token) => token.token) - tokensToCreate.push(...validTokens) - const invalidTokens = tokens.filter(isTokenErrorResponse) - incentives = incentives.filter((incentive) => - invalidTokens.every( - (token) => token.token.id !== incentive.rewardTokenId, - ), - ) - } else { - console.log('TRANSFORM - All reward tokens already exist in db.') - } - - const { incentivesToCreate, incentivesToUpdate } = - await filterIncentives(incentives) - return { incentivesToCreate, incentivesToUpdate, tokens: tokensToCreate } -} - -async function fetchTokenFromContract(token: { - chainId: ChainId - address: Address -}): Promise { - try { - const tokenFromContract = await fetchToken(config, { - chainId: token.chainId, - address: token.address, - }) - const errorResponse: TokenError = { - status: 'error', - chainId: token.chainId, - token: { - id: token.chainId - .toString() - .concat(':') - .concat(token.address.toLowerCase()), - }, - } - - if (tokenFromContract?.decimals) { - const response: TokenSuccess = { - status: 'ok', - chainId: token.chainId, - token: { - id: token.chainId - .toString() - .concat(':') - .concat(tokenFromContract.address.toLowerCase()), - chainId: token.chainId, - address: tokenFromContract.address.toString(), - name: tokenFromContract.name!, - symbol: tokenFromContract.symbol!, - decimals: tokenFromContract.decimals, - }, - } - if (!isTestToken(response)) { - return response - } else { - return errorResponse - } - } - return errorResponse - } catch (e: any) { - const id = token.chainId - .toString() - .concat(':') - .concat(token.address.toLowerCase()) - console.error(`Error fetching token ${id}, error: ${e.message}`) - return { - status: 'error', - chainId: token.chainId, - token: { - id, - }, - } as TokenError - } -} diff --git a/jobs/pool/src/misc/manage-token.ts b/jobs/pool/src/misc/manage-token.ts deleted file mode 100644 index 356864fae6..0000000000 --- a/jobs/pool/src/misc/manage-token.ts +++ /dev/null @@ -1,111 +0,0 @@ -import '../lib/wagmi.js' - -import { isAddress } from '@ethersproject/address' -import { fetchToken } from '@wagmi/core' -import { client } from 'src/lib/prisma.js' -import { ChainId, chainIds, chains } from 'sushi/chain' -import { Address } from 'viem' -import { config } from '../lib/wagmi.js' - -class Token { - id: string - chainId: ChainId - address: Address - status: 'APPROVED' | 'DISAPPROVED' | 'UNKNOWN' | undefined - constructor( - chainId: ChainId, - address: Address, - status: 'APPROVED' | 'DISAPPROVED' | 'UNKNOWN' | undefined = undefined, - ) { - if (!isAddress(address)) { - throw new Error(`Invalid address: ${address}`) - } - if (!chains[chainId]) { - throw new Error( - `Invalid chainId, ${chainId}, valid chains are ${chainIds.join(', ')}`, - ) - } - this.id = `${chainId}:${address.toLowerCase()}` - this.chainId = chainId - this.status = status - this.address = address.toLowerCase() as Address - } -} - -export async function main() { - // const token = new Token(56288, '0x4a2c2838c3907D024916c3f4Fe07832745Ae4bec', 'APPROVED') - const token = new Token(1, '0x', 'DISAPPROVED') - try { - const foundToken = await client.token.findFirst({ - where: { - id: token.id, - }, - }) - if (foundToken) { - let data = {} - if (token.status) { - data = { status: token.status } - } - if (Object.keys(data).length === 0) { - console.log( - `Token ${token.id} exist and no data was provided to update.`, - ) - } - const updatedToken = await client.token.update({ - where: { - id: token.id, - }, - data, - }) - console.log(`Token updated, new data: - ID: ${updatedToken.id} - CHAINID: ${updatedToken.chainId} - ADDRESS: ${updatedToken.address} - NAME: ${updatedToken.name} - SYMBOL: ${updatedToken.symbol} - DECIMALS: ${updatedToken.decimals} - STATUS: ${updatedToken.status} - `) - } else { - const tokenFromContract = await fetchTokenFromContract(token) - const newToken = await client.token.create({ - data: { - id: token.id, - chainId: token.chainId, - ...tokenFromContract, - status: token.status, - }, - }) - console.log(`Token was not found in the database, the token was fetched from the contract and then created: - ID: ${newToken.id} - CHAINID: ${newToken.chainId} - ADDRESS: ${newToken.address} - NAME: ${newToken.name} - SYMBOL: ${newToken.symbol} - DECIMALS: ${newToken.decimals} - STATUS: ${newToken.status} - `) - } - } catch (e) { - console.error(e) - } -} - -async function fetchTokenFromContract(token: Token) { - const tokenFromContract = await fetchToken(config, { - chainId: token.chainId, - address: token.address, - }) - if (tokenFromContract) { - return { - address: tokenFromContract.address, - name: tokenFromContract.name!, - symbol: tokenFromContract.symbol!, - decimals: tokenFromContract.decimals, - } - } else { - throw new Error(`Not ERC20? ${token.id}`) - } -} - -main() diff --git a/jobs/pool/src/misc/merkl-mock-response.json b/jobs/pool/src/misc/merkl-mock-response.json deleted file mode 100644 index ad724b3ea5..0000000000 --- a/jobs/pool/src/misc/merkl-mock-response.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "pools": { - "0xFf5713FdbAD797b81539b5F9766859d4E050a6CC": { - "aprs": { - "Average APR (rewards / pool TVL)": 92.798642353471, - "SUSHI APR (rewards for SUSHI / SUSHI TVL)": 52.367925908524576, - "WETH APR (rewards for WETH / WETH TVL)": 74.12689133589781 - }, - "decimalToken0": 18, - "decimalToken1": 18, - "liquidity": 490.6719642747023, - "meanAPR": 92.798642353471, - "pool": "0xFf5713FdbAD797b81539b5F9766859d4E050a6CC", - "poolFee": 0.3, - "rewardsPerToken": {}, - "token0": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "token0InPool": 4285.875501472752, - "token1": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", - "token1InPool": 2.0668213358218335, - "tokenSymbol0": "SUSHI", - "tokenSymbol1": "WETH", - "tvl": 7625.542191750643, - "userBalances": [], - "userTVL": 0, - "userTotalBalance0": 0, - "userTotalBalance1": 0, - "distributionData": [ - { - "amm": 1, - "amount": 1, - "breakdown": {}, - "end": 1685534400, - "isOutOfRangeIncentivized": false, - "propFees": 10, - "propToken0": 45, - "propToken1": 45, - "start": 1684324800, - "token": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", - "tokenSymbol": "WETH", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 97, - "breakdown": {}, - "end": 1685534400, - "isOutOfRangeIncentivized": false, - "propFees": 10, - "propToken0": 45, - "propToken1": 45, - "start": 1684324800, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 4.85, - "breakdown": {}, - "end": 1684573200, - "isOutOfRangeIncentivized": false, - "propFees": 50, - "propToken0": 25, - "propToken1": 25, - "start": 1684400400, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 4.85, - "breakdown": {}, - "end": 1684573200, - "isOutOfRangeIncentivized": false, - "propFees": 60, - "propToken0": 10, - "propToken1": 30, - "start": 1684400400, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 4.85, - "breakdown": {}, - "end": 1684573200, - "isOutOfRangeIncentivized": false, - "propFees": 70, - "propToken0": 5, - "propToken1": 25, - "start": 1684400400, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 4.85, - "breakdown": {}, - "end": 1684573200, - "isOutOfRangeIncentivized": false, - "propFees": 40, - "propToken0": 40, - "propToken1": 20, - "start": 1684400400, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 4.85, - "breakdown": {}, - "end": 1684573200, - "isOutOfRangeIncentivized": false, - "propFees": 25, - "propToken0": 25, - "propToken1": 50, - "start": 1684400400, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - }, - { - "amm": 1, - "amount": 4.85, - "breakdown": {}, - "end": 1684573200, - "isOutOfRangeIncentivized": false, - "propFees": 10, - "propToken0": 20, - "propToken1": 70, - "start": 1684400400, - "token": "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a", - "tokenSymbol": "SUSHI", - "unclaimed": 0, - "wrappers": [] - } - ] - } - } -} diff --git a/jobs/pool/src/misc/migrate-field.ts b/jobs/pool/src/misc/migrate-field.ts deleted file mode 100644 index 8ae94571ed..0000000000 --- a/jobs/pool/src/misc/migrate-field.ts +++ /dev/null @@ -1,49 +0,0 @@ -// import { createDirectClient, Prisma } from '@sushiswap/database' -// import { ChainId, chainName } from '@sushiswap/chain' -// import { performance } from 'perf_hooks' - -// - -// export async function test() { -// try { -// const startTime = performance.now() -// const client = await createDirectClient() -// const incentives = await client.incentive.findMany({ -// select: { -// id: true, -// type: true, -// }, -// }) -// console.log(incentives.length) - -// const batchSize = 250 -// let updatedCount = 0 - -// for (let i = 0; i < incentives.length; i += batchSize) { -// const batch = incentives.slice(i, i + batchSize) -// const requests = batch.map((incentive) => { -// return client.incentive.update({ -// select: { id: true }, // select only the `id` field, otherwise it returns everything and we don't use the data after updating. -// where: { id: incentive.id }, -// data: { -// chefType: incentive.type, -// }, -// }) -// }) -// const responses = await Promise.all(requests) -// console.log(`BATCH: Updated ${responses.length}/${incentives.length} pools.`) -// updatedCount += responses.length -// } -// console.log({updatedCount}) - -// const endTime = performance.now() -// console.log(`COMPLETE - Script ran for ${((endTime - startTime) / 1000).toFixed(1)} seconds. `) -// } catch (e) { -// console.error(e) -// await (await createDirectClient()).$disconnect() -// } finally { -// await (await createDirectClient()).$disconnect() -// } -// } - -// test() diff --git a/jobs/pool/src/misc/migrate-tokens.ts b/jobs/pool/src/misc/migrate-tokens.ts deleted file mode 100644 index 43264c5865..0000000000 --- a/jobs/pool/src/misc/migrate-tokens.ts +++ /dev/null @@ -1,103 +0,0 @@ -// import { PrismaClient, createDirectClient } from "@sushiswap/database" - -// export async function whitelistTokens2() { -// const productionClient = await createDirectClient({ -// datasources: { -// db: { -// url: process.env.PRODUCTION_DATABASE_URL as string, -// }, -// }, -// }) -// const previewClient = await createDirectClient({ -// datasources: { -// db: { -// url: process.env.PREVIEW_DATABASE_URL as string, -// }, -// }, -// }) - -// try { -// const startTime = performance.now() - -// await start(productionClient, previewClient) - -// const endTime = performance.now() -// console.log(`COMPLETED (${((endTime - startTime) / 1000).toFixed(1)}s). `) -// } catch (e) { -// console.error(e) -// await previewClient.$disconnect() -// await productionClient.$disconnect() -// } finally { -// await previewClient.$disconnect() -// await productionClient.$disconnect() -// } -// } - -// async function start(productionClient: PrismaClient, previewClient: PrismaClient) { -// const approvedTokensResult = await productionClient.token.findMany({ -// select: { -// id: true, -// address: true, -// chainId: true, -// name: true, -// symbol: true, -// decimals: true, -// status: true, -// }, -// where: { -// status: 'APPROVED', -// }, -// }) - -// const existingTokens = await previewClient.token.findMany({ -// select: { -// id: true, -// name: true, -// symbol: true, -// }, -// where: { -// id: { -// in: approvedTokensResult.map((token) => token.id), -// }, -// }, -// }) - -// const tokensToCreate = approvedTokensResult.filter((token) => !existingTokens.find((existingToken) => existingToken.id === token.id)) -// const tokensToUpdate = approvedTokensResult.filter((token) => existingTokens.find((existingToken) => existingToken.id === token.id)) -// const batchSize = 200 - -// console.log(`Tokens to create: ${tokensToCreate.length}, tokens to update: ${tokensToUpdate.length}`) - -// for (let i = 0; i < tokensToCreate.length; i += batchSize) { -// const batch = tokensToCreate.slice(i, i + batchSize) - -// const tokensCreated = await previewClient.token.createMany({ -// data: batch, -// }) - -// console.log(`LOAD - ${tokensCreated.count} tokens created.`) -// } - -// let updateTokenCount = 0 -// for (let i = 0; i < tokensToUpdate.length; i += batchSize) { -// const batch = tokensToUpdate.slice(i, i + batchSize) -// const batchToUpdate = batch.map((token) => -// previewClient.token.update({ -// where: { -// id: token.id, -// }, -// data: { -// status: 'APPROVED', -// name: token.name, -// symbol: token.symbol, -// }, -// }) -// ) -// const tokensUpdated = await Promise.allSettled(batchToUpdate) - -// console.log(`LOAD - ${tokensUpdated.length} tokens updated.`) -// updateTokenCount += tokensUpdated.length -// } -// console.log(`LOAD - COMPLETE, ${updateTokenCount} tokens updated.`) -// } -// whitelistTokens2() diff --git a/jobs/pool/src/pools.ts b/jobs/pool/src/pools.ts deleted file mode 100644 index e14609f3a8..0000000000 --- a/jobs/pool/src/pools.ts +++ /dev/null @@ -1,1258 +0,0 @@ -import { Prisma, Protocol } from '@sushiswap/database' -import { performance } from 'perf_hooks' -import { ChainId, chainShortName } from 'sushi/chain' - -import { - SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, - SushiSwapV2ChainId, - SushiSwapV3ChainId, -} from 'sushi/config' - -import { getBlockHistoric } from '@sushiswap/graph-client/blocks' -import { fetchMultichain } from '@sushiswap/graph-client/multichain' -import { SushiV2Pools, getSushiV2Pools } from '@sushiswap/graph-client/sushi-v2' -import { SushiV3Pools, getSushiV3Pools } from '@sushiswap/graph-client/sushi-v3' -import { upsertPools } from './etl/pool/index.js' -import { createTokens } from './etl/token/load.js' - -interface Blocks { - oneHour: number | undefined - twoHour: number | undefined - oneDay: number | undefined - twoDay: number | undefined - oneWeek: number | undefined - twoWeek: number | undefined - oneMonth: number | undefined - twoMonth: number | undefined -} - -type V2Data = { - currentPools: SushiV2Pools - pools1h: SushiV2Pools - pools2h: SushiV2Pools - pools1d: SushiV2Pools - pools2d: SushiV2Pools - pools1w: SushiV2Pools - pools2w: SushiV2Pools - pools1m: SushiV2Pools - pools2m: SushiV2Pools -} -type V3Data = { - currentPools: SushiV3Pools - pools1h: SushiV3Pools - pools2h: SushiV3Pools - pools1d: SushiV3Pools - pools2d: SushiV3Pools - pools1w: SushiV3Pools - pools2w: SushiV3Pools - pools1m: SushiV3Pools - pools2m: SushiV3Pools -} - -enum AprTimeRange { - ONE_HOUR = 'ONE_HOUR', - ONE_DAY = 'ONE_DAY', - ONE_WEEK = 'ONE_WEEK', - ONE_MONTH = 'ONE_MONTH', -} - -const SUBGRAPH_REQUEST_OPTIONS = { - retries: 10, // can lower to 3 when bad indexer error is fixed by the graph -} - -export async function execute(protocol: Protocol) { - try { - const startTime = performance.now() - console.log(`${protocol}: Preparing to load pools/tokens`) - if ( - protocol !== Protocol.SUSHISWAP_V2 && - protocol !== Protocol.SUSHISWAP_V3 - ) { - throw new Error('Unsupported protocol') - } - // EXTRACT - const exchanges = await extract(protocol) - console.log( - `EXTRACT - ${protocol} - Pairs extracted from ${exchanges.length} different subgraphs`, - ) - - // TRANSFORM - const { tokens, pools } = transform(protocol, exchanges) - - // LOAD - const batchSize = 250 - - for (let i = 0; i < tokens.length; i += batchSize) { - const batch = tokens.slice(i, i + batchSize) - await createTokens(batch) - } - const concurrentBatches = 10 - for (let i = 0; i < pools.length; i += batchSize * concurrentBatches) { - const batches = [] - for (let j = i; j < i + concurrentBatches * batchSize; j += batchSize) { - if (j > pools.length) { - break - } - batches.push(upsertPools(pools.slice(j, j + batchSize))) - } - const batchStartTime = performance.now() - await Promise.all(batches) - const batchEndTime = performance.now() - console.log( - `LOAD: ${protocol} - Batch completed in ${( - (batchEndTime - batchStartTime) / - 1000 - ).toFixed(1)} seconds. `, - ) - } - const endTime = performance.now() - - console.log( - `LOAD: ${protocol} - COMPLETE - Script ran for ${( - (endTime - startTime) / - 1000 - ).toFixed(1)} seconds. `, - ) - } catch (e) { - console.error(e) - } -} - -async function extract(protocol: 'SUSHISWAP_V2' | 'SUSHISWAP_V3') { - const result: { chainId: ChainId; data: V2Data | V3Data }[] = [] - - const chainIds = - protocol === Protocol.SUSHISWAP_V2 - ? SUSHISWAP_V2_SUPPORTED_CHAIN_IDS - : SUSHISWAP_V3_SUPPORTED_CHAIN_IDS - - console.log( - `EXTRACT - ${protocol} - Extracting from ${ - chainIds.length - } different chains, ${chainIds.join(', ')}`, - ) - const [ - oneHourBlocks, - twoHourBlocks, - oneDayBlocks, - twoDayBlocks, - oneWeekBlocks, - twoWeekBlocks, - oneMonthBlocks, - twoMonthBlocks, - ] = await Promise.all([ - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - hoursAgo: 1, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - hoursAgo: 2, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - daysAgo: 1, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - daysAgo: 2, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - weeksAgo: 1, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - weeksAgo: 2, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - monthsAgo: 1, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - fetchMultichain({ - chainIds, - fetch: getBlockHistoric, - variables: { - monthsAgo: 2, - }, - options: SUBGRAPH_REQUEST_OPTIONS, - }), - ]) - - await Promise.allSettled( - chainIds.map(async (chainId) => { - const blocks: Blocks = { - oneHour: oneHourBlocks.data.find((b) => b.chainId === chainId)?.number, - twoHour: twoHourBlocks.data.find((b) => b.chainId === chainId)?.number, - oneDay: oneDayBlocks.data.find((b) => b.chainId === chainId)?.number, - twoDay: twoDayBlocks.data.find((b) => b.chainId === chainId)?.number, - oneWeek: oneWeekBlocks.data.find((b) => b.chainId === chainId)?.number, - twoWeek: twoWeekBlocks.data.find((b) => b.chainId === chainId)?.number, - oneMonth: oneMonthBlocks.data.find((b) => b.chainId === chainId) - ?.number, - twoMonth: twoMonthBlocks.data.find((b) => b.chainId === chainId) - ?.number, - } - const pairs = await fetchPairs(chainId, protocol, blocks) - - if (pairs === undefined) { - console.warn( - `No pairs found, skipping ${protocol} - ${chainShortName[chainId]}`, - ) - return - } - console.log( - `EXTRACT: ${protocol} - ${chainShortName[chainId]}, batches: ${pairs.currentPools.length}`, - ) - result.push({ chainId, data: pairs }) - }), - ) - return result -} - -async function tryGetSushiV2Pools(...args: Parameters) { - return getSushiV2Pools(...args).catch((e) => { - if (e instanceof Error) { - console.error(e.message) - } - return [] - }) -} - -async function tryGetSushiV3Pools(...args: Parameters) { - return getSushiV3Pools(...args).catch((e) => { - if (e instanceof Error) { - console.error(e.message) - } - return [] - }) -} - -async function fetchPairs( - chainId: SushiSwapV2ChainId | SushiSwapV3ChainId, - protocol: 'SUSHISWAP_V2' | 'SUSHISWAP_V3', - blocks: Blocks, -) { - try { - if (protocol === Protocol.SUSHISWAP_V2) { - const [ - currentPools, - pools1h, - pools2h, - pools1d, - pools2d, - pools1w, - pools2w, - pools1m, - pools2m, - ] = await Promise.all([ - tryGetSushiV2Pools( - { - chainId, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ), - blocks.oneHour - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.oneHour, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.twoHour - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.twoHour, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.oneDay - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.oneDay, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.twoDay - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.twoDay, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.oneWeek - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.oneWeek, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.twoWeek - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.twoWeek, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.oneMonth - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.oneMonth, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - blocks.twoMonth - ? tryGetSushiV2Pools( - { - chainId, - block: { - number: blocks.twoMonth, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV2Pools), - ]) - - console.log( - `V2-${chainShortName[chainId]} results by timeframe - * current: ${currentPools.length} - 1h: ${pools1h.length} - 2h: ${pools2h.length} - 1d: ${pools1d.length} - 2d: ${pools2d.length} - 1w: ${pools1w.length} - 2w: ${pools2w.length} - 1m: ${pools1m.length} - 2m: ${pools2m.length}`, - ) - return { - currentPools, - pools1h, - pools2h, - pools1d, - pools2d, - pools1w, - pools2w, - pools1m, - pools2m, - } - } else if (protocol === Protocol.SUSHISWAP_V3) { - const [ - currentPools, - pools1h, - pools2h, - pools1d, - pools2d, - pools1w, - pools2w, - pools1m, - pools2m, - ] = await Promise.all([ - tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ), - blocks.oneHour - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.oneHour, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.twoHour - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.twoHour, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.oneDay - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.oneDay, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.twoDay - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.twoDay, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.oneWeek - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.oneWeek, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.twoWeek - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.twoWeek, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.oneMonth - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.oneMonth, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - blocks.twoMonth - ? tryGetSushiV3Pools( - { - chainId: chainId as SushiSwapV3ChainId, - block: { - number: blocks.twoMonth, - }, - first: Infinity, - }, - SUBGRAPH_REQUEST_OPTIONS, - ) - : ([] as SushiV3Pools), - ]) - - console.log( - `V3-${chainShortName[chainId]} results by timeframe - * current: ${currentPools.length} - 1h: ${pools1h.length} - 2h: ${pools2h.length} - 1d: ${pools1d.length} - 2d: ${pools2d.length} - 1w: ${pools1w.length} - 2w: ${pools2w.length} - 1m: ${pools1m.length} - 2m: ${pools2m.length}`, - ) - return { - currentPools, - pools1h, - pools2h, - pools1d, - pools2d, - pools1w, - pools2w, - pools1m, - pools2m, - } - } else { - throw new Error('EXTRACT: fetchPairs: V2 or V3, skipping') - } - } catch (error) { - console.error(`Error in fetchPairs for chainId ${chainId}:`, error) - return undefined - } -} - -function transform( - protocol: 'SUSHISWAP_V2' | 'SUSHISWAP_V3', - queryResults: { chainId: ChainId; data: V2Data | V3Data }[], -) { - const tokens: Map = new Map() - const pools: Prisma.SushiPoolCreateManyInput[] = [] - - for (const result of queryResults) { - const { chainId, data } = result - if (protocol === Protocol.SUSHISWAP_V2) { - const { pools: v2Pools, tokens: v2Tokens } = transformV2({ - chainId, - data: data as V2Data, - }) - pools.push(...v2Pools) - - v2Tokens.forEach((token) => { - const existing = tokens.get(token.id) - if (!existing) { - tokens.set(token.id, token) - } - }) - } else if (protocol === Protocol.SUSHISWAP_V3) { - const { pools: v3Pools, tokens: v3Tokens } = transformV3({ - chainId, - data: data as V3Data, - }) - pools.push(...v3Pools) - - v3Tokens.forEach((token) => { - const existing = tokens.get(token.id) - if (!existing) { - tokens.set(token.id, token) - } - }) - } else { - console.warn('Unknown protocol') - } - } - - const dedupedTokens = [...new Set(Array.from(tokens.values()))] - console.log( - `${protocol}: ${pools.length} pools, ${dedupedTokens.length} tokens`, - ) - return { pools: pools, tokens: dedupedTokens } -} - -function transformV2(queryResult: { - chainId: ChainId - data: V2Data -}) { - const oneHourData = new Map( - queryResult.data.pools1h.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoHourData = new Map( - queryResult.data.pools2h.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const oneDayData = new Map( - queryResult.data.pools1d.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoDayData = new Map( - queryResult.data.pools2d.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const oneWeekData = new Map( - queryResult.data.pools1w.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoWeekData = new Map( - queryResult.data.pools2w.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const oneMonthData = new Map( - queryResult.data.pools1m.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoMonthData = new Map( - queryResult.data.pools2m.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.volumeUSD * 0.003), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - - const chainsToSkip = new Set() - const tokens: Prisma.TokenCreateManyInput[] = [] - - return { - pools: queryResult.data.currentPools.flatMap((pair) => { - if (chainsToSkip.has(queryResult.chainId)) { - return [] - } - - tokens.push( - Prisma.validator()({ - id: pair.token0.id.toLowerCase(), - address: pair.token0.address.toLowerCase(), - chainId: queryResult.chainId, - name: pair.token0.name, - symbol: pair.token0.symbol, - decimals: Number(pair.token0.decimals), - }), - ) - tokens.push( - Prisma.validator()({ - id: pair.token1.id.toLowerCase(), - address: pair.token1.address.toLowerCase(), - chainId: queryResult.chainId, - name: pair.token1.name, - symbol: pair.token1.symbol, - decimals: Number(pair.token1.decimals), - }), - ) - - const regex = /([^\w ]|_|-)/g - const name = pair.token0.symbol - .replace(regex, '') - .slice(0, 15) - .concat('-') - .concat(pair.token1.symbol.replace(regex, '').slice(0, 15)) - const protocol = Protocol.SUSHISWAP_V2 - - const currentVolumeUSD = Number(pair.volumeUSD) - const currentLiquidityUSD = Number(pair.liquidityUSD) - const currentFeesUSD = Number(pair.volumeUSD * 0.003) - - const anyNotCurrent = - oneHourData.get(pair.id) || - twoHourData.get(pair.id) || - oneDayData.get(pair.id) || - twoDayData.get(pair.id) || - oneWeekData.get(pair.id) || - twoWeekData.get(pair.id) || - oneMonthData.get(pair.id) || - twoMonthData.get(pair.id) - - // A way to prevent old data (thanks TheGraph!) from being added - if (anyNotCurrent && anyNotCurrent.volumeUSD > currentVolumeUSD) { - console.warn( - 'Ignoring chain', - queryResult.chainId, - 'Old Volume:', - anyNotCurrent.volumeUSD, - 'Current Volume:', - currentVolumeUSD, - ) - chainsToSkip.add(queryResult.chainId) - return [] - } - - const feeApr1h = calculateFeeApr( - AprTimeRange.ONE_HOUR, - oneHourData.get(pair.id)?.feesUSD ?? currentFeesUSD, - currentFeesUSD, - pair.liquidityUSD, - ) - const feeApr1d = calculateFeeApr( - AprTimeRange.ONE_DAY, - oneDayData.get(pair.id)?.feesUSD ?? currentFeesUSD, - currentFeesUSD, - pair.liquidityUSD, - ) - const feeApr1w = calculateFeeApr( - AprTimeRange.ONE_WEEK, - oneWeekData.get(pair.id)?.feesUSD ?? currentFeesUSD, - currentFeesUSD, - pair.liquidityUSD, - ) - const feeApr1m = calculateFeeApr( - AprTimeRange.ONE_MONTH, - oneMonthData.get(pair.id)?.feesUSD ?? currentFeesUSD, - currentFeesUSD, - pair.liquidityUSD, - ) - - const fees1h = oneHourData.has(pair.id) - ? currentFeesUSD - oneHourData.get(pair.id)!.feesUSD - : currentFeesUSD - const fees1d = oneDayData.has(pair.id) - ? currentFeesUSD - oneDayData.get(pair.id)!.feesUSD - : currentFeesUSD - const fees1w = oneWeekData.has(pair.id) - ? currentFeesUSD - oneWeekData.get(pair.id)!.feesUSD - : currentFeesUSD - const fees1m = oneMonthData.has(pair.id) - ? currentFeesUSD - oneMonthData.get(pair.id)!.feesUSD - : currentFeesUSD - const feesChange1h = calculatePercentageChange( - currentFeesUSD, - oneHourData.get(pair.id)?.feesUSD ?? 0, - twoHourData.get(pair.id)?.feesUSD ?? 0, - ) - const feesChange1d = calculatePercentageChange( - currentFeesUSD, - oneDayData.get(pair.id)?.feesUSD ?? 0, - twoDayData.get(pair.id)?.feesUSD ?? 0, - ) - const feesChange1w = calculatePercentageChange( - currentFeesUSD, - oneWeekData.get(pair.id)?.feesUSD ?? 0, - twoWeekData.get(pair.id)?.feesUSD ?? 0, - ) - const feesChange1m = calculatePercentageChange( - currentFeesUSD, - oneMonthData.get(pair.id)?.feesUSD ?? 0, - twoMonthData.get(pair.id)?.feesUSD ?? 0, - ) - const volume1h = oneHourData.has(pair.id) - ? currentVolumeUSD - oneHourData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volume1d = oneDayData.has(pair.id) - ? currentVolumeUSD - oneDayData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volume1w = oneWeekData.has(pair.id) - ? currentVolumeUSD - oneWeekData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volume1m = oneMonthData.has(pair.id) - ? currentVolumeUSD - oneMonthData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volumeChange1h = calculatePercentageChange( - currentVolumeUSD, - oneHourData.get(pair.id)?.volumeUSD ?? 0, - twoHourData.get(pair.id)?.volumeUSD ?? 0, - ) - const volumeChange1d = calculatePercentageChange( - currentVolumeUSD, - oneDayData.get(pair.id)?.volumeUSD ?? 0, - twoDayData.get(pair.id)?.volumeUSD ?? 0, - ) - const volumeChange1w = calculatePercentageChange( - currentVolumeUSD, - oneWeekData.get(pair.id)?.volumeUSD ?? 0, - twoWeekData.get(pair.id)?.volumeUSD ?? 0, - ) - const volumeChange1m = calculatePercentageChange( - currentVolumeUSD, - oneMonthData.get(pair.id)?.volumeUSD ?? 0, - twoMonthData.get(pair.id)?.volumeUSD ?? 0, - ) - const liquidityUSDChange1h = oneHourData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneHourData.get(pair.id)!.liquidityUSD - 1 - : 0 - const liquidityUSDChange1d = oneDayData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneDayData.get(pair.id)!.liquidityUSD - 1 - : 0 - - const liquidityUSDChange1w = oneWeekData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneWeekData.get(pair.id)!.liquidityUSD - 1 - : 0 - - const liquidityUSDChange1m = oneMonthData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneMonthData.get(pair.id)!.liquidityUSD - 1 - : 0 - - return { - id: pair.id.toLowerCase(), - address: pair.address.toLowerCase(), - name: name, - protocol, - chainId: queryResult.chainId, - swapFee: 0.003, - twapEnabled: true, - token0Id: pair.token0.id.toLowerCase(), - token1Id: pair.token1.id.toLowerCase(), - reserve0: pair.reserve0.toString(), - reserve1: pair.reserve1.toString(), - totalSupply: pair.liquidity.toString(), - liquidityUSD: currentLiquidityUSD, - liquidityNative: 0, - volumeUSD: currentVolumeUSD, - feesUSD: currentFeesUSD, - volumeNative: 0, // DOES NOT EXIST IN V2 anymore - token0Price: pair.token0Price.toString(), - token1Price: pair.token1Price.toString(), - ...(oneHourData.get(pair.id)?.feesUSD && { fees1h }), - ...(oneDayData.get(pair.id)?.feesUSD && { fees1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { fees1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { fees1m }), - ...(oneHourData.get(pair.id)?.feesUSD && { feesChange1h }), - ...(oneDayData.get(pair.id)?.feesUSD && { feesChange1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { feesChange1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { feesChange1m }), - ...(oneHourData.get(pair.id)?.volumeUSD && { volume1h }), - ...(oneDayData.get(pair.id)?.volumeUSD && { volume1d }), - ...(oneWeekData.get(pair.id)?.volumeUSD && { volume1w }), - ...(oneMonthData.get(pair.id)?.volumeUSD && { volume1m }), - ...(oneHourData.get(pair.id)?.volumeUSD && { volumeChange1h }), - ...(oneDayData.get(pair.id)?.volumeUSD && { volumeChange1d }), - ...(oneWeekData.get(pair.id)?.volumeUSD && { volumeChange1w }), - ...(oneMonthData.get(pair.id)?.volumeUSD && { volumeChange1m }), - ...(oneHourData.get(pair.id)?.liquidityUSD && { - liquidityUSDChange1h, - }), - ...(oneDayData.get(pair.id)?.liquidityUSD && { - liquidityUSDChange1d, - }), - ...(oneWeekData.get(pair.id)?.liquidityUSD && { - liquidityUSDChange1w, - }), - ...(oneMonthData.get(pair.id)?.liquidityUSD && { - liquidityUSDChange1m, - }), - ...(oneHourData.get(pair.id)?.feesUSD && { feeApr1h }), - ...(oneDayData.get(pair.id)?.feesUSD && { feeApr1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { feeApr1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { feeApr1m }), - ...(oneHourData.get(pair.id)?.feesUSD && { totalApr1h: feeApr1h }), - ...(oneDayData.get(pair.id)?.feesUSD && { totalApr1d: feeApr1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { totalApr1w: feeApr1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { totalApr1m: feeApr1m }), - createdAtBlockNumber: 0, - } satisfies Prisma.SushiPoolCreateManyInput - }), - tokens, - } -} - -function transformV3(queryResult: { chainId: ChainId; data: V3Data }) { - const oneHourData = new Map( - queryResult.data.pools1h.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoHourData = new Map( - queryResult.data.pools2h.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const oneDayData = new Map( - queryResult.data.pools1d.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoDayData = new Map( - queryResult.data.pools2d.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const oneWeekData = new Map( - queryResult.data.pools1w.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoWeekData = new Map( - queryResult.data.pools2w.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const oneMonthData = new Map( - queryResult.data.pools1m.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - const twoMonthData = new Map( - queryResult.data.pools2m.map((pool) => [ - pool.id, - { - feesUSD: Number(pool.feesUSD), - volumeUSD: Number(pool.volumeUSD), - liquidityUSD: Number(pool.liquidityUSD), - }, - ]), - ) - - const chainsToSkip = new Set() - const tokens: Prisma.TokenCreateManyInput[] = [] - const poolsTransformed = queryResult.data.currentPools.flatMap((pair) => { - if (chainsToSkip.has(queryResult.chainId)) { - return [] - } - - tokens.push( - Prisma.validator()({ - id: pair.token0.id.toLowerCase(), - address: pair.token0.address.toLowerCase(), - chainId: queryResult.chainId, - name: pair.token0.name, - symbol: pair.token0.symbol, - decimals: Number(pair.token0.decimals), - }), - ) - tokens.push( - Prisma.validator()({ - id: pair.token1.id.toLowerCase(), - address: pair.token1.address.toLowerCase(), - chainId: queryResult.chainId, - name: pair.token1.name, - symbol: pair.token1.symbol, - decimals: Number(pair.token1.decimals), - }), - ) - const regex = /([^\w ]|_|-)/g - const name = pair.token0.symbol - .replace(regex, '') - .slice(0, 15) - .concat('-') - .concat(pair.token1.symbol.replace(regex, '').slice(0, 15)) - const swapFee = pair.swapFee - - const currentVolumeUSD = Number(pair.volumeUSD) - const currentLiquidityUSD = Number(pair.liquidityUSD) - const currentFeesUSD = Number(pair.feesUSD) - - const anyNotCurrent = - oneHourData.get(pair.id) || - twoHourData.get(pair.id) || - oneDayData.get(pair.id) || - twoDayData.get(pair.id) || - oneWeekData.get(pair.id) || - twoWeekData.get(pair.id) || - oneMonthData.get(pair.id) || - twoMonthData.get(pair.id) - - // A way to prevent old data (thanks TheGraph!) from being added - if (anyNotCurrent && anyNotCurrent.volumeUSD > currentVolumeUSD) { - console.warn( - 'Ignoring chain', - queryResult.chainId, - 'Old Volume:', - anyNotCurrent.volumeUSD, - 'Current Volume:', - currentVolumeUSD, - ) - chainsToSkip.add(queryResult.chainId) - return [] - } - - const feeApr1h = calculateFeeApr( - AprTimeRange.ONE_HOUR, - oneHourData.get(pair.id)?.feesUSD ?? currentFeesUSD, - pair.feesUSD, - pair.liquidityUSD, - ) - const feeApr1d = calculateFeeApr( - AprTimeRange.ONE_DAY, - oneDayData.get(pair.id)?.feesUSD ?? currentFeesUSD, - pair.feesUSD, - pair.liquidityUSD, - ) - const feeApr1w = calculateFeeApr( - AprTimeRange.ONE_WEEK, - oneWeekData.get(pair.id)?.feesUSD ?? currentFeesUSD, - pair.feesUSD, - pair.liquidityUSD, - ) - const feeApr1m = calculateFeeApr( - AprTimeRange.ONE_MONTH, - oneMonthData.get(pair.id)?.feesUSD ?? currentFeesUSD, - pair.feesUSD, - pair.liquidityUSD, - ) - - const fees1h = oneHourData.has(pair.id) - ? currentFeesUSD - oneHourData.get(pair.id)!.feesUSD - : currentFeesUSD - const fees1d = oneDayData.has(pair.id) - ? currentFeesUSD - oneDayData.get(pair.id)!.feesUSD - : currentFeesUSD - const fees1w = oneWeekData.has(pair.id) - ? currentFeesUSD - oneWeekData.get(pair.id)!.feesUSD - : currentFeesUSD - const fees1m = oneMonthData.has(pair.id) - ? currentFeesUSD - oneMonthData.get(pair.id)!.feesUSD - : currentFeesUSD - const feesChange1h = calculatePercentageChange( - currentFeesUSD, - oneHourData.get(pair.id)?.feesUSD ?? 0, - twoHourData.get(pair.id)?.feesUSD ?? 0, - ) - const feesChange1d = calculatePercentageChange( - currentFeesUSD, - oneDayData.get(pair.id)?.feesUSD ?? 0, - twoDayData.get(pair.id)?.feesUSD ?? 0, - ) - const feesChange1w = calculatePercentageChange( - currentFeesUSD, - oneWeekData.get(pair.id)?.feesUSD ?? 0, - twoWeekData.get(pair.id)?.feesUSD ?? 0, - ) - const feesChange1m = calculatePercentageChange( - currentFeesUSD, - oneMonthData.get(pair.id)?.feesUSD ?? 0, - twoMonthData.get(pair.id)?.feesUSD ?? 0, - ) - const volume1h = oneHourData.has(pair.id) - ? currentVolumeUSD - oneHourData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volume1d = oneDayData.has(pair.id) - ? currentVolumeUSD - oneDayData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volume1w = oneWeekData.has(pair.id) - ? currentVolumeUSD - oneWeekData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volume1m = oneMonthData.has(pair.id) - ? currentVolumeUSD - oneMonthData.get(pair.id)!.volumeUSD - : currentVolumeUSD - const volumeChange1h = calculatePercentageChange( - currentVolumeUSD, - oneHourData.get(pair.id)?.volumeUSD ?? 0, - twoHourData.get(pair.id)?.volumeUSD ?? 0, - ) - const volumeChange1d = calculatePercentageChange( - currentVolumeUSD, - oneDayData.get(pair.id)?.volumeUSD ?? 0, - twoDayData.get(pair.id)?.volumeUSD ?? 0, - ) - const volumeChange1w = calculatePercentageChange( - currentVolumeUSD, - oneWeekData.get(pair.id)?.volumeUSD ?? 0, - twoWeekData.get(pair.id)?.volumeUSD ?? 0, - ) - const volumeChange1m = calculatePercentageChange( - currentVolumeUSD, - oneMonthData.get(pair.id)?.volumeUSD ?? 0, - twoMonthData.get(pair.id)?.volumeUSD ?? 0, - ) - const liquidityUSDChange1h = oneHourData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneHourData.get(pair.id)!.liquidityUSD - 1 - : 0 - const liquidityUSDChange1d = oneDayData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneDayData.get(pair.id)!.liquidityUSD - 1 - : 0 - - const liquidityUSDChange1w = oneWeekData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneWeekData.get(pair.id)!.liquidityUSD - 1 - : 0 - - const liquidityUSDChange1m = oneMonthData.get(pair.id)?.liquidityUSD - ? currentLiquidityUSD / oneMonthData.get(pair.id)!.liquidityUSD - 1 - : 0 - - return { - id: pair.id.toLowerCase(), - address: pair.address.toLowerCase(), - name: name, - protocol: Protocol.SUSHISWAP_V3, - chainId: queryResult.chainId, - swapFee, - twapEnabled: true, - token0Id: pair.token0.id.toLowerCase(), - token1Id: pair.token1.id.toLowerCase(), - reserve0: pair.reserve0.toString(), - reserve1: pair.reserve1.toString(), - totalSupply: pair.liquidity.toString(), - fees1h, - fees1d, - fees1w, - fees1m, - ...(oneHourData.get(pair.id)?.feesUSD && { feesChange1h }), - ...(oneDayData.get(pair.id)?.feesUSD && { feesChange1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { feesChange1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { feesChange1m }), - volume1h, - volume1d, - volume1w, - volume1m, - ...(oneHourData.get(pair.id)?.volumeUSD && { volumeChange1h }), - ...(oneDayData.get(pair.id)?.volumeUSD && { volumeChange1d }), - ...(oneWeekData.get(pair.id)?.volumeUSD && { volumeChange1w }), - ...(oneMonthData.get(pair.id)?.volumeUSD && { volumeChange1m }), - ...(oneHourData.get(pair.id)?.liquidityUSD && { liquidityUSDChange1h }), - ...(oneDayData.get(pair.id)?.liquidityUSD && { liquidityUSDChange1d }), - ...(oneWeekData.get(pair.id)?.liquidityUSD && { liquidityUSDChange1w }), - ...(oneMonthData.get(pair.id)?.liquidityUSD && { - liquidityUSDChange1m, - }), - ...(oneHourData.get(pair.id)?.feesUSD && { feeApr1h }), - ...(oneDayData.get(pair.id)?.feesUSD && { feeApr1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { feeApr1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { feeApr1m }), - ...((oneDayData.get(pair.id)?.feesUSD && { feeApr1d }) || - (oneHourData.get(pair.id)?.feesUSD && { feeApr1d: feeApr1h })), - ...(oneDayData.get(pair.id)?.feesUSD && { totalApr1d: feeApr1d }), - ...(oneWeekData.get(pair.id)?.feesUSD && { totalApr1w: feeApr1w }), - ...(oneMonthData.get(pair.id)?.feesUSD && { totalApr1m: feeApr1m }), - liquidityUSD: currentLiquidityUSD, - liquidityNative: 0, // TODO: add this back? - volumeUSD: currentVolumeUSD, - feesUSD: currentFeesUSD, - volumeNative: 0, // DOES NOT EXIST IN V3 subgraph - token0Price: pair.token0Price.toString(), - token1Price: pair.token1Price.toString(), - createdAtBlockNumber: 0, - } satisfies Prisma.SushiPoolCreateManyInput - }) - - return { pools: poolsTransformed, tokens } -} - -const calculateFeeApr = ( - timeRange: AprTimeRange, - historicalFee: number, - currentFee: number, - currentLiquidityUSD: number, -) => { - if (Number(currentLiquidityUSD) === 0) return 0 - - if (timeRange === AprTimeRange.ONE_HOUR) { - return ((currentFee - historicalFee) * 24 * 365) / currentLiquidityUSD - } else if (timeRange === AprTimeRange.ONE_DAY) { - return ((currentFee - historicalFee) * 365) / currentLiquidityUSD - } else if (timeRange === AprTimeRange.ONE_WEEK) { - return ((currentFee - historicalFee) * 52) / currentLiquidityUSD - } else if (timeRange === AprTimeRange.ONE_MONTH) { - return ((currentFee - historicalFee) * 12) / currentLiquidityUSD - } - return 0 -} - -const calculatePercentageChange = ( - current: number, - previous: number, - previous2: number, -) => { - if (current === 0) return 0 - const change1 = previous !== 0 ? current - previous : 0 - const change2 = previous !== 0 && previous2 !== 0 ? previous - previous2 : 0 - if (change2 === 0) return 0 // avoid division by 0 - return previous !== 0 && previous2 !== 0 ? change1 / change2 - 1 : 0 -} diff --git a/jobs/pool/src/server.ts b/jobs/pool/src/server.ts deleted file mode 100644 index f6ca057473..0000000000 --- a/jobs/pool/src/server.ts +++ /dev/null @@ -1,87 +0,0 @@ -import 'dotenv/config' - -import { Protocol } from '@sushiswap/database' -import timeout from 'connect-timeout' -import express from 'express' -import { z } from 'zod' - -import { execute as incentives } from './incentives.js' -import { execute as merklIncentives } from './merkl-incentives.js' -import { execute as pools } from './pools.js' -import { steer } from './steer.js' - -if (!process.env.SUSHI_GRAPH_KEY) { - throw new Error('SUSHI_GRAPH_KEY not set') -} - -const app = express() - -const protocolSchema = z.object({ - protocol: z.nativeEnum(Protocol), -}) - -app.get( - '/pools', - async (req, res) => { - req.setTimeout(1200_000) - - const result = protocolSchema.safeParse(req.query) - if (result.success === false) { - return res.status(400).send(result.error.format()) - } - - const { protocol } = result.data - try { - await pools(protocol) - res.sendStatus(200) - } catch (err) { - res.status(500).send(err) - } - }, - timeout('1200s'), -) - -app.get( - '/incentives', - async (req, res) => { - req.setTimeout(600_000) - try { - await incentives() - res.sendStatus(200) - } catch (err) { - res.status(500).send(err) - } - }, - timeout('600s'), -) - -app.get( - '/merkl-incentives', - async (req, res) => { - req.setTimeout(600_000) - try { - await merklIncentives() - res.sendStatus(200) - } catch (err) { - res.status(500).send(err) - } - }, - timeout('600s'), -) - -app.get( - '/steer', - async (req, res) => { - req.setTimeout(600_000) - try { - await steer() - res.sendStatus(200) - } catch (err) { - console.log(err) - res.status(500).send(err) - } - }, - timeout('600s'), -) - -app.listen(8080) diff --git a/jobs/pool/src/steer.ts b/jobs/pool/src/steer.ts deleted file mode 100644 index 7d270bb854..0000000000 --- a/jobs/pool/src/steer.ts +++ /dev/null @@ -1,306 +0,0 @@ -import { Prisma, SteerStrategy } from '@sushiswap/database' -import { getSteerVaults } from '@sushiswap/graph-client/steer' -import { - STEER_SUPPORTED_CHAIN_IDS, - SteerChainId, - getStrategiesPayloads, - getVaultAprs, - getVerifiedVaults, -} from '@sushiswap/steer-sdk' -import { ID, chainName, isPromiseFulfilled } from 'sushi' -import { TickMath } from 'sushi/pool/sushiswap-v3' - -import { updatePoolsWithSteerVaults } from './etl/pool/load.js' -import { - deprecateVaults, - enableVaults, - upsertVaults, -} from './etl/steer/load.js' -import { getTokenPrices } from './lib/price.js' - -export async function steer() { - console.log('Starting steer') - - try { - const startTime = performance.now() - const chainsWithVaults = await extract() - - const transformed = transform(chainsWithVaults) - - await upsertVaults(transformed) - await updatePoolsWithSteerVaults() - - await enable() - await deprecate() - - const endTime = performance.now() - console.log( - `COMPLETE - Script ran for ${((endTime - startTime) / 1000).toFixed( - 1, - )} seconds. `, - ) - } catch (e) { - console.error(e) - } -} - -async function enable() { - const results = await Promise.allSettled( - STEER_SUPPORTED_CHAIN_IDS.map((chainId) => getVerifiedVaults({ chainId })), - ) - - const verifiedVaults = results - .filter(isPromiseFulfilled) - .flatMap((r) => r.value) - - await enableVaults(verifiedVaults) -} - -async function deprecate() { - const deprecatedVaults = await fetch( - 'https://ro81h8hq6b.execute-api.us-east-1.amazonaws.com/deprecated-bundles', - ) - .then((data) => data.json()) - .then((data: { id: string; chainId: number; type: string }[]) => - data.filter((el) => el.type === 'VAULT'), - ) - - await deprecateVaults(deprecatedVaults.map((vault) => vault.id)) -} - -async function extract() { - const result = await Promise.allSettled( - STEER_SUPPORTED_CHAIN_IDS.map((chainId) => - extractChain(chainId).catch((e) => { - console.log( - 'Steer: Extract failed for chain', - chainName[chainId], - e.message, - ) - throw e - }), - ), - ) - - return result.filter(isPromiseFulfilled).map((r) => r.value) -} - -async function extractChain(chainId: SteerChainId) { - const { getPools } = await import('@sushiswap/client') - - const prices = await getTokenPrices({ chainId }) - const vaults = await getSteerVaults( - { - chainId, - first: Infinity, - }, - { retries: 3 }, - ) - - const poolIds = vaults - .filter((vault) => !!vault.pool) - .map((vault) => vault.pool.id) - - const pools = [] as Awaited> - - while (poolIds.length > 0) { - const poolIdsChunk = poolIds.splice(0, 100) - const poolsChunk = await getPools({ - ids: poolIdsChunk as ID[], - chainIds: [chainId], - }) - pools.push(...poolsChunk) - } - - const payloadIpfsHashes = vaults.map((vault) => vault.payloadIpfs) - const payloads: Awaited> = [] - - while (payloadIpfsHashes.length > 0) { - const payloadIpfsHashesChunk = payloadIpfsHashes.splice(0, 10) - const payloadsChunk = await getStrategiesPayloads({ - payloadHashes: payloadIpfsHashesChunk, - }) - payloads.push(...payloadsChunk) - } - - let aprs - - try { - aprs = await getVaultAprs({ chainId }) - } catch (e: any) { - console.error(`Failed to fetch aprs for chainId: ${chainId}`, e.message) - aprs = {} - } - - const vaultsWithPayloads = await Promise.allSettled( - vaults.map(async (vault, i) => { - const pool = pools.find((pool) => pool.id === vault.pool.id) - - const { - apr1d = null, - apr1w = null, - apr1m = null, - apr = null, - } = aprs[vault.id] || {} - - const payload = payloads[i] - - const token0Price = prices[vault.token0.address.toLowerCase()] || 0 - const token1Price = prices[vault.token1.address.toLowerCase()] || 0 - - const reserve0USD = pool - ? (Number(vault.reserve0) / 10 ** pool.token0.decimals) * token0Price - : 0 - const fees0USD = pool - ? (Number(vault.fees0) / 10 ** pool.token0.decimals) * token0Price - : 0 - - const reserve1USD = pool - ? (Number(vault.reserve1) / 10 ** pool.token1.decimals) * token1Price - : 0 - const fees1USD = pool - ? (Number(vault.fees1) / 10 ** pool.token1.decimals) * token1Price - : 0 - - const reserveUSD = reserve0USD + reserve1USD - const feesUSD = Number(fees0USD) + Number(fees1USD) - - return { - ...vault, - payload, - apr1d, - apr1w, - apr1m, - apr, - reserve0USD, - fees0USD, - reserve1USD, - fees1USD, - reserveUSD, - feesUSD, - } - }), - ) - - return { - chainId, - vaults: vaultsWithPayloads.filter(isPromiseFulfilled).map((r) => r.value), - } -} - -const StrategyTypes: Record = { - 'Static Super Wide Strategy': SteerStrategy.SuperWide, - 'Classic Rebalance Strategy': SteerStrategy.ClassicRebalance, - 'Classic Rebalance Strategy V2': SteerStrategy.ClassicRebalance, - 'Delta Neutral - Stables': SteerStrategy.DeltaNeutralStables, - 'Stable Expansion Strategy': SteerStrategy.ElasticExpansion, - 'Elastic Expansion Strategy': SteerStrategy.ElasticExpansion, - 'Elastic Expansion Strategy V2': SteerStrategy.ElasticExpansion, - 'High Low Channel Strategy': SteerStrategy.HighLowChannel, - 'High Low Channel Strategy - Medium Range': SteerStrategy.HighLowChannel, - 'High Low Channel Strategy - Narrow Range': SteerStrategy.HighLowChannel, - 'High Low Channel Strategy V2': SteerStrategy.HighLowChannel, - 'Moving Volatility Channel': SteerStrategy.MovingVolatilityChannel, - 'Moving Volatility Channel Strategy': SteerStrategy.MovingVolatilityChannel, - 'Moving Volatility Channel Strategy - Medium': - SteerStrategy.MovingVolatilityChannel, - 'Moving Volatility Strategy V2': SteerStrategy.MovingVolatilityChannel, - 'Moving Volatility Strategy V2.': SteerStrategy.MovingVolatilityChannel, - 'Moving Volatility Channel Strategy V2': - SteerStrategy.MovingVolatilityChannel, - 'Channel Multiplier Strategy': SteerStrategy.ChannelMultiplier, - 'Algebra Channel Multiplier': SteerStrategy.ChannelMultiplier, - 'MIM-USDC Stable Strategy': SteerStrategy.StaticStable, - 'Relative Static Stable Strategy': SteerStrategy.StaticStable, - 'Generic Static Stable Strategy': SteerStrategy.StaticStable, - 'Static Stable Strategy': SteerStrategy.StaticStable, - 'Static Stable Strategy ': SteerStrategy.StaticStable, - 'Static Stable 1% Strategy': SteerStrategy.StaticStable, - 'Static Stable 0.3% Strategy': SteerStrategy.StaticStable, - 'Static Stable 0.05% Strategy': SteerStrategy.StaticStable, - 'Static Stable Strategy V2': SteerStrategy.StaticStable, - 'Keltner Algo': SteerStrategy.KeltnerAlgo, - 'Bollinger Algo': SteerStrategy.BollingerAlgo, - 'Fixed Percentage Strategy': SteerStrategy.FixedPercentage, - 'Price Multiplier Strategy': SteerStrategy.PriceMultiplier, -} - -function transform( - chainsWithVaults: Awaited>, -): Prisma.SteerVaultCreateManyInput[] { - const vaults = chainsWithVaults.flatMap(({ chainId, vaults }) => - vaults.flatMap((vault) => { - // ! Missing strategies will be ignored - const strategyType = vault?.payload?.strategyConfigData.name - ? StrategyTypes[vault.payload.strategyConfigData.name] - : null - - if (!strategyType || !vault.payload) { - return [] - } - - let lastAdjustmentTimestamp = Math.floor( - vault.payload.strategyConfigData.epochStart, - ) - if (lastAdjustmentTimestamp > 1000000000000) { - lastAdjustmentTimestamp = Math.floor(lastAdjustmentTimestamp / 1000) - } - - return { - id: vault.id.toLowerCase(), - address: vault.address.toLowerCase(), - chainId: chainId, - - poolId: vault.pool.id, - feeTier: Number(vault.feeTier) / 1000000, - - // apr1d, apr1m, apr1y are from the subgraph and inaccurate - apr: vault.apr || 0, - apr1d: vault.apr1d || 0, - apr1w: vault.apr1w || 0, - apr1m: vault.apr1m || 0, - apr1y: 0, - - token0Id: vault.token0.id.toLowerCase(), - reserve0: String(vault.reserve0), - reserve0USD: vault.reserve0USD, - fees0: String(vault.fees0), - fees0USD: vault.fees0USD, - - token1Id: vault.token1.id.toLowerCase(), - reserve1: String(vault.reserve1), - reserve1USD: vault.reserve1USD, - fees1: String(vault.fees1), - fees1USD: vault.fees1USD, - - reserveUSD: vault.reserveUSD, - feesUSD: vault.feesUSD, - - strategy: strategyType, - payloadHash: vault.payloadIpfs, - description: '', // not used - state: 'PendingThreshold', // unused - - performanceFee: 0.15, // currently constant - - lowerTick: vault.lowerTick - ? Number(vault.lowerTick) - : TickMath.MIN_TICK, - upperTick: vault.upperTick - ? Number(vault.upperTick) - : TickMath.MAX_TICK, - - adjustmentFrequency: Number( - vault.payload.strategyConfigData.epochLength, - ), - lastAdjustmentTimestamp, - - admin: vault.strategyToken.admin, - creator: vault.strategyToken.creator.id, - manager: vault.manager, - } satisfies Prisma.SteerVaultCreateManyInput - }), - ) - console.log(`TRANSFORM: ${vaults.length} vaults`) - return vaults -} diff --git a/jobs/pool/tsconfig.json b/jobs/pool/tsconfig.json deleted file mode 100644 index ea1a1a29a4..0000000000 --- a/jobs/pool/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "@tsconfig/node18/tsconfig.json", - "include": ["src", "resolvers"], - "exclude": ["node_modules"], - "compilerOptions": { - "baseUrl": ".", - "rootDir": ".", - "target": "ES2022", - "lib": ["ESNext"], - "module": "ES2022", - "moduleResolution": "Bundler", - "esModuleInterop": true, - "resolveJsonModule": true, - "downlevelIteration": true, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true - }, - "ts-node": { - "swc": true, - "esm": true - } -} diff --git a/jobs/pool/turbo.json b/jobs/pool/turbo.json deleted file mode 100644 index 711b9f5c64..0000000000 --- a/jobs/pool/turbo.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "start": { - "dependsOn": ["build"], - "env": ["DRPC_ID", "DATABASE_URL", "SUSHI_GRAPH_KEY"], - "cache": false, - "persistent": true - }, - "build": { - "outputs": [".graphclient/**"], - "dependsOn": ["^build"] - }, - "check": { - "dependsOn": ["build"], - "cache": false - } - } -} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..8760805b7b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,9720 @@ +{ + "name": "sushi", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "sushi", + "version": "0.0.0", + "hasInstallScript": true, + "devDependencies": { + "@biomejs/biome": "1.5.2", + "@changesets/changelog-github": "0.4.8", + "@changesets/cli": "2.26.2", + "@types/jest": "29.5.5", + "@types/node": "20", + "dotenv-cli": "6.0.0", + "eslint": "8.43.0", + "eslint-config-turbo": "2.0.5", + "jest": "29.7.0", + "sort-package-json": "2.6.0", + "ts-jest": "29.1.1", + "turbo": "2.0.5" + }, + "engines": { + "node": ">=20.x", + "pnpm": "8.15.8" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.0.tgz", + "integrity": "sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", + "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.9", + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-module-transforms": "^7.24.9", + "@babel/helpers": "^7.24.8", + "@babel/parser": "^7.24.8", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.9", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", + "integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.24.8", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.0.tgz", + "integrity": "sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", + "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.0.tgz", + "integrity": "sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.1.tgz", + "integrity": "sha512-LrHHoWq08ZpmmFqBAzN+hUdWwy5zt7FGa/hVwMcOqW6OVtwqaoD5utfuGYU87JYxdZgLUvktAsn37j/sYR9siA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.0.tgz", + "integrity": "sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@biomejs/biome": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.5.2.tgz", + "integrity": "sha512-LhycxGQBQLmfv6M3e4tMfn/XKcUWyduDYOlCEBrHXJ2mMth2qzYt1JWypkWp+XmU/7Hl2dKvrP4mZ5W44+nWZw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "1.5.2", + "@biomejs/cli-darwin-x64": "1.5.2", + "@biomejs/cli-linux-arm64": "1.5.2", + "@biomejs/cli-linux-arm64-musl": "1.5.2", + "@biomejs/cli-linux-x64": "1.5.2", + "@biomejs/cli-linux-x64-musl": "1.5.2", + "@biomejs/cli-win32-arm64": "1.5.2", + "@biomejs/cli-win32-x64": "1.5.2" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.2.tgz", + "integrity": "sha512-3JVl08aHKsPyf0XL9SEj1lssIMmzOMAn2t1zwZKBiy/mcZdb0vuyMSTM5haMQ/90wEmrkYN7zux777PHEGrGiw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.2.tgz", + "integrity": "sha512-QAPW9rZb/AgucUx+ogMg+9eJNipQDqvabktC5Tx4Aqb/mFzS6eDqNP7O0SbGz3DtC5Y2LATEj6o6zKIQ4ZT+3w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.2.tgz", + "integrity": "sha512-fVLrUgIlo05rO4cNu+Py5EwwmXnXhWH+8KrNlWkr2weMYjq85SihUsuWWKpmqU+bUVR+m5gwfcIXZVWYVCJMHw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.2.tgz", + "integrity": "sha512-Z29SjaOyO4QfajplNXSjLx17S79oPN42D094zjE24z7C7p3NxvLhKLygtSP9emgaXkcoESe2chOzF4IrGy/rlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.2.tgz", + "integrity": "sha512-ixqJtUHtF0ho1+1DTZQLAEwHGSqvmvHhAAFXZQoaSdABn+IcITYExlFVA3bGvASy/xtPjRhTx42hVwPtLwMHwg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.2.tgz", + "integrity": "sha512-ZolquPEjWYUmGeERS8svHOOT7OXEeoriPnV8qptgWJmYF9EO9HUGRn1UtCvdVziDYK+u1A7PxjOdkY1B00ty5A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.2.tgz", + "integrity": "sha512-DN4cXSAoFTdjOoh7f+JITj1uQgQSXt+1pVea9bFrpbgip+ZwkONqQq+jUcmFMMehbp9LuiVtNXFz/ReHn6FY7A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.2.tgz", + "integrity": "sha512-YvWWXZmk936FdrXqc2jcP6rfsXsNBIs9MKBQQoVXIihwNNRiAaBD9Iwa/ouU1b7Zxq2zETgeuRewVJickFuVOw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.*" + } + }, + "node_modules/@changesets/apply-release-plan": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-6.1.4.tgz", + "integrity": "sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/config": "^2.3.1", + "@changesets/get-version-range-type": "^0.3.2", + "@changesets/git": "^2.0.0", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "detect-indent": "^6.0.0", + "fs-extra": "^7.0.1", + "lodash.startcase": "^4.4.0", + "outdent": "^0.5.0", + "prettier": "^2.7.1", + "resolve-from": "^5.0.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/assemble-release-plan": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-5.2.4.tgz", + "integrity": "sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/errors": "^0.1.4", + "@changesets/get-dependents-graph": "^1.3.6", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/changelog-git": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.1.14.tgz", + "integrity": "sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^5.2.1" + } + }, + "node_modules/@changesets/changelog-github": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz", + "integrity": "sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/get-github-info": "^0.5.2", + "@changesets/types": "^5.2.1", + "dotenv": "^8.1.0" + } + }, + "node_modules/@changesets/cli": { + "version": "2.26.2", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.26.2.tgz", + "integrity": "sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/apply-release-plan": "^6.1.4", + "@changesets/assemble-release-plan": "^5.2.4", + "@changesets/changelog-git": "^0.1.14", + "@changesets/config": "^2.3.1", + "@changesets/errors": "^0.1.4", + "@changesets/get-dependents-graph": "^1.3.6", + "@changesets/get-release-plan": "^3.0.17", + "@changesets/git": "^2.0.0", + "@changesets/logger": "^0.0.5", + "@changesets/pre": "^1.0.14", + "@changesets/read": "^0.5.9", + "@changesets/types": "^5.2.1", + "@changesets/write": "^0.2.3", + "@manypkg/get-packages": "^1.1.3", + "@types/is-ci": "^3.0.0", + "@types/semver": "^7.5.0", + "ansi-colors": "^4.1.3", + "chalk": "^2.1.0", + "enquirer": "^2.3.0", + "external-editor": "^3.1.0", + "fs-extra": "^7.0.1", + "human-id": "^1.0.2", + "is-ci": "^3.0.1", + "meow": "^6.0.0", + "outdent": "^0.5.0", + "p-limit": "^2.2.0", + "preferred-pm": "^3.0.0", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "spawndamnit": "^2.0.0", + "term-size": "^2.1.0", + "tty-table": "^4.1.5" + }, + "bin": { + "changeset": "bin.js" + } + }, + "node_modules/@changesets/config": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-2.3.1.tgz", + "integrity": "sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.1.4", + "@changesets/get-dependents-graph": "^1.3.6", + "@changesets/logger": "^0.0.5", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + "micromatch": "^4.0.2" + } + }, + "node_modules/@changesets/errors": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.1.4.tgz", + "integrity": "sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/get-dependents-graph": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-1.3.6.tgz", + "integrity": "sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "chalk": "^2.1.0", + "fs-extra": "^7.0.1", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/get-github-info": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@changesets/get-github-info/-/get-github-info-0.5.2.tgz", + "integrity": "sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dataloader": "^1.4.0", + "node-fetch": "^2.5.0" + } + }, + "node_modules/@changesets/get-release-plan": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-3.0.17.tgz", + "integrity": "sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/assemble-release-plan": "^5.2.4", + "@changesets/config": "^2.3.1", + "@changesets/pre": "^1.0.14", + "@changesets/read": "^0.5.9", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/get-version-range-type": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz", + "integrity": "sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/git": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-2.0.0.tgz", + "integrity": "sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/errors": "^0.1.4", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.2", + "spawndamnit": "^2.0.0" + } + }, + "node_modules/@changesets/logger": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.0.5.tgz", + "integrity": "sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.1.0" + } + }, + "node_modules/@changesets/parse": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.3.16.tgz", + "integrity": "sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^5.2.1", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@changesets/pre": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.14.tgz", + "integrity": "sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/errors": "^0.1.4", + "@changesets/types": "^5.2.1", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, + "node_modules/@changesets/read": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.5.9.tgz", + "integrity": "sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/git": "^2.0.0", + "@changesets/logger": "^0.0.5", + "@changesets/parse": "^0.3.16", + "@changesets/types": "^5.2.1", + "chalk": "^2.1.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0" + } + }, + "node_modules/@changesets/types": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-5.2.1.tgz", + "integrity": "sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/write": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.2.3.tgz", + "integrity": "sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.1", + "@changesets/types": "^5.2.1", + "fs-extra": "^7.0.1", + "human-id": "^1.0.2", + "prettier": "^2.7.1" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/js": { + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/console/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/console/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/console/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/console/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/core/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/core/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/core/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/core/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/reporters/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/reporters/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/reporters/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/reporters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/transform/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/transform/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/transform/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/transform/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/transform/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/types/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/types/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/types/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/types/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/types/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@manypkg/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@types/node": "^12.7.1", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + } + }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/find-root/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/get-packages": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", + "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@changesets/types": "^4.0.1", + "@manypkg/find-root": "^1.1.0", + "fs-extra": "^8.1.0", + "globby": "^11.0.0", + "read-yaml-file": "^1.1.0" + } + }, + "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", + "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/get-packages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/is-ci": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.4.tgz", + "integrity": "sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ci-info": "^3.1.0" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.5", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz", + "integrity": "sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.14.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.13.tgz", + "integrity": "sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-jest/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/babel-jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/babel-jest/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/babel-jest/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-jest/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-jest/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-windows": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/breakword": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/breakword/-/breakword-1.0.6.tgz", + "integrity": "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "wcwidth": "^1.0.1" + } + }, + "node_modules/browserslist": { + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", + "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001640", + "electron-to-chromium": "^1.4.820", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001643", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", + "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-jest/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/create-jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/create-jest/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/create-jest/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/create-jest/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csv": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/csv/-/csv-5.5.3.tgz", + "integrity": "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "csv-generate": "^3.4.3", + "csv-parse": "^4.16.3", + "csv-stringify": "^5.6.5", + "stream-transform": "^2.1.3" + }, + "engines": { + "node": ">= 0.1.90" + } + }, + "node_modules/csv-generate": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/csv-generate/-/csv-generate-3.4.3.tgz", + "integrity": "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/csv-parse": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", + "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csv-stringify": { + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", + "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=10" + } + }, + "node_modules/dotenv-cli": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/dotenv-cli/-/dotenv-cli-6.0.0.tgz", + "integrity": "sha512-qXlCOi3UMDhCWFKe0yq5sg3X+pJAz+RQDiFN38AMSbUrnY3uZshSfDJUAge951OS7J9gwLZGfsBlWRSOYz/TRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "dotenv": "^16.0.0", + "dotenv-expand": "^8.0.1", + "minimist": "^1.2.5" + }, + "bin": { + "dotenv": "cli.js" + } + }, + "node_modules/dotenv-cli/node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-8.0.3.tgz", + "integrity": "sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.2.tgz", + "integrity": "sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.43.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-turbo": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/eslint-config-turbo/-/eslint-config-turbo-2.0.5.tgz", + "integrity": "sha512-iE/oD0ZBM6OQFbS/bKnc3UtqhMmJ1IEfqTQ0qCY1CauHm7gj85aRRX/1ydDYKLpu0RupBqzVPybsWxPif9rsig==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-plugin-turbo": "2.0.5" + }, + "peerDependencies": { + "eslint": ">6.6.0" + } + }, + "node_modules/eslint-plugin-turbo": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-2.0.5.tgz", + "integrity": "sha512-nCTXZdaKmdRybBdjnMrDFG+ppLc9toUqB01Hf0pfhkQw8OoC29oJIVPsCSvuL/W58RKD02CNEUrwnVt57t36IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dotenv": "16.0.3" + }, + "peerDependencies": { + "eslint": ">6.6.0" + } + }, + "node_modules/eslint-plugin-turbo/node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-yarn-workspace-root2": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", + "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "micromatch": "^4.0.2", + "pkg-dir": "^4.2.0" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/git-hooks-list": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-3.1.0.tgz", + "integrity": "sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/fisker/git-hooks-list?sponsor=1" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-id": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", + "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-circus/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-circus/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-circus/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-circus/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-cli/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-cli/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-cli/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-cli/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-config/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-config/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-config/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-config/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-config/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-diff/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-diff/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-diff/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-diff/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-diff/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-each/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-each/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-each/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-each/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-each/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-matcher-utils/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-matcher-utils/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-message-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-message-util/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-message-util/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-message-util/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-message-util/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-resolve/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-resolve/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-resolve/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-resolve/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-resolve/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-runner/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-runner/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-runner/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-runner/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-runner/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-runtime/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-runtime/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-runtime/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-runtime/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-runtime/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-snapshot/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-snapshot/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-snapshot/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-snapshot/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-util/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-util/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-util/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-util/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-validate/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-validate/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-validate/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-validate/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-validate/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-watcher/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-watcher/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-watcher/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-watcher/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-watcher/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-watcher/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-yaml-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", + "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.13.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/load-yaml-file/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", + "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "^4.0.2", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mixme": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/mixme/-/mixme-0.5.10.tgz", + "integrity": "sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/preferred-pm": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.4.tgz", + "integrity": "sha512-lEHd+yEm22jXdCphDrkvIJQU66EuLojPPtvZkpKIkiD+l0DMThF/niqZKJSoU8Vl7iuvtmzyMhir9LdVy5WMnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^5.0.0", + "find-yarn-workspace-root2": "1.2.16", + "path-exists": "^4.0.0", + "which-pm": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/preferred-pm/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/preferred-pm/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/preferred-pm/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/preferred-pm/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-yaml-file/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "license": "ISC" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true, + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/smartwrap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.2.tgz", + "integrity": "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array.prototype.flat": "^1.2.3", + "breakword": "^1.0.5", + "grapheme-splitter": "^1.0.4", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1", + "yargs": "^15.1.0" + }, + "bin": { + "smartwrap": "src/terminal-adapter.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/smartwrap/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/smartwrap/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/smartwrap/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/smartwrap/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/smartwrap/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/smartwrap/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/smartwrap/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sort-object-keys": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-1.1.3.tgz", + "integrity": "sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sort-package-json": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-2.6.0.tgz", + "integrity": "sha512-XSQ+lY9bAYA8ZsoChcEoPlgcSMaheziEp1beox1JVxy1SV4F2jSq9+h2rJ+3mC/Dhu9Ius1DLnInD5AWcsDXZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-indent": "^7.0.1", + "detect-newline": "^4.0.0", + "get-stdin": "^9.0.0", + "git-hooks-list": "^3.0.0", + "globby": "^13.1.2", + "is-plain-obj": "^4.1.0", + "sort-object-keys": "^1.1.3" + }, + "bin": { + "sort-package-json": "cli.js" + } + }, + "node_modules/sort-package-json/node_modules/detect-indent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz", + "integrity": "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + } + }, + "node_modules/sort-package-json/node_modules/detect-newline": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-4.0.1.tgz", + "integrity": "sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sort-package-json/node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sort-package-json/node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sort-package-json/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawndamnit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", + "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/spawndamnit/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/spawndamnit/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/spawndamnit/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/spawndamnit/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true, + "license": "ISC" + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/stream-transform": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-2.1.3.tgz", + "integrity": "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mixme": "^0.5.1" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-jest": { + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", + "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/tty-table": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/tty-table/-/tty-table-4.2.3.tgz", + "integrity": "sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "csv": "^5.5.3", + "kleur": "^4.1.5", + "smartwrap": "^2.0.2", + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.1", + "yargs": "^17.7.1" + }, + "bin": { + "tty-table": "adapters/terminal-adapter.js" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/tty-table/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tty-table/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tty-table/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tty-table/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tty-table/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tty-table/node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tty-table/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/turbo": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.0.5.tgz", + "integrity": "sha512-+6+hcWr4nwuESlKqUc626HMOTd3QT8hUOc9QM45PP1d4nErGkNOgExm4Pcov3in7LTuadMnB0gcd/BuzkEDIPw==", + "dev": true, + "license": "MIT", + "bin": { + "turbo": "bin/turbo" + }, + "optionalDependencies": { + "turbo-darwin-64": "2.0.5", + "turbo-darwin-arm64": "2.0.5", + "turbo-linux-64": "2.0.5", + "turbo-linux-arm64": "2.0.5", + "turbo-windows-64": "2.0.5", + "turbo-windows-arm64": "2.0.5" + } + }, + "node_modules/turbo-darwin-64": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.0.5.tgz", + "integrity": "sha512-t/9XpWYIjOhIHUdwiR47SYBGYHkR1zWLxTkTNKZwCSn8BN0cfjPZ1BR6kcwYGxLGBhtl5GBf6A29nq2K7iwAjg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/turbo-darwin-arm64": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.0.5.tgz", + "integrity": "sha512-//5y4RJvnal8CttOLBwlaBqblcQb1qTlIxLN+I8O3E3rPuvHOupNKB9ZJxYIQ8oWf8ns8Ec8cxQ0GSBLTJIMtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/turbo-linux-64": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.0.5.tgz", + "integrity": "sha512-LDtEDU2Gm8p3lKu//aHXZFRKUCVu68BNF9LQ+HmiCKFpNyK7khpMTxIAAUhDqt+AzlrbxtrxcCpCJaWg1JDjHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-linux-arm64": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.0.5.tgz", + "integrity": "sha512-84wdrzntErBNxkHcwHxiTZdaginQAxGPnwLTyZj8lpUYI7okPoxy3jKpUeMHN3adm3iDedl/x0mYSIvVVkmOiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-windows-64": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.0.5.tgz", + "integrity": "sha512-SgaFZ0VW6kHCJogLNuLEleAauAJx2Y48wazZGVRmBpgSUS2AylXesaBMhJaEScYqLz7mIRn6KOgwM8D4wTxI9g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/turbo-windows-arm64": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.0.5.tgz", + "integrity": "sha512-foUxLOZoru0IRNIxm53fkfM4ubas9P0nTFjIcHtd+E8YHeogt8GqTweNre2e6ri1EHDo71emmuQgpuoFCOXZMg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/which-pm": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.2.0.tgz", + "integrity": "sha512-MOiaDbA5ZZgUjkeMWM5EkJp4loW5ZRoa5bc3/aeMox/PJelMhE6t7S/mLuiY43DBupyxH+S0U1bTui9kWUlmsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-yaml-file": "^0.2.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8.15" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index 15beed958e..7dd077380d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "changeset": "changeset", "changeset:publish": "changeset publish", "changeset:version": "changeset version && pnpm install --lockfile-only", - "check": "turbo run check --no-cache --filter=!@sushiswap/pool-job --filter=!@sushiswap/tines-sandbox --filter=!@sushiswap/route-processor", + "check": "turbo run check --no-cache --filter=!@sushiswap/tines-sandbox --filter=!@sushiswap/route-processor", "clean": "turbo run clean && rm -rf node_modules", "dev": "dotenv -- turbo run dev --no-cache --parallel --continue", "disable-remote-caching": "turbo unlink && rm -rf ./node_modules/.cache/turbo", @@ -17,8 +17,8 @@ "preinstall": "npx -y only-allow pnpm", "lint": "biome check .", "lint:fix": "biome check . --apply", - "sort": "sort-package-json 'package.json' 'apis/*/package.json' 'apps/*/package.json' 'config/*/package.json' 'jobs/*/package.json' 'packages/*/package.json' 'protocols/*/package.json'", - "sort-check": "sort-package-json 'package.json' 'apis/*/package.json' 'apps/*/package.json' 'config/*/package.json' 'jobs/*/package.json' 'packages/*/package.json' 'protocols/*/package.json' --check", + "sort": "sort-package-json 'package.json' 'apis/*/package.json' 'apps/*/package.json' 'config/*/package.json' 'packages/*/package.json' 'protocols/*/package.json'", + "sort-check": "sort-package-json 'package.json' 'apis/*/package.json' 'apps/*/package.json' 'config/*/package.json' 'packages/*/package.json' 'protocols/*/package.json' --check", "test": "dotenv -- turbo run test --parallel", "test-web-app": "dotenv -- turbo run test --filter=web", "web": "pnpm exec turbo run dev --filter web" diff --git a/packages/client/src/api/steer-vault/vaults.ts b/packages/client/src/api/steer-vault/vaults.ts index 7da0aaef86..0110305171 100644 --- a/packages/client/src/api/steer-vault/vaults.ts +++ b/packages/client/src/api/steer-vault/vaults.ts @@ -241,7 +241,8 @@ export async function getSteerVaultsFromDB( reserveUSD: Number(vault.reserveUSD), feesUSD: Number(vault.feesUSD), - strategy: vault.strategy, + strategy: vault.strategy as any, + description: '', payloadHash: vault.payloadHash, // description: vault.description, // state: vault.state diff --git a/packages/client/src/hooks/steer-vault/index.ts b/packages/client/src/hooks/steer-vault/index.ts index ac590d37b4..f390259b92 100644 --- a/packages/client/src/hooks/steer-vault/index.ts +++ b/packages/client/src/hooks/steer-vault/index.ts @@ -1,4 +1,3 @@ export * from './count' export * from './vault' export * from './vaults' -export { SteerStrategy } from '@sushiswap/database' diff --git a/packages/client/src/pure/steer-vault/index.ts b/packages/client/src/pure/steer-vault/index.ts index be35e5ada8..61e5d9b441 100644 --- a/packages/client/src/pure/steer-vault/index.ts +++ b/packages/client/src/pure/steer-vault/index.ts @@ -1,4 +1,3 @@ export * from './count/count' export * from './vault/vault' export * from './vaults/vaults' -export { SteerStrategy } from '@sushiswap/database' diff --git a/packages/graph-client/scripts/t.ts b/packages/graph-client/scripts/t.ts deleted file mode 100644 index e18f44fdda..0000000000 --- a/packages/graph-client/scripts/t.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { getSushiV3Pools } from '../src/subgraphs/sushi-v3/queries/pools' - -const a = await getSushiV3Pools({ chainId: 8453, first: Infinity }) - -console.log('v3 pools:', a.length) diff --git a/packages/graph-client/scripts/t2.ts b/packages/graph-client/scripts/t2.ts new file mode 100644 index 0000000000..2c89654a62 --- /dev/null +++ b/packages/graph-client/scripts/t2.ts @@ -0,0 +1,5 @@ +import { getPools } from '../src/subgraphs/data-api/queries/pools' + +const a = await getPools({ chainId: '42161' }) + +console.log('pools api:', a.length ) diff --git a/packages/graph-client/scripts/t3.ts b/packages/graph-client/scripts/t3.ts new file mode 100644 index 0000000000..a4c7a25e80 --- /dev/null +++ b/packages/graph-client/scripts/t3.ts @@ -0,0 +1,9 @@ +import { getPortfolioWallet } from '../src/subgraphs/data-api' + +const portfolio = await getPortfolioWallet({ + id: '0x3808699baf43ba988d1e9acd64237dea36c61593', +}) + +const isPortfolioWalletValid = portfolio.totalUSD > 0 + +console.log({ getPortfolioWallet: isPortfolioWalletValid }) diff --git a/packages/graph-client/scripts/update-schemas.ts b/packages/graph-client/scripts/update-schemas.ts index 9a9c418d36..a7fab8e587 100644 --- a/packages/graph-client/scripts/update-schemas.ts +++ b/packages/graph-client/scripts/update-schemas.ts @@ -1,22 +1,12 @@ -import { BONDS_SUBGRAPH_URL } from '@sushiswap/bonds-sdk' import { buildClientSchema, getIntrospectionQuery, printSchema } from 'graphql' import fs from 'fs' const schemas = { - blocks: 'api.studio.thegraph.com/query/72545/ethereum-blocks/v0.0.2', - bonds: BONDS_SUBGRAPH_URL[1], bentobox: 'api.studio.thegraph.com/query/32073/bentobox-ethereum/v0.0.1', strapi: 'sushi-strapi-cms.herokuapp.com/graphql', furo: 'api.studio.thegraph.com/query/32073/furo-ethereum/v0.0.1', - 'master-chef-v1': 'api.studio.thegraph.com/query/32073/masterchef/v0.0.1', - 'master-chef-v2': 'api.studio.thegraph.com/query/32073/master-chefv2/v0.0.1', - 'mini-chef': - 'api.studio.thegraph.com/query/32073/minichef-arbitrum/version/latest', - steer: 'api.thegraph.com/subgraphs/name/steerprotocol/steer-protocol-polygon', - 'sushi-bar': 'api.studio.thegraph.com/query/32073/xsushi/v0.0.1', - 'sushi-v2': 'api.studio.thegraph.com/query/32073/v2-arbitrum/v0.0.5', - 'sushi-v3': 'api.studio.thegraph.com/query/32073/v3-arbitrum/v0.0.1', + 'data-api': 'data-api-production-acb1.up.railway.app/graphql', } as const satisfies Record async function updateSchema(schema: keyof typeof schemas) { diff --git a/packages/graph-client/src/composite/chef-user-positions.ts b/packages/graph-client/src/composite/chef-user-positions.ts deleted file mode 100644 index 57989f9551..0000000000 --- a/packages/graph-client/src/composite/chef-user-positions.ts +++ /dev/null @@ -1,86 +0,0 @@ -import type { ChainIdVariable, ChainIdsVariable } from 'src/lib/types/chainId' -import { - MINICHEF_SUPPORTED_CHAIN_IDS, - type MiniChefChainId, - isMiniChefChainId, -} from 'sushi/config' - -import type { RequestOptions } from 'src/lib/request' -import { - type GetMasterChefV1UserPositions, - type MasterChefV1UserPositions, - getMasterChefV1UserPositions, -} from 'src/subgraphs/master-chef-v1' -import { - type GetMasterChefV2UserPositions, - type MasterChefV2UserPositions, - getMasterChefV2UserPositions, -} from 'src/subgraphs/master-chef-v2' -import { - type GetMiniChefUserPositions, - type MiniChefUserPositions, - getMiniChefUserPositions, -} from 'src/subgraphs/mini-chef' -import { ChainId } from 'sushi/chain' - -export type GetChefUserPositions = Omit< - GetMasterChefV1UserPositions & - GetMasterChefV2UserPositions & - GetMiniChefUserPositions, - 'chainId' -> & - ChainIdsVariable<1 | MiniChefChainId> - -type CombinedPosition = ( - | MasterChefV1UserPositions - | MasterChefV2UserPositions - | MiniChefUserPositions -)[number] - -export type ChefPosition = Omit & { - pool: Omit & - ChainIdVariable['chainId']> -} - -export async function getChefUserPositions( - { - chainIds = [ChainId.ETHEREUM, ...MINICHEF_SUPPORTED_CHAIN_IDS], - ...variables - }: GetChefUserPositions, - options?: RequestOptions, -) { - const miniChefChainIds = chainIds.filter(isMiniChefChainId) - - const masterChefPromises = chainIds.includes(ChainId.ETHEREUM) - ? [ - getMasterChefV1UserPositions(variables, options), - getMasterChefV2UserPositions(variables, options), - ] - : [] - - const promises = await Promise.allSettled([ - ...masterChefPromises, - ...miniChefChainIds.map((chainId) => - getMiniChefUserPositions( - { - ...variables, - chainId, - }, - options, - ), - ), - ]) - - const data = [] as ChefPosition[] - const errors = [] - - for (const promise of promises) { - if (promise.status === 'fulfilled') { - data.push(...promise.value) - } else { - errors.push(promise.reason) - } - } - - return { data, errors } -} diff --git a/packages/graph-client/src/composite/sushi-day-datas.ts b/packages/graph-client/src/composite/sushi-day-datas.ts deleted file mode 100644 index 053abf2e22..0000000000 --- a/packages/graph-client/src/composite/sushi-day-datas.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { RequestOptions } from 'src/lib/request' -import type { ChainIdsVariable } from 'src/lib/types/chainId' -import { fetchMultichain } from 'src/multichain' -import { getSushiV2DayDatas } from 'src/subgraphs/sushi-v2/queries/day-datas' -import { - type SushiV3DayDatas, - getSushiV3DayDatas, -} from 'src/subgraphs/sushi-v3/queries/day-datas' -import { - SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, - type SushiSwapV2ChainId, - type SushiSwapV3ChainId, - isSushiSwapV2ChainId, - isSushiSwapV3ChainId, -} from 'sushi/config' - -export type GetSushiDayDatas = {} & ChainIdsVariable< - SushiSwapV2ChainId | SushiSwapV3ChainId -> - -export async function getSushiDayDatas( - { - chainIds = Array.from( - new Set([ - ...SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - ...SUSHISWAP_V3_SUPPORTED_CHAIN_IDS, - ]), - ), - }: GetSushiDayDatas, - options: RequestOptions = { - retries: 10, - }, -) { - const sushiSwapV2ChainIds = chainIds.filter(isSushiSwapV2ChainId) - const v2p = fetchMultichain({ - chainIds: sushiSwapV2ChainIds, - fetch: getSushiV2DayDatas, - variables: { - first: 1000, - orderBy: 'date', - orderDirection: 'desc', - }, - options, - }) - - const sushiSwapV3ChainIds = chainIds.filter(isSushiSwapV3ChainId) - const v3p = fetchMultichain({ - chainIds: sushiSwapV3ChainIds, - fetch: getSushiV3DayDatas, - variables: { - first: 1000, - orderBy: 'date', - orderDirection: 'desc', - }, - options, - }) - - const [ - { data: sushiSwapV2DayDatas, errors: sushiSwapV2DayDataErrors }, - { data: sushiSwapV3DayDatas, errors: sushiSwapV3DayDatasErrors }, - ] = await Promise.all([v2p, v3p]) - - const dataMap = new Map() - - const setOrAdd = (date: number, dayData: SushiV3DayDatas[number]) => { - if (Number(dayData.volumeUSD) > 1_000_000_000) return // Skip volume if it's too high, MEV txs on ethereum can cause this - - const existing = dataMap.get(date) - - if (existing) { - dataMap.set(date, { - ...existing, - volumeUSD: existing.volumeUSD + dayData.volumeUSD, - volumeUSDUntracked: - existing.volumeUSDUntracked + dayData.volumeUSDUntracked, - liquidityUSD: existing.liquidityUSD + dayData.liquidityUSD, - txCount: existing.txCount + dayData.txCount, - feesUSD: existing.feesUSD + dayData.feesUSD, - }) - return - } - - dataMap.set(date, dayData) - } - - sushiSwapV3DayDatas.forEach((dayData) => { - setOrAdd(dayData.date, dayData) - }) - - sushiSwapV2DayDatas.forEach((dayData) => { - setOrAdd(dayData.date, dayData) - }) - - const data = Array.from(dataMap.values()) - - const errors = [...sushiSwapV2DayDataErrors, ...sushiSwapV3DayDatasErrors] - - return { data, errors } -} diff --git a/packages/graph-client/src/composite/sushi-historic-pool.ts b/packages/graph-client/src/composite/sushi-historic-pool.ts deleted file mode 100644 index dac910a2af..0000000000 --- a/packages/graph-client/src/composite/sushi-historic-pool.ts +++ /dev/null @@ -1,204 +0,0 @@ -import type { RequestOptions } from 'src/lib/request' -import { getBlockHistoric } from 'src/subgraphs/blocks/queries/block-historic' -import { - type GetSushiV2Pool, - getSushiV2Pool, -} from 'src/subgraphs/sushi-v2/queries/pool' -import { getSushiV2PoolBuckets } from 'src/subgraphs/sushi-v2/queries/pool-with-buckets' -import { - type GetSushiV3Pool, - getSushiV3Pool, -} from 'src/subgraphs/sushi-v3/queries/pool' -import { getSushiV3PoolBuckets } from 'src/subgraphs/sushi-v3/queries/pool-with-buckets' -import { isSushiSwapV2ChainId, isSushiSwapV3ChainId } from 'sushi/config' -import type { - PoolBase, - PoolHistory1D, - PoolV2, - PoolV3, - PoolWithBuckets, -} from 'sushi/types' -import { isPromiseFulfilled } from 'sushi/validate' - -export type GetSushiHistoricPool = Omit< - GetSushiV2Pool | GetSushiV3Pool, - 'block' -> - -type Result = PoolHistory1D< - PoolWithBuckets | PoolV3> -> - -async function fetchSushiV2Pool( - { chainId, ...variables }: GetSushiV2Pool | GetSushiV3Pool, - options?: RequestOptions, -) { - if (!isSushiSwapV2ChainId(chainId)) { - throw new Error(`ChainId ${chainId} is not a SushiSwap V2 chain`) - } - - return getSushiV2Pool({ chainId, ...variables }, options) -} - -async function fetchSushiV3Pool( - { chainId, ...variables }: GetSushiV2Pool | GetSushiV3Pool, - options?: RequestOptions, -) { - if (!isSushiSwapV3ChainId(chainId)) { - throw new Error(`ChainId ${chainId} is not a SushiSwap V3 chain`) - } - - return getSushiV3Pool({ chainId, ...variables }, options) -} - -export async function getSushiHistoricPool( - { chainId, ...variables }: GetSushiHistoricPool, - options?: RequestOptions, -): Promise { - const id = variables.id.toLowerCase() - - // FETCH - const v2poolF = isSushiSwapV2ChainId(chainId) - ? getSushiV2PoolBuckets( - { - chainId, - id, - }, - options, - ) - : null - const v3poolF = isSushiSwapV3ChainId(chainId) - ? getSushiV3PoolBuckets( - { - chainId, - id, - }, - options, - ) - : null - - const [v2poolS, v3poolS] = await Promise.allSettled([v2poolF, v3poolF]) - - const v2pool = isPromiseFulfilled(v2poolS) ? v2poolS.value : null - const v3pool = isPromiseFulfilled(v3poolS) ? v3poolS.value : null - - if (!v2pool && !v3pool) { - throw new Error(`Failed to fetch pool ${chainId}:${variables.id}`) - } - - const fetcher = v2pool ? fetchSushiV2Pool : fetchSushiV3Pool - - const getPoolTimeAgo = async ( - ago: Omit[0], 'chainId'>, - ) => { - return getBlockHistoric( - { - chainId, - ...ago, - }, - options, - ) - .then(async (block) => { - return fetcher( - { - chainId, - id, - block: { number: block.number }, - }, - options, - ) - }) - .catch(() => null) - } - - const pool1dP = getPoolTimeAgo({ daysAgo: 1 }) - const pool2dP = getPoolTimeAgo({ daysAgo: 2 }) - - const [pool1dS, pool2dS] = await Promise.allSettled([pool1dP, pool2dP]) - - const pool = v2pool || v3pool! - const pool1d = isPromiseFulfilled(pool1dS) ? pool1dS.value : null - const pool2d = isPromiseFulfilled(pool2dS) ? pool2dS.value : null - - // TRANSFORM - const liquidityUSD1dChange = calculateRelativePercentageChange( - pool.liquidityUSD, - pool1d?.liquidityUSD, - ) - - const volumeUSD1d = calculateValueChange(pool.volumeUSD, pool1d?.volumeUSD) - const volumeUSD1dChange = calculateCumulativePercentageChange( - pool.volumeUSD, - pool1d?.volumeUSD, - pool2d?.volumeUSD, - ) - - const feesUSD1d = calculateValueChange(pool.feesUSD, pool1d?.feesUSD) - const feesUSD1dChange = calculateCumulativePercentageChange( - pool.feesUSD, - pool1d?.feesUSD, - pool2d?.feesUSD, - ) - const txCount1d = calculateValueChange(pool.txCount, pool1d?.txCount) - const txCount1dChange = calculateCumulativePercentageChange( - pool.txCount, - pool1d?.txCount, - pool2d?.txCount, - ) - - return { - ...pool, - liquidityUSD1dChange, - volumeUSD1d, - volumeUSD1dChange, - feesUSD1d, - feesUSD1dChange, - txCount1d, - txCount1dChange, - } -} - -const calculateValueChange = ( - current: string | number | bigint | undefined, - previous: string | number | bigint | undefined, -) => { - const _current = Number(current) - const _previous = Number(previous) - - if (_current === 0 || [_current, _previous].some((num) => isNaN(num))) - return 0 - return _previous !== 0 ? _current - _previous : 0 -} - -const calculateCumulativePercentageChange = ( - current: string | number | bigint | undefined, - previous: string | number | bigint | undefined, - previous2?: string | number | bigint | undefined, -) => { - const _current = Number(current) - const _previous = Number(previous) - const _previous2 = Number(previous2) - - if ( - _current === 0 || - [_current, _previous, _previous2].some((num) => isNaN(num)) - ) - return 0 - const change1 = _previous !== 0 ? _current - _previous : 0 - const change2 = - _previous !== 0 && _previous2 !== 0 ? _previous - _previous2 : 0 - if (change2 === 0) return 0 // avoid division by 0 - return _previous !== 0 && _previous2 !== 0 ? change1 / change2 - 1 : 0 -} - -const calculateRelativePercentageChange = ( - current: string | number | bigint | undefined, - previous?: string | number | bigint | undefined, -) => { - const _current = Number(current) - const _previous = Number(previous) - - if (_current === 0 || [_current, _previous].some((num) => isNaN(num))) - return 0 - return _previous !== 0 ? _current / _previous - 1 : 0 -} diff --git a/packages/graph-client/src/composite/sushi-v2-staked-unstaked-positions.ts b/packages/graph-client/src/composite/sushi-v2-staked-unstaked-positions.ts deleted file mode 100644 index f1b1c69207..0000000000 --- a/packages/graph-client/src/composite/sushi-v2-staked-unstaked-positions.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { FetchError } from 'src/lib/fetch-error' -import type { ChainIdsVariable } from 'src/lib/types/chainId' -import type { Hex } from 'src/lib/types/hex' -import { fetchMultichain } from 'src/multichain/fetch-multichain' -import { - type GetSushiV2LiquidityPositions, - getSushiV2LiquidityPositions, -} from 'src/subgraphs/sushi-v2' -import { ChainId } from 'sushi/chain' -import { - MINICHEF_SUPPORTED_CHAIN_IDS, - SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - isMiniChefChainId, - isSushiSwapV2ChainId, -} from 'sushi/config' -import type { - PoolV2, - SushiPositionStaked, - SushiPositionWithPool, -} from 'sushi/types' -import { - type GetChefUserPositions, - getChefUserPositions, -} from './chef-user-positions' - -export type GetSushiV2StakedUnstakedPositions = { - id: Hex -} & ChainIdsVariable< - | NonNullable[number] - | GetSushiV2LiquidityPositions['chainId'] -> - -export type SushiV2StakedUnstakedPosition = SushiPositionStaked< - SushiPositionWithPool -> - -/** - * @brief Get staked AND unstaked user positions - */ -export async function getSushiV2StakedUnstakedPositions({ - chainIds = [ - ...new Set([ - ...SUSHISWAP_V2_SUPPORTED_CHAIN_IDS, - ...MINICHEF_SUPPORTED_CHAIN_IDS, - ]), - ], - id, -}: GetSushiV2StakedUnstakedPositions): Promise<{ - data: SushiV2StakedUnstakedPosition[] - errors: FetchError[] -}> { - const sushiSwapChainIds = chainIds.filter(isSushiSwapV2ChainId) - const { - data: sushiSwapV2LiquidityPositions, - errors: sushiSwapV2LiquidityPositionErrors, - } = await fetchMultichain({ - chainIds: sushiSwapChainIds, - fetch: getSushiV2LiquidityPositions, - variables: { - first: 1000, - where: { - user: id, - liquidityTokenBalance_gt: '0', - }, - }, - }) - - const chefChainIds = [ - ...chainIds.filter(isMiniChefChainId), - ...(chainIds.includes(ChainId.ETHEREUM) ? [ChainId.ETHEREUM] : []), - ] - const { data: chefUserPositions, errors: chefUserPositionErrors } = - await getChefUserPositions({ - chainIds: chefChainIds, - where: { - address: id, - amount_gt: '0', - }, - }) - - const poolIds = Array.from( - new Set([ - ...sushiSwapV2LiquidityPositions.map((position) => position.pool.id), - ...chefUserPositions.map((position) => position.pool.id), - ]), - ) - - const data = poolIds - .map((poolId) => { - const sushiSwapPosition = sushiSwapV2LiquidityPositions.find( - (position) => position.pool.id === poolId, - ) - const chefPosition = chefUserPositions.find( - (position) => position.pool.id === poolId, - ) - - const pool = sushiSwapPosition?.pool ?? chefPosition?.pool - - if (!pool) return null - - return { - user: id, - unstakedBalance: BigInt(sushiSwapPosition?.balance ?? '0'), - stakedBalance: BigInt(chefPosition?.balance ?? '0'), - pool, - } - }) - .filter((p): p is NonNullable => p !== null) - - const errors = [ - ...sushiSwapV2LiquidityPositionErrors, - ...chefUserPositionErrors, - ] - - return { data, errors } -} diff --git a/packages/graph-client/src/subgraphs/blocks/index.ts b/packages/graph-client/src/subgraphs/blocks/index.ts deleted file mode 100644 index 2b85d07c49..0000000000 --- a/packages/graph-client/src/subgraphs/blocks/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './queries/block-historic' -export * from './queries/blocks' diff --git a/packages/graph-client/src/subgraphs/blocks/queries/block-historic.ts b/packages/graph-client/src/subgraphs/blocks/queries/block-historic.ts deleted file mode 100644 index 7936a6b424..0000000000 --- a/packages/graph-client/src/subgraphs/blocks/queries/block-historic.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { RequestOptions } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { ChainId } from 'sushi/chain' -import { getBlocks } from './blocks' - -type GetBlockHistoric = { - secsAgo?: number - minsAgo?: number - hoursAgo?: number - daysAgo?: number - weeksAgo?: number - monthsAgo?: number - yearsAgo?: number -} & ChainIdVariable - -export async function getBlockHistoric( - { - chainId, - secsAgo = 0, - minsAgo = 0, - hoursAgo = 0, - daysAgo = 0, - weeksAgo = 0, - monthsAgo = 0, - yearsAgo = 0, - }: GetBlockHistoric, - options?: RequestOptions, -) { - const current = Math.floor(Date.now() / 1000) - const ago = - secsAgo + - minsAgo * 60 + - hoursAgo * 60 * 60 + - daysAgo * 60 * 60 * 24 + - weeksAgo * 60 * 60 * 24 * 7 + - monthsAgo * 60 * 60 * 24 * 30 + - yearsAgo * 60 * 60 * 24 * 365 - - const target = current - ago - - const blocks = await getBlocks( - { - chainId, - first: 1, - orderBy: 'timestamp', - orderDirection: 'asc', - where: { - timestamp_gte: String(target), - }, - }, - options, - ) - - const block = blocks[0] - - if (!block) { - throw new Error('Block not found') - } - - return { - chainId, - ...block, - } -} diff --git a/packages/graph-client/src/subgraphs/blocks/queries/blocks.ts b/packages/graph-client/src/subgraphs/blocks/queries/blocks.ts deleted file mode 100644 index 3ae82aba7c..0000000000 --- a/packages/graph-client/src/subgraphs/blocks/queries/blocks.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { VariablesOf } from 'gql.tada' - -import { FetchError } from 'src/lib/fetch-error' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { ChainId } from 'sushi/chain' -import { BLOCKS_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { graphql } from '../graphql' - -export const BlocksQuery = graphql( - ` - query Blocks($first: Int = 1000, $skip: Int = 0, $orderBy: Block_orderBy = number, $orderDirection: OrderDirection = desc, $where: Block_filter) { - blocks(first: $first, skip: $skip, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - number - timestamp - } - } -`, -) - -export type GetBlocks = VariablesOf & - ChainIdVariable - -export async function getBlocks( - { chainId, ...variables }: GetBlocks, - options?: RequestOptions, -) { - const baseUrl = BLOCKS_SUBGRAPH_URL[chainId] - - if (!baseUrl) { - throw new FetchError(chainId, `No subgraph URL for chainId ${chainId}`) - } - - const url = `https://${baseUrl}` - - const result = await request( - { url, document: BlocksQuery, variables }, - options, - ) - - return result.blocks.map((block) => ({ - id: block.id, - number: Number(block.number), - timestamp: Number(block.timestamp), - })) -} - -export type Blocks = Awaited> diff --git a/packages/graph-client/src/subgraphs/blocks/schema.graphql b/packages/graph-client/src/subgraphs/blocks/schema.graphql deleted file mode 100644 index 662dac97e1..0000000000 --- a/packages/graph-client/src/subgraphs/blocks/schema.graphql +++ /dev/null @@ -1,381 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -type Block { - id: Bytes! - number: BigInt! - timestamp: BigInt! - parentHash: String - author: String - difficulty: BigInt - totalDifficulty: BigInt - gasUsed: BigInt - gasLimit: BigInt - receiptsRoot: String - transactionsRoot: String - stateRoot: String - size: BigInt - unclesHash: String -} - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - number: BigInt - number_not: BigInt - number_gt: BigInt - number_lt: BigInt - number_gte: BigInt - number_lte: BigInt - number_in: [BigInt!] - number_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - parentHash: String - parentHash_not: String - parentHash_gt: String - parentHash_lt: String - parentHash_gte: String - parentHash_lte: String - parentHash_in: [String!] - parentHash_not_in: [String!] - parentHash_contains: String - parentHash_contains_nocase: String - parentHash_not_contains: String - parentHash_not_contains_nocase: String - parentHash_starts_with: String - parentHash_starts_with_nocase: String - parentHash_not_starts_with: String - parentHash_not_starts_with_nocase: String - parentHash_ends_with: String - parentHash_ends_with_nocase: String - parentHash_not_ends_with: String - parentHash_not_ends_with_nocase: String - author: String - author_not: String - author_gt: String - author_lt: String - author_gte: String - author_lte: String - author_in: [String!] - author_not_in: [String!] - author_contains: String - author_contains_nocase: String - author_not_contains: String - author_not_contains_nocase: String - author_starts_with: String - author_starts_with_nocase: String - author_not_starts_with: String - author_not_starts_with_nocase: String - author_ends_with: String - author_ends_with_nocase: String - author_not_ends_with: String - author_not_ends_with_nocase: String - difficulty: BigInt - difficulty_not: BigInt - difficulty_gt: BigInt - difficulty_lt: BigInt - difficulty_gte: BigInt - difficulty_lte: BigInt - difficulty_in: [BigInt!] - difficulty_not_in: [BigInt!] - totalDifficulty: BigInt - totalDifficulty_not: BigInt - totalDifficulty_gt: BigInt - totalDifficulty_lt: BigInt - totalDifficulty_gte: BigInt - totalDifficulty_lte: BigInt - totalDifficulty_in: [BigInt!] - totalDifficulty_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - gasLimit: BigInt - gasLimit_not: BigInt - gasLimit_gt: BigInt - gasLimit_lt: BigInt - gasLimit_gte: BigInt - gasLimit_lte: BigInt - gasLimit_in: [BigInt!] - gasLimit_not_in: [BigInt!] - receiptsRoot: String - receiptsRoot_not: String - receiptsRoot_gt: String - receiptsRoot_lt: String - receiptsRoot_gte: String - receiptsRoot_lte: String - receiptsRoot_in: [String!] - receiptsRoot_not_in: [String!] - receiptsRoot_contains: String - receiptsRoot_contains_nocase: String - receiptsRoot_not_contains: String - receiptsRoot_not_contains_nocase: String - receiptsRoot_starts_with: String - receiptsRoot_starts_with_nocase: String - receiptsRoot_not_starts_with: String - receiptsRoot_not_starts_with_nocase: String - receiptsRoot_ends_with: String - receiptsRoot_ends_with_nocase: String - receiptsRoot_not_ends_with: String - receiptsRoot_not_ends_with_nocase: String - transactionsRoot: String - transactionsRoot_not: String - transactionsRoot_gt: String - transactionsRoot_lt: String - transactionsRoot_gte: String - transactionsRoot_lte: String - transactionsRoot_in: [String!] - transactionsRoot_not_in: [String!] - transactionsRoot_contains: String - transactionsRoot_contains_nocase: String - transactionsRoot_not_contains: String - transactionsRoot_not_contains_nocase: String - transactionsRoot_starts_with: String - transactionsRoot_starts_with_nocase: String - transactionsRoot_not_starts_with: String - transactionsRoot_not_starts_with_nocase: String - transactionsRoot_ends_with: String - transactionsRoot_ends_with_nocase: String - transactionsRoot_not_ends_with: String - transactionsRoot_not_ends_with_nocase: String - stateRoot: String - stateRoot_not: String - stateRoot_gt: String - stateRoot_lt: String - stateRoot_gte: String - stateRoot_lte: String - stateRoot_in: [String!] - stateRoot_not_in: [String!] - stateRoot_contains: String - stateRoot_contains_nocase: String - stateRoot_not_contains: String - stateRoot_not_contains_nocase: String - stateRoot_starts_with: String - stateRoot_starts_with_nocase: String - stateRoot_not_starts_with: String - stateRoot_not_starts_with_nocase: String - stateRoot_ends_with: String - stateRoot_ends_with_nocase: String - stateRoot_not_ends_with: String - stateRoot_not_ends_with_nocase: String - size: BigInt - size_not: BigInt - size_gt: BigInt - size_lt: BigInt - size_gte: BigInt - size_lte: BigInt - size_in: [BigInt!] - size_not_in: [BigInt!] - unclesHash: String - unclesHash_not: String - unclesHash_gt: String - unclesHash_lt: String - unclesHash_gte: String - unclesHash_lte: String - unclesHash_in: [String!] - unclesHash_not_in: [String!] - unclesHash_contains: String - unclesHash_contains_nocase: String - unclesHash_not_contains: String - unclesHash_not_contains_nocase: String - unclesHash_starts_with: String - unclesHash_starts_with_nocase: String - unclesHash_not_starts_with: String - unclesHash_not_starts_with_nocase: String - unclesHash_ends_with: String - unclesHash_ends_with_nocase: String - unclesHash_not_ends_with: String - unclesHash_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Block_filter] - or: [Block_filter] -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -enum Block_orderBy { - id - number - timestamp - parentHash - author - difficulty - totalDifficulty - gasUsed - gasLimit - receiptsRoot - transactionsRoot - stateRoot - size - unclesHash -} - -scalar Bytes - -"8 bytes signed integer\n" -scalar Int8 - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Query { - block( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Block - blocks( - skip: Int = 0 - first: Int = 100 - orderBy: Block_orderBy - orderDirection: OrderDirection - where: Block_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Block!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Subscription { - block( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Block - blocks( - skip: Int = 0 - first: Int = 100 - orderBy: Block_orderBy - orderDirection: OrderDirection - where: Block_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Block!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/blocks/graphql.ts b/packages/graph-client/src/subgraphs/data-api/graphql.ts similarity index 78% rename from packages/graph-client/src/subgraphs/blocks/graphql.ts rename to packages/graph-client/src/subgraphs/data-api/graphql.ts index f6de3c9c20..15e7e1e7da 100644 --- a/packages/graph-client/src/subgraphs/blocks/graphql.ts +++ b/packages/graph-client/src/subgraphs/data-api/graphql.ts @@ -1,6 +1,6 @@ import { initGraphQLTada } from 'gql.tada' import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './blocks-env.js' +import type { introspection } from './data-api-env.js' export const graphql = initGraphQLTada<{ introspection: introspection diff --git a/packages/graph-client/src/subgraphs/data-api/index.ts b/packages/graph-client/src/subgraphs/data-api/index.ts new file mode 100644 index 0000000000..1eedbd4efc --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/index.ts @@ -0,0 +1,2 @@ +export * from './queries' +export * from './request-headers' \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/data-api/queries/analytics/day-buckets.ts b/packages/graph-client/src/subgraphs/data-api/queries/analytics/day-buckets.ts new file mode 100644 index 0000000000..3c40add228 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/analytics/day-buckets.ts @@ -0,0 +1,63 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { graphql } from '../../graphql' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const AnalyticsDayBucketsQuery = graphql( + ` + query SushiDayBuckets($chainId: Int!) { + sushiDayBuckets(chainId: $chainId) { + v2 { + id + date + volumeUSD + liquidityUSD + + } + v3 { + id + date + volumeUSD + liquidityUSD + } + } +} +`, +) + +export type GetAnalyticsDayBuckets = VariablesOf< + typeof AnalyticsDayBucketsQuery +> + +export async function getAnalyticsDayBuckets( + variables: GetAnalyticsDayBuckets, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + try { + const result = await request( + { + url, + document: AnalyticsDayBucketsQuery, + variables, + requestHeaders: SUSHI_REQUEST_HEADERS, + }, + options, + ) + if (result) { + return result.sushiDayBuckets + } + } catch { + // TODO: handle error, probably return {data, error}? or message + } + return { + v2: [], + v3: [], + } +} + +export type AnalyticsDayBuckets = Awaited< + ReturnType +> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/analytics/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/analytics/index.ts new file mode 100644 index 0000000000..e41e558d80 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/analytics/index.ts @@ -0,0 +1,2 @@ +export * from './day-buckets' + diff --git a/packages/graph-client/src/subgraphs/data-api/queries/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/index.ts new file mode 100644 index 0000000000..c25c393560 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/index.ts @@ -0,0 +1,7 @@ +export * from './analytics' +export * from './pool' +export * from './portfolio' +export * from './smart-pool' +export * from './sushi-bar' +export * from './v2' +export * from './v3' diff --git a/packages/graph-client/src/subgraphs/data-api/queries/pool/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/pool/index.ts new file mode 100644 index 0000000000..4786a074fc --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/pool/index.ts @@ -0,0 +1,4 @@ +export * from './top-evm-pools' +export * from './top-non-evm-pools' +export * from './v2-pool' +export * from './v3-pool' \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/data-api/queries/pool/top-evm-pools.ts b/packages/graph-client/src/subgraphs/data-api/queries/pool/top-evm-pools.ts new file mode 100644 index 0000000000..c291aeae93 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/pool/top-evm-pools.ts @@ -0,0 +1,79 @@ +import type { VariablesOf } from 'gql.tada' +import { type RequestOptions, request } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' +import { ChainId, isChainId } from 'sushi' + +export const PoolsQuery = graphql( + ` + query TopPools($chainId: String!) { + topPools(chainId: $chainId) { + id + chainId + name + address + createdAt + swapFee + protocol + token0Price + token1Price + token0Address + token1Address + token0PriceUSD + token1PriceUSD + liquidityUSD + txCount1h + txCount1d + feeUSD1h + feeUSD1d + volumeUSD1h + volumeUSD1d + feeApr1d + totalApr1d + incentiveApr + isSmartPool + isIncentivized + wasIncentivized + source + } + } +`, +) + +export type GetPools = VariablesOf + +export async function getTopPools( + variables: GetPools, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + try { + if (!isChainId(parseInt(variables.chainId))) { + throw new Error(`Invalid chainId: ${variables.chainId}, this only supports evm networks and must be a number.`) + } + const chainId = parseInt(variables.chainId) as ChainId + const result = await request( + { + url, + document: PoolsQuery, + variables, + requestHeaders: SUSHI_REQUEST_HEADERS, + }, + options, + ) + if (result) { + return ( + result.topPools.map((p) => ({ + ...p, + chainId, + })) ?? [] + ) + } + } catch (error) { + console.error('getTopPools error', error) + } + return [] +} + +export type TopPools = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/pool/top-non-evm-pools.ts b/packages/graph-client/src/subgraphs/data-api/queries/pool/top-non-evm-pools.ts new file mode 100644 index 0000000000..060375c871 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/pool/top-non-evm-pools.ts @@ -0,0 +1,69 @@ +import type { VariablesOf } from 'gql.tada' +import { type RequestOptions, request } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const TopNonEvmPoolsQuery = graphql( + ` + query TopPools($chainId: String!) { + topPools(chainId: $chainId) { + id + chainId + name + address + createdAt + swapFee + protocol + token0Price + token1Price + token0Address + token1Address + token0PriceUSD + token1PriceUSD + liquidityUSD + txCount1h + txCount1d + feeUSD1h + feeUSD1d + volumeUSD1h + volumeUSD1d + feeApr1d + totalApr1d + incentiveApr + isSmartPool + isIncentivized + wasIncentivized + source + } + } +`, +) + +export type GetNonEvmPools = VariablesOf + +export async function getTopNonEvmPools( + variables: GetNonEvmPools, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + try { + const result = await request( + { + url, + document: TopNonEvmPoolsQuery, + variables, + requestHeaders: SUSHI_REQUEST_HEADERS, + }, + options, + ) + if (result) { + return result.topPools ?? [] + } + } catch (error) { + console.error('getTopPools error', error) + } + return [] +} + +export type TopNonEvmPools = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/pool/v2-pool.ts b/packages/graph-client/src/subgraphs/data-api/queries/pool/v2-pool.ts new file mode 100644 index 0000000000..977dc91308 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/pool/v2-pool.ts @@ -0,0 +1,191 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { + ChainId, + ChefType, + RewarderType, + SushiSwapProtocol, + type PoolBase, + type PoolHistory1D, + type PoolV2, + type PoolWithAprs, + type PoolWithIncentives, +} from 'sushi' +import { isSushiSwapV2ChainId } from 'sushi/config' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import type { Address } from 'viem' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const V2PoolQuery = graphql( + ` + query V2Pool($address: String!, $chainId: Int!) { + v2Pool(address: $address, chainId: $chainId) { + id + chainId + name + address + createdAt + swapFee + protocol + token0 { + id + address + name + symbol + decimals + } + token1 { + id + address + name + symbol + decimals + } + source + reserve0 + reserve1 + liquidity + volumeUSD + liquidityUSD + token0Price + token1Price + volumeUSD1d + feeUSD1d + txCount1d + feeApr1d + totalApr1d + volumeUSD1dChange + feeUSD1dChange + txCount1dChange + liquidityUSD1dChange + incentiveApr + isIncentivized + wasIncentivized + incentives { + id + chainId + chefType + apr + rewardToken { + id + address + name + symbol + decimals + } + rewardPerDay + poolAddress + pid + rewarderAddress + rewarderType + } + } + } +`, +) + +export type GetV2Pool = VariablesOf + +export async function getV2Pool( + variables: GetV2Pool, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = Number(variables.chainId) as ChainId + + if (!isSushiSwapV2ChainId(chainId)) { + throw new Error('Invalid chainId') + } + try { + const result = await request( + { + url, + document: V2PoolQuery, + variables, + requestHeaders: SUSHI_REQUEST_HEADERS, + }, + options, + ) + if (result.v2Pool) { + const pool = result.v2Pool + return { + id: pool.id as `${string}:0x${string}`, + address: pool.address as Address, + chainId, + name: `${pool.token0.symbol}-${pool.token1.symbol}`, + swapFee: pool.swapFee, + protocol: SushiSwapProtocol.SUSHISWAP_V2, + reserve0: BigInt(pool.reserve0), + reserve1: BigInt(pool.reserve1), + liquidity: BigInt(pool.liquidity), + liquidityUSD: pool.liquidityUSD, + + volumeUSD: pool.volumeUSD, + feesUSD: pool.volumeUSD * pool.swapFee, + + token0: { + id: pool.token0.id as `${string}:0x${string}`, + address: pool.token0.address as Address, + chainId, + decimals: pool.token0.decimals, + name: pool.token0.name, + symbol: pool.token0.symbol, + }, + token1: { + id: pool.token1.id as `${string}:0x${string}`, + address: pool.token1.address as Address, + chainId, + decimals: pool.token1.decimals, + name: pool.token1.name, + symbol: pool.token1.symbol, + }, + token0Price: pool.token0Price, + token1Price: pool.token1Price, + txCount: pool.txCount1d, + + volumeUSD1d: pool.volumeUSD1d, + feesUSD1d: pool.feeUSD1d, + txCount1d: pool.txCount1d, + liquidityUSD1dChange: pool.liquidityUSD1dChange, + volumeUSD1dChange: pool.volumeUSD1dChange, + feesUSD1dChange: pool.feeUSD1dChange, + txCount1dChange: pool.txCount1dChange, + + feeApr1d: pool.feeApr1d, + totalApr1d: pool.totalApr1d, + incentiveApr: pool.incentiveApr, + isIncentivized: pool.isIncentivized, + wasIncentivized: pool.wasIncentivized, + + incentives: pool.incentives.map((incentive) => ({ + id: incentive.id as `${string}:0x${string}`, + chainId, + chefType: incentive.chefType as ChefType, + apr: incentive.apr, + rewardToken: { + id: incentive.rewardToken.id as `${string}:0x${string}`, + address: incentive.rewardToken.address as Address, + chainId, + decimals: incentive.rewardToken.decimals, + name: incentive.rewardToken.name, + symbol: incentive.rewardToken.symbol, + }, + rewardPerDay: incentive.rewardPerDay, + poolAddress: incentive.poolAddress as Address, + pid: incentive.pid, + rewarderAddress: incentive.rewarderAddress as Address, + rewarderType: incentive.rewarderType as RewarderType, + })), + } satisfies PoolWithAprs< + PoolWithIncentives>> + > + } + } catch (error) { + console.error('getV2Pool error', error) + } + return null +} + +export type V2Pool = NonNullable>> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/pool/v3-pool.ts b/packages/graph-client/src/subgraphs/data-api/queries/pool/v3-pool.ts new file mode 100644 index 0000000000..e3c2f1491a --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/pool/v3-pool.ts @@ -0,0 +1,211 @@ +import type { VariablesOf } from 'gql.tada' + +import type { PoolHasSteerVaults } from '@sushiswap/steer-sdk' +import { request, type RequestOptions } from 'src/lib/request' +import { + ChainId, + ChefType, + RewarderType, + SushiSwapProtocol, + type PoolBase, + type PoolHistory1D, + type PoolV3, + type PoolWithAprs, + type PoolWithIncentives, +} from 'sushi' +import { isSushiSwapV3ChainId } from 'sushi/config' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import type { Address } from 'viem' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const V3PoolQuery = graphql( + ` + query V3Pool($address: String!, $chainId: Int!) { + v3Pool(address: $address, chainId: $chainId) { + id + chainId + name + address + createdAt + swapFee + protocol + token0 { + id + address + name + symbol + decimals + } + token1 { + id + address + name + symbol + decimals + } + source + reserve0 + reserve1 + liquidity + sqrtPrice + tick + observationIndex + feeGrowthGlobal0X128 + feeGrowthGlobal1X128 + volumeUSD + liquidityUSD + token0Price + token1Price + volumeUSD1d + feeUSD1d + txCount1d + feeApr1d + totalApr1d + volumeUSD1dChange + feeUSD1dChange + txCount1dChange + liquidityUSD1dChange + incentiveApr + hadSmartPool + hasSmartPool + isIncentivized + wasIncentivized + incentives { + id + chainId + chefType + apr + rewardToken { + id + address + name + symbol + decimals + } + rewardPerDay + poolAddress + pid + rewarderAddress + rewarderType + } + vaults + } + } +`, +) + +export type GetV3Pool = VariablesOf + +export async function getV3Pool( + variables: GetV3Pool, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = Number(variables.chainId) as ChainId + + if (!isSushiSwapV3ChainId(chainId)) { + throw new Error('Invalid chainId') + } + try { + const result = await request( + { + url, + document: V3PoolQuery, + variables, + requestHeaders: SUSHI_REQUEST_HEADERS, + }, + options, + ) + if (result.v3Pool) { + const incentives = result.v3Pool.incentives.filter((i) => i !== null) + const pool = result.v3Pool + return { + id: pool.id as `${string}:0x${string}`, + address: pool.address as Address, + chainId, + name: `${pool.token0.symbol}-${pool.token1.symbol}`, + swapFee: pool.swapFee, + protocol: SushiSwapProtocol.SUSHISWAP_V3, + reserve0: BigInt(pool.reserve0), + reserve1: BigInt(pool.reserve1), + liquidity: BigInt(pool.liquidity), + + sqrtPrice: BigInt(pool.sqrtPrice), + tick: BigInt(pool.tick), + observationIndex: BigInt(pool.observationIndex), + feeGrowthGlobal0X128: BigInt(pool.feeGrowthGlobal0X128), + feeGrowthGlobal1X128: BigInt(pool.feeGrowthGlobal1X128), + + liquidityUSD: pool.liquidityUSD, + volumeUSD: pool.volumeUSD, + feesUSD: pool.volumeUSD * pool.swapFee, + + token0: { + id: pool.token0.id as `${string}:0x${string}`, + address: pool.token0.address as Address, + chainId, + decimals: pool.token0.decimals, + name: pool.token0.name, + symbol: pool.token0.symbol, + }, + token1: { + id: pool.token1.id as `${string}:0x${string}`, + address: pool.token1.address as Address, + chainId, + decimals: pool.token1.decimals, + name: pool.token1.name, + symbol: pool.token1.symbol, + }, + token0Price: pool.token0Price, + token1Price: pool.token1Price, + txCount: pool.txCount1d, + + volumeUSD1d: pool.volumeUSD1d, + feesUSD1d: pool.feeUSD1d, + txCount1d: pool.txCount1d, + liquidityUSD1dChange: pool.liquidityUSD1dChange, + volumeUSD1dChange: pool.volumeUSD1dChange, + feesUSD1dChange: pool.feeUSD1dChange, + txCount1dChange: pool.txCount1dChange, + + feeApr1d: pool.feeApr1d, + totalApr1d: pool.totalApr1d, + incentiveApr: pool.incentiveApr, + isIncentivized: pool.isIncentivized, + wasIncentivized: pool.wasIncentivized, + hasEnabledSteerVault: pool.hasSmartPool, + hadEnabledSteerVault: pool.hadSmartPool, + + incentives: incentives.map((incentive) => ({ + id: incentive.id as `${string}:0x${string}`, + chainId, + chefType: incentive.chefType as ChefType, + apr: incentive.apr, + rewardToken: { + id: incentive.rewardToken.id as `${string}:0x${string}`, + address: incentive.rewardToken.address as Address, + chainId, + decimals: incentive.rewardToken.decimals, + name: incentive.rewardToken.name, + symbol: incentive.rewardToken.symbol, + }, + rewardPerDay: incentive.rewardPerDay, + poolAddress: incentive.poolAddress as Address, + pid: incentive.pid, + rewarderAddress: incentive.rewarderAddress as Address, + rewarderType: incentive.rewarderType as RewarderType, + })), + } satisfies PoolHasSteerVaults< + PoolWithAprs>>> + > + } + } catch (error) { + console.error('getV3Pool error', error) + } + return null +} + +export type MaybeV3Pool = Awaited> + +export type V3Pool = NonNullable>> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/portfolio/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/index.ts new file mode 100644 index 0000000000..8ffc4a18b1 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/index.ts @@ -0,0 +1,5 @@ +export * from './portfolio-history' +export * from './portfolio-positions' +export * from './portfolio-wallet' +export * from './portfolio-claimables' + diff --git a/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-claimables.ts b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-claimables.ts new file mode 100644 index 0000000000..1536041d9c --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-claimables.ts @@ -0,0 +1,235 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const PortfolioClaimablesQuery = graphql( + ` + query PortfolioClaimables($id: ID!) { + portfolioClaimables(id: $id) { + totalUSD + v2PositionClaimables { + position { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + address + name + swapFee + token0 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + token1 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + amountUSD + updatedAt + } + token { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + } + v3PositionClaimables { + position { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + address + name + swapFee + positionId + range + fees { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + amountUSD + updatedAt + } + token { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + } + smartPositionClaimables { + token { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + position { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + address + name + vaultAddress + swapFee + strategy + amountUSD + updatedAt + } + } + furoClaimables { + position { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + address + name + positionId + updatedAt + } + token { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + } + } + } +`, +) + +export type GetPortfolioClaimables = VariablesOf< + typeof PortfolioClaimablesQuery +> + +export async function getPortfolioClaimables( + variables: GetPortfolioClaimables, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: PortfolioClaimablesQuery, variables }, + options, + ) + if (result) { + return result.portfolioClaimables + } + + throw new Error('No portfolio positions') +} + +export type PortfolioClaimables = Awaited< + ReturnType +> + +export type PortfolioV2Claim = PortfolioClaimables['v2PositionClaimables'][0] +export type PortfolioV3Claim = PortfolioClaimables['v3PositionClaimables'][0] +export type PortfolioSmartPositionClaim = + PortfolioClaimables['smartPositionClaimables'][0] +export type PortfolioFuroClaim = PortfolioClaimables['furoClaimables'][0] + +export type PortfolioFarmClaim = + | PortfolioV2Claim + | PortfolioV3Claim + | PortfolioSmartPositionClaim + +export type PortfolioClaim = PortfolioFarmClaim | PortfolioFuroClaim diff --git a/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-history.ts b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-history.ts new file mode 100644 index 0000000000..dbcb7f49ea --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-history.ts @@ -0,0 +1,83 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const PortfolioHistoryQuery = graphql( + ` +query PortfolioHistory($id: ID!) { + portfolioHistory(id: $id) { + category + approve { + amount + id + isCore + isScam + isSuspicious + isVerified + logoUrl + name + symbol + type + } + chain + chainId + functionName + gasFeeNative + gasFeeUSD + projectName + protocolLogo + receives { + amount + id + isCore + isScam + isSuspicious + isVerified + logoUrl + name + symbol + type + } + sends { + amount + id + isCore + isScam + isSuspicious + isVerified + logoUrl + name + symbol + type + } + timestamp + txHash + } +} +`, +) + +export type GetPortfolioHistory = VariablesOf + +export async function getPortfolioHistory( + variables: GetPortfolioHistory, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: PortfolioHistoryQuery, variables }, + options, + ) + if (result) { + return result.portfolioHistory + } + + throw new Error('No portfolio history') +} + +export type PortfolioHistory = Awaited> + +export type PortfolioTransaction = PortfolioHistory[0] diff --git a/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-positions.ts b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-positions.ts new file mode 100644 index 0000000000..3cd0e7e82c --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-positions.ts @@ -0,0 +1,211 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const PortfolioPositionsQuery = graphql( + ` +query PortfolioPositions($id: ID!) { + portfolioLiquidityPositions(id: $id) { + totalUSD + v2Positions { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + address + name + swapFee + token0 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + token1 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + amountUSD + updatedAt + } + v3Positions { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + address + name + + token0 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + token1 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + swapFee + positionId + range + fees { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + amountUSD + updatedAt + } + smartPositions { + id + chainId + chain + protocol + protocolId + protocolLogoUrl + + token0 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + token1 { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + isVerified + isCore + isWallet + timeAt + amount + amountUSD + } + address + name + vaultAddress + swapFee + strategy + amountUSD + updatedAt + } + } +} +`, +) + +export type GetPortfolioPositions = VariablesOf + +export async function getPortfolioPositions( + variables: GetPortfolioPositions, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: PortfolioPositionsQuery, variables }, + options, + ) + if (result) { + return result.portfolioLiquidityPositions + } + + throw new Error('No portfolio positions') +} + +export type PortfolioPositions = Awaited< + ReturnType +> + +export type PortfolioV2Position = PortfolioPositions['v2Positions'][0] +export type PortfolioV3Position = PortfolioPositions['v3Positions'][0] +export type PortfolioSmartPosition = PortfolioPositions['smartPositions'][0] + +export type PortfolioPosition = + | PortfolioV2Position + | PortfolioV3Position + | PortfolioSmartPosition diff --git a/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-wallet.ts b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-wallet.ts new file mode 100644 index 0000000000..3d7f87d580 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/portfolio/portfolio-wallet.ts @@ -0,0 +1,58 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const PortfolioWalletQuery = graphql( + ` + query PortfolioWallet($id: ID!) { + portfolioWallet(id: $id) { + totalUSD + amountUSD24Change + percentageChange24h + tokens { + id + chain + chainId + name + symbol + decimals + logoUrl + protocolId + price + price24hChange + isVerified + isCore + isWallet + timeAt + amount + rawAmount + amountUSD + } + } + } +`, +) + +export type GetPortfolioWallet = VariablesOf + +export async function getPortfolioWallet( + variables: GetPortfolioWallet, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: PortfolioWalletQuery, variables }, + options, + ) + if (result) { + return result.portfolioWallet + } + + throw new Error('No portfolio wallet') +} + +export type PortfolioWallet = Awaited> +export type PortfolioWalletToken = PortfolioWallet['tokens'][0] diff --git a/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/index.ts new file mode 100644 index 0000000000..fecb863099 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/index.ts @@ -0,0 +1,3 @@ +export * from './smart-pools' +export * from './vault' +export * from './vaults' diff --git a/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/smart-pools.ts b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/smart-pools.ts new file mode 100644 index 0000000000..e52ba89656 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/smart-pools.ts @@ -0,0 +1,100 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import type { ChainId } from 'sushi' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import type { Address } from 'viem' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const SmartPoolsQuery = graphql( + ` + query SmartPools($chainId: Int!) { + smartPools(chainId: $chainId) { + id + address + chainId + poolAddress + address + swapFee + strategy + description + protocol + token0 { + id + chainId + address + name + symbol + decimals + } + token1 { + id + chainId + address + name + symbol + decimals + } + liquidityUSD + vaultLiquidityUSD + feeUSD1d + feeApr1d + feeAndIncentiveApr1d + stakedApr1d + stakedAndIncentiveApr1d + incentiveApr + wasIncentivized + isIncentivized + + isEnabled + wasEnabled + isDeprecated + } + } +`, +) + +export type GetSmartPools = VariablesOf + +export async function getSmartPools( + variables: GetSmartPools, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SmartPoolsQuery, variables, requestHeaders: SUSHI_REQUEST_HEADERS }, + options, + ) + + if (result) { + return result.smartPools + .map((pool) => ({ + ...pool, + chainId: pool.chainId as ChainId, + id: pool.id as `${string}:0x${string}`, + strategy: pool.strategy, + token0: { + id: pool.token0.id as `${string}:0x${string}`, + address: pool.token0.address as Address, + chainId: pool.token0.chainId as ChainId, + decimals: pool.token0.decimals, + name: pool.token0.name, + symbol: pool.token0.symbol, + }, + token1: { + id: pool.token1.id as `${string}:0x${string}`, + address: pool.token1.address as Address, + chainId: pool.token1.chainId as ChainId, + decimals: pool.token1.decimals, + name: pool.token1.name, + symbol: pool.token1.symbol, + }, + })) + } + + throw new Error('No smart pools found') +} + +export type SmartPoolsV1 = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/vault.ts b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/vault.ts new file mode 100644 index 0000000000..77efa1bbfe --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/vault.ts @@ -0,0 +1,109 @@ +import type { SteerChainId } from '@sushiswap/steer-sdk' +import type { VariablesOf } from 'gql.tada' +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import type { Address } from 'viem' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const VaultQuery = graphql( + ` + query Vault($chainId: Int!, $vaultAddress: String!) { + vault(chainId: $chainId, vaultAddress: $vaultAddress) { + id + address + chainId + poolAddress + feeTier + performanceFee + token0 { + id + address + name + symbol + decimals + } + token1 { + id + address + name + symbol + decimals + } + adjustmentFrequency + lastAdjustmentTimestamp + strategy + description + payloadHash + lowerTick + upperTick + apr + apr1d + apr1w + reserve0 + reserve0USD + fees0 + fees0USD + reserve1 + reserve1USD + fees1 + fees1USD + reserveUSD + feesUSD + feeApr1d + feeAndIncentiveApr1d + stakedApr1d + stakedAndIncentiveApr1d + incentiveApr + wasIncentivized + isIncentivized + isEnabled + wasEnabled + isDeprecated + } + } +`, +) + +export type GetVault = VariablesOf + +export async function getVault(variables: GetVault, options?: RequestOptions) { + const url = `https://${SUSHI_DATA_API_HOST}` + try { + const result = await request( + { url, document: VaultQuery, variables, requestHeaders: SUSHI_REQUEST_HEADERS }, + options, + ) + if (result) { + const vault = result.vault + return { + ...vault, + chainId: vault.chainId as SteerChainId, + id: vault.id as `${string}:0x${string}`, + address: vault.address as Address, + reserve0: BigInt(vault.reserve0), + reserve1: BigInt(vault.reserve1), + fees0: BigInt(vault.fees0), + fees1: BigInt(vault.fees1), + token0: { + ...vault.token0, + id: `${vault.chainId}:${vault.token0.address}` as `${string}:0x${string}`, + address: vault.token0.address as Address, + chainId: vault.chainId as SteerChainId, + }, + token1: { + ...vault.token1, + id: `${vault.chainId}:${vault.token1.address}` as `${string}:0x${string}`, + address: vault.token1.address as Address, + chainId: vault.chainId as SteerChainId, + }, + } + } + + throw new Error('No vault found') + } catch { + return null + } +} + +export type VaultV1 = NonNullable>> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/vaults.ts b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/vaults.ts new file mode 100644 index 0000000000..af57dddb34 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/smart-pool/vaults.ts @@ -0,0 +1,111 @@ +import type { SteerChainId } from '@sushiswap/steer-sdk' +import type { VariablesOf } from 'gql.tada' +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import type { Address } from 'viem' +import { graphql } from '../../graphql' +import type { VaultV1 } from './vault' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const VaultsQuery = graphql( + ` + query Vaults($chainId: Int!, $poolAddress: String!) { + vaults(chainId: $chainId, poolAddress: $poolAddress) { + id + address + chainId + poolAddress + feeTier + performanceFee + token0 { + id + address + name + symbol + decimals + } + token1 { + id + address + name + symbol + decimals + } + adjustmentFrequency + lastAdjustmentTimestamp + strategy + description + payloadHash + lowerTick + upperTick + apr + apr1d + apr1w + reserve0 + reserve0USD + fees0 + fees0USD + reserve1 + reserve1USD + fees1 + fees1USD + reserveUSD + feesUSD + feeApr1d + feeAndIncentiveApr1d + stakedApr1d + stakedAndIncentiveApr1d + incentiveApr + wasIncentivized + isIncentivized + isEnabled + wasEnabled + isDeprecated + } + } +`, +) + +export type GetVaults = VariablesOf + +export async function getVaults( + variables: GetVaults, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: VaultsQuery, variables, requestHeaders: SUSHI_REQUEST_HEADERS }, + options, + ) + if (result.vaults) { + const vaults = result.vaults.map((v) => { + return { + ...v, + chainId: v.chainId as SteerChainId, + id: v.id as `${string}:0x${string}`, + address: v.address as Address, + reserve0: BigInt(v.reserve0), + reserve1: BigInt(v.reserve1), + fees0: BigInt(v.fees0), + fees1: BigInt(v.fees1), + token0: { + ...v.token0, + id: `${v.chainId}:${v.token0.address}` as `${string}:0x${string}`, + address: v.token0.address as Address, + chainId: v.chainId as SteerChainId, + }, + token1: { + ...v.token1, + id: `${v.chainId}:${v.token1.address}` as `${string}:0x${string}`, + address: v.token1.address as Address, + chainId: v.chainId as SteerChainId, + }, + } satisfies VaultV1 + }) + + return vaults.filter((v) => v !== null) as VaultV1[] + } + + throw new Error('No smart pool found') +} diff --git a/packages/graph-client/src/subgraphs/sushi-bar/queries/bar-history.ts b/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/history.ts similarity index 50% rename from packages/graph-client/src/subgraphs/sushi-bar/queries/bar-history.ts rename to packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/history.ts index a506812b2d..4e9b593dc9 100644 --- a/packages/graph-client/src/subgraphs/sushi-bar/queries/bar-history.ts +++ b/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/history.ts @@ -1,13 +1,15 @@ import type { VariablesOf } from 'gql.tada' -import { type RequestOptions, request } from 'src/lib/request' -import { SUSHI_BAR_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { graphql } from '../graphql' +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' -export const SushiBarHistoryQuery = graphql( +export const SushiBarHistory = graphql( ` - query Bar($hourCnt: Int = 24, $dayCnt: Int = 7, $weekCnt: Int = 1000) { - hourSnapshots(first: $hourCnt, orderBy: date, orderDirection: desc) { + query SushiBarHistory { + sushiBarHistory { + hourSnapshots { id date xSushiSupply @@ -16,7 +18,7 @@ export const SushiBarHistoryQuery = graphql( apr6m apr12m } - daySnapshots(first: $dayCnt, orderBy: date, orderDirection: desc) { + daySnapshots { id date xSushiSupply @@ -25,7 +27,7 @@ export const SushiBarHistoryQuery = graphql( apr6m apr12m } - weekSnapshots(first: $weekCnt, orderBy: date, orderDirection: desc) { + weekSnapshots { id date xSushiSupply @@ -35,23 +37,27 @@ export const SushiBarHistoryQuery = graphql( apr12m } } +} `, ) -export type GetSushiBarHistory = VariablesOf +export type GetSushiBarHistory = VariablesOf export async function getSushiBarHistory( variables: GetSushiBarHistory, options?: RequestOptions, ) { - const url = `https://${SUSHI_BAR_SUBGRAPH_URL}` + const url = `https://${SUSHI_DATA_API_HOST}` const result = await request( - { url, document: SushiBarHistoryQuery, variables }, + { url, document: SushiBarHistory, variables, requestHeaders: SUSHI_REQUEST_HEADERS }, options, ) + if (result) { + return result.sushiBarHistory + } - return result + throw new Error('No sushi bar history found') } export type SushiBarHistory = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/index.ts new file mode 100644 index 0000000000..fd24a12d89 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/index.ts @@ -0,0 +1,2 @@ +export * from './history' +export * from './stats' \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/stats.ts b/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/stats.ts new file mode 100644 index 0000000000..eddd09de3d --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/sushi-bar/stats.ts @@ -0,0 +1,46 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const SushiBarStats = graphql( + ` +query SushiBarStats { + sushiBarStats { + id + sushiXsushiRatio + xSushiSushiRatio + sushiSupply + xSushiSupply + apr1m + apr3m + apr6m + apr12m + } +} + +`, +) + +export type GetSushiBarStats = VariablesOf + +export async function getSushiBarStats( + variables: GetSushiBarStats, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiBarStats, variables, requestHeaders: SUSHI_REQUEST_HEADERS }, + options, + ) + if (result) { + return result.sushiBarStats + } + + throw new Error('No sushi bar stats found') +} + +export type SushiBarStats = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v2/buckets.ts b/packages/graph-client/src/subgraphs/data-api/queries/v2/buckets.ts new file mode 100644 index 0000000000..186ff566cc --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v2/buckets.ts @@ -0,0 +1,66 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { ChainId } from 'sushi' +import { isSushiSwapV2ChainId } from 'sushi/config' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const V2PoolBucketsQuery = graphql( + ` +query V2PoolBuckets($address: String!, $chainId: Int!) { + v2PoolBuckets(address: $address, chainId: $chainId) { + hourBuckets { + id + date + volumeUSD + liquidityUSD + txCount + feesUSD + } + dayBuckets { + id + date + volumeUSD + liquidityUSD + txCount + feesUSD + } + } +} +`, +) + +export type GetV2PoolBuckets = VariablesOf + +export async function getV2PoolBuckets( + variables: GetV2PoolBuckets, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = Number(variables.chainId) as ChainId + + if (!isSushiSwapV2ChainId(chainId)) { + throw new Error('Invalid chainId') + } + try { + const result = await request( + { url, document: V2PoolBucketsQuery, variables }, + options, + ) + if (result.v2PoolBuckets) { + return { + hourBuckets: result.v2PoolBuckets.hourBuckets.filter((b) => b !== null), + dayBuckets: result.v2PoolBuckets.dayBuckets.filter((b) => b !== null), + } + } + throw new Error('Invalid response') + } catch { + return { + hourBuckets: [], + dayBuckets: [], + } + } +} + +export type V2PoolBuckets = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v2/burns.ts b/packages/graph-client/src/subgraphs/data-api/queries/v2/burns.ts new file mode 100644 index 0000000000..26e12178cf --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v2/burns.ts @@ -0,0 +1,46 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV2BurnsQuery = graphql(` +query V2Burns($address: String!, $chainId: Int!) { + v2Burns(address: $address, chainId: $chainId) { + id + logIndex + amountUSD + amount1 + amount0 + liquidity + sender + transaction { + createdAtBlock + createdAtTimestamp + id + } + } +} +`) + +export type GetSushiV2Burns = VariablesOf + +export async function getSushiV2Burns( + { ...variables }: GetSushiV2Burns, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV2BurnsQuery, variables }, + options, + ) + + if (result) { + return result.v2Burns + } + + throw new Error(`Failed to fetch burns for ${variables.chainId}`) +} + +export type SushiV2Burns = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v2/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/v2/index.ts new file mode 100644 index 0000000000..50f015cfd6 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v2/index.ts @@ -0,0 +1,5 @@ +export * from './buckets' +export * from './burns' +export * from './mints' +export * from './positions' +export * from './swaps' diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v2/mints.ts b/packages/graph-client/src/subgraphs/data-api/queries/v2/mints.ts new file mode 100644 index 0000000000..d3e6b6cbf9 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v2/mints.ts @@ -0,0 +1,46 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV2MintsQuery = graphql(` +query V2Mints($address: String!, $chainId: Int!) { + v2Mints(address: $address, chainId: $chainId) { + id + logIndex + amountUSD + amount1 + amount0 + liquidity + sender + transaction { + createdAtBlock + createdAtTimestamp + id + } + } +} +`) + +export type GetSushiV2Mints = VariablesOf + +export async function getSushiV2Mints( + { ...variables }: GetSushiV2Mints, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV2MintsQuery, variables }, + options, + ) + + if (result) { + return result.v2Mints + } + + throw new Error(`Failed to fetch swaps for ${variables.chainId}`) +} + +export type SushiV2Mints = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v2/positions.ts b/packages/graph-client/src/subgraphs/data-api/queries/v2/positions.ts new file mode 100644 index 0000000000..58a4ce00e6 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v2/positions.ts @@ -0,0 +1,159 @@ +import type { VariablesOf } from 'gql.tada' +import { request, type RequestOptions } from 'src/lib/request' +import { ChainId, ChefType, RewarderType, SushiSwapProtocol } from 'sushi' +import { isSushiSwapV2ChainId } from 'sushi/config' +import { getAddress, type Address } from 'viem' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const V2PositionsQuery = graphql( + ` +query V2PositionsQuery($user: String!, $chainId: Int!) { + v2LiquidityPositions(user: $user, chainId: $chainId) { + user + stakedBalance + unstakedBalance + pool { + id + chainId + name + address + swapFee + protocol + + liquidity + liquidityUSD + feeApr1d + totalApr1d + incentiveApr + isIncentivized + wasIncentivized + + incentives { + id + chainId + chefType + apr + rewardToken { + id + address + name + symbol + decimals + } + rewardPerDay + poolAddress + pid + rewarderAddress + rewarderType + } + + token0 { + id + address + name + symbol + decimals + } + token1 { + id + address + name + symbol + decimals + } + } + } +} +`, +) + +export type GetV2Positions = VariablesOf + +export async function getV2Positions( + variables: GetV2Positions, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = Number(variables.chainId) as ChainId + + if (!isSushiSwapV2ChainId(chainId)) { + throw new Error('Invalid chainId') + } + const user = getAddress(variables.user).toLowerCase() + + const result = await request( + { url, document: V2PositionsQuery, variables: { chainId, user } }, + options, + ) + if (result.v2LiquidityPositions) { + return result.v2LiquidityPositions.map((p) => { + const incentives = p.pool.incentives + .filter((i) => i !== null) + .map((incentive) => ({ + id: incentive.id as `${string}:0x${string}`, + chainId, + chefType: incentive.chefType as ChefType, + apr: incentive.apr, + rewardToken: { + id: incentive.rewardToken.id as `${string}:0x${string}`, + address: incentive.rewardToken.address as Address, + chainId, + decimals: incentive.rewardToken.decimals, + name: incentive.rewardToken.name, + symbol: incentive.rewardToken.symbol, + }, + rewardPerDay: incentive.rewardPerDay, + poolAddress: incentive.poolAddress as Address, + pid: incentive.pid, + rewarderAddress: incentive.rewarderAddress as Address, + rewarderType: incentive.rewarderType as RewarderType, + })) + + const pool = { + id: p.pool.id as `${string}:0x${string}`, + address: p.pool.address as Address, + chainId, + name: `${p.pool.token0.symbol}-${p.pool.token1.symbol}`, + swapFee: p.pool.swapFee, + protocol: SushiSwapProtocol.SUSHISWAP_V2, + liquidity: BigInt(p.pool.liquidity), + liquidityUSD: p.pool.liquidityUSD, + + token0: { + id: p.pool.token0.id as `${string}:0x${string}`, + address: p.pool.token0.address as Address, + chainId, + decimals: p.pool.token0.decimals, + name: p.pool.token0.name, + symbol: p.pool.token0.symbol, + }, + token1: { + id: p.pool.token1.id as `${string}:0x${string}`, + address: p.pool.token1.address as Address, + chainId, + decimals: p.pool.token1.decimals, + name: p.pool.token1.name, + symbol: p.pool.token1.symbol, + }, + + feeApr1d: p.pool.feeApr1d, + totalApr1d: p.pool.totalApr1d, + incentiveApr: p.pool.incentiveApr, + isIncentivized: p.pool.isIncentivized, + wasIncentivized: p.pool.wasIncentivized, + incentives, + } + return { + user: p.user, + stakedBalance: BigInt(p.stakedBalance), + unstakedBalance: BigInt(p.unstakedBalance), + pool, + } + }) + } + + throw new Error('No positions found') +} + +export type V2Position = Awaited>[0] diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v2/swaps.ts b/packages/graph-client/src/subgraphs/data-api/queries/v2/swaps.ts new file mode 100644 index 0000000000..cf1587493f --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v2/swaps.ts @@ -0,0 +1,48 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV2SwapsQuery = graphql(` +query V2Swaps($address: String!, $chainId: Int!) { + v2Swaps(address: $address, chainId: $chainId) { + transaction { + createdAtBlock + createdAtTimestamp + id + } + logIndex + amountUSD + amount1Out + amount0Out + amount1In + amount0In + to + sender + id + } +} +`) + +export type GetSushiV2Swaps = VariablesOf + +export async function getSushiV2Swaps( + { ...variables }: GetSushiV2Swaps, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV2SwapsQuery, variables }, + options, + ) + + if (result) { + return result.v2Swaps + } + + throw new Error(`Failed to fetch swaps for ${variables.chainId}`) +} + +export type SushiV2Swaps = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/buckets.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/buckets.ts new file mode 100644 index 0000000000..d50bc241ac --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/buckets.ts @@ -0,0 +1,66 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { ChainId } from 'sushi' +import { isSushiSwapV3ChainId } from 'sushi/config' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const V3PoolBucketsQuery = graphql( + ` +query V3PoolBuckets($address: String!, $chainId: Int!) { + v3PoolBuckets(address: $address, chainId: $chainId) { + hourBuckets { + id + date + volumeUSD + liquidityUSD + txCount + feesUSD + } + dayBuckets { + id + date + volumeUSD + liquidityUSD + txCount + feesUSD + } + } +} +`, +) + +export type GetV3PoolBuckets = VariablesOf + +export async function getV3PoolBuckets( + variables: GetV3PoolBuckets, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = Number(variables.chainId) as ChainId + + if (!isSushiSwapV3ChainId(chainId)) { + throw new Error('Invalid chainId') + } + try { + const result = await request( + { url, document: V3PoolBucketsQuery, variables }, + options, + ) + if (result.v3PoolBuckets) { + return { + hourBuckets: result.v3PoolBuckets.hourBuckets.filter((b) => b !== null), + dayBuckets: result.v3PoolBuckets.dayBuckets.filter((b) => b !== null), + } + } + throw new Error('Invalid response') + } catch { + return { + hourBuckets: [], + dayBuckets: [], + } + } +} + +export type V3PoolBuckets = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/burns.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/burns.ts new file mode 100644 index 0000000000..c5d36e02a0 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/burns.ts @@ -0,0 +1,47 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV3BurnsQuery = graphql(` +query V3Burns($address: String!, $chainId: Int!) { + v3Burns(address: $address, chainId: $chainId) { + id + logIndex + amountUSD + amount1 + amount0 + amount + origin + owner + transaction { + id + blockNumber + timestamp + } + } +} +`) + +export type GetSushiV3Burns = VariablesOf + +export async function getSushiV3Burns( + { ...variables }: GetSushiV3Burns, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV3BurnsQuery, variables }, + options, + ) + + if (result) { + return result.v3Burns + } + + throw new Error(`Failed to fetch burns for ${variables.chainId}`) +} + +export type SushiV3Burns = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/collects.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/collects.ts new file mode 100644 index 0000000000..cb6e7fe971 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/collects.ts @@ -0,0 +1,45 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV3CollectsQuery = graphql(` +query V3Collects($address: String!, $chainId: Int!) { + v3Collects(address: $address, chainId: $chainId) { + id + logIndex + amountUSD + amount1 + amount0 + owner + transaction { + id + blockNumber + timestamp + } + } +} +`) + +export type GetSushiV3Collects = VariablesOf + +export async function getSushiV3Collects( + { ...variables }: GetSushiV3Collects, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV3CollectsQuery, variables }, + options, + ) + + if (result) { + return result.v3Collects + } + + throw new Error(`Failed to fetch collects for ${variables.chainId}`) +} + +export type SushiV3Collects = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/index.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/index.ts new file mode 100644 index 0000000000..cedc8d29e1 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/index.ts @@ -0,0 +1,7 @@ +export * from './buckets' +export * from './burns' +export * from './collects' +export * from './mints' +export * from './pools' +export * from './pools-by-tokens' +export * from './swaps' diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/mints.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/mints.ts new file mode 100644 index 0000000000..b65dda679b --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/mints.ts @@ -0,0 +1,48 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV3MintsQuery = graphql(` +query V3Mints($address: String!, $chainId: Int!) { + v3Mints(address: $address, chainId: $chainId) { + id + logIndex + amountUSD + amount1 + amount0 + amount + origin + sender + owner + transaction { + id + blockNumber + timestamp + } + } +} +`) + +export type GetSushiV3Mints = VariablesOf + +export async function getSushiV3Mints( + { ...variables }: GetSushiV3Mints, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV3MintsQuery, variables }, + options, + ) + + if (result) { + return result.v3Mints + } + + throw new Error(`Failed to fetch mints for ${variables.chainId}`) +} + +export type SushiV3Mints = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/pools-by-tokens.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/pools-by-tokens.ts new file mode 100644 index 0000000000..5011494974 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/pools-by-tokens.ts @@ -0,0 +1,138 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { ChainId, SushiSwapProtocol, type PoolBase, type PoolV3 } from 'sushi' +import { isSushiSwapV3ChainId } from 'sushi/config' +import type { Address } from 'viem' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const V3PoolsByTokensQuery = graphql( + ` + query V3PoolsByTokens($token0: String!, $token1: String!, $chainId: Int!) { + v3PoolsByTokens(token0: $token0, token1: $token1, chainId: $chainId) { + id + address + chainId + protocol + name + createdAt + swapFee + isProtocolFeeEnabled + token0 { + id + chainId + address + name + symbol + decimals + } + token1 { + id + chainId + address + name + symbol + decimals + } + source + reserve0 + reserve1 + liquidity + token0Price + token1Price + sqrtPrice + tick + observationIndex + feeGrowthGlobal0X128 + feeGrowthGlobal1X128 + volumeUSD + liquidityUSD + feesUSD + txCount + } + } +`, +) + +export type GetV3BasePoolsByTokens = VariablesOf + +export async function getV3BasePoolsByToken( + variables: GetV3BasePoolsByTokens, + options?: RequestOptions, +): Promise[]> { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = variables.chainId as ChainId + + if (!isSushiSwapV3ChainId(chainId)) { + throw new Error('Invalid chainId') + } + + const tokens = [variables.token0, variables.token1].sort() as [ + `0x${string}`, + `0x${string}`, + ] + + const result = await request( + { + url, + document: V3PoolsByTokensQuery, + variables: { + chainId: chainId, + token0: tokens[0].toLowerCase(), + token1: tokens[1].toLowerCase(), + }, + }, + options, + ) + + if (result.v3PoolsByTokens) { + return result.v3PoolsByTokens.map( + (pool) => + ({ + id: pool.id as `${string}:0x${string}`, + address: pool.address as Address, + chainId, + name: pool.name, + swapFee: pool.swapFee, + protocol: SushiSwapProtocol.SUSHISWAP_V3, + isProtocolFeeEnabled: pool.isProtocolFeeEnabled, + token0: { + id: pool.token0.id as `${string}:0x${string}`, + address: pool.token0.address as Address, + chainId, + decimals: pool.token0.decimals, + name: pool.token0.name, + symbol: pool.token0.symbol, + }, + token1: { + id: pool.token1.id as `${string}:0x${string}`, + address: pool.token1.address as Address, + chainId, + decimals: pool.token1.decimals, + name: pool.token1.name, + symbol: pool.token1.symbol, + }, + + reserve0: BigInt(pool.reserve0), + reserve1: BigInt(pool.reserve1), + liquidity: BigInt(pool.liquidity), + token0Price: pool.token0Price, + token1Price: pool.token1Price, + + sqrtPrice: BigInt(pool.sqrtPrice), + tick: BigInt(pool.tick), + observationIndex: BigInt(pool.observationIndex), + feeGrowthGlobal0X128: BigInt(pool.feeGrowthGlobal0X128), + feeGrowthGlobal1X128: BigInt(pool.feeGrowthGlobal1X128), + + liquidityUSD: pool.liquidityUSD, + volumeUSD: pool.volumeUSD, + feesUSD: pool.feesUSD, + txCount: pool.txCount, + }) satisfies PoolV3, + ) + } + + throw new Error('No pool found') +} diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/pools.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/pools.ts new file mode 100644 index 0000000000..11f7278ff4 --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/pools.ts @@ -0,0 +1,135 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { ChainId, SushiSwapProtocol, type PoolBase, type PoolV3 } from 'sushi' +import { isSushiSwapV3ChainId } from 'sushi/config' +import type { Address } from 'viem' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' +import { SUSHI_REQUEST_HEADERS } from '../../request-headers' + +export const V3PoolsQuery = graphql( + ` + query V3Pools($chainId: Int!) { + v3Pools(chainId: $chainId) { + id + address + chainId + protocol + name + createdAt + isProtocolFeeEnabled + swapFee + token0 { + id + chainId + address + name + symbol + decimals + } + token1 { + id + chainId + address + name + symbol + decimals + } + source + reserve0 + reserve1 + liquidity + token0Price + token1Price + sqrtPrice + tick + observationIndex + feeGrowthGlobal0X128 + feeGrowthGlobal1X128 + volumeUSD + liquidityUSD + feesUSD + txCount + } + } +`, +) + +export type GetV3BasePools = VariablesOf + +export async function getV3BasePools( + variables: GetV3BasePools, + options?: RequestOptions, +): Promise[]> { + const url = `https://${SUSHI_DATA_API_HOST}` + const chainId = variables.chainId as ChainId + + if (!isSushiSwapV3ChainId(chainId)) { + throw new Error('Invalid chainId') + } + + const result = await request( + { + url, + document: V3PoolsQuery, + variables: { + chainId: chainId, + }, + requestHeaders: SUSHI_REQUEST_HEADERS, + }, + options, + ) + + if (result.v3Pools) { + return result.v3Pools.map( + (pool) => + ({ + id: pool.id as `${string}:0x${string}`, + address: pool.address as Address, + chainId, + name: pool.name, + swapFee: pool.swapFee, + protocol: SushiSwapProtocol.SUSHISWAP_V3, + isProtocolFeeEnabled: pool.isProtocolFeeEnabled, + token0: { + id: pool.token0.id as `${string}:0x${string}`, + address: pool.token0.address as Address, + chainId, + decimals: pool.token0.decimals, + name: pool.token0.name, + symbol: pool.token0.symbol, + }, + token1: { + id: pool.token1.id as `${string}:0x${string}`, + address: pool.token1.address as Address, + chainId, + decimals: pool.token1.decimals, + name: pool.token1.name, + symbol: pool.token1.symbol, + }, + + reserve0: BigInt(pool.reserve0), + reserve1: BigInt(pool.reserve1), + liquidity: BigInt(pool.liquidity), + token0Price: pool.token0Price, + token1Price: pool.token1Price, + + sqrtPrice: BigInt(pool.sqrtPrice), + tick: BigInt(pool.tick), + observationIndex: BigInt(pool.observationIndex), + feeGrowthGlobal0X128: BigInt(pool.feeGrowthGlobal0X128), + feeGrowthGlobal1X128: BigInt(pool.feeGrowthGlobal1X128), + + liquidityUSD: pool.liquidityUSD, + volumeUSD: pool.volumeUSD, + feesUSD: pool.feesUSD, + txCount: pool.txCount, + }) satisfies PoolV3, + ) + } + return [] +} + + +export type V3BasePool = NonNullable>>[0] \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/data-api/queries/v3/swaps.ts b/packages/graph-client/src/subgraphs/data-api/queries/v3/swaps.ts new file mode 100644 index 0000000000..75fbec7a3e --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/queries/v3/swaps.ts @@ -0,0 +1,47 @@ +import type { VariablesOf } from 'gql.tada' + +import { request, type RequestOptions } from 'src/lib/request' +import { SUSHI_DATA_API_HOST } from 'sushi/config/subgraph' +import { graphql } from '../../graphql' + +export const SushiV3SwapsQuery = graphql(` + query V3Swaps($address: String!, $chainId: Int!) { + v3Swaps(address: $address, chainId: $chainId) { + id + logIndex + amountUSD + amount1 + amount0 + origin + recipient + sender + transaction { + id + blockNumber + timestamp + } + } + } +`) + +export type GetSushiV3Swaps = VariablesOf + +export async function getSushiV3Swaps( + { ...variables }: GetSushiV3Swaps, + options?: RequestOptions, +) { + const url = `https://${SUSHI_DATA_API_HOST}` + + const result = await request( + { url, document: SushiV3SwapsQuery, variables }, + options, + ) + + if (result) { + return result.v3Swaps + } + + throw new Error(`Failed to fetch swaps for ${variables.chainId}`) +} + +export type SushiV3Swaps = Awaited> diff --git a/packages/graph-client/src/subgraphs/data-api/request-headers.ts b/packages/graph-client/src/subgraphs/data-api/request-headers.ts new file mode 100644 index 0000000000..659b480c6a --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/request-headers.ts @@ -0,0 +1,3 @@ +export const SUSHI_REQUEST_HEADERS = { + 'Origin': 'https://sushi.com' +} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/data-api/schema.graphql b/packages/graph-client/src/subgraphs/data-api/schema.graphql new file mode 100644 index 0000000000..6366b6917e --- /dev/null +++ b/packages/graph-client/src/subgraphs/data-api/schema.graphql @@ -0,0 +1,724 @@ +""" +Indicates exactly one field must be supplied and this field must not be `null`. +""" +directive @oneOf on INPUT_OBJECT + +type Bucket { + id: ID! + date: Int! + volumeUSD: Float! + volumeUSDUntracked: Float! + liquidityUSD: Float! + feesUSD: Float! + txCount: Int! +} + +type SushiDayBuckets { + v2: [Bucket!]! + v3: [Bucket!]! +} + +type Query { + sushiDayBuckets(chainId: Int!): SushiDayBuckets! + topPools(chainId: String!): [TopPool!]! + v2Pool(address: String!, chainId: Int!): V2Pool! + v3Pool(address: String!, chainId: Int!): V3Pool! + v2PoolBuckets(address: String!, chainId: Int!): PoolBuckets! + v3PoolBuckets(address: String!, chainId: Int!): PoolBuckets! + v3PoolsByTokens(token0: String!, token1: String!, chainId: Int!): [V3BasePool!]! + v3Pools(chainId: Int!): [V3BasePool!]! + portfolioWallet(id: ID!): PortfolioWallet! + portfolioLiquidityPositions(id: ID!): PortfolioPositions! + portfolioClaimables(id: ID!): PortfolioClaimables! + portfolioHistory(id: ID!): [PortfolioTransaction!]! + smartPools(chainId: Int!): [BasicSmartPool!]! + vault(chainId: Int!, vaultAddress: String!): Vault! + vaults(chainId: Int!, poolAddress: String!): [Vault!]! + sushiBarStats: SushiBarStats! + sushiBarHistory: SushiBarHistory! + tokenList(chainId: TokenListChainId!, first: Int = 50, skip: Int, search: String, customTokens: [Bytes!]): [TokenListEntry!]! + tokenListBalances(chainId: TokenListChainId!, account: Bytes!, includeNative: Boolean = true, customTokens: [Bytes!]): [TokenListEntryWithBalance!]! + approvedCommunityTokens: [TokenListEntry!]! + tokenAnalysis(chainId: Int!, address: Bytes!): TokenAnalysis! + pendingTokens: [PendingToken!]! + trendingTokens(chainId: Int!): [TrendingToken!]! + v2LiquidityPositions(user: String!, chainId: Int!): [V2LiquidityPosition!]! + v2Swaps(address: String!, chainId: Int!): [V2Swap!]! + v2Burns(address: String!, chainId: Int!): [V2Burn!]! + v2Mints(address: String!, chainId: Int!): [V2Mint!]! + v2Transactions(address: String!, chainId: Int!): [V2Transaction!]! + v3Swaps(address: String!, chainId: Int!): [V3Swap!]! + v3Burns(address: String!, chainId: Int!): [V3Burn!]! + v3Mints(address: String!, chainId: Int!): [V3Mint!]! + v3Collects(address: String!, chainId: Int!): [V3Collect!]! + v3Transactions(address: String!, chainId: Int!): [V3Transaction!]! +} + +type Token { + id: ID! + chainId: Int! + address: String! + name: String! + symbol: String! + decimals: Int! +} + +type V2Pool { + id: ID! + chainId: Int! + name: String! + address: String! + createdAt: String! + swapFee: Float! + protocol: String! + token0: Token! + token1: Token! + source: String! + reserve0: String! + reserve1: String! + liquidity: String! + volumeUSD: Float! + liquidityUSD: Float! + token0Price: Float! + token1Price: Float! + volumeUSD1d: Float! + feeUSD1d: Float! + txCount1d: Int! + feeApr1d: Float! + totalApr1d: Float! + volumeUSD1dChange: Float! + feeUSD1dChange: Float! + txCount1dChange: Float! + liquidityUSD1dChange: Float! + incentiveApr: Float! + isIncentivized: Boolean! + wasIncentivized: Boolean! + incentives: [Incentive!]! +} + +type V3Pool { + id: ID! + chainId: Int! + name: String! + address: String! + createdAt: String! + swapFee: Float! + protocol: String! + token0: Token! + token1: Token! + source: String! + reserve0: String! + reserve1: String! + liquidity: String! + sqrtPrice: String! + tick: String! + observationIndex: String! + feeGrowthGlobal0X128: String! + feeGrowthGlobal1X128: String! + volumeUSD: Float! + liquidityUSD: Float! + token0Price: Float! + token1Price: Float! + volumeUSD1d: Float! + feeUSD1d: Float! + txCount1d: Int! + feeApr1d: Float! + totalApr1d: Float! + volumeUSD1dChange: Float! + feeUSD1dChange: Float! + txCount1dChange: Float! + liquidityUSD1dChange: Float! + incentiveApr: Float! + hadSmartPool: Boolean! + hasSmartPool: Boolean! + isIncentivized: Boolean! + wasIncentivized: Boolean! + incentives: [Incentive!]! + vaults: [String!]! +} + +type V3BasePool { + id: ID! + address: String! + chainId: Int! + protocol: String! + isProtocolFeeEnabled: Boolean! + name: String! + createdAt: String! + swapFee: Float! + token0: Token! + token1: Token! + source: String! + reserve0: String! + reserve1: String! + liquidity: String! + token0Price: Float! + token1Price: Float! + sqrtPrice: String! + tick: String! + observationIndex: String! + feeGrowthGlobal0X128: String! + feeGrowthGlobal1X128: String! + volumeUSD: Float! + liquidityUSD: Float! + feesUSD: Float! + txCount: Int! +} + +type Incentive { + id: ID! + chainId: Int! + chefType: String! + apr: Float! + rewardToken: Token! + rewardPerDay: Float! + poolAddress: String! + pid: Int! + rewarderAddress: String! + rewarderType: String! +} + +type PoolBucket { + id: ID! + date: Int! + volumeUSD: Float! + liquidityUSD: Float! + txCount: Int! + feesUSD: Float! +} + +type TopPool { + id: ID! + chainId: String! + name: String! + address: String! + createdAt: String! + swapFee: Float! + protocol: String! + token0Price: Float! + token1Price: Float! + token0Address: String! + token1Address: String! + token0PriceUSD: Float! + token1PriceUSD: Float! + liquidityUSD: Float! + txCount1h: Int! + txCount1d: Int! + feeUSD1h: Float! + feeUSD1d: Float! + volumeUSD1h: Float! + volumeUSD1d: Float! + feeApr1d: Float! + totalApr1d: Float! + incentiveApr: Float! + isSmartPool: Boolean! + isIncentivized: Boolean! + wasIncentivized: Boolean! + source: String! +} + +type PoolBuckets { + hourBuckets: [PoolBucket!]! + dayBuckets: [PoolBucket!]! +} + +type SimpleToken { + id: String! + chain: String! + chainId: Int! + name: String! + symbol: String + decimals: Int! + logoUrl: String + protocolId: String! + price: Float! + isVerified: Boolean! + isCore: Boolean! + isWallet: Boolean! + timeAt: Int + amount: Float! + amountUSD: Float! +} + +type PortfolioToken { + id: String! + chain: String! + chainId: Int! + name: String! + symbol: String + decimals: Int! + logoUrl: String + protocolId: String! + price: Float! + price24hChange: Float + isVerified: Boolean! + isCore: Boolean! + isWallet: Boolean! + timeAt: Int + amount: Float! + rawAmount: Float! + amountUSD: Float! +} + +type V2PortfolioPosition { + id: String! + chainId: Int! + chain: String! + protocol: String! + protocolId: String! + protocolLogoUrl: String! + address: String! + name: String! + swapFee: Float! + token0: SimpleToken! + token1: SimpleToken! + amountUSD: Float! + updatedAt: Int +} + +enum RangeStatus { + IN_RANGE + OUT_OF_RANGE + UNKNOWN +} + +type V3PortfolioPosition { + id: String! + chainId: Int! + chain: String! + protocol: String! + protocolId: String! + protocolLogoUrl: String! + address: String! + name: String! + swapFee: Float! + positionId: Int! + range: RangeStatus! + token0: SimpleToken! + token1: SimpleToken! + fees: [SimpleToken]! + amountUSD: Float! + updatedAt: Int +} + +type PortfolioSmartPosition { + id: String! + chainId: Int! + chain: String! + protocol: String! + protocolId: String! + protocolLogoUrl: String! + address: String! + name: String! + vaultAddress: String! + swapFee: Float! + token0: SimpleToken! + token1: SimpleToken! + strategy: String! + amountUSD: Float! + updatedAt: Int +} + +type FuroPosition { + id: String! + chainId: Int! + chain: String! + protocol: String! + protocolId: String! + protocolLogoUrl: String! + address: String! + name: String! + positionId: Int! + token: SimpleToken! + updatedAt: Int +} + +type PortfolioPositions { + totalUSD: Float! + v2Positions: [V2PortfolioPosition]! + v3Positions: [V3PortfolioPosition]! + smartPositions: [PortfolioSmartPosition]! +} + +type PortfolioClaimables { + totalUSD: Float! + v2PositionClaimables: [V2PoolClaim]! + v3PositionClaimables: [V3PoolClaim]! + smartPositionClaimables: [SmartPoolClaim]! + furoClaimables: [FuroClaim]! +} + +type V2PoolClaim { + position: V2PortfolioPosition! + token: SimpleToken! +} + +type V3PoolClaim { + position: V3PortfolioPosition! + token: SimpleToken! +} + +type SmartPoolClaim { + position: PortfolioSmartPosition! + token: SimpleToken! +} + +type FuroClaim { + position: FuroPosition! + token: SimpleToken! +} + +type PortfolioWallet { + totalUSD: Float! + amountUSD24Change: Float! + percentageChange24h: Float! + tokens: [PortfolioToken]! +} + +enum TransactionTokenType { + ERC20 + NFT +} + +type PortfolioTransactionToken { + id: String! + name: String! + symbol: String! + type: TransactionTokenType! + logoUrl: String + amount: Float! + isVerified: Boolean! + isCore: Boolean! + isSuspicious: Boolean! + isScam: Boolean! +} + +enum PortfolioTransactionCategory { + SEND + RECEIVE + APPROVE + OTHER +} + +type PortfolioTransaction { + chainId: Int + chain: String! + txHash: String! + timestamp: Int! + functionName: String! + projectName: String + protocolLogo: String + category: PortfolioTransactionCategory! + receives: [PortfolioTransactionToken]! + sends: [PortfolioTransactionToken]! + approve: PortfolioTransactionToken + gasFeeNative: Float! + gasFeeUSD: Float! +} + +""" +A field whose value is a byte string: https://en.wikipedia.org/wiki/Byte_string +""" +scalar Bytes + +"""A field whose value is a bigint""" +scalar BigInt + +type BasicSmartPool { + id: ID! + chainId: Int! + address: String! + poolAddress: String! + swapFee: Float! + protocol: String! + token0: Token! + token1: Token! + strategy: String! + description: String! + liquidityUSD: Float! + vaultLiquidityUSD: Float! + feeUSD1d: Float! + feeApr1d: Float! + feeAndIncentiveApr1d: Float! + stakedApr1d: Float! + stakedAndIncentiveApr1d: Float! + incentiveApr: Float! + wasIncentivized: Boolean! + isIncentivized: Boolean! + lowerTick: Int! + upperTick: Int! + adjustmentFrequency: Int! + lastAdjustmentTimestamp: Int! + isEnabled: Boolean! + wasEnabled: Boolean! + isDeprecated: Boolean! +} + +type Vault { + id: ID! + address: String! + chainId: Int! + poolAddress: String! + feeTier: Float! + performanceFee: Float! + token0: Token! + token1: Token! + adjustmentFrequency: Int! + lastAdjustmentTimestamp: Int! + strategy: String! + payloadHash: String! + description: String! + lowerTick: Int! + upperTick: Int! + apr: Float! + apr1d: Float! + apr1w: Float! + reserve0: String! + reserve0USD: Float! + fees0: String! + fees0USD: Float! + reserve1: String! + reserve1USD: Float! + fees1: String! + fees1USD: Float! + reserveUSD: Float! + feesUSD: Float! + feeApr1d: Float! + feeAndIncentiveApr1d: Float! + stakedApr1d: Float! + stakedAndIncentiveApr1d: Float! + incentiveApr: Float! + wasIncentivized: Boolean! + isIncentivized: Boolean! + isEnabled: Boolean! + wasEnabled: Boolean! + isDeprecated: Boolean! +} + +type SushiBarStats { + id: String! + sushiXsushiRatio: Float! + xSushiSushiRatio: Float! + sushiSupply: Float! + xSushiSupply: Float! + apr1m: Float! + apr3m: Float! + apr6m: Float! + apr12m: Float! +} + +type SushiBarBucket { + id: String! + date: Int! + xSushiSupply: Float! + apr1m: Float! + apr3m: Float! + apr6m: Float! + apr12m: Float! +} + +type SushiBarHistory { + hourSnapshots: [SushiBarBucket!]! + daySnapshots: [SushiBarBucket!]! + weekSnapshots: [SushiBarBucket!]! +} + +scalar TokenListChainId + +type TokenListEntry { + address: Bytes! + symbol: String! + name: String! + decimals: Int! + approved: Boolean! +} + +type TokenListEntryWithBalance { + address: Bytes! + symbol: String! + name: String! + decimals: Int! + balance: BigInt! + approved: Boolean! +} + +type TokenValidationMetrics { + age: Int! + volumeUSD24h: Float! + marketcapUSD: Float! + holders: Int! +} + +type TokenSubmissionRequirements { + minimumAge: Int! + minimumVolumeUSD24h: Float! + minimumMarketcapUSD: Float! + minimumHolders: Int! +} + +type TokenAnalysis { + token: Token! + isExisting: Boolean! + isPending: Boolean! + isPassingRequirements: Boolean! + reasoning: [String!]! + metrics: TokenValidationMetrics! + requirements: TokenSubmissionRequirements! + security: TokenSecurity +} + +type PendingToken { + token: Token! + tweetUrl: String! + logoUrl: String! + reasoning: [String!]! + createdAt: Int! + metrics: TokenValidationMetrics! + security: TokenSecurity +} + +type TokenSecurity { + isOpenSource: Boolean! + isProxy: Boolean! + isMintable: Boolean! + canTakeBackOwnership: Boolean! + ownerChangeBalance: Boolean! + hiddenOwner: Boolean! + selfDestruct: Boolean! + externalCall: Boolean! + gasAbuse: Boolean! + buyTax: Boolean + sellTax: Boolean + cannotBuy: Boolean! + cannotSellAll: Boolean! + slippageModifiable: Boolean! + isHoneypot: Boolean! + transferPausable: Boolean! + isBlacklisted: Boolean! + isWhitelisted: Boolean! + isAntiWhale: Boolean! + tradingCooldown: Boolean! + isTrueToken: Boolean! + isAirdropScam: Boolean! + trustList: Boolean! + isBuyable: Boolean + isFakeToken: Boolean + isSellLimit: Boolean + holderCount: Float! +} + +type TrendingToken { + address: Bytes! + symbol: String! + name: String! + decimals: Int! + approved: Boolean! +} + +type V2LiquidityPosition { + user: String! + stakedBalance: String! + unstakedBalance: String! + pool: V2Pool! +} + +type V2Burn { + id: ID! + logIndex: String + amountUSD: String + amount1: String + amount0: String + liquidity: String! + sender: ID + transaction: V2Transaction! +} + +type V2Mint { + id: ID! + logIndex: String + amountUSD: String + amount1: String + amount0: String + liquidity: String! + sender: ID + transaction: V2Transaction! +} + +type V2Swap { + id: ID! + logIndex: String + amountUSD: String! + amount1Out: String! + amount0Out: String! + amount1In: String! + amount0In: String! + to: ID! + sender: ID! + transaction: V2Transaction! +} + +type V2Transaction { + swaps: [V2Swap] + burns: [V2Burn] + mints: [V2Mint] + createdAtBlock: String! + createdAtTimestamp: String! + id: ID! +} + +type V3Burn { + id: ID! + logIndex: String + amountUSD: String + amount1: String! + amount0: String! + amount: String! + origin: ID! + owner: ID + transaction: V3Transaction! +} + +type V3Collect { + id: ID! + logIndex: String + amountUSD: String + amount1: String! + amount0: String! + owner: ID + transaction: V3Transaction! +} + +type V3Mint { + id: ID! + logIndex: String + amountUSD: String + amount1: String! + amount0: String! + amount: String! + origin: ID! + sender: ID + owner: ID! + transaction: V3Transaction! +} + +type V3Swap { + id: ID! + logIndex: String + amountUSD: String! + amount1: String! + amount0: String! + origin: ID! + recipient: ID! + sender: ID! + transaction: V3Transaction! +} + +type V3Transaction { + id: ID! + blockNumber: String! + timestamp: String! + collects: [V3Collect] + swaps: [V3Swap] + burns: [V3Burn] + mints: [V3Mint] +} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/master-chef-v1/graphql.ts b/packages/graph-client/src/subgraphs/master-chef-v1/graphql.ts deleted file mode 100644 index 36f29587b1..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v1/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './master-chef-v1-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/master-chef-v1/index.ts b/packages/graph-client/src/subgraphs/master-chef-v1/index.ts deleted file mode 100644 index 044b4b733e..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v1/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './queries/user-positions' diff --git a/packages/graph-client/src/subgraphs/master-chef-v1/queries/user-positions.ts b/packages/graph-client/src/subgraphs/master-chef-v1/queries/user-positions.ts deleted file mode 100644 index b0eccc5de1..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v1/queries/user-positions.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { VariablesOf } from 'gql.tada' - -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import { ChainId } from 'sushi/chain' -import { MASTERCHEF_V1_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { SushiSwapProtocol } from 'sushi/types' -import { graphql } from '../graphql' - -export const MasterChefV1UserPositionsQuery = graphql( - ` - query UserPositions($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: User_orderBy, $orderDirection: OrderDirection, $where: User_filter) { - users(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - address - balance: amount - pool { - id: pair - } - } - } -`, -) - -export type GetMasterChefV1UserPositions = VariablesOf< - typeof MasterChefV1UserPositionsQuery -> - -export async function getMasterChefV1UserPositions( - { ...variables }: GetMasterChefV1UserPositions, - options?: RequestOptions, -) { - const url = `https://${MASTERCHEF_V1_SUBGRAPH_URL}` - - const result = await requestPaged({ - chainId: ChainId.ETHEREUM, - url, - query: MasterChefV1UserPositionsQuery, - variables, - options, - }) - - return result.users.flatMap((position) => { - if (!position.pool) { - return [] - } - - const pool = { - ...convertIdToMultichainId( - copyIdToAddress(addChainId(ChainId.ETHEREUM, position.pool)), - ), - protocol: SushiSwapProtocol.SUSHISWAP_V2, - } - - return { - id: position.id, - address: position.address, - balance: position.balance, - pool, - } - }) -} - -export type MasterChefV1UserPositions = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/master-chef-v1/schema.graphql b/packages/graph-client/src/subgraphs/master-chef-v1/schema.graphql deleted file mode 100644 index 59c46fbb5d..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v1/schema.graphql +++ /dev/null @@ -1,1318 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -scalar Bytes - -type History { - id: ID! - owner: MasterChef! - slpBalance: BigDecimal! - slpAge: BigDecimal! - slpAgeRemoved: BigDecimal! - slpDeposited: BigDecimal! - slpWithdrawn: BigDecimal! - timestamp: BigInt! - block: BigInt! -} - -input History_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - owner: String - owner_not: String - owner_gt: String - owner_lt: String - owner_gte: String - owner_lte: String - owner_in: [String!] - owner_not_in: [String!] - owner_contains: String - owner_contains_nocase: String - owner_not_contains: String - owner_not_contains_nocase: String - owner_starts_with: String - owner_starts_with_nocase: String - owner_not_starts_with: String - owner_not_starts_with_nocase: String - owner_ends_with: String - owner_ends_with_nocase: String - owner_not_ends_with: String - owner_not_ends_with_nocase: String - owner_: MasterChef_filter - slpBalance: BigDecimal - slpBalance_not: BigDecimal - slpBalance_gt: BigDecimal - slpBalance_lt: BigDecimal - slpBalance_gte: BigDecimal - slpBalance_lte: BigDecimal - slpBalance_in: [BigDecimal!] - slpBalance_not_in: [BigDecimal!] - slpAge: BigDecimal - slpAge_not: BigDecimal - slpAge_gt: BigDecimal - slpAge_lt: BigDecimal - slpAge_gte: BigDecimal - slpAge_lte: BigDecimal - slpAge_in: [BigDecimal!] - slpAge_not_in: [BigDecimal!] - slpAgeRemoved: BigDecimal - slpAgeRemoved_not: BigDecimal - slpAgeRemoved_gt: BigDecimal - slpAgeRemoved_lt: BigDecimal - slpAgeRemoved_gte: BigDecimal - slpAgeRemoved_lte: BigDecimal - slpAgeRemoved_in: [BigDecimal!] - slpAgeRemoved_not_in: [BigDecimal!] - slpDeposited: BigDecimal - slpDeposited_not: BigDecimal - slpDeposited_gt: BigDecimal - slpDeposited_lt: BigDecimal - slpDeposited_gte: BigDecimal - slpDeposited_lte: BigDecimal - slpDeposited_in: [BigDecimal!] - slpDeposited_not_in: [BigDecimal!] - slpWithdrawn: BigDecimal - slpWithdrawn_not: BigDecimal - slpWithdrawn_gt: BigDecimal - slpWithdrawn_lt: BigDecimal - slpWithdrawn_gte: BigDecimal - slpWithdrawn_lte: BigDecimal - slpWithdrawn_in: [BigDecimal!] - slpWithdrawn_not_in: [BigDecimal!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [History_filter] - or: [History_filter] -} - -enum History_orderBy { - id - owner - owner__id - owner__bonusMultiplier - owner__bonusEndBlock - owner__devaddr - owner__migrator - owner__owner - owner__startBlock - owner__sushi - owner__sushiPerBlock - owner__totalAllocPoint - owner__poolCount - owner__slpBalance - owner__slpAge - owner__slpAgeRemoved - owner__slpDeposited - owner__slpWithdrawn - owner__updatedAt - slpBalance - slpAge - slpAgeRemoved - slpDeposited - slpWithdrawn - timestamp - block -} - -"8 bytes signed integer\n" -scalar Int8 - -type MasterChef { - id: ID! - bonusMultiplier: BigInt! - bonusEndBlock: BigInt! - devaddr: Bytes! - migrator: Bytes! - owner: Bytes! - startBlock: BigInt! - sushi: Bytes! - sushiPerBlock: BigInt! - totalAllocPoint: BigInt! - pools(skip: Int = 0, first: Int = 100, orderBy: Pool_orderBy, orderDirection: OrderDirection, where: Pool_filter): [Pool!]! - poolCount: BigInt! - slpBalance: BigDecimal! - slpAge: BigDecimal! - slpAgeRemoved: BigDecimal! - slpDeposited: BigDecimal! - slpWithdrawn: BigDecimal! - history(skip: Int = 0, first: Int = 100, orderBy: History_orderBy, orderDirection: OrderDirection, where: History_filter): [History!]! - updatedAt: BigInt! -} - -input MasterChef_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - bonusMultiplier: BigInt - bonusMultiplier_not: BigInt - bonusMultiplier_gt: BigInt - bonusMultiplier_lt: BigInt - bonusMultiplier_gte: BigInt - bonusMultiplier_lte: BigInt - bonusMultiplier_in: [BigInt!] - bonusMultiplier_not_in: [BigInt!] - bonusEndBlock: BigInt - bonusEndBlock_not: BigInt - bonusEndBlock_gt: BigInt - bonusEndBlock_lt: BigInt - bonusEndBlock_gte: BigInt - bonusEndBlock_lte: BigInt - bonusEndBlock_in: [BigInt!] - bonusEndBlock_not_in: [BigInt!] - devaddr: Bytes - devaddr_not: Bytes - devaddr_gt: Bytes - devaddr_lt: Bytes - devaddr_gte: Bytes - devaddr_lte: Bytes - devaddr_in: [Bytes!] - devaddr_not_in: [Bytes!] - devaddr_contains: Bytes - devaddr_not_contains: Bytes - migrator: Bytes - migrator_not: Bytes - migrator_gt: Bytes - migrator_lt: Bytes - migrator_gte: Bytes - migrator_lte: Bytes - migrator_in: [Bytes!] - migrator_not_in: [Bytes!] - migrator_contains: Bytes - migrator_not_contains: Bytes - owner: Bytes - owner_not: Bytes - owner_gt: Bytes - owner_lt: Bytes - owner_gte: Bytes - owner_lte: Bytes - owner_in: [Bytes!] - owner_not_in: [Bytes!] - owner_contains: Bytes - owner_not_contains: Bytes - startBlock: BigInt - startBlock_not: BigInt - startBlock_gt: BigInt - startBlock_lt: BigInt - startBlock_gte: BigInt - startBlock_lte: BigInt - startBlock_in: [BigInt!] - startBlock_not_in: [BigInt!] - sushi: Bytes - sushi_not: Bytes - sushi_gt: Bytes - sushi_lt: Bytes - sushi_gte: Bytes - sushi_lte: Bytes - sushi_in: [Bytes!] - sushi_not_in: [Bytes!] - sushi_contains: Bytes - sushi_not_contains: Bytes - sushiPerBlock: BigInt - sushiPerBlock_not: BigInt - sushiPerBlock_gt: BigInt - sushiPerBlock_lt: BigInt - sushiPerBlock_gte: BigInt - sushiPerBlock_lte: BigInt - sushiPerBlock_in: [BigInt!] - sushiPerBlock_not_in: [BigInt!] - totalAllocPoint: BigInt - totalAllocPoint_not: BigInt - totalAllocPoint_gt: BigInt - totalAllocPoint_lt: BigInt - totalAllocPoint_gte: BigInt - totalAllocPoint_lte: BigInt - totalAllocPoint_in: [BigInt!] - totalAllocPoint_not_in: [BigInt!] - pools_: Pool_filter - poolCount: BigInt - poolCount_not: BigInt - poolCount_gt: BigInt - poolCount_lt: BigInt - poolCount_gte: BigInt - poolCount_lte: BigInt - poolCount_in: [BigInt!] - poolCount_not_in: [BigInt!] - slpBalance: BigDecimal - slpBalance_not: BigDecimal - slpBalance_gt: BigDecimal - slpBalance_lt: BigDecimal - slpBalance_gte: BigDecimal - slpBalance_lte: BigDecimal - slpBalance_in: [BigDecimal!] - slpBalance_not_in: [BigDecimal!] - slpAge: BigDecimal - slpAge_not: BigDecimal - slpAge_gt: BigDecimal - slpAge_lt: BigDecimal - slpAge_gte: BigDecimal - slpAge_lte: BigDecimal - slpAge_in: [BigDecimal!] - slpAge_not_in: [BigDecimal!] - slpAgeRemoved: BigDecimal - slpAgeRemoved_not: BigDecimal - slpAgeRemoved_gt: BigDecimal - slpAgeRemoved_lt: BigDecimal - slpAgeRemoved_gte: BigDecimal - slpAgeRemoved_lte: BigDecimal - slpAgeRemoved_in: [BigDecimal!] - slpAgeRemoved_not_in: [BigDecimal!] - slpDeposited: BigDecimal - slpDeposited_not: BigDecimal - slpDeposited_gt: BigDecimal - slpDeposited_lt: BigDecimal - slpDeposited_gte: BigDecimal - slpDeposited_lte: BigDecimal - slpDeposited_in: [BigDecimal!] - slpDeposited_not_in: [BigDecimal!] - slpWithdrawn: BigDecimal - slpWithdrawn_not: BigDecimal - slpWithdrawn_gt: BigDecimal - slpWithdrawn_lt: BigDecimal - slpWithdrawn_gte: BigDecimal - slpWithdrawn_lte: BigDecimal - slpWithdrawn_in: [BigDecimal!] - slpWithdrawn_not_in: [BigDecimal!] - history_: History_filter - updatedAt: BigInt - updatedAt_not: BigInt - updatedAt_gt: BigInt - updatedAt_lt: BigInt - updatedAt_gte: BigInt - updatedAt_lte: BigInt - updatedAt_in: [BigInt!] - updatedAt_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [MasterChef_filter] - or: [MasterChef_filter] -} - -enum MasterChef_orderBy { - id - bonusMultiplier - bonusEndBlock - devaddr - migrator - owner - startBlock - sushi - sushiPerBlock - totalAllocPoint - pools - poolCount - slpBalance - slpAge - slpAgeRemoved - slpDeposited - slpWithdrawn - history - updatedAt -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Pool { - id: ID! - owner: MasterChef! - pair: Bytes! - allocPoint: BigInt! - lastRewardBlock: BigInt! - accSushiPerShare: BigInt! - balance: BigInt! - users(skip: Int = 0, first: Int = 100, orderBy: User_orderBy, orderDirection: OrderDirection, where: User_filter): [User!]! - userCount: BigInt! - slpBalance: BigDecimal! - slpAge: BigDecimal! - slpAgeRemoved: BigDecimal! - slpDeposited: BigDecimal! - slpWithdrawn: BigDecimal! - timestamp: BigInt! - block: BigInt! - updatedAt: BigInt! - entryUSD: BigDecimal! - exitUSD: BigDecimal! - sushiHarvested: BigDecimal! - sushiHarvestedUSD: BigDecimal! -} - -type PoolHistory { - id: ID! - pool: Pool! - slpBalance: BigDecimal! - slpAge: BigDecimal! - slpAgeRemoved: BigDecimal! - slpDeposited: BigDecimal! - slpWithdrawn: BigDecimal! - userCount: BigInt! - timestamp: BigInt! - block: BigInt! - entryUSD: BigDecimal! - exitUSD: BigDecimal! - sushiHarvested: BigDecimal! - sushiHarvestedUSD: BigDecimal! -} - -input PoolHistory_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - slpBalance: BigDecimal - slpBalance_not: BigDecimal - slpBalance_gt: BigDecimal - slpBalance_lt: BigDecimal - slpBalance_gte: BigDecimal - slpBalance_lte: BigDecimal - slpBalance_in: [BigDecimal!] - slpBalance_not_in: [BigDecimal!] - slpAge: BigDecimal - slpAge_not: BigDecimal - slpAge_gt: BigDecimal - slpAge_lt: BigDecimal - slpAge_gte: BigDecimal - slpAge_lte: BigDecimal - slpAge_in: [BigDecimal!] - slpAge_not_in: [BigDecimal!] - slpAgeRemoved: BigDecimal - slpAgeRemoved_not: BigDecimal - slpAgeRemoved_gt: BigDecimal - slpAgeRemoved_lt: BigDecimal - slpAgeRemoved_gte: BigDecimal - slpAgeRemoved_lte: BigDecimal - slpAgeRemoved_in: [BigDecimal!] - slpAgeRemoved_not_in: [BigDecimal!] - slpDeposited: BigDecimal - slpDeposited_not: BigDecimal - slpDeposited_gt: BigDecimal - slpDeposited_lt: BigDecimal - slpDeposited_gte: BigDecimal - slpDeposited_lte: BigDecimal - slpDeposited_in: [BigDecimal!] - slpDeposited_not_in: [BigDecimal!] - slpWithdrawn: BigDecimal - slpWithdrawn_not: BigDecimal - slpWithdrawn_gt: BigDecimal - slpWithdrawn_lt: BigDecimal - slpWithdrawn_gte: BigDecimal - slpWithdrawn_lte: BigDecimal - slpWithdrawn_in: [BigDecimal!] - slpWithdrawn_not_in: [BigDecimal!] - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - entryUSD: BigDecimal - entryUSD_not: BigDecimal - entryUSD_gt: BigDecimal - entryUSD_lt: BigDecimal - entryUSD_gte: BigDecimal - entryUSD_lte: BigDecimal - entryUSD_in: [BigDecimal!] - entryUSD_not_in: [BigDecimal!] - exitUSD: BigDecimal - exitUSD_not: BigDecimal - exitUSD_gt: BigDecimal - exitUSD_lt: BigDecimal - exitUSD_gte: BigDecimal - exitUSD_lte: BigDecimal - exitUSD_in: [BigDecimal!] - exitUSD_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - sushiHarvestedUSD: BigDecimal - sushiHarvestedUSD_not: BigDecimal - sushiHarvestedUSD_gt: BigDecimal - sushiHarvestedUSD_lt: BigDecimal - sushiHarvestedUSD_gte: BigDecimal - sushiHarvestedUSD_lte: BigDecimal - sushiHarvestedUSD_in: [BigDecimal!] - sushiHarvestedUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PoolHistory_filter] - or: [PoolHistory_filter] -} - -enum PoolHistory_orderBy { - id - pool - pool__id - pool__pair - pool__allocPoint - pool__lastRewardBlock - pool__accSushiPerShare - pool__balance - pool__userCount - pool__slpBalance - pool__slpAge - pool__slpAgeRemoved - pool__slpDeposited - pool__slpWithdrawn - pool__timestamp - pool__block - pool__updatedAt - pool__entryUSD - pool__exitUSD - pool__sushiHarvested - pool__sushiHarvestedUSD - slpBalance - slpAge - slpAgeRemoved - slpDeposited - slpWithdrawn - userCount - timestamp - block - entryUSD - exitUSD - sushiHarvested - sushiHarvestedUSD -} - -input Pool_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - owner: String - owner_not: String - owner_gt: String - owner_lt: String - owner_gte: String - owner_lte: String - owner_in: [String!] - owner_not_in: [String!] - owner_contains: String - owner_contains_nocase: String - owner_not_contains: String - owner_not_contains_nocase: String - owner_starts_with: String - owner_starts_with_nocase: String - owner_not_starts_with: String - owner_not_starts_with_nocase: String - owner_ends_with: String - owner_ends_with_nocase: String - owner_not_ends_with: String - owner_not_ends_with_nocase: String - owner_: MasterChef_filter - pair: Bytes - pair_not: Bytes - pair_gt: Bytes - pair_lt: Bytes - pair_gte: Bytes - pair_lte: Bytes - pair_in: [Bytes!] - pair_not_in: [Bytes!] - pair_contains: Bytes - pair_not_contains: Bytes - allocPoint: BigInt - allocPoint_not: BigInt - allocPoint_gt: BigInt - allocPoint_lt: BigInt - allocPoint_gte: BigInt - allocPoint_lte: BigInt - allocPoint_in: [BigInt!] - allocPoint_not_in: [BigInt!] - lastRewardBlock: BigInt - lastRewardBlock_not: BigInt - lastRewardBlock_gt: BigInt - lastRewardBlock_lt: BigInt - lastRewardBlock_gte: BigInt - lastRewardBlock_lte: BigInt - lastRewardBlock_in: [BigInt!] - lastRewardBlock_not_in: [BigInt!] - accSushiPerShare: BigInt - accSushiPerShare_not: BigInt - accSushiPerShare_gt: BigInt - accSushiPerShare_lt: BigInt - accSushiPerShare_gte: BigInt - accSushiPerShare_lte: BigInt - accSushiPerShare_in: [BigInt!] - accSushiPerShare_not_in: [BigInt!] - balance: BigInt - balance_not: BigInt - balance_gt: BigInt - balance_lt: BigInt - balance_gte: BigInt - balance_lte: BigInt - balance_in: [BigInt!] - balance_not_in: [BigInt!] - users_: User_filter - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - slpBalance: BigDecimal - slpBalance_not: BigDecimal - slpBalance_gt: BigDecimal - slpBalance_lt: BigDecimal - slpBalance_gte: BigDecimal - slpBalance_lte: BigDecimal - slpBalance_in: [BigDecimal!] - slpBalance_not_in: [BigDecimal!] - slpAge: BigDecimal - slpAge_not: BigDecimal - slpAge_gt: BigDecimal - slpAge_lt: BigDecimal - slpAge_gte: BigDecimal - slpAge_lte: BigDecimal - slpAge_in: [BigDecimal!] - slpAge_not_in: [BigDecimal!] - slpAgeRemoved: BigDecimal - slpAgeRemoved_not: BigDecimal - slpAgeRemoved_gt: BigDecimal - slpAgeRemoved_lt: BigDecimal - slpAgeRemoved_gte: BigDecimal - slpAgeRemoved_lte: BigDecimal - slpAgeRemoved_in: [BigDecimal!] - slpAgeRemoved_not_in: [BigDecimal!] - slpDeposited: BigDecimal - slpDeposited_not: BigDecimal - slpDeposited_gt: BigDecimal - slpDeposited_lt: BigDecimal - slpDeposited_gte: BigDecimal - slpDeposited_lte: BigDecimal - slpDeposited_in: [BigDecimal!] - slpDeposited_not_in: [BigDecimal!] - slpWithdrawn: BigDecimal - slpWithdrawn_not: BigDecimal - slpWithdrawn_gt: BigDecimal - slpWithdrawn_lt: BigDecimal - slpWithdrawn_gte: BigDecimal - slpWithdrawn_lte: BigDecimal - slpWithdrawn_in: [BigDecimal!] - slpWithdrawn_not_in: [BigDecimal!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - updatedAt: BigInt - updatedAt_not: BigInt - updatedAt_gt: BigInt - updatedAt_lt: BigInt - updatedAt_gte: BigInt - updatedAt_lte: BigInt - updatedAt_in: [BigInt!] - updatedAt_not_in: [BigInt!] - entryUSD: BigDecimal - entryUSD_not: BigDecimal - entryUSD_gt: BigDecimal - entryUSD_lt: BigDecimal - entryUSD_gte: BigDecimal - entryUSD_lte: BigDecimal - entryUSD_in: [BigDecimal!] - entryUSD_not_in: [BigDecimal!] - exitUSD: BigDecimal - exitUSD_not: BigDecimal - exitUSD_gt: BigDecimal - exitUSD_lt: BigDecimal - exitUSD_gte: BigDecimal - exitUSD_lte: BigDecimal - exitUSD_in: [BigDecimal!] - exitUSD_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - sushiHarvestedUSD: BigDecimal - sushiHarvestedUSD_not: BigDecimal - sushiHarvestedUSD_gt: BigDecimal - sushiHarvestedUSD_lt: BigDecimal - sushiHarvestedUSD_gte: BigDecimal - sushiHarvestedUSD_lte: BigDecimal - sushiHarvestedUSD_in: [BigDecimal!] - sushiHarvestedUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Pool_filter] - or: [Pool_filter] -} - -enum Pool_orderBy { - id - owner - owner__id - owner__bonusMultiplier - owner__bonusEndBlock - owner__devaddr - owner__migrator - owner__owner - owner__startBlock - owner__sushi - owner__sushiPerBlock - owner__totalAllocPoint - owner__poolCount - owner__slpBalance - owner__slpAge - owner__slpAgeRemoved - owner__slpDeposited - owner__slpWithdrawn - owner__updatedAt - pair - allocPoint - lastRewardBlock - accSushiPerShare - balance - users - userCount - slpBalance - slpAge - slpAgeRemoved - slpDeposited - slpWithdrawn - timestamp - block - updatedAt - entryUSD - exitUSD - sushiHarvested - sushiHarvestedUSD -} - -type Query { - masterChef( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MasterChef - masterChefs( - skip: Int = 0 - first: Int = 100 - orderBy: MasterChef_orderBy - orderDirection: OrderDirection - where: MasterChef_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MasterChef!]! - history( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): History - histories( - skip: Int = 0 - first: Int = 100 - orderBy: History_orderBy - orderDirection: OrderDirection - where: History_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [History!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - poolHistory( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PoolHistory - poolHistories( - skip: Int = 0 - first: Int = 100 - orderBy: PoolHistory_orderBy - orderDirection: OrderDirection - where: PoolHistory_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PoolHistory!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Subscription { - masterChef( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MasterChef - masterChefs( - skip: Int = 0 - first: Int = 100 - orderBy: MasterChef_orderBy - orderDirection: OrderDirection - where: MasterChef_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MasterChef!]! - history( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): History - histories( - skip: Int = 0 - first: Int = 100 - orderBy: History_orderBy - orderDirection: OrderDirection - where: History_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [History!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - poolHistory( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PoolHistory - poolHistories( - skip: Int = 0 - first: Int = 100 - orderBy: PoolHistory_orderBy - orderDirection: OrderDirection - where: PoolHistory_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PoolHistory!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type User { - id: ID! - address: Bytes! - pool: Pool - amount: BigInt! - rewardDebt: BigInt! - entryUSD: BigDecimal! - exitUSD: BigDecimal! - sushiHarvested: BigDecimal! - sushiHarvestedUSD: BigDecimal! - timestamp: BigInt! - block: BigInt! -} - -input User_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - address: Bytes - address_not: Bytes - address_gt: Bytes - address_lt: Bytes - address_gte: Bytes - address_lte: Bytes - address_in: [Bytes!] - address_not_in: [Bytes!] - address_contains: Bytes - address_not_contains: Bytes - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - rewardDebt: BigInt - rewardDebt_not: BigInt - rewardDebt_gt: BigInt - rewardDebt_lt: BigInt - rewardDebt_gte: BigInt - rewardDebt_lte: BigInt - rewardDebt_in: [BigInt!] - rewardDebt_not_in: [BigInt!] - entryUSD: BigDecimal - entryUSD_not: BigDecimal - entryUSD_gt: BigDecimal - entryUSD_lt: BigDecimal - entryUSD_gte: BigDecimal - entryUSD_lte: BigDecimal - entryUSD_in: [BigDecimal!] - entryUSD_not_in: [BigDecimal!] - exitUSD: BigDecimal - exitUSD_not: BigDecimal - exitUSD_gt: BigDecimal - exitUSD_lt: BigDecimal - exitUSD_gte: BigDecimal - exitUSD_lte: BigDecimal - exitUSD_in: [BigDecimal!] - exitUSD_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - sushiHarvestedUSD: BigDecimal - sushiHarvestedUSD_not: BigDecimal - sushiHarvestedUSD_gt: BigDecimal - sushiHarvestedUSD_lt: BigDecimal - sushiHarvestedUSD_gte: BigDecimal - sushiHarvestedUSD_lte: BigDecimal - sushiHarvestedUSD_in: [BigDecimal!] - sushiHarvestedUSD_not_in: [BigDecimal!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [User_filter] - or: [User_filter] -} - -enum User_orderBy { - id - address - pool - pool__id - pool__pair - pool__allocPoint - pool__lastRewardBlock - pool__accSushiPerShare - pool__balance - pool__userCount - pool__slpBalance - pool__slpAge - pool__slpAgeRemoved - pool__slpDeposited - pool__slpWithdrawn - pool__timestamp - pool__block - pool__updatedAt - pool__entryUSD - pool__exitUSD - pool__sushiHarvested - pool__sushiHarvestedUSD - amount - rewardDebt - entryUSD - exitUSD - sushiHarvested - sushiHarvestedUSD - timestamp - block -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/master-chef-v2/graphql.ts b/packages/graph-client/src/subgraphs/master-chef-v2/graphql.ts deleted file mode 100644 index 81d0ae2967..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v2/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './master-chef-v2-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/master-chef-v2/index.ts b/packages/graph-client/src/subgraphs/master-chef-v2/index.ts deleted file mode 100644 index b161405c5e..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v2/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './queries/user-positions' -export * from './queries/rewarders' diff --git a/packages/graph-client/src/subgraphs/master-chef-v2/queries/rewarders.ts b/packages/graph-client/src/subgraphs/master-chef-v2/queries/rewarders.ts deleted file mode 100644 index 169faf4e33..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v2/queries/rewarders.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import { ChainId } from 'sushi/chain' -import { MASTERCHEF_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import { graphql } from '../graphql' - -export const MasterChefV2RewardersQuery = graphql( - ` - query MasterChefV2Rewarders( - $first: Int = 1000 - $skip: Int = 0 - $where: Rewarder_filter - $block: Block_height - ) { - rewarders(first: $first, skip: $skip, where: $where, block: $block) { - id - rewardToken - rewardPerSecond - } - } -`, -) - -export type GetMasterChefV2Rewarders = VariablesOf< - typeof MasterChefV2RewardersQuery -> - -export async function getMasterChefV2Rewarders( - { ...variables }: GetMasterChefV2Rewarders, - options?: RequestOptions, -) { - const url = `https://${MASTERCHEF_V2_SUBGRAPH_URL}` - - const result = await requestPaged({ - chainId: ChainId.ETHEREUM, - url, - query: MasterChefV2RewardersQuery, - variables, - options, - }) - - return result.rewarders.map((rewarder) => { - // TODO: multichain id for rewardToken? - return { - id: rewarder.id, - address: rewarder.rewardToken, - rewardPerSecond: BigInt(rewarder.rewardPerSecond), - } - }) -} - -export type MasterChefV2Rewarders = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/master-chef-v2/queries/user-positions.ts b/packages/graph-client/src/subgraphs/master-chef-v2/queries/user-positions.ts deleted file mode 100644 index a3759e7c5c..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v2/queries/user-positions.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import { ChainId } from 'sushi/chain' -import { MASTERCHEF_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import { SushiSwapProtocol } from 'sushi' -import { graphql } from '../graphql' - -export const MasterChefV2UserPositionsQuery = graphql( - ` - query UserPositions($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: User_orderBy, $orderDirection: OrderDirection, $where: User_filter) { - users(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - address - balance: amount - pool { - id: pair - } - } - } -`, -) - -export type GetMasterChefV2UserPositions = VariablesOf< - typeof MasterChefV2UserPositionsQuery -> - -export async function getMasterChefV2UserPositions( - { ...variables }: GetMasterChefV2UserPositions, - options?: RequestOptions, -) { - const url = `https://${MASTERCHEF_V2_SUBGRAPH_URL}` - - const result = await requestPaged({ - chainId: ChainId.ETHEREUM, - url, - query: MasterChefV2UserPositionsQuery, - variables, - options, - }) - - return result.users.flatMap((position) => { - if (!position.pool) { - return [] - } - - const pool = { - ...convertIdToMultichainId( - copyIdToAddress(addChainId(ChainId.ETHEREUM, position.pool)), - ), - protocol: SushiSwapProtocol.SUSHISWAP_V2, - } - - return { - id: position.id, - address: position.address, - balance: position.balance, - pool, - } - }) -} - -export type MasterChefV2UserPositions = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/master-chef-v2/schema.graphql b/packages/graph-client/src/subgraphs/master-chef-v2/schema.graphql deleted file mode 100644 index 9b8d761688..0000000000 --- a/packages/graph-client/src/subgraphs/master-chef-v2/schema.graphql +++ /dev/null @@ -1,749 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -scalar Bytes - -"8 bytes signed integer\n" -scalar Int8 - -type MasterChef { - id: ID! - totalAllocPoint: BigInt! - pools(skip: Int = 0, first: Int = 100, orderBy: Pool_orderBy, orderDirection: OrderDirection, where: Pool_filter): [Pool!] - poolCount: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input MasterChef_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - totalAllocPoint: BigInt - totalAllocPoint_not: BigInt - totalAllocPoint_gt: BigInt - totalAllocPoint_lt: BigInt - totalAllocPoint_gte: BigInt - totalAllocPoint_lte: BigInt - totalAllocPoint_in: [BigInt!] - totalAllocPoint_not_in: [BigInt!] - pools_: Pool_filter - poolCount: BigInt - poolCount_not: BigInt - poolCount_gt: BigInt - poolCount_lt: BigInt - poolCount_gte: BigInt - poolCount_lte: BigInt - poolCount_in: [BigInt!] - poolCount_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [MasterChef_filter] - or: [MasterChef_filter] -} - -enum MasterChef_orderBy { - id - totalAllocPoint - pools - poolCount - timestamp - block -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Pool { - id: ID! - masterChef: MasterChef! - pair: Bytes! - rewarder: Rewarder - allocPoint: BigInt! - lastRewardBlock: BigInt! - accSushiPerShare: BigInt! - slpBalance: BigInt! - users(skip: Int = 0, first: Int = 100, orderBy: User_orderBy, orderDirection: OrderDirection, where: User_filter): [User!]! - userCount: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input Pool_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - masterChef: String - masterChef_not: String - masterChef_gt: String - masterChef_lt: String - masterChef_gte: String - masterChef_lte: String - masterChef_in: [String!] - masterChef_not_in: [String!] - masterChef_contains: String - masterChef_contains_nocase: String - masterChef_not_contains: String - masterChef_not_contains_nocase: String - masterChef_starts_with: String - masterChef_starts_with_nocase: String - masterChef_not_starts_with: String - masterChef_not_starts_with_nocase: String - masterChef_ends_with: String - masterChef_ends_with_nocase: String - masterChef_not_ends_with: String - masterChef_not_ends_with_nocase: String - masterChef_: MasterChef_filter - pair: Bytes - pair_not: Bytes - pair_gt: Bytes - pair_lt: Bytes - pair_gte: Bytes - pair_lte: Bytes - pair_in: [Bytes!] - pair_not_in: [Bytes!] - pair_contains: Bytes - pair_not_contains: Bytes - rewarder: String - rewarder_not: String - rewarder_gt: String - rewarder_lt: String - rewarder_gte: String - rewarder_lte: String - rewarder_in: [String!] - rewarder_not_in: [String!] - rewarder_contains: String - rewarder_contains_nocase: String - rewarder_not_contains: String - rewarder_not_contains_nocase: String - rewarder_starts_with: String - rewarder_starts_with_nocase: String - rewarder_not_starts_with: String - rewarder_not_starts_with_nocase: String - rewarder_ends_with: String - rewarder_ends_with_nocase: String - rewarder_not_ends_with: String - rewarder_not_ends_with_nocase: String - rewarder_: Rewarder_filter - allocPoint: BigInt - allocPoint_not: BigInt - allocPoint_gt: BigInt - allocPoint_lt: BigInt - allocPoint_gte: BigInt - allocPoint_lte: BigInt - allocPoint_in: [BigInt!] - allocPoint_not_in: [BigInt!] - lastRewardBlock: BigInt - lastRewardBlock_not: BigInt - lastRewardBlock_gt: BigInt - lastRewardBlock_lt: BigInt - lastRewardBlock_gte: BigInt - lastRewardBlock_lte: BigInt - lastRewardBlock_in: [BigInt!] - lastRewardBlock_not_in: [BigInt!] - accSushiPerShare: BigInt - accSushiPerShare_not: BigInt - accSushiPerShare_gt: BigInt - accSushiPerShare_lt: BigInt - accSushiPerShare_gte: BigInt - accSushiPerShare_lte: BigInt - accSushiPerShare_in: [BigInt!] - accSushiPerShare_not_in: [BigInt!] - slpBalance: BigInt - slpBalance_not: BigInt - slpBalance_gt: BigInt - slpBalance_lt: BigInt - slpBalance_gte: BigInt - slpBalance_lte: BigInt - slpBalance_in: [BigInt!] - slpBalance_not_in: [BigInt!] - users_: User_filter - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Pool_filter] - or: [Pool_filter] -} - -enum Pool_orderBy { - id - masterChef - masterChef__id - masterChef__totalAllocPoint - masterChef__poolCount - masterChef__timestamp - masterChef__block - pair - rewarder - rewarder__id - rewarder__rewardToken - rewarder__rewardPerSecond - rewarder__timestamp - rewarder__block - allocPoint - lastRewardBlock - accSushiPerShare - slpBalance - users - userCount - timestamp - block -} - -type Query { - masterChef( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MasterChef - masterChefs( - skip: Int = 0 - first: Int = 100 - orderBy: MasterChef_orderBy - orderDirection: OrderDirection - where: MasterChef_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MasterChef!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - rewarder( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Rewarder - rewarders( - skip: Int = 0 - first: Int = 100 - orderBy: Rewarder_orderBy - orderDirection: OrderDirection - where: Rewarder_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Rewarder!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Rewarder { - id: ID! - rewardToken: Bytes! - rewardPerSecond: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input Rewarder_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - rewardToken: Bytes - rewardToken_not: Bytes - rewardToken_gt: Bytes - rewardToken_lt: Bytes - rewardToken_gte: Bytes - rewardToken_lte: Bytes - rewardToken_in: [Bytes!] - rewardToken_not_in: [Bytes!] - rewardToken_contains: Bytes - rewardToken_not_contains: Bytes - rewardPerSecond: BigInt - rewardPerSecond_not: BigInt - rewardPerSecond_gt: BigInt - rewardPerSecond_lt: BigInt - rewardPerSecond_gte: BigInt - rewardPerSecond_lte: BigInt - rewardPerSecond_in: [BigInt!] - rewardPerSecond_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Rewarder_filter] - or: [Rewarder_filter] -} - -enum Rewarder_orderBy { - id - rewardToken - rewardPerSecond - timestamp - block -} - -type Subscription { - masterChef( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MasterChef - masterChefs( - skip: Int = 0 - first: Int = 100 - orderBy: MasterChef_orderBy - orderDirection: OrderDirection - where: MasterChef_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MasterChef!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - rewarder( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Rewarder - rewarders( - skip: Int = 0 - first: Int = 100 - orderBy: Rewarder_orderBy - orderDirection: OrderDirection - where: Rewarder_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Rewarder!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type User { - id: ID! - address: Bytes! - pool: Pool - amount: BigInt! - rewardDebt: BigInt! - sushiHarvested: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input User_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - address: Bytes - address_not: Bytes - address_gt: Bytes - address_lt: Bytes - address_gte: Bytes - address_lte: Bytes - address_in: [Bytes!] - address_not_in: [Bytes!] - address_contains: Bytes - address_not_contains: Bytes - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - rewardDebt: BigInt - rewardDebt_not: BigInt - rewardDebt_gt: BigInt - rewardDebt_lt: BigInt - rewardDebt_gte: BigInt - rewardDebt_lte: BigInt - rewardDebt_in: [BigInt!] - rewardDebt_not_in: [BigInt!] - sushiHarvested: BigInt - sushiHarvested_not: BigInt - sushiHarvested_gt: BigInt - sushiHarvested_lt: BigInt - sushiHarvested_gte: BigInt - sushiHarvested_lte: BigInt - sushiHarvested_in: [BigInt!] - sushiHarvested_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [User_filter] - or: [User_filter] -} - -enum User_orderBy { - id - address - pool - pool__id - pool__pair - pool__allocPoint - pool__lastRewardBlock - pool__accSushiPerShare - pool__slpBalance - pool__userCount - pool__timestamp - pool__block - amount - rewardDebt - sushiHarvested - timestamp - block -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/mini-chef/graphql.ts b/packages/graph-client/src/subgraphs/mini-chef/graphql.ts deleted file mode 100644 index 01a82d3406..0000000000 --- a/packages/graph-client/src/subgraphs/mini-chef/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './mini-chef-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/mini-chef/index.ts b/packages/graph-client/src/subgraphs/mini-chef/index.ts deleted file mode 100644 index b161405c5e..0000000000 --- a/packages/graph-client/src/subgraphs/mini-chef/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './queries/user-positions' -export * from './queries/rewarders' diff --git a/packages/graph-client/src/subgraphs/mini-chef/queries/rewarders.ts b/packages/graph-client/src/subgraphs/mini-chef/queries/rewarders.ts deleted file mode 100644 index 817e18ac4c..0000000000 --- a/packages/graph-client/src/subgraphs/mini-chef/queries/rewarders.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { VariablesOf } from 'gql.tada' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { MiniChefChainId } from 'sushi/config' -import { MINICHEF_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { graphql } from '../graphql' - -export const MiniChefRewardersQuery = graphql( - ` -query MiniChefRewarders( - $first: Int = 1000 - $skip: Int = 0 - $where: Rewarder_filter - $block: Block_height -) { - rewarders(first: $first, skip: $skip, where: $where, block: $block) { - id - rewardToken - rewardPerSecond - } -} - -`, -) - -export type GetMiniChefRewarders = VariablesOf & - ChainIdVariable - -export async function getMiniChefRewarders( - { chainId, ...variables }: GetMiniChefRewarders, - options?: RequestOptions, -) { - const url = `https://${MINICHEF_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: MiniChefRewardersQuery, - variables, - options, - }) - - return result.rewarders.map((rewarder) => { - // TODO: multichain id for rewardToken? - return { - id: rewarder.id, - address: rewarder.rewardToken, - rewardPerSecond: BigInt(rewarder.rewardPerSecond), - } - }) -} - -export type MiniChefRewarders = Awaited> diff --git a/packages/graph-client/src/subgraphs/mini-chef/queries/user-positions.ts b/packages/graph-client/src/subgraphs/mini-chef/queries/user-positions.ts deleted file mode 100644 index 228ce3bf1c..0000000000 --- a/packages/graph-client/src/subgraphs/mini-chef/queries/user-positions.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { VariablesOf } from 'gql.tada' - -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { MiniChefChainId } from 'sushi/config' -import { MINICHEF_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { SushiSwapProtocol } from 'sushi/types' -import { graphql } from '../graphql' - -export const MiniChefUserPositionsQuery = graphql( - ` - query UserPositions($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: User_orderBy, $orderDirection: OrderDirection, $where: User_filter) { - users(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - address - balance: amount - pool { - id: pair - } - } - } -`, -) - -export type GetMiniChefUserPositions = VariablesOf< - typeof MiniChefUserPositionsQuery -> & - ChainIdVariable - -export async function getMiniChefUserPositions( - { chainId, ...variables }: GetMiniChefUserPositions, - options?: RequestOptions, -) { - const url = `https://${MINICHEF_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: MiniChefUserPositionsQuery, - variables, - options, - }) - - return result.users.flatMap((position) => { - if (!position.pool) { - return [] - } - - const pool = { - ...convertIdToMultichainId( - copyIdToAddress(addChainId(chainId, position.pool)), - ), - protocol: SushiSwapProtocol.SUSHISWAP_V2, - } - - return { - id: position.id, - address: position.address, - balance: position.balance, - pool, - } - }) -} - -export type MiniChefUserPositions = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/mini-chef/schema.graphql b/packages/graph-client/src/subgraphs/mini-chef/schema.graphql deleted file mode 100644 index 516e5d30bd..0000000000 --- a/packages/graph-client/src/subgraphs/mini-chef/schema.graphql +++ /dev/null @@ -1,878 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -scalar Bytes - -"8 bytes signed integer\n" -scalar Int8 - -type MiniChef { - id: ID! - sushi: Bytes! - sushiPerSecond: BigInt! - totalAllocPoint: BigInt! - pools(skip: Int = 0, first: Int = 100, orderBy: Pool_orderBy, orderDirection: OrderDirection, where: Pool_filter): [Pool!] - poolCount: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input MiniChef_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - sushi: Bytes - sushi_not: Bytes - sushi_gt: Bytes - sushi_lt: Bytes - sushi_gte: Bytes - sushi_lte: Bytes - sushi_in: [Bytes!] - sushi_not_in: [Bytes!] - sushi_contains: Bytes - sushi_not_contains: Bytes - sushiPerSecond: BigInt - sushiPerSecond_not: BigInt - sushiPerSecond_gt: BigInt - sushiPerSecond_lt: BigInt - sushiPerSecond_gte: BigInt - sushiPerSecond_lte: BigInt - sushiPerSecond_in: [BigInt!] - sushiPerSecond_not_in: [BigInt!] - totalAllocPoint: BigInt - totalAllocPoint_not: BigInt - totalAllocPoint_gt: BigInt - totalAllocPoint_lt: BigInt - totalAllocPoint_gte: BigInt - totalAllocPoint_lte: BigInt - totalAllocPoint_in: [BigInt!] - totalAllocPoint_not_in: [BigInt!] - pools_: Pool_filter - poolCount: BigInt - poolCount_not: BigInt - poolCount_gt: BigInt - poolCount_lt: BigInt - poolCount_gte: BigInt - poolCount_lte: BigInt - poolCount_in: [BigInt!] - poolCount_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [MiniChef_filter] - or: [MiniChef_filter] -} - -enum MiniChef_orderBy { - id - sushi - sushiPerSecond - totalAllocPoint - pools - poolCount - timestamp - block -} - -type NativeRewarderPool { - id: ID! - allocPoint: BigInt! -} - -input NativeRewarderPool_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - allocPoint: BigInt - allocPoint_not: BigInt - allocPoint_gt: BigInt - allocPoint_lt: BigInt - allocPoint_gte: BigInt - allocPoint_lte: BigInt - allocPoint_in: [BigInt!] - allocPoint_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [NativeRewarderPool_filter] - or: [NativeRewarderPool_filter] -} - -enum NativeRewarderPool_orderBy { - id - allocPoint -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Pool { - id: ID! - miniChef: MiniChef! - pair: Bytes! - rewarder: Rewarder - allocPoint: BigInt! - lastRewardTime: BigInt! - accSushiPerShare: BigInt! - slpBalance: BigInt! - users(skip: Int = 0, first: Int = 100, orderBy: User_orderBy, orderDirection: OrderDirection, where: User_filter): [User!]! - userCount: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input Pool_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - miniChef: String - miniChef_not: String - miniChef_gt: String - miniChef_lt: String - miniChef_gte: String - miniChef_lte: String - miniChef_in: [String!] - miniChef_not_in: [String!] - miniChef_contains: String - miniChef_contains_nocase: String - miniChef_not_contains: String - miniChef_not_contains_nocase: String - miniChef_starts_with: String - miniChef_starts_with_nocase: String - miniChef_not_starts_with: String - miniChef_not_starts_with_nocase: String - miniChef_ends_with: String - miniChef_ends_with_nocase: String - miniChef_not_ends_with: String - miniChef_not_ends_with_nocase: String - miniChef_: MiniChef_filter - pair: Bytes - pair_not: Bytes - pair_gt: Bytes - pair_lt: Bytes - pair_gte: Bytes - pair_lte: Bytes - pair_in: [Bytes!] - pair_not_in: [Bytes!] - pair_contains: Bytes - pair_not_contains: Bytes - rewarder: String - rewarder_not: String - rewarder_gt: String - rewarder_lt: String - rewarder_gte: String - rewarder_lte: String - rewarder_in: [String!] - rewarder_not_in: [String!] - rewarder_contains: String - rewarder_contains_nocase: String - rewarder_not_contains: String - rewarder_not_contains_nocase: String - rewarder_starts_with: String - rewarder_starts_with_nocase: String - rewarder_not_starts_with: String - rewarder_not_starts_with_nocase: String - rewarder_ends_with: String - rewarder_ends_with_nocase: String - rewarder_not_ends_with: String - rewarder_not_ends_with_nocase: String - rewarder_: Rewarder_filter - allocPoint: BigInt - allocPoint_not: BigInt - allocPoint_gt: BigInt - allocPoint_lt: BigInt - allocPoint_gte: BigInt - allocPoint_lte: BigInt - allocPoint_in: [BigInt!] - allocPoint_not_in: [BigInt!] - lastRewardTime: BigInt - lastRewardTime_not: BigInt - lastRewardTime_gt: BigInt - lastRewardTime_lt: BigInt - lastRewardTime_gte: BigInt - lastRewardTime_lte: BigInt - lastRewardTime_in: [BigInt!] - lastRewardTime_not_in: [BigInt!] - accSushiPerShare: BigInt - accSushiPerShare_not: BigInt - accSushiPerShare_gt: BigInt - accSushiPerShare_lt: BigInt - accSushiPerShare_gte: BigInt - accSushiPerShare_lte: BigInt - accSushiPerShare_in: [BigInt!] - accSushiPerShare_not_in: [BigInt!] - slpBalance: BigInt - slpBalance_not: BigInt - slpBalance_gt: BigInt - slpBalance_lt: BigInt - slpBalance_gte: BigInt - slpBalance_lte: BigInt - slpBalance_in: [BigInt!] - slpBalance_not_in: [BigInt!] - users_: User_filter - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Pool_filter] - or: [Pool_filter] -} - -enum Pool_orderBy { - id - miniChef - miniChef__id - miniChef__sushi - miniChef__sushiPerSecond - miniChef__totalAllocPoint - miniChef__poolCount - miniChef__timestamp - miniChef__block - pair - rewarder - rewarder__id - rewarder__rewardToken - rewarder__rewardPerSecond - rewarder__totalAllocPoint - rewarder__timestamp - rewarder__block - allocPoint - lastRewardTime - accSushiPerShare - slpBalance - users - userCount - timestamp - block -} - -type Query { - miniChef( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MiniChef - miniChefs( - skip: Int = 0 - first: Int = 100 - orderBy: MiniChef_orderBy - orderDirection: OrderDirection - where: MiniChef_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MiniChef!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - nativeRewarderPool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): NativeRewarderPool - nativeRewarderPools( - skip: Int = 0 - first: Int = 100 - orderBy: NativeRewarderPool_orderBy - orderDirection: OrderDirection - where: NativeRewarderPool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [NativeRewarderPool!]! - rewarder( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Rewarder - rewarders( - skip: Int = 0 - first: Int = 100 - orderBy: Rewarder_orderBy - orderDirection: OrderDirection - where: Rewarder_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Rewarder!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Rewarder { - id: ID! - rewardToken: Bytes! - rewardPerSecond: BigInt! - totalAllocPoint: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input Rewarder_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - rewardToken: Bytes - rewardToken_not: Bytes - rewardToken_gt: Bytes - rewardToken_lt: Bytes - rewardToken_gte: Bytes - rewardToken_lte: Bytes - rewardToken_in: [Bytes!] - rewardToken_not_in: [Bytes!] - rewardToken_contains: Bytes - rewardToken_not_contains: Bytes - rewardPerSecond: BigInt - rewardPerSecond_not: BigInt - rewardPerSecond_gt: BigInt - rewardPerSecond_lt: BigInt - rewardPerSecond_gte: BigInt - rewardPerSecond_lte: BigInt - rewardPerSecond_in: [BigInt!] - rewardPerSecond_not_in: [BigInt!] - totalAllocPoint: BigInt - totalAllocPoint_not: BigInt - totalAllocPoint_gt: BigInt - totalAllocPoint_lt: BigInt - totalAllocPoint_gte: BigInt - totalAllocPoint_lte: BigInt - totalAllocPoint_in: [BigInt!] - totalAllocPoint_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Rewarder_filter] - or: [Rewarder_filter] -} - -enum Rewarder_orderBy { - id - rewardToken - rewardPerSecond - totalAllocPoint - timestamp - block -} - -type Subscription { - miniChef( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): MiniChef - miniChefs( - skip: Int = 0 - first: Int = 100 - orderBy: MiniChef_orderBy - orderDirection: OrderDirection - where: MiniChef_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [MiniChef!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - nativeRewarderPool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): NativeRewarderPool - nativeRewarderPools( - skip: Int = 0 - first: Int = 100 - orderBy: NativeRewarderPool_orderBy - orderDirection: OrderDirection - where: NativeRewarderPool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [NativeRewarderPool!]! - rewarder( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Rewarder - rewarders( - skip: Int = 0 - first: Int = 100 - orderBy: Rewarder_orderBy - orderDirection: OrderDirection - where: Rewarder_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Rewarder!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type User { - id: ID! - address: Bytes! - pool: Pool - amount: BigInt! - rewardDebt: BigInt! - sushiHarvested: BigInt! - timestamp: BigInt! - block: BigInt! -} - -input User_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - address: Bytes - address_not: Bytes - address_gt: Bytes - address_lt: Bytes - address_gte: Bytes - address_lte: Bytes - address_in: [Bytes!] - address_not_in: [Bytes!] - address_contains: Bytes - address_not_contains: Bytes - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - rewardDebt: BigInt - rewardDebt_not: BigInt - rewardDebt_gt: BigInt - rewardDebt_lt: BigInt - rewardDebt_gte: BigInt - rewardDebt_lte: BigInt - rewardDebt_in: [BigInt!] - rewardDebt_not_in: [BigInt!] - sushiHarvested: BigInt - sushiHarvested_not: BigInt - sushiHarvested_gt: BigInt - sushiHarvested_lt: BigInt - sushiHarvested_gte: BigInt - sushiHarvested_lte: BigInt - sushiHarvested_in: [BigInt!] - sushiHarvested_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [User_filter] - or: [User_filter] -} - -enum User_orderBy { - id - address - pool - pool__id - pool__pair - pool__allocPoint - pool__lastRewardTime - pool__accSushiPerShare - pool__slpBalance - pool__userCount - pool__timestamp - pool__block - amount - rewardDebt - sushiHarvested - timestamp - block -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/steer/graphql.ts b/packages/graph-client/src/subgraphs/steer/graphql.ts deleted file mode 100644 index 5e19070a0d..0000000000 --- a/packages/graph-client/src/subgraphs/steer/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './steer-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/steer/index.ts b/packages/graph-client/src/subgraphs/steer/index.ts deleted file mode 100644 index 5bda41d19f..0000000000 --- a/packages/graph-client/src/subgraphs/steer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './queries/vaults' diff --git a/packages/graph-client/src/subgraphs/steer/queries/vaults.ts b/packages/graph-client/src/subgraphs/steer/queries/vaults.ts deleted file mode 100644 index 59ada9bb07..0000000000 --- a/packages/graph-client/src/subgraphs/steer/queries/vaults.ts +++ /dev/null @@ -1,135 +0,0 @@ -import type { VariablesOf } from 'gql.tada' - -import { STEER_SUBGRAPH_URL, type SteerChainId } from '@sushiswap/steer-sdk' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { - type Address, - SushiSwapProtocol, - TickMath, - getIdFromChainIdAddress, -} from 'sushi' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { graphql } from '../graphql' - -export const SteerVaultsQuery = graphql(` - query Vaults($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Vault_orderBy, $orderDirection: OrderDirection, $where: Vault_filter) { - vaults(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - feeTier - reserve0: token0Balance - reserve1: token1Balance - pool - state - payloadIpfs - strategyToken { - id - name - - creator { - id - } - admin - } - - positions(first: 1000) { - lowerTick - upperTick - } - - createdAt - token0 - token1 - fees0 - fees1 - - manager: vaultManager - } - } -`) - -export type GetSteerVaults = VariablesOf & - ChainIdVariable - -export async function getSteerVaults( - { chainId, ...variables }: GetSteerVaults, - options?: RequestOptions, -) { - const url = `https://${STEER_SUBGRAPH_URL[chainId]}` - const result = await requestPaged({ - chainId, - url, - query: SteerVaultsQuery, - variables, - options, - }) - - return result.vaults.map((vault) => { - const lowTicks = vault.positions.flatMap((position) => position.lowerTick) - const lowestTick = Math.max( - lowTicks.reduce( - (lowest, tick) => (Number(tick) < lowest ? Number(tick) : lowest), - Number(lowTicks[0] || 0), - ), - TickMath.MIN_TICK, - ) - - const highTicks = vault.positions.flatMap((position) => position.upperTick) - const highestTick = Math.min( - highTicks.reduce( - (highest, tick) => (Number(tick) > highest ? Number(tick) : highest), - Number(highTicks[0] || 0), - ), - TickMath.MAX_TICK, - ) - return { - id: getIdFromChainIdAddress(chainId, vault.id as Address), - chainId: chainId as SteerChainId, - address: vault.id as Address, - - feeTier: Number(vault.feeTier), - - reserve0: BigInt(vault.reserve0), - reserve1: BigInt(vault.reserve1), - - pool: { - id: getIdFromChainIdAddress(chainId, vault.pool as Address), - address: vault.pool as Address, - chainId: chainId as SushiSwapV3ChainId, - protocol: SushiSwapProtocol.SUSHISWAP_V3, - }, - - state: vault.state, - payloadIpfs: vault.payloadIpfs, - strategyToken: { - id: vault.strategyToken.id, - name: vault.strategyToken.name, - creator: { - id: vault.strategyToken.creator.id, - }, - admin: vault.strategyToken.admin, - }, - lowerTick: lowestTick ? BigInt(lowestTick || 0) : null, - upperTick: highestTick ? BigInt(highestTick || 0) : null, - - token0: { - id: getIdFromChainIdAddress(chainId, vault.token0 as Address), - chainId: chainId as SushiSwapV3ChainId, - address: vault.token0 as Address, - }, - token1: { - id: getIdFromChainIdAddress(chainId, vault.token1 as Address), - chainId: chainId as SushiSwapV3ChainId, - address: vault.token1 as Address, - }, - - fees0: BigInt(vault.fees0), - fees1: BigInt(vault.fees1), - - manager: vault.manager, - } - }) -} - -export type SteerVaults = Awaited> diff --git a/packages/graph-client/src/subgraphs/steer/schema.graphql b/packages/graph-client/src/subgraphs/steer/schema.graphql deleted file mode 100644 index 8b3fc7f782..0000000000 --- a/packages/graph-client/src/subgraphs/steer/schema.graphql +++ /dev/null @@ -1,7681 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -type ActionFailure { - id: ID! - timeStamp: BigInt! - method: BigInt! - action: OrchestratorAction! -} - -input ActionFailure_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - method: BigInt - method_not: BigInt - method_gt: BigInt - method_lt: BigInt - method_gte: BigInt - method_lte: BigInt - method_in: [BigInt!] - method_not_in: [BigInt!] - action: String - action_not: String - action_gt: String - action_lt: String - action_gte: String - action_lte: String - action_in: [String!] - action_not_in: [String!] - action_contains: String - action_contains_nocase: String - action_not_contains: String - action_not_contains_nocase: String - action_starts_with: String - action_starts_with_nocase: String - action_not_starts_with: String - action_not_starts_with_nocase: String - action_ends_with: String - action_ends_with_nocase: String - action_not_ends_with: String - action_not_ends_with_nocase: String - action_: OrchestratorAction_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [ActionFailure_filter] - or: [ActionFailure_filter] -} - -enum ActionFailure_orderBy { - id - timeStamp - method - action - action__id - action__timestamp - action__lastUpdated - action__state - action__status - action__vault - action__transactionHash - action__hash - action__gasUsed -} - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -type Bundle { - id: ID! - createdAt: BigInt! - bundle: String! - creator: String! - host: String! - source: String! - output: String! - active: Boolean! - infoHash: String! - hash: String! -} - -input Bundle_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - createdAt: BigInt - createdAt_not: BigInt - createdAt_gt: BigInt - createdAt_lt: BigInt - createdAt_gte: BigInt - createdAt_lte: BigInt - createdAt_in: [BigInt!] - createdAt_not_in: [BigInt!] - bundle: String - bundle_not: String - bundle_gt: String - bundle_lt: String - bundle_gte: String - bundle_lte: String - bundle_in: [String!] - bundle_not_in: [String!] - bundle_contains: String - bundle_contains_nocase: String - bundle_not_contains: String - bundle_not_contains_nocase: String - bundle_starts_with: String - bundle_starts_with_nocase: String - bundle_not_starts_with: String - bundle_not_starts_with_nocase: String - bundle_ends_with: String - bundle_ends_with_nocase: String - bundle_not_ends_with: String - bundle_not_ends_with_nocase: String - creator: String - creator_not: String - creator_gt: String - creator_lt: String - creator_gte: String - creator_lte: String - creator_in: [String!] - creator_not_in: [String!] - creator_contains: String - creator_contains_nocase: String - creator_not_contains: String - creator_not_contains_nocase: String - creator_starts_with: String - creator_starts_with_nocase: String - creator_not_starts_with: String - creator_not_starts_with_nocase: String - creator_ends_with: String - creator_ends_with_nocase: String - creator_not_ends_with: String - creator_not_ends_with_nocase: String - host: String - host_not: String - host_gt: String - host_lt: String - host_gte: String - host_lte: String - host_in: [String!] - host_not_in: [String!] - host_contains: String - host_contains_nocase: String - host_not_contains: String - host_not_contains_nocase: String - host_starts_with: String - host_starts_with_nocase: String - host_not_starts_with: String - host_not_starts_with_nocase: String - host_ends_with: String - host_ends_with_nocase: String - host_not_ends_with: String - host_not_ends_with_nocase: String - source: String - source_not: String - source_gt: String - source_lt: String - source_gte: String - source_lte: String - source_in: [String!] - source_not_in: [String!] - source_contains: String - source_contains_nocase: String - source_not_contains: String - source_not_contains_nocase: String - source_starts_with: String - source_starts_with_nocase: String - source_not_starts_with: String - source_not_starts_with_nocase: String - source_ends_with: String - source_ends_with_nocase: String - source_not_ends_with: String - source_not_ends_with_nocase: String - output: String - output_not: String - output_gt: String - output_lt: String - output_gte: String - output_lte: String - output_in: [String!] - output_not_in: [String!] - output_contains: String - output_contains_nocase: String - output_not_contains: String - output_not_contains_nocase: String - output_starts_with: String - output_starts_with_nocase: String - output_not_starts_with: String - output_not_starts_with_nocase: String - output_ends_with: String - output_ends_with_nocase: String - output_not_ends_with: String - output_not_ends_with_nocase: String - active: Boolean - active_not: Boolean - active_in: [Boolean!] - active_not_in: [Boolean!] - infoHash: String - infoHash_not: String - infoHash_gt: String - infoHash_lt: String - infoHash_gte: String - infoHash_lte: String - infoHash_in: [String!] - infoHash_not_in: [String!] - infoHash_contains: String - infoHash_contains_nocase: String - infoHash_not_contains: String - infoHash_not_contains_nocase: String - infoHash_starts_with: String - infoHash_starts_with_nocase: String - infoHash_not_starts_with: String - infoHash_not_starts_with_nocase: String - infoHash_ends_with: String - infoHash_ends_with_nocase: String - infoHash_not_ends_with: String - infoHash_not_ends_with_nocase: String - hash: String - hash_not: String - hash_gt: String - hash_lt: String - hash_gte: String - hash_lte: String - hash_in: [String!] - hash_not_in: [String!] - hash_contains: String - hash_contains_nocase: String - hash_not_contains: String - hash_not_contains_nocase: String - hash_starts_with: String - hash_starts_with_nocase: String - hash_not_starts_with: String - hash_not_starts_with_nocase: String - hash_ends_with: String - hash_ends_with_nocase: String - hash_not_ends_with: String - hash_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Bundle_filter] - or: [Bundle_filter] -} - -enum Bundle_orderBy { - id - createdAt - bundle - creator - host - source - output - active - infoHash - hash -} - -scalar Bytes - -type Creator { - id: ID! - strategies(skip: Int = 0, first: Int = 100, orderBy: Strategy_orderBy, orderDirection: OrderDirection, where: Strategy_filter): [Strategy!]! - revenue: BigDecimal! - withdrawals(skip: Int = 0, first: Int = 100, orderBy: CreatorWithdrawal_orderBy, orderDirection: OrderDirection, where: CreatorWithdrawal_filter): [CreatorWithdrawal!] - totalValueLocked: BigDecimal! - totalYield: BigDecimal! -} - -type CreatorWithdrawal { - id: ID! - timeStamp: BigInt! - creator: Creator! - amount: BigDecimal! -} - -input CreatorWithdrawal_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - creator: String - creator_not: String - creator_gt: String - creator_lt: String - creator_gte: String - creator_lte: String - creator_in: [String!] - creator_not_in: [String!] - creator_contains: String - creator_contains_nocase: String - creator_not_contains: String - creator_not_contains_nocase: String - creator_starts_with: String - creator_starts_with_nocase: String - creator_not_starts_with: String - creator_not_starts_with_nocase: String - creator_ends_with: String - creator_ends_with_nocase: String - creator_not_ends_with: String - creator_not_ends_with_nocase: String - creator_: Creator_filter - amount: BigDecimal - amount_not: BigDecimal - amount_gt: BigDecimal - amount_lt: BigDecimal - amount_gte: BigDecimal - amount_lte: BigDecimal - amount_in: [BigDecimal!] - amount_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [CreatorWithdrawal_filter] - or: [CreatorWithdrawal_filter] -} - -enum CreatorWithdrawal_orderBy { - id - timeStamp - creator - creator__id - creator__revenue - creator__totalValueLocked - creator__totalYield - amount -} - -input Creator_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - strategies_: Strategy_filter - revenue: BigDecimal - revenue_not: BigDecimal - revenue_gt: BigDecimal - revenue_lt: BigDecimal - revenue_gte: BigDecimal - revenue_lte: BigDecimal - revenue_in: [BigDecimal!] - revenue_not_in: [BigDecimal!] - withdrawals_: CreatorWithdrawal_filter - totalValueLocked: BigDecimal - totalValueLocked_not: BigDecimal - totalValueLocked_gt: BigDecimal - totalValueLocked_lt: BigDecimal - totalValueLocked_gte: BigDecimal - totalValueLocked_lte: BigDecimal - totalValueLocked_in: [BigDecimal!] - totalValueLocked_not_in: [BigDecimal!] - totalYield: BigDecimal - totalYield_not: BigDecimal - totalYield_gt: BigDecimal - totalYield_lt: BigDecimal - totalYield_gte: BigDecimal - totalYield_lte: BigDecimal - totalYield_in: [BigDecimal!] - totalYield_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Creator_filter] - or: [Creator_filter] -} - -enum Creator_orderBy { - id - strategies - revenue - withdrawals - totalValueLocked - totalYield -} - -type Depositor { - id: ID! - vault: Vault! - account: String! - executor: String! - depositCaller: String! - depositedAmount0: BigInt! - depositedAmount1: BigInt! - withdrawnAmount0: BigInt! - withdrawnAmount1: BigInt! - liquidityAmount0: BigInt! - liquidityAmount1: BigInt! - createdTimestamp: BigInt! - updatedTimestamp: BigInt! - shares: BigInt! -} - -input Depositor_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - account: String - account_not: String - account_gt: String - account_lt: String - account_gte: String - account_lte: String - account_in: [String!] - account_not_in: [String!] - account_contains: String - account_contains_nocase: String - account_not_contains: String - account_not_contains_nocase: String - account_starts_with: String - account_starts_with_nocase: String - account_not_starts_with: String - account_not_starts_with_nocase: String - account_ends_with: String - account_ends_with_nocase: String - account_not_ends_with: String - account_not_ends_with_nocase: String - executor: String - executor_not: String - executor_gt: String - executor_lt: String - executor_gte: String - executor_lte: String - executor_in: [String!] - executor_not_in: [String!] - executor_contains: String - executor_contains_nocase: String - executor_not_contains: String - executor_not_contains_nocase: String - executor_starts_with: String - executor_starts_with_nocase: String - executor_not_starts_with: String - executor_not_starts_with_nocase: String - executor_ends_with: String - executor_ends_with_nocase: String - executor_not_ends_with: String - executor_not_ends_with_nocase: String - depositCaller: String - depositCaller_not: String - depositCaller_gt: String - depositCaller_lt: String - depositCaller_gte: String - depositCaller_lte: String - depositCaller_in: [String!] - depositCaller_not_in: [String!] - depositCaller_contains: String - depositCaller_contains_nocase: String - depositCaller_not_contains: String - depositCaller_not_contains_nocase: String - depositCaller_starts_with: String - depositCaller_starts_with_nocase: String - depositCaller_not_starts_with: String - depositCaller_not_starts_with_nocase: String - depositCaller_ends_with: String - depositCaller_ends_with_nocase: String - depositCaller_not_ends_with: String - depositCaller_not_ends_with_nocase: String - depositedAmount0: BigInt - depositedAmount0_not: BigInt - depositedAmount0_gt: BigInt - depositedAmount0_lt: BigInt - depositedAmount0_gte: BigInt - depositedAmount0_lte: BigInt - depositedAmount0_in: [BigInt!] - depositedAmount0_not_in: [BigInt!] - depositedAmount1: BigInt - depositedAmount1_not: BigInt - depositedAmount1_gt: BigInt - depositedAmount1_lt: BigInt - depositedAmount1_gte: BigInt - depositedAmount1_lte: BigInt - depositedAmount1_in: [BigInt!] - depositedAmount1_not_in: [BigInt!] - withdrawnAmount0: BigInt - withdrawnAmount0_not: BigInt - withdrawnAmount0_gt: BigInt - withdrawnAmount0_lt: BigInt - withdrawnAmount0_gte: BigInt - withdrawnAmount0_lte: BigInt - withdrawnAmount0_in: [BigInt!] - withdrawnAmount0_not_in: [BigInt!] - withdrawnAmount1: BigInt - withdrawnAmount1_not: BigInt - withdrawnAmount1_gt: BigInt - withdrawnAmount1_lt: BigInt - withdrawnAmount1_gte: BigInt - withdrawnAmount1_lte: BigInt - withdrawnAmount1_in: [BigInt!] - withdrawnAmount1_not_in: [BigInt!] - liquidityAmount0: BigInt - liquidityAmount0_not: BigInt - liquidityAmount0_gt: BigInt - liquidityAmount0_lt: BigInt - liquidityAmount0_gte: BigInt - liquidityAmount0_lte: BigInt - liquidityAmount0_in: [BigInt!] - liquidityAmount0_not_in: [BigInt!] - liquidityAmount1: BigInt - liquidityAmount1_not: BigInt - liquidityAmount1_gt: BigInt - liquidityAmount1_lt: BigInt - liquidityAmount1_gte: BigInt - liquidityAmount1_lte: BigInt - liquidityAmount1_in: [BigInt!] - liquidityAmount1_not_in: [BigInt!] - createdTimestamp: BigInt - createdTimestamp_not: BigInt - createdTimestamp_gt: BigInt - createdTimestamp_lt: BigInt - createdTimestamp_gte: BigInt - createdTimestamp_lte: BigInt - createdTimestamp_in: [BigInt!] - createdTimestamp_not_in: [BigInt!] - updatedTimestamp: BigInt - updatedTimestamp_not: BigInt - updatedTimestamp_gt: BigInt - updatedTimestamp_lt: BigInt - updatedTimestamp_gte: BigInt - updatedTimestamp_lte: BigInt - updatedTimestamp_in: [BigInt!] - updatedTimestamp_not_in: [BigInt!] - shares: BigInt - shares_not: BigInt - shares_gt: BigInt - shares_lt: BigInt - shares_gte: BigInt - shares_lte: BigInt - shares_in: [BigInt!] - shares_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Depositor_filter] - or: [Depositor_filter] -} - -enum Depositor_orderBy { - id - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - account - executor - depositCaller - depositedAmount0 - depositedAmount1 - withdrawnAmount0 - withdrawnAmount1 - liquidityAmount0 - liquidityAmount1 - createdTimestamp - updatedTimestamp - shares -} - -"8 bytes signed integer\n" -scalar Int8 - -type Job { - id: ID! - name: String! - timestamp: BigInt! - jobInfo: [String!]! - targetAddresses: [String!]! - ipfsHash: String! - executions(skip: Int = 0, first: Int = 100, orderBy: JobExecution_orderBy, orderDirection: OrderDirection, where: JobExecution_filter): [JobExecution!]! - status: BigInt! - failedCounts: BigInt! - vaultAddress: Vault! - jobHash: String! - gasUsed: BigInt! -} - -type JobExecution { - id: ID! - timestamp: BigInt! - jobHash: String! - executor: String! - status: String! - jobIdString: String! - jobId: Job! -} - -input JobExecution_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - jobHash: String - jobHash_not: String - jobHash_gt: String - jobHash_lt: String - jobHash_gte: String - jobHash_lte: String - jobHash_in: [String!] - jobHash_not_in: [String!] - jobHash_contains: String - jobHash_contains_nocase: String - jobHash_not_contains: String - jobHash_not_contains_nocase: String - jobHash_starts_with: String - jobHash_starts_with_nocase: String - jobHash_not_starts_with: String - jobHash_not_starts_with_nocase: String - jobHash_ends_with: String - jobHash_ends_with_nocase: String - jobHash_not_ends_with: String - jobHash_not_ends_with_nocase: String - executor: String - executor_not: String - executor_gt: String - executor_lt: String - executor_gte: String - executor_lte: String - executor_in: [String!] - executor_not_in: [String!] - executor_contains: String - executor_contains_nocase: String - executor_not_contains: String - executor_not_contains_nocase: String - executor_starts_with: String - executor_starts_with_nocase: String - executor_not_starts_with: String - executor_not_starts_with_nocase: String - executor_ends_with: String - executor_ends_with_nocase: String - executor_not_ends_with: String - executor_not_ends_with_nocase: String - status: String - status_not: String - status_gt: String - status_lt: String - status_gte: String - status_lte: String - status_in: [String!] - status_not_in: [String!] - status_contains: String - status_contains_nocase: String - status_not_contains: String - status_not_contains_nocase: String - status_starts_with: String - status_starts_with_nocase: String - status_not_starts_with: String - status_not_starts_with_nocase: String - status_ends_with: String - status_ends_with_nocase: String - status_not_ends_with: String - status_not_ends_with_nocase: String - jobIdString: String - jobIdString_not: String - jobIdString_gt: String - jobIdString_lt: String - jobIdString_gte: String - jobIdString_lte: String - jobIdString_in: [String!] - jobIdString_not_in: [String!] - jobIdString_contains: String - jobIdString_contains_nocase: String - jobIdString_not_contains: String - jobIdString_not_contains_nocase: String - jobIdString_starts_with: String - jobIdString_starts_with_nocase: String - jobIdString_not_starts_with: String - jobIdString_not_starts_with_nocase: String - jobIdString_ends_with: String - jobIdString_ends_with_nocase: String - jobIdString_not_ends_with: String - jobIdString_not_ends_with_nocase: String - jobId: String - jobId_not: String - jobId_gt: String - jobId_lt: String - jobId_gte: String - jobId_lte: String - jobId_in: [String!] - jobId_not_in: [String!] - jobId_contains: String - jobId_contains_nocase: String - jobId_not_contains: String - jobId_not_contains_nocase: String - jobId_starts_with: String - jobId_starts_with_nocase: String - jobId_not_starts_with: String - jobId_not_starts_with_nocase: String - jobId_ends_with: String - jobId_ends_with_nocase: String - jobId_not_ends_with: String - jobId_not_ends_with_nocase: String - jobId_: Job_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [JobExecution_filter] - or: [JobExecution_filter] -} - -enum JobExecution_orderBy { - id - timestamp - jobHash - executor - status - jobIdString - jobId - jobId__id - jobId__name - jobId__timestamp - jobId__ipfsHash - jobId__status - jobId__failedCounts - jobId__jobHash - jobId__gasUsed -} - -type JobGasDeposited { - id: ID! - timestamp: BigInt! - creator: String! - amount: BigInt! -} - -input JobGasDeposited_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - creator: String - creator_not: String - creator_gt: String - creator_lt: String - creator_gte: String - creator_lte: String - creator_in: [String!] - creator_not_in: [String!] - creator_contains: String - creator_contains_nocase: String - creator_not_contains: String - creator_not_contains_nocase: String - creator_starts_with: String - creator_starts_with_nocase: String - creator_not_starts_with: String - creator_not_starts_with_nocase: String - creator_ends_with: String - creator_ends_with_nocase: String - creator_not_ends_with: String - creator_not_ends_with_nocase: String - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [JobGasDeposited_filter] - or: [JobGasDeposited_filter] -} - -enum JobGasDeposited_orderBy { - id - timestamp - creator - amount -} - -type JobGasWithdrawn { - id: ID! - timestamp: BigInt! - creator: String! - amount: BigInt! -} - -input JobGasWithdrawn_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - creator: String - creator_not: String - creator_gt: String - creator_lt: String - creator_gte: String - creator_lte: String - creator_in: [String!] - creator_not_in: [String!] - creator_contains: String - creator_contains_nocase: String - creator_not_contains: String - creator_not_contains_nocase: String - creator_starts_with: String - creator_starts_with_nocase: String - creator_not_starts_with: String - creator_not_starts_with_nocase: String - creator_ends_with: String - creator_ends_with_nocase: String - creator_not_ends_with: String - creator_not_ends_with_nocase: String - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [JobGasWithdrawn_filter] - or: [JobGasWithdrawn_filter] -} - -enum JobGasWithdrawn_orderBy { - id - timestamp - creator - amount -} - -input Job_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - jobInfo: [String!] - jobInfo_not: [String!] - jobInfo_contains: [String!] - jobInfo_contains_nocase: [String!] - jobInfo_not_contains: [String!] - jobInfo_not_contains_nocase: [String!] - targetAddresses: [String!] - targetAddresses_not: [String!] - targetAddresses_contains: [String!] - targetAddresses_contains_nocase: [String!] - targetAddresses_not_contains: [String!] - targetAddresses_not_contains_nocase: [String!] - ipfsHash: String - ipfsHash_not: String - ipfsHash_gt: String - ipfsHash_lt: String - ipfsHash_gte: String - ipfsHash_lte: String - ipfsHash_in: [String!] - ipfsHash_not_in: [String!] - ipfsHash_contains: String - ipfsHash_contains_nocase: String - ipfsHash_not_contains: String - ipfsHash_not_contains_nocase: String - ipfsHash_starts_with: String - ipfsHash_starts_with_nocase: String - ipfsHash_not_starts_with: String - ipfsHash_not_starts_with_nocase: String - ipfsHash_ends_with: String - ipfsHash_ends_with_nocase: String - ipfsHash_not_ends_with: String - ipfsHash_not_ends_with_nocase: String - executions_: JobExecution_filter - status: BigInt - status_not: BigInt - status_gt: BigInt - status_lt: BigInt - status_gte: BigInt - status_lte: BigInt - status_in: [BigInt!] - status_not_in: [BigInt!] - failedCounts: BigInt - failedCounts_not: BigInt - failedCounts_gt: BigInt - failedCounts_lt: BigInt - failedCounts_gte: BigInt - failedCounts_lte: BigInt - failedCounts_in: [BigInt!] - failedCounts_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - jobHash: String - jobHash_not: String - jobHash_gt: String - jobHash_lt: String - jobHash_gte: String - jobHash_lte: String - jobHash_in: [String!] - jobHash_not_in: [String!] - jobHash_contains: String - jobHash_contains_nocase: String - jobHash_not_contains: String - jobHash_not_contains_nocase: String - jobHash_starts_with: String - jobHash_starts_with_nocase: String - jobHash_not_starts_with: String - jobHash_not_starts_with_nocase: String - jobHash_ends_with: String - jobHash_ends_with_nocase: String - jobHash_not_ends_with: String - jobHash_not_ends_with_nocase: String - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Job_filter] - or: [Job_filter] -} - -enum Job_orderBy { - id - name - timestamp - jobInfo - targetAddresses - ipfsHash - executions - status - failedCounts - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - jobHash - gasUsed -} - -type Keeper { - id: ID! - bondHeld: BigDecimal! - index: BigInt! - actions(skip: Int = 0, first: Int = 100, orderBy: OrchestratorAction_orderBy, orderDirection: OrderDirection, where: OrchestratorAction_filter): [OrchestratorAction!]! - status: String! - queueTimeline(skip: Int = 0, first: Int = 100, orderBy: QueueTimeline_orderBy, orderDirection: OrderDirection, where: QueueTimeline_filter): [QueueTimeline!]! - permissionUpdates(skip: Int = 0, first: Int = 100, orderBy: PermissionUpdate_orderBy, orderDirection: OrderDirection, where: PermissionUpdate_filter): [PermissionUpdate!]! -} - -input Keeper_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - bondHeld: BigDecimal - bondHeld_not: BigDecimal - bondHeld_gt: BigDecimal - bondHeld_lt: BigDecimal - bondHeld_gte: BigDecimal - bondHeld_lte: BigDecimal - bondHeld_in: [BigDecimal!] - bondHeld_not_in: [BigDecimal!] - index: BigInt - index_not: BigInt - index_gt: BigInt - index_lt: BigInt - index_gte: BigInt - index_lte: BigInt - index_in: [BigInt!] - index_not_in: [BigInt!] - actions_: OrchestratorAction_filter - status: String - status_not: String - status_gt: String - status_lt: String - status_gte: String - status_lte: String - status_in: [String!] - status_not_in: [String!] - status_contains: String - status_contains_nocase: String - status_not_contains: String - status_not_contains_nocase: String - status_starts_with: String - status_starts_with_nocase: String - status_not_starts_with: String - status_not_starts_with_nocase: String - status_ends_with: String - status_ends_with_nocase: String - status_not_ends_with: String - status_not_ends_with_nocase: String - queueTimeline_: QueueTimeline_filter - permissionUpdates_: PermissionUpdate_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Keeper_filter] - or: [Keeper_filter] -} - -enum Keeper_orderBy { - id - bondHeld - index - actions - status - queueTimeline - permissionUpdates -} - -type LeaderBoard { - id: ID! - address: String! - numStaticJobs: BigInt! - numApps: BigInt! - timestamp: BigInt! -} - -input LeaderBoard_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - address: String - address_not: String - address_gt: String - address_lt: String - address_gte: String - address_lte: String - address_in: [String!] - address_not_in: [String!] - address_contains: String - address_contains_nocase: String - address_not_contains: String - address_not_contains_nocase: String - address_starts_with: String - address_starts_with_nocase: String - address_not_starts_with: String - address_not_starts_with_nocase: String - address_ends_with: String - address_ends_with_nocase: String - address_not_ends_with: String - address_not_ends_with_nocase: String - numStaticJobs: BigInt - numStaticJobs_not: BigInt - numStaticJobs_gt: BigInt - numStaticJobs_lt: BigInt - numStaticJobs_gte: BigInt - numStaticJobs_lte: BigInt - numStaticJobs_in: [BigInt!] - numStaticJobs_not_in: [BigInt!] - numApps: BigInt - numApps_not: BigInt - numApps_gt: BigInt - numApps_lt: BigInt - numApps_gte: BigInt - numApps_lte: BigInt - numApps_in: [BigInt!] - numApps_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [LeaderBoard_filter] - or: [LeaderBoard_filter] -} - -enum LeaderBoard_orderBy { - id - address - numStaticJobs - numApps - timestamp -} - -type LiquiditySteer { - id: ID! - vault: Vault! - timeStamp: BigInt! - tick: BigInt! -} - -input LiquiditySteer_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - tick: BigInt - tick_not: BigInt - tick_gt: BigInt - tick_lt: BigInt - tick_gte: BigInt - tick_lte: BigInt - tick_in: [BigInt!] - tick_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [LiquiditySteer_filter] - or: [LiquiditySteer_filter] -} - -enum LiquiditySteer_orderBy { - id - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - timeStamp - tick -} - -type OrchestratorAction { - id: ID! - timestamp: BigInt! - from: Keeper! - votes(skip: Int = 0, first: Int = 100, orderBy: Vote_orderBy, orderDirection: OrderDirection, where: Vote_filter): [Vote!]! - lastUpdated: BigInt - state: String! - status: String! - recipients: [String!] - actionFailed(skip: Int = 0, first: Int = 100, orderBy: ActionFailure_orderBy, orderDirection: OrderDirection, where: ActionFailure_filter): [ActionFailure!]! - vault: String! - transactionHash: String! - hash: String! - gasUsed: BigInt! -} - -input OrchestratorAction_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - from: String - from_not: String - from_gt: String - from_lt: String - from_gte: String - from_lte: String - from_in: [String!] - from_not_in: [String!] - from_contains: String - from_contains_nocase: String - from_not_contains: String - from_not_contains_nocase: String - from_starts_with: String - from_starts_with_nocase: String - from_not_starts_with: String - from_not_starts_with_nocase: String - from_ends_with: String - from_ends_with_nocase: String - from_not_ends_with: String - from_not_ends_with_nocase: String - from_: Keeper_filter - votes_: Vote_filter - lastUpdated: BigInt - lastUpdated_not: BigInt - lastUpdated_gt: BigInt - lastUpdated_lt: BigInt - lastUpdated_gte: BigInt - lastUpdated_lte: BigInt - lastUpdated_in: [BigInt!] - lastUpdated_not_in: [BigInt!] - state: String - state_not: String - state_gt: String - state_lt: String - state_gte: String - state_lte: String - state_in: [String!] - state_not_in: [String!] - state_contains: String - state_contains_nocase: String - state_not_contains: String - state_not_contains_nocase: String - state_starts_with: String - state_starts_with_nocase: String - state_not_starts_with: String - state_not_starts_with_nocase: String - state_ends_with: String - state_ends_with_nocase: String - state_not_ends_with: String - state_not_ends_with_nocase: String - status: String - status_not: String - status_gt: String - status_lt: String - status_gte: String - status_lte: String - status_in: [String!] - status_not_in: [String!] - status_contains: String - status_contains_nocase: String - status_not_contains: String - status_not_contains_nocase: String - status_starts_with: String - status_starts_with_nocase: String - status_not_starts_with: String - status_not_starts_with_nocase: String - status_ends_with: String - status_ends_with_nocase: String - status_not_ends_with: String - status_not_ends_with_nocase: String - recipients: [String!] - recipients_not: [String!] - recipients_contains: [String!] - recipients_contains_nocase: [String!] - recipients_not_contains: [String!] - recipients_not_contains_nocase: [String!] - actionFailed_: ActionFailure_filter - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - transactionHash: String - transactionHash_not: String - transactionHash_gt: String - transactionHash_lt: String - transactionHash_gte: String - transactionHash_lte: String - transactionHash_in: [String!] - transactionHash_not_in: [String!] - transactionHash_contains: String - transactionHash_contains_nocase: String - transactionHash_not_contains: String - transactionHash_not_contains_nocase: String - transactionHash_starts_with: String - transactionHash_starts_with_nocase: String - transactionHash_not_starts_with: String - transactionHash_not_starts_with_nocase: String - transactionHash_ends_with: String - transactionHash_ends_with_nocase: String - transactionHash_not_ends_with: String - transactionHash_not_ends_with_nocase: String - hash: String - hash_not: String - hash_gt: String - hash_lt: String - hash_gte: String - hash_lte: String - hash_in: [String!] - hash_not_in: [String!] - hash_contains: String - hash_contains_nocase: String - hash_not_contains: String - hash_not_contains_nocase: String - hash_starts_with: String - hash_starts_with_nocase: String - hash_not_starts_with: String - hash_not_starts_with_nocase: String - hash_ends_with: String - hash_ends_with_nocase: String - hash_not_ends_with: String - hash_not_ends_with_nocase: String - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [OrchestratorAction_filter] - or: [OrchestratorAction_filter] -} - -enum OrchestratorAction_orderBy { - id - timestamp - from - from__id - from__bondHeld - from__index - from__status - votes - lastUpdated - state - status - recipients - actionFailed - vault - transactionHash - hash - gasUsed -} - -type OrchestratorReward { - id: ID! - timeStamp: BigInt! - updatedTimeStamp: BigInt! - address: String! - reward: BigInt! - trackerId: OrchestratorRewardTracker! -} - -type OrchestratorRewardSnapshot { - id: ID! - timeStamp: BigInt! - updatedTimeStamp: BigInt! - address: String! - reward: BigInt! -} - -input OrchestratorRewardSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - updatedTimeStamp: BigInt - updatedTimeStamp_not: BigInt - updatedTimeStamp_gt: BigInt - updatedTimeStamp_lt: BigInt - updatedTimeStamp_gte: BigInt - updatedTimeStamp_lte: BigInt - updatedTimeStamp_in: [BigInt!] - updatedTimeStamp_not_in: [BigInt!] - address: String - address_not: String - address_gt: String - address_lt: String - address_gte: String - address_lte: String - address_in: [String!] - address_not_in: [String!] - address_contains: String - address_contains_nocase: String - address_not_contains: String - address_not_contains_nocase: String - address_starts_with: String - address_starts_with_nocase: String - address_not_starts_with: String - address_not_starts_with_nocase: String - address_ends_with: String - address_ends_with_nocase: String - address_not_ends_with: String - address_not_ends_with_nocase: String - reward: BigInt - reward_not: BigInt - reward_gt: BigInt - reward_lt: BigInt - reward_gte: BigInt - reward_lte: BigInt - reward_in: [BigInt!] - reward_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [OrchestratorRewardSnapshot_filter] - or: [OrchestratorRewardSnapshot_filter] -} - -enum OrchestratorRewardSnapshot_orderBy { - id - timeStamp - updatedTimeStamp - address - reward -} - -type OrchestratorRewardTracker { - id: ID! - timeStamp: BigInt! - rewards(skip: Int = 0, first: Int = 100, orderBy: OrchestratorReward_orderBy, orderDirection: OrderDirection, where: OrchestratorReward_filter): [OrchestratorReward!]! -} - -input OrchestratorRewardTracker_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - rewards_: OrchestratorReward_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [OrchestratorRewardTracker_filter] - or: [OrchestratorRewardTracker_filter] -} - -enum OrchestratorRewardTracker_orderBy { - id - timeStamp - rewards -} - -input OrchestratorReward_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - updatedTimeStamp: BigInt - updatedTimeStamp_not: BigInt - updatedTimeStamp_gt: BigInt - updatedTimeStamp_lt: BigInt - updatedTimeStamp_gte: BigInt - updatedTimeStamp_lte: BigInt - updatedTimeStamp_in: [BigInt!] - updatedTimeStamp_not_in: [BigInt!] - address: String - address_not: String - address_gt: String - address_lt: String - address_gte: String - address_lte: String - address_in: [String!] - address_not_in: [String!] - address_contains: String - address_contains_nocase: String - address_not_contains: String - address_not_contains_nocase: String - address_starts_with: String - address_starts_with_nocase: String - address_not_starts_with: String - address_not_starts_with_nocase: String - address_ends_with: String - address_ends_with_nocase: String - address_not_ends_with: String - address_not_ends_with_nocase: String - reward: BigInt - reward_not: BigInt - reward_gt: BigInt - reward_lt: BigInt - reward_gte: BigInt - reward_lte: BigInt - reward_in: [BigInt!] - reward_not_in: [BigInt!] - trackerId: String - trackerId_not: String - trackerId_gt: String - trackerId_lt: String - trackerId_gte: String - trackerId_lte: String - trackerId_in: [String!] - trackerId_not_in: [String!] - trackerId_contains: String - trackerId_contains_nocase: String - trackerId_not_contains: String - trackerId_not_contains_nocase: String - trackerId_starts_with: String - trackerId_starts_with_nocase: String - trackerId_not_starts_with: String - trackerId_not_starts_with_nocase: String - trackerId_ends_with: String - trackerId_ends_with_nocase: String - trackerId_not_ends_with: String - trackerId_not_ends_with_nocase: String - trackerId_: OrchestratorRewardTracker_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [OrchestratorReward_filter] - or: [OrchestratorReward_filter] -} - -enum OrchestratorReward_orderBy { - id - timeStamp - updatedTimeStamp - address - reward - trackerId - trackerId__id - trackerId__timeStamp -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type PermissionUpdate { - id: ID! - keeper: Keeper! - timeStamp: BigInt! - action: String! -} - -input PermissionUpdate_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - keeper: String - keeper_not: String - keeper_gt: String - keeper_lt: String - keeper_gte: String - keeper_lte: String - keeper_in: [String!] - keeper_not_in: [String!] - keeper_contains: String - keeper_contains_nocase: String - keeper_not_contains: String - keeper_not_contains_nocase: String - keeper_starts_with: String - keeper_starts_with_nocase: String - keeper_not_starts_with: String - keeper_not_starts_with_nocase: String - keeper_ends_with: String - keeper_ends_with_nocase: String - keeper_not_ends_with: String - keeper_not_ends_with_nocase: String - keeper_: Keeper_filter - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - action: String - action_not: String - action_gt: String - action_lt: String - action_gte: String - action_lte: String - action_in: [String!] - action_not_in: [String!] - action_contains: String - action_contains_nocase: String - action_not_contains: String - action_not_contains_nocase: String - action_starts_with: String - action_starts_with_nocase: String - action_not_starts_with: String - action_not_starts_with_nocase: String - action_ends_with: String - action_ends_with_nocase: String - action_not_ends_with: String - action_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PermissionUpdate_filter] - or: [PermissionUpdate_filter] -} - -enum PermissionUpdate_orderBy { - id - keeper - keeper__id - keeper__bondHeld - keeper__index - keeper__status - timeStamp - action -} - -type PrevAnnualVaultSnapshot { - id: ID! - timestamp: BigInt! - vaultAddress: Vault! - totalAmount0: BigInt! - totalAmount1: BigInt! - sqrtPriceX96: BigInt! - totalSupply: BigInt! - fees1: BigInt! - fees0: BigInt! -} - -input PrevAnnualVaultSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - totalAmount0: BigInt - totalAmount0_not: BigInt - totalAmount0_gt: BigInt - totalAmount0_lt: BigInt - totalAmount0_gte: BigInt - totalAmount0_lte: BigInt - totalAmount0_in: [BigInt!] - totalAmount0_not_in: [BigInt!] - totalAmount1: BigInt - totalAmount1_not: BigInt - totalAmount1_gt: BigInt - totalAmount1_lt: BigInt - totalAmount1_gte: BigInt - totalAmount1_lte: BigInt - totalAmount1_in: [BigInt!] - totalAmount1_not_in: [BigInt!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PrevAnnualVaultSnapshot_filter] - or: [PrevAnnualVaultSnapshot_filter] -} - -enum PrevAnnualVaultSnapshot_orderBy { - id - timestamp - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - totalAmount0 - totalAmount1 - sqrtPriceX96 - totalSupply - fees1 - fees0 -} - -type PrevDailyVaultSnapshot { - id: ID! - timestamp: BigInt! - vaultAddress: Vault! - totalAmount0: BigInt! - totalAmount1: BigInt! - sqrtPriceX96: BigInt! - totalSupply: BigInt! - fees1: BigInt! - fees0: BigInt! -} - -input PrevDailyVaultSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - totalAmount0: BigInt - totalAmount0_not: BigInt - totalAmount0_gt: BigInt - totalAmount0_lt: BigInt - totalAmount0_gte: BigInt - totalAmount0_lte: BigInt - totalAmount0_in: [BigInt!] - totalAmount0_not_in: [BigInt!] - totalAmount1: BigInt - totalAmount1_not: BigInt - totalAmount1_gt: BigInt - totalAmount1_lt: BigInt - totalAmount1_gte: BigInt - totalAmount1_lte: BigInt - totalAmount1_in: [BigInt!] - totalAmount1_not_in: [BigInt!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PrevDailyVaultSnapshot_filter] - or: [PrevDailyVaultSnapshot_filter] -} - -enum PrevDailyVaultSnapshot_orderBy { - id - timestamp - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - totalAmount0 - totalAmount1 - sqrtPriceX96 - totalSupply - fees1 - fees0 -} - -type PrevMonthlyVaultSnapshot { - id: ID! - timestamp: BigInt! - vaultAddress: Vault! - totalAmount0: BigInt! - totalAmount1: BigInt! - sqrtPriceX96: BigInt! - totalSupply: BigInt! - fees1: BigInt! - fees0: BigInt! -} - -input PrevMonthlyVaultSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - totalAmount0: BigInt - totalAmount0_not: BigInt - totalAmount0_gt: BigInt - totalAmount0_lt: BigInt - totalAmount0_gte: BigInt - totalAmount0_lte: BigInt - totalAmount0_in: [BigInt!] - totalAmount0_not_in: [BigInt!] - totalAmount1: BigInt - totalAmount1_not: BigInt - totalAmount1_gt: BigInt - totalAmount1_lt: BigInt - totalAmount1_gte: BigInt - totalAmount1_lte: BigInt - totalAmount1_in: [BigInt!] - totalAmount1_not_in: [BigInt!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PrevMonthlyVaultSnapshot_filter] - or: [PrevMonthlyVaultSnapshot_filter] -} - -enum PrevMonthlyVaultSnapshot_orderBy { - id - timestamp - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - totalAmount0 - totalAmount1 - sqrtPriceX96 - totalSupply - fees1 - fees0 -} - -type PrevVaultSnapshot { - id: ID! - timestamp: BigInt! - vaultAddress: Vault! - totalAmount0: BigInt! - totalAmount1: BigInt! - sqrtPriceX96: BigInt! - totalSupply: BigInt! - fees1: BigInt! - fees0: BigInt! -} - -input PrevVaultSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - totalAmount0: BigInt - totalAmount0_not: BigInt - totalAmount0_gt: BigInt - totalAmount0_lt: BigInt - totalAmount0_gte: BigInt - totalAmount0_lte: BigInt - totalAmount0_in: [BigInt!] - totalAmount0_not_in: [BigInt!] - totalAmount1: BigInt - totalAmount1_not: BigInt - totalAmount1_gt: BigInt - totalAmount1_lt: BigInt - totalAmount1_gte: BigInt - totalAmount1_lte: BigInt - totalAmount1_in: [BigInt!] - totalAmount1_not_in: [BigInt!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PrevVaultSnapshot_filter] - or: [PrevVaultSnapshot_filter] -} - -enum PrevVaultSnapshot_orderBy { - id - timestamp - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - totalAmount0 - totalAmount1 - sqrtPriceX96 - totalSupply - fees1 - fees0 -} - -type PrevWeeklyVaultSnapshot { - id: ID! - timestamp: BigInt! - vaultAddress: Vault! - totalAmount0: BigInt! - totalAmount1: BigInt! - sqrtPriceX96: BigInt! - totalSupply: BigInt! - fees1: BigInt! - fees0: BigInt! - averageFeeArrPerSecond: BigDecimal! - totalSnapshots: BigInt! - weeklyFeeApr: BigDecimal! -} - -input PrevWeeklyVaultSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - totalAmount0: BigInt - totalAmount0_not: BigInt - totalAmount0_gt: BigInt - totalAmount0_lt: BigInt - totalAmount0_gte: BigInt - totalAmount0_lte: BigInt - totalAmount0_in: [BigInt!] - totalAmount0_not_in: [BigInt!] - totalAmount1: BigInt - totalAmount1_not: BigInt - totalAmount1_gt: BigInt - totalAmount1_lt: BigInt - totalAmount1_gte: BigInt - totalAmount1_lte: BigInt - totalAmount1_in: [BigInt!] - totalAmount1_not_in: [BigInt!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - averageFeeArrPerSecond: BigDecimal - averageFeeArrPerSecond_not: BigDecimal - averageFeeArrPerSecond_gt: BigDecimal - averageFeeArrPerSecond_lt: BigDecimal - averageFeeArrPerSecond_gte: BigDecimal - averageFeeArrPerSecond_lte: BigDecimal - averageFeeArrPerSecond_in: [BigDecimal!] - averageFeeArrPerSecond_not_in: [BigDecimal!] - totalSnapshots: BigInt - totalSnapshots_not: BigInt - totalSnapshots_gt: BigInt - totalSnapshots_lt: BigInt - totalSnapshots_gte: BigInt - totalSnapshots_lte: BigInt - totalSnapshots_in: [BigInt!] - totalSnapshots_not_in: [BigInt!] - weeklyFeeApr: BigDecimal - weeklyFeeApr_not: BigDecimal - weeklyFeeApr_gt: BigDecimal - weeklyFeeApr_lt: BigDecimal - weeklyFeeApr_gte: BigDecimal - weeklyFeeApr_lte: BigDecimal - weeklyFeeApr_in: [BigDecimal!] - weeklyFeeApr_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PrevWeeklyVaultSnapshot_filter] - or: [PrevWeeklyVaultSnapshot_filter] -} - -enum PrevWeeklyVaultSnapshot_orderBy { - id - timestamp - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - totalAmount0 - totalAmount1 - sqrtPriceX96 - totalSupply - fees1 - fees0 - averageFeeArrPerSecond - totalSnapshots - weeklyFeeApr -} - -type Query { - keeper( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Keeper - keepers( - skip: Int = 0 - first: Int = 100 - orderBy: Keeper_orderBy - orderDirection: OrderDirection - where: Keeper_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Keeper!]! - runner( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Runner - runners( - skip: Int = 0 - first: Int = 100 - orderBy: Runner_orderBy - orderDirection: OrderDirection - where: Runner_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Runner!]! - queueTimeline( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): QueueTimeline - queueTimelines( - skip: Int = 0 - first: Int = 100 - orderBy: QueueTimeline_orderBy - orderDirection: OrderDirection - where: QueueTimeline_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [QueueTimeline!]! - permissionUpdate( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PermissionUpdate - permissionUpdates( - skip: Int = 0 - first: Int = 100 - orderBy: PermissionUpdate_orderBy - orderDirection: OrderDirection - where: PermissionUpdate_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PermissionUpdate!]! - orchestratorAction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorAction - orchestratorActions( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorAction_orderBy - orderDirection: OrderDirection - where: OrchestratorAction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorAction!]! - vote( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Vote - votes( - skip: Int = 0 - first: Int = 100 - orderBy: Vote_orderBy - orderDirection: OrderDirection - where: Vote_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Vote!]! - actionFailure( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): ActionFailure - actionFailures( - skip: Int = 0 - first: Int = 100 - orderBy: ActionFailure_orderBy - orderDirection: OrderDirection - where: ActionFailure_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [ActionFailure!]! - creator( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Creator - creators( - skip: Int = 0 - first: Int = 100 - orderBy: Creator_orderBy - orderDirection: OrderDirection - where: Creator_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Creator!]! - creatorWithdrawal( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): CreatorWithdrawal - creatorWithdrawals( - skip: Int = 0 - first: Int = 100 - orderBy: CreatorWithdrawal_orderBy - orderDirection: OrderDirection - where: CreatorWithdrawal_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [CreatorWithdrawal!]! - strategy( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Strategy - strategies( - skip: Int = 0 - first: Int = 100 - orderBy: Strategy_orderBy - orderDirection: OrderDirection - where: Strategy_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Strategy!]! - vault( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Vault - vaults( - skip: Int = 0 - first: Int = 100 - orderBy: Vault_orderBy - orderDirection: OrderDirection - where: Vault_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Vault!]! - vaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultSnapshot - vaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: VaultSnapshot_orderBy - orderDirection: OrderDirection - where: VaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultSnapshot!]! - prevVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevVaultSnapshot - prevVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevVaultSnapshot!]! - prevDailyVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevDailyVaultSnapshot - prevDailyVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevDailyVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevDailyVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevDailyVaultSnapshot!]! - prevMonthlyVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevMonthlyVaultSnapshot - prevMonthlyVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevMonthlyVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevMonthlyVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevMonthlyVaultSnapshot!]! - prevAnnualVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevAnnualVaultSnapshot - prevAnnualVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevAnnualVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevAnnualVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevAnnualVaultSnapshot!]! - prevWeeklyVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevWeeklyVaultSnapshot - prevWeeklyVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevWeeklyVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevWeeklyVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevWeeklyVaultSnapshot!]! - vaultStateChanged( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultStateChanged - vaultStateChangeds( - skip: Int = 0 - first: Int = 100 - orderBy: VaultStateChanged_orderBy - orderDirection: OrderDirection - where: VaultStateChanged_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultStateChanged!]! - vaultDeposit( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultDeposit - vaultDeposits( - skip: Int = 0 - first: Int = 100 - orderBy: VaultDeposit_orderBy - orderDirection: OrderDirection - where: VaultDeposit_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultDeposit!]! - vaultWithdraw( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultWithdraw - vaultWithdraws( - skip: Int = 0 - first: Int = 100 - orderBy: VaultWithdraw_orderBy - orderDirection: OrderDirection - where: VaultWithdraw_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultWithdraw!]! - depositor( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Depositor - depositors( - skip: Int = 0 - first: Int = 100 - orderBy: Depositor_orderBy - orderDirection: OrderDirection - where: Depositor_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Depositor!]! - vaultBeacon( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultBeacon - vaultBeacons( - skip: Int = 0 - first: Int = 100 - orderBy: VaultBeacon_orderBy - orderDirection: OrderDirection - where: VaultBeacon_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultBeacon!]! - vaultPosition( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultPosition - vaultPositions( - skip: Int = 0 - first: Int = 100 - orderBy: VaultPosition_orderBy - orderDirection: OrderDirection - where: VaultPosition_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultPosition!]! - liquiditySteer( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LiquiditySteer - liquiditySteers( - skip: Int = 0 - first: Int = 100 - orderBy: LiquiditySteer_orderBy - orderDirection: OrderDirection - where: LiquiditySteer_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LiquiditySteer!]! - orchestratorReward( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorReward - orchestratorRewards( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorReward_orderBy - orderDirection: OrderDirection - where: OrchestratorReward_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorReward!]! - orchestratorRewardTracker( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorRewardTracker - orchestratorRewardTrackers( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorRewardTracker_orderBy - orderDirection: OrderDirection - where: OrchestratorRewardTracker_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorRewardTracker!]! - orchestratorRewardSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorRewardSnapshot - orchestratorRewardSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorRewardSnapshot_orderBy - orderDirection: OrderDirection - where: OrchestratorRewardSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorRewardSnapshot!]! - bundle( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Bundle - bundles( - skip: Int = 0 - first: Int = 100 - orderBy: Bundle_orderBy - orderDirection: OrderDirection - where: Bundle_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Bundle!]! - job( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Job - jobs( - skip: Int = 0 - first: Int = 100 - orderBy: Job_orderBy - orderDirection: OrderDirection - where: Job_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Job!]! - jobExecution( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JobExecution - jobExecutions( - skip: Int = 0 - first: Int = 100 - orderBy: JobExecution_orderBy - orderDirection: OrderDirection - where: JobExecution_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JobExecution!]! - jobGasDeposited( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JobGasDeposited - jobGasDepositeds( - skip: Int = 0 - first: Int = 100 - orderBy: JobGasDeposited_orderBy - orderDirection: OrderDirection - where: JobGasDeposited_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JobGasDeposited!]! - jobGasWithdrawn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JobGasWithdrawn - jobGasWithdrawns( - skip: Int = 0 - first: Int = 100 - orderBy: JobGasWithdrawn_orderBy - orderDirection: OrderDirection - where: JobGasWithdrawn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JobGasWithdrawn!]! - vaultGasUsed( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultGasUsed - vaultGasUseds( - skip: Int = 0 - first: Int = 100 - orderBy: VaultGasUsed_orderBy - orderDirection: OrderDirection - where: VaultGasUsed_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultGasUsed!]! - vaultGasDeposited( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultGasDeposited - vaultGasDepositeds( - skip: Int = 0 - first: Int = 100 - orderBy: VaultGasDeposited_orderBy - orderDirection: OrderDirection - where: VaultGasDeposited_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultGasDeposited!]! - vaultGasWithdrawn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultGasWithdrawn - vaultGasWithdrawns( - skip: Int = 0 - first: Int = 100 - orderBy: VaultGasWithdrawn_orderBy - orderDirection: OrderDirection - where: VaultGasWithdrawn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultGasWithdrawn!]! - whiteListManager( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): WhiteListManager - whiteListManagers( - skip: Int = 0 - first: Int = 100 - orderBy: WhiteListManager_orderBy - orderDirection: OrderDirection - where: WhiteListManager_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [WhiteListManager!]! - whiteListVaultPermission( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): WhiteListVaultPermission - whiteListVaultPermissions( - skip: Int = 0 - first: Int = 100 - orderBy: WhiteListVaultPermission_orderBy - orderDirection: OrderDirection - where: WhiteListVaultPermission_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [WhiteListVaultPermission!]! - leaderBoard( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LeaderBoard - leaderBoards( - skip: Int = 0 - first: Int = 100 - orderBy: LeaderBoard_orderBy - orderDirection: OrderDirection - where: LeaderBoard_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LeaderBoard!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type QueueTimeline { - id: ID! - keeper: Keeper! - timeDelay: BigInt! - queued: Boolean! -} - -input QueueTimeline_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - keeper: String - keeper_not: String - keeper_gt: String - keeper_lt: String - keeper_gte: String - keeper_lte: String - keeper_in: [String!] - keeper_not_in: [String!] - keeper_contains: String - keeper_contains_nocase: String - keeper_not_contains: String - keeper_not_contains_nocase: String - keeper_starts_with: String - keeper_starts_with_nocase: String - keeper_not_starts_with: String - keeper_not_starts_with_nocase: String - keeper_ends_with: String - keeper_ends_with_nocase: String - keeper_not_ends_with: String - keeper_not_ends_with_nocase: String - keeper_: Keeper_filter - timeDelay: BigInt - timeDelay_not: BigInt - timeDelay_gt: BigInt - timeDelay_lt: BigInt - timeDelay_gte: BigInt - timeDelay_lte: BigInt - timeDelay_in: [BigInt!] - timeDelay_not_in: [BigInt!] - queued: Boolean - queued_not: Boolean - queued_in: [Boolean!] - queued_not_in: [Boolean!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [QueueTimeline_filter] - or: [QueueTimeline_filter] -} - -enum QueueTimeline_orderBy { - id - keeper - keeper__id - keeper__bondHeld - keeper__index - keeper__status - timeDelay - queued -} - -type Runner { - id: ID! - bondHeld: BigInt! - - """Time when the runner was created""" - createdAt: BigInt! -} - -input Runner_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - bondHeld: BigInt - bondHeld_not: BigInt - bondHeld_gt: BigInt - bondHeld_lt: BigInt - bondHeld_gte: BigInt - bondHeld_lte: BigInt - bondHeld_in: [BigInt!] - bondHeld_not_in: [BigInt!] - createdAt: BigInt - createdAt_not: BigInt - createdAt_gt: BigInt - createdAt_lt: BigInt - createdAt_gte: BigInt - createdAt_lte: BigInt - createdAt_in: [BigInt!] - createdAt_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Runner_filter] - or: [Runner_filter] -} - -enum Runner_orderBy { - id - bondHeld - createdAt -} - -type Strategy { - id: ID! - name: String! - vault(skip: Int = 0, first: Int = 100, orderBy: Vault_orderBy, orderDirection: OrderDirection, where: Vault_filter): [Vault!]! - createdAt: BigInt! - admin: String! - creator: Creator! - executionBundle: String! -} - -input Strategy_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - vault_: Vault_filter - createdAt: BigInt - createdAt_not: BigInt - createdAt_gt: BigInt - createdAt_lt: BigInt - createdAt_gte: BigInt - createdAt_lte: BigInt - createdAt_in: [BigInt!] - createdAt_not_in: [BigInt!] - admin: String - admin_not: String - admin_gt: String - admin_lt: String - admin_gte: String - admin_lte: String - admin_in: [String!] - admin_not_in: [String!] - admin_contains: String - admin_contains_nocase: String - admin_not_contains: String - admin_not_contains_nocase: String - admin_starts_with: String - admin_starts_with_nocase: String - admin_not_starts_with: String - admin_not_starts_with_nocase: String - admin_ends_with: String - admin_ends_with_nocase: String - admin_not_ends_with: String - admin_not_ends_with_nocase: String - creator: String - creator_not: String - creator_gt: String - creator_lt: String - creator_gte: String - creator_lte: String - creator_in: [String!] - creator_not_in: [String!] - creator_contains: String - creator_contains_nocase: String - creator_not_contains: String - creator_not_contains_nocase: String - creator_starts_with: String - creator_starts_with_nocase: String - creator_not_starts_with: String - creator_not_starts_with_nocase: String - creator_ends_with: String - creator_ends_with_nocase: String - creator_not_ends_with: String - creator_not_ends_with_nocase: String - creator_: Creator_filter - executionBundle: String - executionBundle_not: String - executionBundle_gt: String - executionBundle_lt: String - executionBundle_gte: String - executionBundle_lte: String - executionBundle_in: [String!] - executionBundle_not_in: [String!] - executionBundle_contains: String - executionBundle_contains_nocase: String - executionBundle_not_contains: String - executionBundle_not_contains_nocase: String - executionBundle_starts_with: String - executionBundle_starts_with_nocase: String - executionBundle_not_starts_with: String - executionBundle_not_starts_with_nocase: String - executionBundle_ends_with: String - executionBundle_ends_with_nocase: String - executionBundle_not_ends_with: String - executionBundle_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Strategy_filter] - or: [Strategy_filter] -} - -enum Strategy_orderBy { - id - name - vault - createdAt - admin - creator - creator__id - creator__revenue - creator__totalValueLocked - creator__totalYield - executionBundle -} - -type Subscription { - keeper( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Keeper - keepers( - skip: Int = 0 - first: Int = 100 - orderBy: Keeper_orderBy - orderDirection: OrderDirection - where: Keeper_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Keeper!]! - runner( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Runner - runners( - skip: Int = 0 - first: Int = 100 - orderBy: Runner_orderBy - orderDirection: OrderDirection - where: Runner_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Runner!]! - queueTimeline( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): QueueTimeline - queueTimelines( - skip: Int = 0 - first: Int = 100 - orderBy: QueueTimeline_orderBy - orderDirection: OrderDirection - where: QueueTimeline_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [QueueTimeline!]! - permissionUpdate( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PermissionUpdate - permissionUpdates( - skip: Int = 0 - first: Int = 100 - orderBy: PermissionUpdate_orderBy - orderDirection: OrderDirection - where: PermissionUpdate_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PermissionUpdate!]! - orchestratorAction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorAction - orchestratorActions( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorAction_orderBy - orderDirection: OrderDirection - where: OrchestratorAction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorAction!]! - vote( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Vote - votes( - skip: Int = 0 - first: Int = 100 - orderBy: Vote_orderBy - orderDirection: OrderDirection - where: Vote_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Vote!]! - actionFailure( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): ActionFailure - actionFailures( - skip: Int = 0 - first: Int = 100 - orderBy: ActionFailure_orderBy - orderDirection: OrderDirection - where: ActionFailure_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [ActionFailure!]! - creator( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Creator - creators( - skip: Int = 0 - first: Int = 100 - orderBy: Creator_orderBy - orderDirection: OrderDirection - where: Creator_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Creator!]! - creatorWithdrawal( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): CreatorWithdrawal - creatorWithdrawals( - skip: Int = 0 - first: Int = 100 - orderBy: CreatorWithdrawal_orderBy - orderDirection: OrderDirection - where: CreatorWithdrawal_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [CreatorWithdrawal!]! - strategy( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Strategy - strategies( - skip: Int = 0 - first: Int = 100 - orderBy: Strategy_orderBy - orderDirection: OrderDirection - where: Strategy_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Strategy!]! - vault( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Vault - vaults( - skip: Int = 0 - first: Int = 100 - orderBy: Vault_orderBy - orderDirection: OrderDirection - where: Vault_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Vault!]! - vaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultSnapshot - vaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: VaultSnapshot_orderBy - orderDirection: OrderDirection - where: VaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultSnapshot!]! - prevVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevVaultSnapshot - prevVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevVaultSnapshot!]! - prevDailyVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevDailyVaultSnapshot - prevDailyVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevDailyVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevDailyVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevDailyVaultSnapshot!]! - prevMonthlyVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevMonthlyVaultSnapshot - prevMonthlyVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevMonthlyVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevMonthlyVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevMonthlyVaultSnapshot!]! - prevAnnualVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevAnnualVaultSnapshot - prevAnnualVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevAnnualVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevAnnualVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevAnnualVaultSnapshot!]! - prevWeeklyVaultSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PrevWeeklyVaultSnapshot - prevWeeklyVaultSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PrevWeeklyVaultSnapshot_orderBy - orderDirection: OrderDirection - where: PrevWeeklyVaultSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PrevWeeklyVaultSnapshot!]! - vaultStateChanged( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultStateChanged - vaultStateChangeds( - skip: Int = 0 - first: Int = 100 - orderBy: VaultStateChanged_orderBy - orderDirection: OrderDirection - where: VaultStateChanged_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultStateChanged!]! - vaultDeposit( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultDeposit - vaultDeposits( - skip: Int = 0 - first: Int = 100 - orderBy: VaultDeposit_orderBy - orderDirection: OrderDirection - where: VaultDeposit_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultDeposit!]! - vaultWithdraw( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultWithdraw - vaultWithdraws( - skip: Int = 0 - first: Int = 100 - orderBy: VaultWithdraw_orderBy - orderDirection: OrderDirection - where: VaultWithdraw_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultWithdraw!]! - depositor( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Depositor - depositors( - skip: Int = 0 - first: Int = 100 - orderBy: Depositor_orderBy - orderDirection: OrderDirection - where: Depositor_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Depositor!]! - vaultBeacon( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultBeacon - vaultBeacons( - skip: Int = 0 - first: Int = 100 - orderBy: VaultBeacon_orderBy - orderDirection: OrderDirection - where: VaultBeacon_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultBeacon!]! - vaultPosition( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultPosition - vaultPositions( - skip: Int = 0 - first: Int = 100 - orderBy: VaultPosition_orderBy - orderDirection: OrderDirection - where: VaultPosition_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultPosition!]! - liquiditySteer( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LiquiditySteer - liquiditySteers( - skip: Int = 0 - first: Int = 100 - orderBy: LiquiditySteer_orderBy - orderDirection: OrderDirection - where: LiquiditySteer_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LiquiditySteer!]! - orchestratorReward( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorReward - orchestratorRewards( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorReward_orderBy - orderDirection: OrderDirection - where: OrchestratorReward_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorReward!]! - orchestratorRewardTracker( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorRewardTracker - orchestratorRewardTrackers( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorRewardTracker_orderBy - orderDirection: OrderDirection - where: OrchestratorRewardTracker_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorRewardTracker!]! - orchestratorRewardSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): OrchestratorRewardSnapshot - orchestratorRewardSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: OrchestratorRewardSnapshot_orderBy - orderDirection: OrderDirection - where: OrchestratorRewardSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [OrchestratorRewardSnapshot!]! - bundle( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Bundle - bundles( - skip: Int = 0 - first: Int = 100 - orderBy: Bundle_orderBy - orderDirection: OrderDirection - where: Bundle_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Bundle!]! - job( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Job - jobs( - skip: Int = 0 - first: Int = 100 - orderBy: Job_orderBy - orderDirection: OrderDirection - where: Job_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Job!]! - jobExecution( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JobExecution - jobExecutions( - skip: Int = 0 - first: Int = 100 - orderBy: JobExecution_orderBy - orderDirection: OrderDirection - where: JobExecution_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JobExecution!]! - jobGasDeposited( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JobGasDeposited - jobGasDepositeds( - skip: Int = 0 - first: Int = 100 - orderBy: JobGasDeposited_orderBy - orderDirection: OrderDirection - where: JobGasDeposited_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JobGasDeposited!]! - jobGasWithdrawn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JobGasWithdrawn - jobGasWithdrawns( - skip: Int = 0 - first: Int = 100 - orderBy: JobGasWithdrawn_orderBy - orderDirection: OrderDirection - where: JobGasWithdrawn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JobGasWithdrawn!]! - vaultGasUsed( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultGasUsed - vaultGasUseds( - skip: Int = 0 - first: Int = 100 - orderBy: VaultGasUsed_orderBy - orderDirection: OrderDirection - where: VaultGasUsed_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultGasUsed!]! - vaultGasDeposited( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultGasDeposited - vaultGasDepositeds( - skip: Int = 0 - first: Int = 100 - orderBy: VaultGasDeposited_orderBy - orderDirection: OrderDirection - where: VaultGasDeposited_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultGasDeposited!]! - vaultGasWithdrawn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): VaultGasWithdrawn - vaultGasWithdrawns( - skip: Int = 0 - first: Int = 100 - orderBy: VaultGasWithdrawn_orderBy - orderDirection: OrderDirection - where: VaultGasWithdrawn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [VaultGasWithdrawn!]! - whiteListManager( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): WhiteListManager - whiteListManagers( - skip: Int = 0 - first: Int = 100 - orderBy: WhiteListManager_orderBy - orderDirection: OrderDirection - where: WhiteListManager_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [WhiteListManager!]! - whiteListVaultPermission( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): WhiteListVaultPermission - whiteListVaultPermissions( - skip: Int = 0 - first: Int = 100 - orderBy: WhiteListVaultPermission_orderBy - orderDirection: OrderDirection - where: WhiteListVaultPermission_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [WhiteListVaultPermission!]! - leaderBoard( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LeaderBoard - leaderBoards( - skip: Int = 0 - first: Int = 100 - orderBy: LeaderBoard_orderBy - orderDirection: OrderDirection - where: LeaderBoard_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LeaderBoard!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type Vault { - id: ID! - deployer: String! - token0: String! - token1: String! - totalAmount0: BigDecimal! - totalAmount1: BigDecimal! - createdAt: BigInt! - lastSnapshot: BigInt! - pool: String! - state: BigInt! - statusUpdates(skip: Int = 0, first: Int = 100, orderBy: VaultStateChanged_orderBy, orderDirection: OrderDirection, where: VaultStateChanged_filter): [VaultStateChanged!]! - strategyToken: Strategy! - - """Statistics""" - snapshots(skip: Int = 0, first: Int = 100, orderBy: VaultSnapshot_orderBy, orderDirection: OrderDirection, where: VaultSnapshot_filter): [VaultSnapshot!]! - permissions(skip: Int = 0, first: Int = 100, orderBy: WhiteListVaultPermission_orderBy, orderDirection: OrderDirection, where: WhiteListVaultPermission_filter): [WhiteListVaultPermission!]! - positions(skip: Int = 0, first: Int = 100, orderBy: VaultPosition_orderBy, orderDirection: OrderDirection, where: VaultPosition_filter): [VaultPosition!]! - depositors(skip: Int = 0, first: Int = 100, orderBy: Depositor_orderBy, orderDirection: OrderDirection, where: Depositor_filter): [Depositor!]! - annualPercentageYield: BigDecimal! - annualPercentageDailyYield: BigDecimal! - annualPercentageMonthlyYield: BigDecimal! - annualPercentageYearlyYield: BigDecimal! - lastTotalT0ValuePerLPT: BigDecimal! - accruedStrategistFees0: BigInt! - accruedStrategistFees1: BigInt! - fees0: BigInt! - fees1: BigInt! - beaconName: String! - jobs(skip: Int = 0, first: Int = 100, orderBy: Job_orderBy, orderDirection: OrderDirection, where: Job_filter): [Job!]! - gasUsed: BigInt! - gasDeposited: BigInt! - totalLPTokensIssued: BigInt! - token1Symbol: String! - decimals: BigInt! - feeTier: BigInt! - name: String! - symbol: String! - token0Balance: BigInt! - token0Decimals: BigInt! - token0Name: String! - token0Symbol: String! - token1Balance: BigInt! - token1Decimals: BigInt! - token1Name: String! - payloadIpfs: String! - vaultManager: String! - averageFeeArrPerSecond: BigDecimal! - totalSnapshots: BigInt! - annualFeeARR: BigDecimal! - dailyFeeAPR: BigDecimal! - weeklyFeeAPR: BigDecimal! - totalValueLockedToken0: BigDecimal! - totalValueLockedToken1: BigDecimal! -} - -type VaultBeacon { - """Address of the VaultBeacon""" - id: ID! - address: String! - - """IPFS Config for Beacon""" - ipfsHash: String! - name: String! - - """Beacon status""" - status: String! - timestamp: BigInt! - updateTimestamp: BigInt! -} - -input VaultBeacon_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - address: String - address_not: String - address_gt: String - address_lt: String - address_gte: String - address_lte: String - address_in: [String!] - address_not_in: [String!] - address_contains: String - address_contains_nocase: String - address_not_contains: String - address_not_contains_nocase: String - address_starts_with: String - address_starts_with_nocase: String - address_not_starts_with: String - address_not_starts_with_nocase: String - address_ends_with: String - address_ends_with_nocase: String - address_not_ends_with: String - address_not_ends_with_nocase: String - ipfsHash: String - ipfsHash_not: String - ipfsHash_gt: String - ipfsHash_lt: String - ipfsHash_gte: String - ipfsHash_lte: String - ipfsHash_in: [String!] - ipfsHash_not_in: [String!] - ipfsHash_contains: String - ipfsHash_contains_nocase: String - ipfsHash_not_contains: String - ipfsHash_not_contains_nocase: String - ipfsHash_starts_with: String - ipfsHash_starts_with_nocase: String - ipfsHash_not_starts_with: String - ipfsHash_not_starts_with_nocase: String - ipfsHash_ends_with: String - ipfsHash_ends_with_nocase: String - ipfsHash_not_ends_with: String - ipfsHash_not_ends_with_nocase: String - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - status: String - status_not: String - status_gt: String - status_lt: String - status_gte: String - status_lte: String - status_in: [String!] - status_not_in: [String!] - status_contains: String - status_contains_nocase: String - status_not_contains: String - status_not_contains_nocase: String - status_starts_with: String - status_starts_with_nocase: String - status_not_starts_with: String - status_not_starts_with_nocase: String - status_ends_with: String - status_ends_with_nocase: String - status_not_ends_with: String - status_not_ends_with_nocase: String - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - updateTimestamp: BigInt - updateTimestamp_not: BigInt - updateTimestamp_gt: BigInt - updateTimestamp_lt: BigInt - updateTimestamp_gte: BigInt - updateTimestamp_lte: BigInt - updateTimestamp_in: [BigInt!] - updateTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultBeacon_filter] - or: [VaultBeacon_filter] -} - -enum VaultBeacon_orderBy { - id - address - ipfsHash - name - status - timestamp - updateTimestamp -} - -type VaultDeposit { - """Address of the depositor""" - id: ID! - vault: Vault! - - """Amount of tokens deposited""" - amount0: BigDecimal! - amount1: BigDecimal! - - """Token Addresses""" - token0: String! - token1: String! - sender: String! - transactionHash: String! - - """Time when the deposit was made""" - timeStamp: BigInt! - shares: BigInt! - executor: String! - depositCaller: String! -} - -input VaultDeposit_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - sender: String - sender_not: String - sender_gt: String - sender_lt: String - sender_gte: String - sender_lte: String - sender_in: [String!] - sender_not_in: [String!] - sender_contains: String - sender_contains_nocase: String - sender_not_contains: String - sender_not_contains_nocase: String - sender_starts_with: String - sender_starts_with_nocase: String - sender_not_starts_with: String - sender_not_starts_with_nocase: String - sender_ends_with: String - sender_ends_with_nocase: String - sender_not_ends_with: String - sender_not_ends_with_nocase: String - transactionHash: String - transactionHash_not: String - transactionHash_gt: String - transactionHash_lt: String - transactionHash_gte: String - transactionHash_lte: String - transactionHash_in: [String!] - transactionHash_not_in: [String!] - transactionHash_contains: String - transactionHash_contains_nocase: String - transactionHash_not_contains: String - transactionHash_not_contains_nocase: String - transactionHash_starts_with: String - transactionHash_starts_with_nocase: String - transactionHash_not_starts_with: String - transactionHash_not_starts_with_nocase: String - transactionHash_ends_with: String - transactionHash_ends_with_nocase: String - transactionHash_not_ends_with: String - transactionHash_not_ends_with_nocase: String - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - shares: BigInt - shares_not: BigInt - shares_gt: BigInt - shares_lt: BigInt - shares_gte: BigInt - shares_lte: BigInt - shares_in: [BigInt!] - shares_not_in: [BigInt!] - executor: String - executor_not: String - executor_gt: String - executor_lt: String - executor_gte: String - executor_lte: String - executor_in: [String!] - executor_not_in: [String!] - executor_contains: String - executor_contains_nocase: String - executor_not_contains: String - executor_not_contains_nocase: String - executor_starts_with: String - executor_starts_with_nocase: String - executor_not_starts_with: String - executor_not_starts_with_nocase: String - executor_ends_with: String - executor_ends_with_nocase: String - executor_not_ends_with: String - executor_not_ends_with_nocase: String - depositCaller: String - depositCaller_not: String - depositCaller_gt: String - depositCaller_lt: String - depositCaller_gte: String - depositCaller_lte: String - depositCaller_in: [String!] - depositCaller_not_in: [String!] - depositCaller_contains: String - depositCaller_contains_nocase: String - depositCaller_not_contains: String - depositCaller_not_contains_nocase: String - depositCaller_starts_with: String - depositCaller_starts_with_nocase: String - depositCaller_not_starts_with: String - depositCaller_not_starts_with_nocase: String - depositCaller_ends_with: String - depositCaller_ends_with_nocase: String - depositCaller_not_ends_with: String - depositCaller_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultDeposit_filter] - or: [VaultDeposit_filter] -} - -enum VaultDeposit_orderBy { - id - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - amount0 - amount1 - token0 - token1 - sender - transactionHash - timeStamp - shares - executor - depositCaller -} - -type VaultGasDeposited { - id: ID! - timestamp: BigInt! - vault: String! - origin: String! - amount: BigInt! -} - -input VaultGasDeposited_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - origin: String - origin_not: String - origin_gt: String - origin_lt: String - origin_gte: String - origin_lte: String - origin_in: [String!] - origin_not_in: [String!] - origin_contains: String - origin_contains_nocase: String - origin_not_contains: String - origin_not_contains_nocase: String - origin_starts_with: String - origin_starts_with_nocase: String - origin_not_starts_with: String - origin_not_starts_with_nocase: String - origin_ends_with: String - origin_ends_with_nocase: String - origin_not_ends_with: String - origin_not_ends_with_nocase: String - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultGasDeposited_filter] - or: [VaultGasDeposited_filter] -} - -enum VaultGasDeposited_orderBy { - id - timestamp - vault - origin - amount -} - -type VaultGasUsed { - id: ID! - timestamp: BigInt! - vault: String! - actionHash: String - amount: BigInt! -} - -input VaultGasUsed_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - actionHash: String - actionHash_not: String - actionHash_gt: String - actionHash_lt: String - actionHash_gte: String - actionHash_lte: String - actionHash_in: [String!] - actionHash_not_in: [String!] - actionHash_contains: String - actionHash_contains_nocase: String - actionHash_not_contains: String - actionHash_not_contains_nocase: String - actionHash_starts_with: String - actionHash_starts_with_nocase: String - actionHash_not_starts_with: String - actionHash_not_starts_with_nocase: String - actionHash_ends_with: String - actionHash_ends_with_nocase: String - actionHash_not_ends_with: String - actionHash_not_ends_with_nocase: String - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultGasUsed_filter] - or: [VaultGasUsed_filter] -} - -enum VaultGasUsed_orderBy { - id - timestamp - vault - actionHash - amount -} - -type VaultGasWithdrawn { - id: ID! - timestamp: BigInt! - vault: String! - to: String! - amount: BigInt! -} - -input VaultGasWithdrawn_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - to: String - to_not: String - to_gt: String - to_lt: String - to_gte: String - to_lte: String - to_in: [String!] - to_not_in: [String!] - to_contains: String - to_contains_nocase: String - to_not_contains: String - to_not_contains_nocase: String - to_starts_with: String - to_starts_with_nocase: String - to_not_starts_with: String - to_not_starts_with_nocase: String - to_ends_with: String - to_ends_with_nocase: String - to_not_ends_with: String - to_not_ends_with_nocase: String - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultGasWithdrawn_filter] - or: [VaultGasWithdrawn_filter] -} - -enum VaultGasWithdrawn_orderBy { - id - timestamp - vault - to - amount -} - -type VaultPosition { - id: ID! - upperTick: [BigInt!]! - lowerTick: [BigInt!]! - vault: Vault! - relativeWeight: [BigInt!]! - timestamp: BigInt! -} - -input VaultPosition_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - upperTick: [BigInt!] - upperTick_not: [BigInt!] - upperTick_contains: [BigInt!] - upperTick_contains_nocase: [BigInt!] - upperTick_not_contains: [BigInt!] - upperTick_not_contains_nocase: [BigInt!] - lowerTick: [BigInt!] - lowerTick_not: [BigInt!] - lowerTick_contains: [BigInt!] - lowerTick_contains_nocase: [BigInt!] - lowerTick_not_contains: [BigInt!] - lowerTick_not_contains_nocase: [BigInt!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - relativeWeight: [BigInt!] - relativeWeight_not: [BigInt!] - relativeWeight_contains: [BigInt!] - relativeWeight_contains_nocase: [BigInt!] - relativeWeight_not_contains: [BigInt!] - relativeWeight_not_contains_nocase: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultPosition_filter] - or: [VaultPosition_filter] -} - -enum VaultPosition_orderBy { - id - upperTick - lowerTick - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - relativeWeight - timestamp -} - -type VaultSnapshot { - id: ID! - timestamp: BigInt! - vaultAddress: Vault! - totalAmount0: BigInt! - totalAmount1: BigInt! - sqrtPriceX96: BigInt! - totalSupply: BigInt! - fees1: BigInt! - fees0: BigInt! - annualFeeAPR: BigDecimal! - dailyFeeAPR: BigDecimal! - weeklyFeeAPR: BigDecimal! - transactionHash: String! -} - -input VaultSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - vaultAddress: String - vaultAddress_not: String - vaultAddress_gt: String - vaultAddress_lt: String - vaultAddress_gte: String - vaultAddress_lte: String - vaultAddress_in: [String!] - vaultAddress_not_in: [String!] - vaultAddress_contains: String - vaultAddress_contains_nocase: String - vaultAddress_not_contains: String - vaultAddress_not_contains_nocase: String - vaultAddress_starts_with: String - vaultAddress_starts_with_nocase: String - vaultAddress_not_starts_with: String - vaultAddress_not_starts_with_nocase: String - vaultAddress_ends_with: String - vaultAddress_ends_with_nocase: String - vaultAddress_not_ends_with: String - vaultAddress_not_ends_with_nocase: String - vaultAddress_: Vault_filter - totalAmount0: BigInt - totalAmount0_not: BigInt - totalAmount0_gt: BigInt - totalAmount0_lt: BigInt - totalAmount0_gte: BigInt - totalAmount0_lte: BigInt - totalAmount0_in: [BigInt!] - totalAmount0_not_in: [BigInt!] - totalAmount1: BigInt - totalAmount1_not: BigInt - totalAmount1_gt: BigInt - totalAmount1_lt: BigInt - totalAmount1_gte: BigInt - totalAmount1_lte: BigInt - totalAmount1_in: [BigInt!] - totalAmount1_not_in: [BigInt!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - annualFeeAPR: BigDecimal - annualFeeAPR_not: BigDecimal - annualFeeAPR_gt: BigDecimal - annualFeeAPR_lt: BigDecimal - annualFeeAPR_gte: BigDecimal - annualFeeAPR_lte: BigDecimal - annualFeeAPR_in: [BigDecimal!] - annualFeeAPR_not_in: [BigDecimal!] - dailyFeeAPR: BigDecimal - dailyFeeAPR_not: BigDecimal - dailyFeeAPR_gt: BigDecimal - dailyFeeAPR_lt: BigDecimal - dailyFeeAPR_gte: BigDecimal - dailyFeeAPR_lte: BigDecimal - dailyFeeAPR_in: [BigDecimal!] - dailyFeeAPR_not_in: [BigDecimal!] - weeklyFeeAPR: BigDecimal - weeklyFeeAPR_not: BigDecimal - weeklyFeeAPR_gt: BigDecimal - weeklyFeeAPR_lt: BigDecimal - weeklyFeeAPR_gte: BigDecimal - weeklyFeeAPR_lte: BigDecimal - weeklyFeeAPR_in: [BigDecimal!] - weeklyFeeAPR_not_in: [BigDecimal!] - transactionHash: String - transactionHash_not: String - transactionHash_gt: String - transactionHash_lt: String - transactionHash_gte: String - transactionHash_lte: String - transactionHash_in: [String!] - transactionHash_not_in: [String!] - transactionHash_contains: String - transactionHash_contains_nocase: String - transactionHash_not_contains: String - transactionHash_not_contains_nocase: String - transactionHash_starts_with: String - transactionHash_starts_with_nocase: String - transactionHash_not_starts_with: String - transactionHash_not_starts_with_nocase: String - transactionHash_ends_with: String - transactionHash_ends_with_nocase: String - transactionHash_not_ends_with: String - transactionHash_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultSnapshot_filter] - or: [VaultSnapshot_filter] -} - -enum VaultSnapshot_orderBy { - id - timestamp - vaultAddress - vaultAddress__id - vaultAddress__deployer - vaultAddress__token0 - vaultAddress__token1 - vaultAddress__totalAmount0 - vaultAddress__totalAmount1 - vaultAddress__createdAt - vaultAddress__lastSnapshot - vaultAddress__pool - vaultAddress__state - vaultAddress__annualPercentageYield - vaultAddress__annualPercentageDailyYield - vaultAddress__annualPercentageMonthlyYield - vaultAddress__annualPercentageYearlyYield - vaultAddress__lastTotalT0ValuePerLPT - vaultAddress__accruedStrategistFees0 - vaultAddress__accruedStrategistFees1 - vaultAddress__fees0 - vaultAddress__fees1 - vaultAddress__beaconName - vaultAddress__gasUsed - vaultAddress__gasDeposited - vaultAddress__totalLPTokensIssued - vaultAddress__token1Symbol - vaultAddress__decimals - vaultAddress__feeTier - vaultAddress__name - vaultAddress__symbol - vaultAddress__token0Balance - vaultAddress__token0Decimals - vaultAddress__token0Name - vaultAddress__token0Symbol - vaultAddress__token1Balance - vaultAddress__token1Decimals - vaultAddress__token1Name - vaultAddress__payloadIpfs - vaultAddress__vaultManager - vaultAddress__averageFeeArrPerSecond - vaultAddress__totalSnapshots - vaultAddress__annualFeeARR - vaultAddress__dailyFeeAPR - vaultAddress__weeklyFeeAPR - vaultAddress__totalValueLockedToken0 - vaultAddress__totalValueLockedToken1 - totalAmount0 - totalAmount1 - sqrtPriceX96 - totalSupply - fees1 - fees0 - annualFeeAPR - dailyFeeAPR - weeklyFeeAPR - transactionHash -} - -type VaultStateChanged { - id: ID! - timeStamp: BigInt! - vault: Vault! - status: BigInt! -} - -input VaultStateChanged_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - status: BigInt - status_not: BigInt - status_gt: BigInt - status_lt: BigInt - status_gte: BigInt - status_lte: BigInt - status_in: [BigInt!] - status_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultStateChanged_filter] - or: [VaultStateChanged_filter] -} - -enum VaultStateChanged_orderBy { - id - timeStamp - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - status -} - -type VaultWithdraw { - """Address of the withdrawer""" - id: ID! - vault: Vault! - - """Amount of tokens withdrawn""" - amount0: BigDecimal! - amount1: BigDecimal! - - """Token Addresses""" - token0: String! - token1: String! - - """Time when the withdraw was made""" - timeStamp: BigInt! - sender: String! - transactionHash: String! -} - -input VaultWithdraw_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - sender: String - sender_not: String - sender_gt: String - sender_lt: String - sender_gte: String - sender_lte: String - sender_in: [String!] - sender_not_in: [String!] - sender_contains: String - sender_contains_nocase: String - sender_not_contains: String - sender_not_contains_nocase: String - sender_starts_with: String - sender_starts_with_nocase: String - sender_not_starts_with: String - sender_not_starts_with_nocase: String - sender_ends_with: String - sender_ends_with_nocase: String - sender_not_ends_with: String - sender_not_ends_with_nocase: String - transactionHash: String - transactionHash_not: String - transactionHash_gt: String - transactionHash_lt: String - transactionHash_gte: String - transactionHash_lte: String - transactionHash_in: [String!] - transactionHash_not_in: [String!] - transactionHash_contains: String - transactionHash_contains_nocase: String - transactionHash_not_contains: String - transactionHash_not_contains_nocase: String - transactionHash_starts_with: String - transactionHash_starts_with_nocase: String - transactionHash_not_starts_with: String - transactionHash_not_starts_with_nocase: String - transactionHash_ends_with: String - transactionHash_ends_with_nocase: String - transactionHash_not_ends_with: String - transactionHash_not_ends_with_nocase: String - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [VaultWithdraw_filter] - or: [VaultWithdraw_filter] -} - -enum VaultWithdraw_orderBy { - id - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - amount0 - amount1 - token0 - token1 - timeStamp - sender - transactionHash -} - -input Vault_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - deployer: String - deployer_not: String - deployer_gt: String - deployer_lt: String - deployer_gte: String - deployer_lte: String - deployer_in: [String!] - deployer_not_in: [String!] - deployer_contains: String - deployer_contains_nocase: String - deployer_not_contains: String - deployer_not_contains_nocase: String - deployer_starts_with: String - deployer_starts_with_nocase: String - deployer_not_starts_with: String - deployer_not_starts_with_nocase: String - deployer_ends_with: String - deployer_ends_with_nocase: String - deployer_not_ends_with: String - deployer_not_ends_with_nocase: String - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - totalAmount0: BigDecimal - totalAmount0_not: BigDecimal - totalAmount0_gt: BigDecimal - totalAmount0_lt: BigDecimal - totalAmount0_gte: BigDecimal - totalAmount0_lte: BigDecimal - totalAmount0_in: [BigDecimal!] - totalAmount0_not_in: [BigDecimal!] - totalAmount1: BigDecimal - totalAmount1_not: BigDecimal - totalAmount1_gt: BigDecimal - totalAmount1_lt: BigDecimal - totalAmount1_gte: BigDecimal - totalAmount1_lte: BigDecimal - totalAmount1_in: [BigDecimal!] - totalAmount1_not_in: [BigDecimal!] - createdAt: BigInt - createdAt_not: BigInt - createdAt_gt: BigInt - createdAt_lt: BigInt - createdAt_gte: BigInt - createdAt_lte: BigInt - createdAt_in: [BigInt!] - createdAt_not_in: [BigInt!] - lastSnapshot: BigInt - lastSnapshot_not: BigInt - lastSnapshot_gt: BigInt - lastSnapshot_lt: BigInt - lastSnapshot_gte: BigInt - lastSnapshot_lte: BigInt - lastSnapshot_in: [BigInt!] - lastSnapshot_not_in: [BigInt!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - state: BigInt - state_not: BigInt - state_gt: BigInt - state_lt: BigInt - state_gte: BigInt - state_lte: BigInt - state_in: [BigInt!] - state_not_in: [BigInt!] - statusUpdates_: VaultStateChanged_filter - strategyToken: String - strategyToken_not: String - strategyToken_gt: String - strategyToken_lt: String - strategyToken_gte: String - strategyToken_lte: String - strategyToken_in: [String!] - strategyToken_not_in: [String!] - strategyToken_contains: String - strategyToken_contains_nocase: String - strategyToken_not_contains: String - strategyToken_not_contains_nocase: String - strategyToken_starts_with: String - strategyToken_starts_with_nocase: String - strategyToken_not_starts_with: String - strategyToken_not_starts_with_nocase: String - strategyToken_ends_with: String - strategyToken_ends_with_nocase: String - strategyToken_not_ends_with: String - strategyToken_not_ends_with_nocase: String - strategyToken_: Strategy_filter - snapshots_: VaultSnapshot_filter - permissions_: WhiteListVaultPermission_filter - positions_: VaultPosition_filter - depositors_: Depositor_filter - annualPercentageYield: BigDecimal - annualPercentageYield_not: BigDecimal - annualPercentageYield_gt: BigDecimal - annualPercentageYield_lt: BigDecimal - annualPercentageYield_gte: BigDecimal - annualPercentageYield_lte: BigDecimal - annualPercentageYield_in: [BigDecimal!] - annualPercentageYield_not_in: [BigDecimal!] - annualPercentageDailyYield: BigDecimal - annualPercentageDailyYield_not: BigDecimal - annualPercentageDailyYield_gt: BigDecimal - annualPercentageDailyYield_lt: BigDecimal - annualPercentageDailyYield_gte: BigDecimal - annualPercentageDailyYield_lte: BigDecimal - annualPercentageDailyYield_in: [BigDecimal!] - annualPercentageDailyYield_not_in: [BigDecimal!] - annualPercentageMonthlyYield: BigDecimal - annualPercentageMonthlyYield_not: BigDecimal - annualPercentageMonthlyYield_gt: BigDecimal - annualPercentageMonthlyYield_lt: BigDecimal - annualPercentageMonthlyYield_gte: BigDecimal - annualPercentageMonthlyYield_lte: BigDecimal - annualPercentageMonthlyYield_in: [BigDecimal!] - annualPercentageMonthlyYield_not_in: [BigDecimal!] - annualPercentageYearlyYield: BigDecimal - annualPercentageYearlyYield_not: BigDecimal - annualPercentageYearlyYield_gt: BigDecimal - annualPercentageYearlyYield_lt: BigDecimal - annualPercentageYearlyYield_gte: BigDecimal - annualPercentageYearlyYield_lte: BigDecimal - annualPercentageYearlyYield_in: [BigDecimal!] - annualPercentageYearlyYield_not_in: [BigDecimal!] - lastTotalT0ValuePerLPT: BigDecimal - lastTotalT0ValuePerLPT_not: BigDecimal - lastTotalT0ValuePerLPT_gt: BigDecimal - lastTotalT0ValuePerLPT_lt: BigDecimal - lastTotalT0ValuePerLPT_gte: BigDecimal - lastTotalT0ValuePerLPT_lte: BigDecimal - lastTotalT0ValuePerLPT_in: [BigDecimal!] - lastTotalT0ValuePerLPT_not_in: [BigDecimal!] - accruedStrategistFees0: BigInt - accruedStrategistFees0_not: BigInt - accruedStrategistFees0_gt: BigInt - accruedStrategistFees0_lt: BigInt - accruedStrategistFees0_gte: BigInt - accruedStrategistFees0_lte: BigInt - accruedStrategistFees0_in: [BigInt!] - accruedStrategistFees0_not_in: [BigInt!] - accruedStrategistFees1: BigInt - accruedStrategistFees1_not: BigInt - accruedStrategistFees1_gt: BigInt - accruedStrategistFees1_lt: BigInt - accruedStrategistFees1_gte: BigInt - accruedStrategistFees1_lte: BigInt - accruedStrategistFees1_in: [BigInt!] - accruedStrategistFees1_not_in: [BigInt!] - fees0: BigInt - fees0_not: BigInt - fees0_gt: BigInt - fees0_lt: BigInt - fees0_gte: BigInt - fees0_lte: BigInt - fees0_in: [BigInt!] - fees0_not_in: [BigInt!] - fees1: BigInt - fees1_not: BigInt - fees1_gt: BigInt - fees1_lt: BigInt - fees1_gte: BigInt - fees1_lte: BigInt - fees1_in: [BigInt!] - fees1_not_in: [BigInt!] - beaconName: String - beaconName_not: String - beaconName_gt: String - beaconName_lt: String - beaconName_gte: String - beaconName_lte: String - beaconName_in: [String!] - beaconName_not_in: [String!] - beaconName_contains: String - beaconName_contains_nocase: String - beaconName_not_contains: String - beaconName_not_contains_nocase: String - beaconName_starts_with: String - beaconName_starts_with_nocase: String - beaconName_not_starts_with: String - beaconName_not_starts_with_nocase: String - beaconName_ends_with: String - beaconName_ends_with_nocase: String - beaconName_not_ends_with: String - beaconName_not_ends_with_nocase: String - jobs_: Job_filter - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - gasDeposited: BigInt - gasDeposited_not: BigInt - gasDeposited_gt: BigInt - gasDeposited_lt: BigInt - gasDeposited_gte: BigInt - gasDeposited_lte: BigInt - gasDeposited_in: [BigInt!] - gasDeposited_not_in: [BigInt!] - totalLPTokensIssued: BigInt - totalLPTokensIssued_not: BigInt - totalLPTokensIssued_gt: BigInt - totalLPTokensIssued_lt: BigInt - totalLPTokensIssued_gte: BigInt - totalLPTokensIssued_lte: BigInt - totalLPTokensIssued_in: [BigInt!] - totalLPTokensIssued_not_in: [BigInt!] - token1Symbol: String - token1Symbol_not: String - token1Symbol_gt: String - token1Symbol_lt: String - token1Symbol_gte: String - token1Symbol_lte: String - token1Symbol_in: [String!] - token1Symbol_not_in: [String!] - token1Symbol_contains: String - token1Symbol_contains_nocase: String - token1Symbol_not_contains: String - token1Symbol_not_contains_nocase: String - token1Symbol_starts_with: String - token1Symbol_starts_with_nocase: String - token1Symbol_not_starts_with: String - token1Symbol_not_starts_with_nocase: String - token1Symbol_ends_with: String - token1Symbol_ends_with_nocase: String - token1Symbol_not_ends_with: String - token1Symbol_not_ends_with_nocase: String - decimals: BigInt - decimals_not: BigInt - decimals_gt: BigInt - decimals_lt: BigInt - decimals_gte: BigInt - decimals_lte: BigInt - decimals_in: [BigInt!] - decimals_not_in: [BigInt!] - feeTier: BigInt - feeTier_not: BigInt - feeTier_gt: BigInt - feeTier_lt: BigInt - feeTier_gte: BigInt - feeTier_lte: BigInt - feeTier_in: [BigInt!] - feeTier_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - symbol: String - symbol_not: String - symbol_gt: String - symbol_lt: String - symbol_gte: String - symbol_lte: String - symbol_in: [String!] - symbol_not_in: [String!] - symbol_contains: String - symbol_contains_nocase: String - symbol_not_contains: String - symbol_not_contains_nocase: String - symbol_starts_with: String - symbol_starts_with_nocase: String - symbol_not_starts_with: String - symbol_not_starts_with_nocase: String - symbol_ends_with: String - symbol_ends_with_nocase: String - symbol_not_ends_with: String - symbol_not_ends_with_nocase: String - token0Balance: BigInt - token0Balance_not: BigInt - token0Balance_gt: BigInt - token0Balance_lt: BigInt - token0Balance_gte: BigInt - token0Balance_lte: BigInt - token0Balance_in: [BigInt!] - token0Balance_not_in: [BigInt!] - token0Decimals: BigInt - token0Decimals_not: BigInt - token0Decimals_gt: BigInt - token0Decimals_lt: BigInt - token0Decimals_gte: BigInt - token0Decimals_lte: BigInt - token0Decimals_in: [BigInt!] - token0Decimals_not_in: [BigInt!] - token0Name: String - token0Name_not: String - token0Name_gt: String - token0Name_lt: String - token0Name_gte: String - token0Name_lte: String - token0Name_in: [String!] - token0Name_not_in: [String!] - token0Name_contains: String - token0Name_contains_nocase: String - token0Name_not_contains: String - token0Name_not_contains_nocase: String - token0Name_starts_with: String - token0Name_starts_with_nocase: String - token0Name_not_starts_with: String - token0Name_not_starts_with_nocase: String - token0Name_ends_with: String - token0Name_ends_with_nocase: String - token0Name_not_ends_with: String - token0Name_not_ends_with_nocase: String - token0Symbol: String - token0Symbol_not: String - token0Symbol_gt: String - token0Symbol_lt: String - token0Symbol_gte: String - token0Symbol_lte: String - token0Symbol_in: [String!] - token0Symbol_not_in: [String!] - token0Symbol_contains: String - token0Symbol_contains_nocase: String - token0Symbol_not_contains: String - token0Symbol_not_contains_nocase: String - token0Symbol_starts_with: String - token0Symbol_starts_with_nocase: String - token0Symbol_not_starts_with: String - token0Symbol_not_starts_with_nocase: String - token0Symbol_ends_with: String - token0Symbol_ends_with_nocase: String - token0Symbol_not_ends_with: String - token0Symbol_not_ends_with_nocase: String - token1Balance: BigInt - token1Balance_not: BigInt - token1Balance_gt: BigInt - token1Balance_lt: BigInt - token1Balance_gte: BigInt - token1Balance_lte: BigInt - token1Balance_in: [BigInt!] - token1Balance_not_in: [BigInt!] - token1Decimals: BigInt - token1Decimals_not: BigInt - token1Decimals_gt: BigInt - token1Decimals_lt: BigInt - token1Decimals_gte: BigInt - token1Decimals_lte: BigInt - token1Decimals_in: [BigInt!] - token1Decimals_not_in: [BigInt!] - token1Name: String - token1Name_not: String - token1Name_gt: String - token1Name_lt: String - token1Name_gte: String - token1Name_lte: String - token1Name_in: [String!] - token1Name_not_in: [String!] - token1Name_contains: String - token1Name_contains_nocase: String - token1Name_not_contains: String - token1Name_not_contains_nocase: String - token1Name_starts_with: String - token1Name_starts_with_nocase: String - token1Name_not_starts_with: String - token1Name_not_starts_with_nocase: String - token1Name_ends_with: String - token1Name_ends_with_nocase: String - token1Name_not_ends_with: String - token1Name_not_ends_with_nocase: String - payloadIpfs: String - payloadIpfs_not: String - payloadIpfs_gt: String - payloadIpfs_lt: String - payloadIpfs_gte: String - payloadIpfs_lte: String - payloadIpfs_in: [String!] - payloadIpfs_not_in: [String!] - payloadIpfs_contains: String - payloadIpfs_contains_nocase: String - payloadIpfs_not_contains: String - payloadIpfs_not_contains_nocase: String - payloadIpfs_starts_with: String - payloadIpfs_starts_with_nocase: String - payloadIpfs_not_starts_with: String - payloadIpfs_not_starts_with_nocase: String - payloadIpfs_ends_with: String - payloadIpfs_ends_with_nocase: String - payloadIpfs_not_ends_with: String - payloadIpfs_not_ends_with_nocase: String - vaultManager: String - vaultManager_not: String - vaultManager_gt: String - vaultManager_lt: String - vaultManager_gte: String - vaultManager_lte: String - vaultManager_in: [String!] - vaultManager_not_in: [String!] - vaultManager_contains: String - vaultManager_contains_nocase: String - vaultManager_not_contains: String - vaultManager_not_contains_nocase: String - vaultManager_starts_with: String - vaultManager_starts_with_nocase: String - vaultManager_not_starts_with: String - vaultManager_not_starts_with_nocase: String - vaultManager_ends_with: String - vaultManager_ends_with_nocase: String - vaultManager_not_ends_with: String - vaultManager_not_ends_with_nocase: String - averageFeeArrPerSecond: BigDecimal - averageFeeArrPerSecond_not: BigDecimal - averageFeeArrPerSecond_gt: BigDecimal - averageFeeArrPerSecond_lt: BigDecimal - averageFeeArrPerSecond_gte: BigDecimal - averageFeeArrPerSecond_lte: BigDecimal - averageFeeArrPerSecond_in: [BigDecimal!] - averageFeeArrPerSecond_not_in: [BigDecimal!] - totalSnapshots: BigInt - totalSnapshots_not: BigInt - totalSnapshots_gt: BigInt - totalSnapshots_lt: BigInt - totalSnapshots_gte: BigInt - totalSnapshots_lte: BigInt - totalSnapshots_in: [BigInt!] - totalSnapshots_not_in: [BigInt!] - annualFeeARR: BigDecimal - annualFeeARR_not: BigDecimal - annualFeeARR_gt: BigDecimal - annualFeeARR_lt: BigDecimal - annualFeeARR_gte: BigDecimal - annualFeeARR_lte: BigDecimal - annualFeeARR_in: [BigDecimal!] - annualFeeARR_not_in: [BigDecimal!] - dailyFeeAPR: BigDecimal - dailyFeeAPR_not: BigDecimal - dailyFeeAPR_gt: BigDecimal - dailyFeeAPR_lt: BigDecimal - dailyFeeAPR_gte: BigDecimal - dailyFeeAPR_lte: BigDecimal - dailyFeeAPR_in: [BigDecimal!] - dailyFeeAPR_not_in: [BigDecimal!] - weeklyFeeAPR: BigDecimal - weeklyFeeAPR_not: BigDecimal - weeklyFeeAPR_gt: BigDecimal - weeklyFeeAPR_lt: BigDecimal - weeklyFeeAPR_gte: BigDecimal - weeklyFeeAPR_lte: BigDecimal - weeklyFeeAPR_in: [BigDecimal!] - weeklyFeeAPR_not_in: [BigDecimal!] - totalValueLockedToken0: BigDecimal - totalValueLockedToken0_not: BigDecimal - totalValueLockedToken0_gt: BigDecimal - totalValueLockedToken0_lt: BigDecimal - totalValueLockedToken0_gte: BigDecimal - totalValueLockedToken0_lte: BigDecimal - totalValueLockedToken0_in: [BigDecimal!] - totalValueLockedToken0_not_in: [BigDecimal!] - totalValueLockedToken1: BigDecimal - totalValueLockedToken1_not: BigDecimal - totalValueLockedToken1_gt: BigDecimal - totalValueLockedToken1_lt: BigDecimal - totalValueLockedToken1_gte: BigDecimal - totalValueLockedToken1_lte: BigDecimal - totalValueLockedToken1_in: [BigDecimal!] - totalValueLockedToken1_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Vault_filter] - or: [Vault_filter] -} - -enum Vault_orderBy { - id - deployer - token0 - token1 - totalAmount0 - totalAmount1 - createdAt - lastSnapshot - pool - state - statusUpdates - strategyToken - strategyToken__id - strategyToken__name - strategyToken__createdAt - strategyToken__admin - strategyToken__executionBundle - snapshots - permissions - positions - depositors - annualPercentageYield - annualPercentageDailyYield - annualPercentageMonthlyYield - annualPercentageYearlyYield - lastTotalT0ValuePerLPT - accruedStrategistFees0 - accruedStrategistFees1 - fees0 - fees1 - beaconName - jobs - gasUsed - gasDeposited - totalLPTokensIssued - token1Symbol - decimals - feeTier - name - symbol - token0Balance - token0Decimals - token0Name - token0Symbol - token1Balance - token1Decimals - token1Name - payloadIpfs - vaultManager - averageFeeArrPerSecond - totalSnapshots - annualFeeARR - dailyFeeAPR - weeklyFeeAPR - totalValueLockedToken0 - totalValueLockedToken1 -} - -type Vote { - id: ID! - timestamp: BigInt! - by: Keeper! - action: OrchestratorAction! -} - -input Vote_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - by: String - by_not: String - by_gt: String - by_lt: String - by_gte: String - by_lte: String - by_in: [String!] - by_not_in: [String!] - by_contains: String - by_contains_nocase: String - by_not_contains: String - by_not_contains_nocase: String - by_starts_with: String - by_starts_with_nocase: String - by_not_starts_with: String - by_not_starts_with_nocase: String - by_ends_with: String - by_ends_with_nocase: String - by_not_ends_with: String - by_not_ends_with_nocase: String - by_: Keeper_filter - action: String - action_not: String - action_gt: String - action_lt: String - action_gte: String - action_lte: String - action_in: [String!] - action_not_in: [String!] - action_contains: String - action_contains_nocase: String - action_not_contains: String - action_not_contains_nocase: String - action_starts_with: String - action_starts_with_nocase: String - action_not_starts_with: String - action_not_starts_with_nocase: String - action_ends_with: String - action_ends_with_nocase: String - action_not_ends_with: String - action_not_ends_with_nocase: String - action_: OrchestratorAction_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Vote_filter] - or: [Vote_filter] -} - -enum Vote_orderBy { - id - timestamp - by - by__id - by__bondHeld - by__index - by__status - action - action__id - action__timestamp - action__lastUpdated - action__state - action__status - action__vault - action__transactionHash - action__hash - action__gasUsed -} - -type WhiteListManager { - id: ID! - address: String! - vault: String! - timestamp: BigInt! - permission: WhiteListVaultPermission! -} - -input WhiteListManager_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - address: String - address_not: String - address_gt: String - address_lt: String - address_gte: String - address_lte: String - address_in: [String!] - address_not_in: [String!] - address_contains: String - address_contains_nocase: String - address_not_contains: String - address_not_contains_nocase: String - address_starts_with: String - address_starts_with_nocase: String - address_not_starts_with: String - address_not_starts_with_nocase: String - address_ends_with: String - address_ends_with_nocase: String - address_not_ends_with: String - address_not_ends_with_nocase: String - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - permission_: WhiteListVaultPermission_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [WhiteListManager_filter] - or: [WhiteListManager_filter] -} - -enum WhiteListManager_orderBy { - id - address - vault - timestamp - permission - permission__id - permission__timestamp - permission__updatedTimestamp -} - -type WhiteListVaultPermission { - id: ID! - manager: WhiteListManager! - vault: Vault! - addresses: [String!]! - timestamp: BigInt! - updatedTimestamp: BigInt! -} - -input WhiteListVaultPermission_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - manager: String - manager_not: String - manager_gt: String - manager_lt: String - manager_gte: String - manager_lte: String - manager_in: [String!] - manager_not_in: [String!] - manager_contains: String - manager_contains_nocase: String - manager_not_contains: String - manager_not_contains_nocase: String - manager_starts_with: String - manager_starts_with_nocase: String - manager_not_starts_with: String - manager_not_starts_with_nocase: String - manager_ends_with: String - manager_ends_with_nocase: String - manager_not_ends_with: String - manager_not_ends_with_nocase: String - manager_: WhiteListManager_filter - vault: String - vault_not: String - vault_gt: String - vault_lt: String - vault_gte: String - vault_lte: String - vault_in: [String!] - vault_not_in: [String!] - vault_contains: String - vault_contains_nocase: String - vault_not_contains: String - vault_not_contains_nocase: String - vault_starts_with: String - vault_starts_with_nocase: String - vault_not_starts_with: String - vault_not_starts_with_nocase: String - vault_ends_with: String - vault_ends_with_nocase: String - vault_not_ends_with: String - vault_not_ends_with_nocase: String - vault_: Vault_filter - addresses: [String!] - addresses_not: [String!] - addresses_contains: [String!] - addresses_contains_nocase: [String!] - addresses_not_contains: [String!] - addresses_not_contains_nocase: [String!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - updatedTimestamp: BigInt - updatedTimestamp_not: BigInt - updatedTimestamp_gt: BigInt - updatedTimestamp_lt: BigInt - updatedTimestamp_gte: BigInt - updatedTimestamp_lte: BigInt - updatedTimestamp_in: [BigInt!] - updatedTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [WhiteListVaultPermission_filter] - or: [WhiteListVaultPermission_filter] -} - -enum WhiteListVaultPermission_orderBy { - id - manager - manager__id - manager__address - manager__vault - manager__timestamp - vault - vault__id - vault__deployer - vault__token0 - vault__token1 - vault__totalAmount0 - vault__totalAmount1 - vault__createdAt - vault__lastSnapshot - vault__pool - vault__state - vault__annualPercentageYield - vault__annualPercentageDailyYield - vault__annualPercentageMonthlyYield - vault__annualPercentageYearlyYield - vault__lastTotalT0ValuePerLPT - vault__accruedStrategistFees0 - vault__accruedStrategistFees1 - vault__fees0 - vault__fees1 - vault__beaconName - vault__gasUsed - vault__gasDeposited - vault__totalLPTokensIssued - vault__token1Symbol - vault__decimals - vault__feeTier - vault__name - vault__symbol - vault__token0Balance - vault__token0Decimals - vault__token0Name - vault__token0Symbol - vault__token1Balance - vault__token1Decimals - vault__token1Name - vault__payloadIpfs - vault__vaultManager - vault__averageFeeArrPerSecond - vault__totalSnapshots - vault__annualFeeARR - vault__dailyFeeAPR - vault__weeklyFeeAPR - vault__totalValueLockedToken0 - vault__totalValueLockedToken1 - addresses - timestamp - updatedTimestamp -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/strapi/schema.graphql b/packages/graph-client/src/subgraphs/strapi/schema.graphql index 0d5cb46429..39382329a3 100644 --- a/packages/graph-client/src/subgraphs/strapi/schema.graphql +++ b/packages/graph-client/src/subgraphs/strapi/schema.graphql @@ -280,32 +280,12 @@ input ComponentSharedTableOfContentsEntryFiltersInput { not: ComponentSharedTableOfContentsEntryFiltersInput } -input ComponentSharedTableOfContentsEntryInput { - id: ID - key: String - text: String -} - type ComponentSharedTableOfContentsEntry { id: ID! key: String text: String } -input ComponentSharedTableOfContentsFiltersInput { - entries: ComponentSharedTableOfContentsEntryFiltersInput - header: StringFilterInput - and: [ComponentSharedTableOfContentsFiltersInput] - or: [ComponentSharedTableOfContentsFiltersInput] - not: ComponentSharedTableOfContentsFiltersInput -} - -input ComponentSharedTableOfContentsInput { - id: ID - entries: [ComponentSharedTableOfContentsEntryInput] - header: String -} - type ComponentSharedTableOfContents { id: ID! entries(filters: ComponentSharedTableOfContentsEntryFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentSharedTableOfContentsEntry] @@ -684,26 +664,15 @@ type AboutEntityResponse { data: AboutEntity } -enum ENUM_ARTICLE_ARTICLETYPE { - blog - academy -} - -union ArticleBlocksDynamicZone = ComponentSharedDivider | ComponentSharedMedia | ComponentSharedRichText | ComponentSharedSlider | ComponentSharedTableOfContents | Error - -scalar ArticleBlocksDynamicZoneInput - input ArticleFiltersInput { id: IDFilterInput title: StringFilterInput description: StringFilterInput ghostSlug: StringFilterInput customDate: DateTimeFilterInput - articleType: StringFilterInput slug: StringFilterInput authors: AuthorFiltersInput categories: CategoryFiltersInput - staticTableOfContents: ComponentSharedTableOfContentsFiltersInput difficulty: DifficultyFiltersInput topics: TopicFiltersInput products: ProductFiltersInput @@ -723,13 +692,10 @@ input ArticleInput { description: String ghostSlug: String customDate: DateTime - articleType: ENUM_ARTICLE_ARTICLETYPE slug: String cover: ID authors: [ID] categories: [ID] - blocks: [ArticleBlocksDynamicZoneInput!] - staticTableOfContents: ComponentSharedTableOfContentsInput difficulty: ID topics: [ID] products: [ID] @@ -742,16 +708,13 @@ type Article { description: String! ghostSlug: String customDate: DateTime - articleType: ENUM_ARTICLE_ARTICLETYPE! slug: String! cover: UploadFileEntityResponse! authors(filters: AuthorFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): AuthorRelationResponseCollection categories(filters: CategoryFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): CategoryRelationResponseCollection - blocks: [ArticleBlocksDynamicZone] - staticTableOfContents: ComponentSharedTableOfContents difficulty: DifficultyEntityResponse - topics(filters: TopicFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): TopicRelationResponseCollection - products(filters: ProductFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): ProductRelationResponseCollection + topics(filters: TopicFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): TopicRelationResponseCollection + products(filters: ProductFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): ProductRelationResponseCollection articleTypes(filters: ArticleTypeFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): ArticleTypeRelationResponseCollection createdAt: DateTime updatedAt: DateTime @@ -1317,6 +1280,7 @@ input ProductFiltersInput { relevantArticleIds: JSONFilterInput createdAt: DateTimeFilterInput updatedAt: DateTimeFilterInput + publishedAt: DateTimeFilterInput localizations: ProductFiltersInput locale: StringFilterInput and: [ProductFiltersInput] @@ -1334,6 +1298,7 @@ input ProductInput { url: String relevantArticleIds: JSON shareImage: ID + publishedAt: DateTime } type Product { @@ -1348,7 +1313,8 @@ type Product { shareImage: UploadFileEntityResponse createdAt: DateTime updatedAt: DateTime - localizations(filters: ProductFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): ProductRelationResponseCollection + publishedAt: DateTime + localizations(filters: ProductFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): ProductRelationResponseCollection locale: String } @@ -1377,6 +1343,7 @@ input TopicFiltersInput { articles: ArticleFiltersInput createdAt: DateTimeFilterInput updatedAt: DateTimeFilterInput + publishedAt: DateTimeFilterInput localizations: TopicFiltersInput locale: StringFilterInput and: [TopicFiltersInput] @@ -1388,6 +1355,7 @@ input TopicInput { name: String slug: String articles: [ID] + publishedAt: DateTime } type Topic { @@ -1396,7 +1364,8 @@ type Topic { articles(filters: ArticleFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): ArticleRelationResponseCollection createdAt: DateTime updatedAt: DateTime - localizations(filters: TopicFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): TopicRelationResponseCollection + publishedAt: DateTime + localizations(filters: TopicFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): TopicRelationResponseCollection locale: String } @@ -1542,9 +1511,9 @@ type Query { global: GlobalEntityResponse globalAcademy: GlobalAcademyEntityResponse product(id: ID, locale: I18NLocaleCode): ProductEntityResponse - products(filters: ProductFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): ProductEntityResponseCollection! + products(filters: ProductFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): ProductEntityResponseCollection! topic(id: ID, locale: I18NLocaleCode): TopicEntityResponse - topics(filters: TopicFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): TopicEntityResponseCollection! + topics(filters: TopicFiltersInput, pagination: PaginationArg = {}, sort: [String] = [], publicationState: PublicationState = LIVE): TopicEntityResponseCollection! trendingSearch: TrendingSearchEntityResponse me: UsersPermissionsMe } diff --git a/packages/graph-client/src/subgraphs/sushi-bar/graphql.ts b/packages/graph-client/src/subgraphs/sushi-bar/graphql.ts deleted file mode 100644 index ecbcd48bcf..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-bar/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './sushi-bar-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/sushi-bar/index.ts b/packages/graph-client/src/subgraphs/sushi-bar/index.ts deleted file mode 100644 index 2848968ccc..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-bar/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './queries/bar-history' -export * from './queries/bar' diff --git a/packages/graph-client/src/subgraphs/sushi-bar/queries/bar.ts b/packages/graph-client/src/subgraphs/sushi-bar/queries/bar.ts deleted file mode 100644 index 2778e85319..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-bar/queries/bar.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { VariablesOf } from 'gql.tada' - -import { FetchError } from 'src/lib/fetch-error' -import { type RequestOptions, request } from 'src/lib/request' -import { SUSHI_BAR_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { graphql } from '../graphql' - -export const SushiBarQuery = graphql( - ` - query Bar($block: Block_height) { - xsushi(id: "xSushi", block: $block) { - id - sushiXsushiRatio - xSushiSushiRatio - sushiSupply - xSushiSupply - apr1m - apr3m - apr6m - apr12m - } - } -`, -) - -export type GetSushiBar = VariablesOf - -export async function getSushiBar( - variables: GetSushiBar, - options?: RequestOptions, -) { - const url = `https://${SUSHI_BAR_SUBGRAPH_URL}` - - const result = await request( - { url, document: SushiBarQuery, variables }, - options, - ) - - if (result) { - return result.xsushi - } - - throw new FetchError(1, 'No bar') -} - -export type SushiBar = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-bar/schema.graphql b/packages/graph-client/src/subgraphs/sushi-bar/schema.graphql deleted file mode 100644 index 2c6d936e75..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-bar/schema.graphql +++ /dev/null @@ -1,1886 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -scalar Bytes - -type DaySnapshot { - """ {day}-{date} """ - id: ID! - date: Int! - userCount: BigInt! - transactionCount: BigInt! - sushiSupply: BigDecimal! - xSushiSupply: BigDecimal! - sushiStaked: BigDecimal! - sushiHarvested: BigDecimal! - totalFeeAmount: BigDecimal! - xSushiBurned: BigDecimal! - xSushiMinted: BigDecimal! - xSushiSushiRatio: BigDecimal! - sushiXsushiRatio: BigDecimal! - apr1m: BigDecimal! - apr3m: BigDecimal! - apr6m: BigDecimal! - apr12m: BigDecimal! - newTransactions: BigInt! - newSushiStaked: BigDecimal! - newSushiHarvested: BigDecimal! - newFeeAmount: BigDecimal! - newXSushiBurned: BigDecimal! - newXSushiMinted: BigDecimal! -} - -input DaySnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - transactionCount: BigInt - transactionCount_not: BigInt - transactionCount_gt: BigInt - transactionCount_lt: BigInt - transactionCount_gte: BigInt - transactionCount_lte: BigInt - transactionCount_in: [BigInt!] - transactionCount_not_in: [BigInt!] - sushiSupply: BigDecimal - sushiSupply_not: BigDecimal - sushiSupply_gt: BigDecimal - sushiSupply_lt: BigDecimal - sushiSupply_gte: BigDecimal - sushiSupply_lte: BigDecimal - sushiSupply_in: [BigDecimal!] - sushiSupply_not_in: [BigDecimal!] - xSushiSupply: BigDecimal - xSushiSupply_not: BigDecimal - xSushiSupply_gt: BigDecimal - xSushiSupply_lt: BigDecimal - xSushiSupply_gte: BigDecimal - xSushiSupply_lte: BigDecimal - xSushiSupply_in: [BigDecimal!] - xSushiSupply_not_in: [BigDecimal!] - sushiStaked: BigDecimal - sushiStaked_not: BigDecimal - sushiStaked_gt: BigDecimal - sushiStaked_lt: BigDecimal - sushiStaked_gte: BigDecimal - sushiStaked_lte: BigDecimal - sushiStaked_in: [BigDecimal!] - sushiStaked_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - totalFeeAmount: BigDecimal - totalFeeAmount_not: BigDecimal - totalFeeAmount_gt: BigDecimal - totalFeeAmount_lt: BigDecimal - totalFeeAmount_gte: BigDecimal - totalFeeAmount_lte: BigDecimal - totalFeeAmount_in: [BigDecimal!] - totalFeeAmount_not_in: [BigDecimal!] - xSushiBurned: BigDecimal - xSushiBurned_not: BigDecimal - xSushiBurned_gt: BigDecimal - xSushiBurned_lt: BigDecimal - xSushiBurned_gte: BigDecimal - xSushiBurned_lte: BigDecimal - xSushiBurned_in: [BigDecimal!] - xSushiBurned_not_in: [BigDecimal!] - xSushiMinted: BigDecimal - xSushiMinted_not: BigDecimal - xSushiMinted_gt: BigDecimal - xSushiMinted_lt: BigDecimal - xSushiMinted_gte: BigDecimal - xSushiMinted_lte: BigDecimal - xSushiMinted_in: [BigDecimal!] - xSushiMinted_not_in: [BigDecimal!] - xSushiSushiRatio: BigDecimal - xSushiSushiRatio_not: BigDecimal - xSushiSushiRatio_gt: BigDecimal - xSushiSushiRatio_lt: BigDecimal - xSushiSushiRatio_gte: BigDecimal - xSushiSushiRatio_lte: BigDecimal - xSushiSushiRatio_in: [BigDecimal!] - xSushiSushiRatio_not_in: [BigDecimal!] - sushiXsushiRatio: BigDecimal - sushiXsushiRatio_not: BigDecimal - sushiXsushiRatio_gt: BigDecimal - sushiXsushiRatio_lt: BigDecimal - sushiXsushiRatio_gte: BigDecimal - sushiXsushiRatio_lte: BigDecimal - sushiXsushiRatio_in: [BigDecimal!] - sushiXsushiRatio_not_in: [BigDecimal!] - apr1m: BigDecimal - apr1m_not: BigDecimal - apr1m_gt: BigDecimal - apr1m_lt: BigDecimal - apr1m_gte: BigDecimal - apr1m_lte: BigDecimal - apr1m_in: [BigDecimal!] - apr1m_not_in: [BigDecimal!] - apr3m: BigDecimal - apr3m_not: BigDecimal - apr3m_gt: BigDecimal - apr3m_lt: BigDecimal - apr3m_gte: BigDecimal - apr3m_lte: BigDecimal - apr3m_in: [BigDecimal!] - apr3m_not_in: [BigDecimal!] - apr6m: BigDecimal - apr6m_not: BigDecimal - apr6m_gt: BigDecimal - apr6m_lt: BigDecimal - apr6m_gte: BigDecimal - apr6m_lte: BigDecimal - apr6m_in: [BigDecimal!] - apr6m_not_in: [BigDecimal!] - apr12m: BigDecimal - apr12m_not: BigDecimal - apr12m_gt: BigDecimal - apr12m_lt: BigDecimal - apr12m_gte: BigDecimal - apr12m_lte: BigDecimal - apr12m_in: [BigDecimal!] - apr12m_not_in: [BigDecimal!] - newTransactions: BigInt - newTransactions_not: BigInt - newTransactions_gt: BigInt - newTransactions_lt: BigInt - newTransactions_gte: BigInt - newTransactions_lte: BigInt - newTransactions_in: [BigInt!] - newTransactions_not_in: [BigInt!] - newSushiStaked: BigDecimal - newSushiStaked_not: BigDecimal - newSushiStaked_gt: BigDecimal - newSushiStaked_lt: BigDecimal - newSushiStaked_gte: BigDecimal - newSushiStaked_lte: BigDecimal - newSushiStaked_in: [BigDecimal!] - newSushiStaked_not_in: [BigDecimal!] - newSushiHarvested: BigDecimal - newSushiHarvested_not: BigDecimal - newSushiHarvested_gt: BigDecimal - newSushiHarvested_lt: BigDecimal - newSushiHarvested_gte: BigDecimal - newSushiHarvested_lte: BigDecimal - newSushiHarvested_in: [BigDecimal!] - newSushiHarvested_not_in: [BigDecimal!] - newFeeAmount: BigDecimal - newFeeAmount_not: BigDecimal - newFeeAmount_gt: BigDecimal - newFeeAmount_lt: BigDecimal - newFeeAmount_gte: BigDecimal - newFeeAmount_lte: BigDecimal - newFeeAmount_in: [BigDecimal!] - newFeeAmount_not_in: [BigDecimal!] - newXSushiBurned: BigDecimal - newXSushiBurned_not: BigDecimal - newXSushiBurned_gt: BigDecimal - newXSushiBurned_lt: BigDecimal - newXSushiBurned_gte: BigDecimal - newXSushiBurned_lte: BigDecimal - newXSushiBurned_in: [BigDecimal!] - newXSushiBurned_not_in: [BigDecimal!] - newXSushiMinted: BigDecimal - newXSushiMinted_not: BigDecimal - newXSushiMinted_gt: BigDecimal - newXSushiMinted_lt: BigDecimal - newXSushiMinted_gte: BigDecimal - newXSushiMinted_lte: BigDecimal - newXSushiMinted_in: [BigDecimal!] - newXSushiMinted_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [DaySnapshot_filter] - or: [DaySnapshot_filter] -} - -enum DaySnapshot_orderBy { - id - date - userCount - transactionCount - sushiSupply - xSushiSupply - sushiStaked - sushiHarvested - totalFeeAmount - xSushiBurned - xSushiMinted - xSushiSushiRatio - sushiXsushiRatio - apr1m - apr3m - apr6m - apr12m - newTransactions - newSushiStaked - newSushiHarvested - newFeeAmount - newXSushiBurned - newXSushiMinted -} - -type Fee { - id: ID! - sender: FeeSender! - amount: BigInt! - createdAtBlock: BigInt! - createdAtTimestamp: BigInt! -} - -type FeeSender { - id: ID! - totalFeeSent: BigInt! - fees(skip: Int = 0, first: Int = 100, orderBy: Fee_orderBy, orderDirection: OrderDirection, where: Fee_filter): [Fee!]! - createdAtBlock: BigInt! - createdAtTimestamp: BigInt! - modifiedAtBlock: BigInt! - modifiedAtTimestamp: BigInt! -} - -input FeeSender_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - totalFeeSent: BigInt - totalFeeSent_not: BigInt - totalFeeSent_gt: BigInt - totalFeeSent_lt: BigInt - totalFeeSent_gte: BigInt - totalFeeSent_lte: BigInt - totalFeeSent_in: [BigInt!] - totalFeeSent_not_in: [BigInt!] - fees_: Fee_filter - createdAtBlock: BigInt - createdAtBlock_not: BigInt - createdAtBlock_gt: BigInt - createdAtBlock_lt: BigInt - createdAtBlock_gte: BigInt - createdAtBlock_lte: BigInt - createdAtBlock_in: [BigInt!] - createdAtBlock_not_in: [BigInt!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - modifiedAtBlock: BigInt - modifiedAtBlock_not: BigInt - modifiedAtBlock_gt: BigInt - modifiedAtBlock_lt: BigInt - modifiedAtBlock_gte: BigInt - modifiedAtBlock_lte: BigInt - modifiedAtBlock_in: [BigInt!] - modifiedAtBlock_not_in: [BigInt!] - modifiedAtTimestamp: BigInt - modifiedAtTimestamp_not: BigInt - modifiedAtTimestamp_gt: BigInt - modifiedAtTimestamp_lt: BigInt - modifiedAtTimestamp_gte: BigInt - modifiedAtTimestamp_lte: BigInt - modifiedAtTimestamp_in: [BigInt!] - modifiedAtTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [FeeSender_filter] - or: [FeeSender_filter] -} - -enum FeeSender_orderBy { - id - totalFeeSent - fees - createdAtBlock - createdAtTimestamp - modifiedAtBlock - modifiedAtTimestamp -} - -input Fee_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - sender: String - sender_not: String - sender_gt: String - sender_lt: String - sender_gte: String - sender_lte: String - sender_in: [String!] - sender_not_in: [String!] - sender_contains: String - sender_contains_nocase: String - sender_not_contains: String - sender_not_contains_nocase: String - sender_starts_with: String - sender_starts_with_nocase: String - sender_not_starts_with: String - sender_not_starts_with_nocase: String - sender_ends_with: String - sender_ends_with_nocase: String - sender_not_ends_with: String - sender_not_ends_with_nocase: String - sender_: FeeSender_filter - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - createdAtBlock: BigInt - createdAtBlock_not: BigInt - createdAtBlock_gt: BigInt - createdAtBlock_lt: BigInt - createdAtBlock_gte: BigInt - createdAtBlock_lte: BigInt - createdAtBlock_in: [BigInt!] - createdAtBlock_not_in: [BigInt!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Fee_filter] - or: [Fee_filter] -} - -enum Fee_orderBy { - id - sender - sender__id - sender__totalFeeSent - sender__createdAtBlock - sender__createdAtTimestamp - sender__modifiedAtBlock - sender__modifiedAtTimestamp - amount - createdAtBlock - createdAtTimestamp -} - -type HourSnapshot { - """ {hour}-{date} """ - id: ID! - date: Int! - userCount: BigInt! - transactionCount: BigInt! - sushiSupply: BigDecimal! - xSushiSupply: BigDecimal! - sushiStaked: BigDecimal! - sushiHarvested: BigDecimal! - totalFeeAmount: BigDecimal! - xSushiBurned: BigDecimal! - xSushiMinted: BigDecimal! - xSushiSushiRatio: BigDecimal! - sushiXsushiRatio: BigDecimal! - apr1m: BigDecimal! - apr3m: BigDecimal! - apr6m: BigDecimal! - apr12m: BigDecimal! - newTransactions: BigInt! - newSushiStaked: BigDecimal! - newSushiHarvested: BigDecimal! - newFeeAmount: BigDecimal! - newXSushiBurned: BigDecimal! - newXSushiMinted: BigDecimal! -} - -input HourSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - transactionCount: BigInt - transactionCount_not: BigInt - transactionCount_gt: BigInt - transactionCount_lt: BigInt - transactionCount_gte: BigInt - transactionCount_lte: BigInt - transactionCount_in: [BigInt!] - transactionCount_not_in: [BigInt!] - sushiSupply: BigDecimal - sushiSupply_not: BigDecimal - sushiSupply_gt: BigDecimal - sushiSupply_lt: BigDecimal - sushiSupply_gte: BigDecimal - sushiSupply_lte: BigDecimal - sushiSupply_in: [BigDecimal!] - sushiSupply_not_in: [BigDecimal!] - xSushiSupply: BigDecimal - xSushiSupply_not: BigDecimal - xSushiSupply_gt: BigDecimal - xSushiSupply_lt: BigDecimal - xSushiSupply_gte: BigDecimal - xSushiSupply_lte: BigDecimal - xSushiSupply_in: [BigDecimal!] - xSushiSupply_not_in: [BigDecimal!] - sushiStaked: BigDecimal - sushiStaked_not: BigDecimal - sushiStaked_gt: BigDecimal - sushiStaked_lt: BigDecimal - sushiStaked_gte: BigDecimal - sushiStaked_lte: BigDecimal - sushiStaked_in: [BigDecimal!] - sushiStaked_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - totalFeeAmount: BigDecimal - totalFeeAmount_not: BigDecimal - totalFeeAmount_gt: BigDecimal - totalFeeAmount_lt: BigDecimal - totalFeeAmount_gte: BigDecimal - totalFeeAmount_lte: BigDecimal - totalFeeAmount_in: [BigDecimal!] - totalFeeAmount_not_in: [BigDecimal!] - xSushiBurned: BigDecimal - xSushiBurned_not: BigDecimal - xSushiBurned_gt: BigDecimal - xSushiBurned_lt: BigDecimal - xSushiBurned_gte: BigDecimal - xSushiBurned_lte: BigDecimal - xSushiBurned_in: [BigDecimal!] - xSushiBurned_not_in: [BigDecimal!] - xSushiMinted: BigDecimal - xSushiMinted_not: BigDecimal - xSushiMinted_gt: BigDecimal - xSushiMinted_lt: BigDecimal - xSushiMinted_gte: BigDecimal - xSushiMinted_lte: BigDecimal - xSushiMinted_in: [BigDecimal!] - xSushiMinted_not_in: [BigDecimal!] - xSushiSushiRatio: BigDecimal - xSushiSushiRatio_not: BigDecimal - xSushiSushiRatio_gt: BigDecimal - xSushiSushiRatio_lt: BigDecimal - xSushiSushiRatio_gte: BigDecimal - xSushiSushiRatio_lte: BigDecimal - xSushiSushiRatio_in: [BigDecimal!] - xSushiSushiRatio_not_in: [BigDecimal!] - sushiXsushiRatio: BigDecimal - sushiXsushiRatio_not: BigDecimal - sushiXsushiRatio_gt: BigDecimal - sushiXsushiRatio_lt: BigDecimal - sushiXsushiRatio_gte: BigDecimal - sushiXsushiRatio_lte: BigDecimal - sushiXsushiRatio_in: [BigDecimal!] - sushiXsushiRatio_not_in: [BigDecimal!] - apr1m: BigDecimal - apr1m_not: BigDecimal - apr1m_gt: BigDecimal - apr1m_lt: BigDecimal - apr1m_gte: BigDecimal - apr1m_lte: BigDecimal - apr1m_in: [BigDecimal!] - apr1m_not_in: [BigDecimal!] - apr3m: BigDecimal - apr3m_not: BigDecimal - apr3m_gt: BigDecimal - apr3m_lt: BigDecimal - apr3m_gte: BigDecimal - apr3m_lte: BigDecimal - apr3m_in: [BigDecimal!] - apr3m_not_in: [BigDecimal!] - apr6m: BigDecimal - apr6m_not: BigDecimal - apr6m_gt: BigDecimal - apr6m_lt: BigDecimal - apr6m_gte: BigDecimal - apr6m_lte: BigDecimal - apr6m_in: [BigDecimal!] - apr6m_not_in: [BigDecimal!] - apr12m: BigDecimal - apr12m_not: BigDecimal - apr12m_gt: BigDecimal - apr12m_lt: BigDecimal - apr12m_gte: BigDecimal - apr12m_lte: BigDecimal - apr12m_in: [BigDecimal!] - apr12m_not_in: [BigDecimal!] - newTransactions: BigInt - newTransactions_not: BigInt - newTransactions_gt: BigInt - newTransactions_lt: BigInt - newTransactions_gte: BigInt - newTransactions_lte: BigInt - newTransactions_in: [BigInt!] - newTransactions_not_in: [BigInt!] - newSushiStaked: BigDecimal - newSushiStaked_not: BigDecimal - newSushiStaked_gt: BigDecimal - newSushiStaked_lt: BigDecimal - newSushiStaked_gte: BigDecimal - newSushiStaked_lte: BigDecimal - newSushiStaked_in: [BigDecimal!] - newSushiStaked_not_in: [BigDecimal!] - newSushiHarvested: BigDecimal - newSushiHarvested_not: BigDecimal - newSushiHarvested_gt: BigDecimal - newSushiHarvested_lt: BigDecimal - newSushiHarvested_gte: BigDecimal - newSushiHarvested_lte: BigDecimal - newSushiHarvested_in: [BigDecimal!] - newSushiHarvested_not_in: [BigDecimal!] - newFeeAmount: BigDecimal - newFeeAmount_not: BigDecimal - newFeeAmount_gt: BigDecimal - newFeeAmount_lt: BigDecimal - newFeeAmount_gte: BigDecimal - newFeeAmount_lte: BigDecimal - newFeeAmount_in: [BigDecimal!] - newFeeAmount_not_in: [BigDecimal!] - newXSushiBurned: BigDecimal - newXSushiBurned_not: BigDecimal - newXSushiBurned_gt: BigDecimal - newXSushiBurned_lt: BigDecimal - newXSushiBurned_gte: BigDecimal - newXSushiBurned_lte: BigDecimal - newXSushiBurned_in: [BigDecimal!] - newXSushiBurned_not_in: [BigDecimal!] - newXSushiMinted: BigDecimal - newXSushiMinted_not: BigDecimal - newXSushiMinted_gt: BigDecimal - newXSushiMinted_lt: BigDecimal - newXSushiMinted_gte: BigDecimal - newXSushiMinted_lte: BigDecimal - newXSushiMinted_in: [BigDecimal!] - newXSushiMinted_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [HourSnapshot_filter] - or: [HourSnapshot_filter] -} - -enum HourSnapshot_orderBy { - id - date - userCount - transactionCount - sushiSupply - xSushiSupply - sushiStaked - sushiHarvested - totalFeeAmount - xSushiBurned - xSushiMinted - xSushiSushiRatio - sushiXsushiRatio - apr1m - apr3m - apr6m - apr12m - newTransactions - newSushiStaked - newSushiHarvested - newFeeAmount - newXSushiBurned - newXSushiMinted -} - -"8 bytes signed integer\n" -scalar Int8 - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Query { - xsushi( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): XSushi - xsushis( - skip: Int = 0 - first: Int = 100 - orderBy: XSushi_orderBy - orderDirection: OrderDirection - where: XSushi_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [XSushi!]! - transaction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Transaction - transactions( - skip: Int = 0 - first: Int = 100 - orderBy: Transaction_orderBy - orderDirection: OrderDirection - where: Transaction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Transaction!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - feeSender( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): FeeSender - feeSenders( - skip: Int = 0 - first: Int = 100 - orderBy: FeeSender_orderBy - orderDirection: OrderDirection - where: FeeSender_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [FeeSender!]! - fee( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Fee - fees( - skip: Int = 0 - first: Int = 100 - orderBy: Fee_orderBy - orderDirection: OrderDirection - where: Fee_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Fee!]! - hourSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): HourSnapshot - hourSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: HourSnapshot_orderBy - orderDirection: OrderDirection - where: HourSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [HourSnapshot!]! - daySnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): DaySnapshot - daySnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: DaySnapshot_orderBy - orderDirection: OrderDirection - where: DaySnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [DaySnapshot!]! - weekSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): WeekSnapshot - weekSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: WeekSnapshot_orderBy - orderDirection: OrderDirection - where: WeekSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [WeekSnapshot!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Subscription { - xsushi( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): XSushi - xsushis( - skip: Int = 0 - first: Int = 100 - orderBy: XSushi_orderBy - orderDirection: OrderDirection - where: XSushi_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [XSushi!]! - transaction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Transaction - transactions( - skip: Int = 0 - first: Int = 100 - orderBy: Transaction_orderBy - orderDirection: OrderDirection - where: Transaction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Transaction!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - feeSender( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): FeeSender - feeSenders( - skip: Int = 0 - first: Int = 100 - orderBy: FeeSender_orderBy - orderDirection: OrderDirection - where: FeeSender_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [FeeSender!]! - fee( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Fee - fees( - skip: Int = 0 - first: Int = 100 - orderBy: Fee_orderBy - orderDirection: OrderDirection - where: Fee_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Fee!]! - hourSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): HourSnapshot - hourSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: HourSnapshot_orderBy - orderDirection: OrderDirection - where: HourSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [HourSnapshot!]! - daySnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): DaySnapshot - daySnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: DaySnapshot_orderBy - orderDirection: OrderDirection - where: DaySnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [DaySnapshot!]! - weekSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): WeekSnapshot - weekSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: WeekSnapshot_orderBy - orderDirection: OrderDirection - where: WeekSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [WeekSnapshot!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type Transaction { - id: ID! - from: User! - to: User! - amount: BigDecimal! - type: TransactionType! - gasUsed: BigInt! - gasLimit: BigInt! - gasPrice: BigInt! - createdAtBlock: BigInt! - createdAtTimestamp: BigInt! -} - -enum TransactionType { - TRANSFER - MINT - BURN -} - -input Transaction_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - from: String - from_not: String - from_gt: String - from_lt: String - from_gte: String - from_lte: String - from_in: [String!] - from_not_in: [String!] - from_contains: String - from_contains_nocase: String - from_not_contains: String - from_not_contains_nocase: String - from_starts_with: String - from_starts_with_nocase: String - from_not_starts_with: String - from_not_starts_with_nocase: String - from_ends_with: String - from_ends_with_nocase: String - from_not_ends_with: String - from_not_ends_with_nocase: String - from_: User_filter - to: String - to_not: String - to_gt: String - to_lt: String - to_gte: String - to_lte: String - to_in: [String!] - to_not_in: [String!] - to_contains: String - to_contains_nocase: String - to_not_contains: String - to_not_contains_nocase: String - to_starts_with: String - to_starts_with_nocase: String - to_not_starts_with: String - to_not_starts_with_nocase: String - to_ends_with: String - to_ends_with_nocase: String - to_not_ends_with: String - to_not_ends_with_nocase: String - to_: User_filter - amount: BigDecimal - amount_not: BigDecimal - amount_gt: BigDecimal - amount_lt: BigDecimal - amount_gte: BigDecimal - amount_lte: BigDecimal - amount_in: [BigDecimal!] - amount_not_in: [BigDecimal!] - type: TransactionType - type_not: TransactionType - type_in: [TransactionType!] - type_not_in: [TransactionType!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - gasLimit: BigInt - gasLimit_not: BigInt - gasLimit_gt: BigInt - gasLimit_lt: BigInt - gasLimit_gte: BigInt - gasLimit_lte: BigInt - gasLimit_in: [BigInt!] - gasLimit_not_in: [BigInt!] - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - createdAtBlock: BigInt - createdAtBlock_not: BigInt - createdAtBlock_gt: BigInt - createdAtBlock_lt: BigInt - createdAtBlock_gte: BigInt - createdAtBlock_lte: BigInt - createdAtBlock_in: [BigInt!] - createdAtBlock_not_in: [BigInt!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Transaction_filter] - or: [Transaction_filter] -} - -enum Transaction_orderBy { - id - from - from__id - from__balance - from__createdAtBlock - from__createdAtTimestamp - from__modifiedAtBlock - from__modifiedAtTimestamp - to - to__id - to__balance - to__createdAtBlock - to__createdAtTimestamp - to__modifiedAtBlock - to__modifiedAtTimestamp - amount - type - gasUsed - gasLimit - gasPrice - createdAtBlock - createdAtTimestamp -} - -type User { - id: ID! - balance: BigInt! - withdrawals(skip: Int = 0, first: Int = 100, orderBy: Transaction_orderBy, orderDirection: OrderDirection, where: Transaction_filter): [Transaction!]! - deposits(skip: Int = 0, first: Int = 100, orderBy: Transaction_orderBy, orderDirection: OrderDirection, where: Transaction_filter): [Transaction!]! - createdAtBlock: BigInt! - createdAtTimestamp: BigInt! - modifiedAtBlock: BigInt! - modifiedAtTimestamp: BigInt! -} - -input User_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - balance: BigInt - balance_not: BigInt - balance_gt: BigInt - balance_lt: BigInt - balance_gte: BigInt - balance_lte: BigInt - balance_in: [BigInt!] - balance_not_in: [BigInt!] - withdrawals_: Transaction_filter - deposits_: Transaction_filter - createdAtBlock: BigInt - createdAtBlock_not: BigInt - createdAtBlock_gt: BigInt - createdAtBlock_lt: BigInt - createdAtBlock_gte: BigInt - createdAtBlock_lte: BigInt - createdAtBlock_in: [BigInt!] - createdAtBlock_not_in: [BigInt!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - modifiedAtBlock: BigInt - modifiedAtBlock_not: BigInt - modifiedAtBlock_gt: BigInt - modifiedAtBlock_lt: BigInt - modifiedAtBlock_gte: BigInt - modifiedAtBlock_lte: BigInt - modifiedAtBlock_in: [BigInt!] - modifiedAtBlock_not_in: [BigInt!] - modifiedAtTimestamp: BigInt - modifiedAtTimestamp_not: BigInt - modifiedAtTimestamp_gt: BigInt - modifiedAtTimestamp_lt: BigInt - modifiedAtTimestamp_gte: BigInt - modifiedAtTimestamp_lte: BigInt - modifiedAtTimestamp_in: [BigInt!] - modifiedAtTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [User_filter] - or: [User_filter] -} - -enum User_orderBy { - id - balance - withdrawals - deposits - createdAtBlock - createdAtTimestamp - modifiedAtBlock - modifiedAtTimestamp -} - -type WeekSnapshot { - """ {week}-{date} """ - id: ID! - date: Int! - userCount: BigInt! - transactionCount: BigInt! - sushiSupply: BigDecimal! - xSushiSupply: BigDecimal! - sushiStaked: BigDecimal! - sushiHarvested: BigDecimal! - totalFeeAmount: BigDecimal! - xSushiBurned: BigDecimal! - xSushiMinted: BigDecimal! - xSushiSushiRatio: BigDecimal! - sushiXsushiRatio: BigDecimal! - apr1m: BigDecimal! - apr3m: BigDecimal! - apr6m: BigDecimal! - apr12m: BigDecimal! - newTransactions: BigInt! - newSushiStaked: BigDecimal! - newSushiHarvested: BigDecimal! - newFeeAmount: BigDecimal! - newXSushiBurned: BigDecimal! - newXSushiMinted: BigDecimal! -} - -input WeekSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - transactionCount: BigInt - transactionCount_not: BigInt - transactionCount_gt: BigInt - transactionCount_lt: BigInt - transactionCount_gte: BigInt - transactionCount_lte: BigInt - transactionCount_in: [BigInt!] - transactionCount_not_in: [BigInt!] - sushiSupply: BigDecimal - sushiSupply_not: BigDecimal - sushiSupply_gt: BigDecimal - sushiSupply_lt: BigDecimal - sushiSupply_gte: BigDecimal - sushiSupply_lte: BigDecimal - sushiSupply_in: [BigDecimal!] - sushiSupply_not_in: [BigDecimal!] - xSushiSupply: BigDecimal - xSushiSupply_not: BigDecimal - xSushiSupply_gt: BigDecimal - xSushiSupply_lt: BigDecimal - xSushiSupply_gte: BigDecimal - xSushiSupply_lte: BigDecimal - xSushiSupply_in: [BigDecimal!] - xSushiSupply_not_in: [BigDecimal!] - sushiStaked: BigDecimal - sushiStaked_not: BigDecimal - sushiStaked_gt: BigDecimal - sushiStaked_lt: BigDecimal - sushiStaked_gte: BigDecimal - sushiStaked_lte: BigDecimal - sushiStaked_in: [BigDecimal!] - sushiStaked_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - totalFeeAmount: BigDecimal - totalFeeAmount_not: BigDecimal - totalFeeAmount_gt: BigDecimal - totalFeeAmount_lt: BigDecimal - totalFeeAmount_gte: BigDecimal - totalFeeAmount_lte: BigDecimal - totalFeeAmount_in: [BigDecimal!] - totalFeeAmount_not_in: [BigDecimal!] - xSushiBurned: BigDecimal - xSushiBurned_not: BigDecimal - xSushiBurned_gt: BigDecimal - xSushiBurned_lt: BigDecimal - xSushiBurned_gte: BigDecimal - xSushiBurned_lte: BigDecimal - xSushiBurned_in: [BigDecimal!] - xSushiBurned_not_in: [BigDecimal!] - xSushiMinted: BigDecimal - xSushiMinted_not: BigDecimal - xSushiMinted_gt: BigDecimal - xSushiMinted_lt: BigDecimal - xSushiMinted_gte: BigDecimal - xSushiMinted_lte: BigDecimal - xSushiMinted_in: [BigDecimal!] - xSushiMinted_not_in: [BigDecimal!] - xSushiSushiRatio: BigDecimal - xSushiSushiRatio_not: BigDecimal - xSushiSushiRatio_gt: BigDecimal - xSushiSushiRatio_lt: BigDecimal - xSushiSushiRatio_gte: BigDecimal - xSushiSushiRatio_lte: BigDecimal - xSushiSushiRatio_in: [BigDecimal!] - xSushiSushiRatio_not_in: [BigDecimal!] - sushiXsushiRatio: BigDecimal - sushiXsushiRatio_not: BigDecimal - sushiXsushiRatio_gt: BigDecimal - sushiXsushiRatio_lt: BigDecimal - sushiXsushiRatio_gte: BigDecimal - sushiXsushiRatio_lte: BigDecimal - sushiXsushiRatio_in: [BigDecimal!] - sushiXsushiRatio_not_in: [BigDecimal!] - apr1m: BigDecimal - apr1m_not: BigDecimal - apr1m_gt: BigDecimal - apr1m_lt: BigDecimal - apr1m_gte: BigDecimal - apr1m_lte: BigDecimal - apr1m_in: [BigDecimal!] - apr1m_not_in: [BigDecimal!] - apr3m: BigDecimal - apr3m_not: BigDecimal - apr3m_gt: BigDecimal - apr3m_lt: BigDecimal - apr3m_gte: BigDecimal - apr3m_lte: BigDecimal - apr3m_in: [BigDecimal!] - apr3m_not_in: [BigDecimal!] - apr6m: BigDecimal - apr6m_not: BigDecimal - apr6m_gt: BigDecimal - apr6m_lt: BigDecimal - apr6m_gte: BigDecimal - apr6m_lte: BigDecimal - apr6m_in: [BigDecimal!] - apr6m_not_in: [BigDecimal!] - apr12m: BigDecimal - apr12m_not: BigDecimal - apr12m_gt: BigDecimal - apr12m_lt: BigDecimal - apr12m_gte: BigDecimal - apr12m_lte: BigDecimal - apr12m_in: [BigDecimal!] - apr12m_not_in: [BigDecimal!] - newTransactions: BigInt - newTransactions_not: BigInt - newTransactions_gt: BigInt - newTransactions_lt: BigInt - newTransactions_gte: BigInt - newTransactions_lte: BigInt - newTransactions_in: [BigInt!] - newTransactions_not_in: [BigInt!] - newSushiStaked: BigDecimal - newSushiStaked_not: BigDecimal - newSushiStaked_gt: BigDecimal - newSushiStaked_lt: BigDecimal - newSushiStaked_gte: BigDecimal - newSushiStaked_lte: BigDecimal - newSushiStaked_in: [BigDecimal!] - newSushiStaked_not_in: [BigDecimal!] - newSushiHarvested: BigDecimal - newSushiHarvested_not: BigDecimal - newSushiHarvested_gt: BigDecimal - newSushiHarvested_lt: BigDecimal - newSushiHarvested_gte: BigDecimal - newSushiHarvested_lte: BigDecimal - newSushiHarvested_in: [BigDecimal!] - newSushiHarvested_not_in: [BigDecimal!] - newFeeAmount: BigDecimal - newFeeAmount_not: BigDecimal - newFeeAmount_gt: BigDecimal - newFeeAmount_lt: BigDecimal - newFeeAmount_gte: BigDecimal - newFeeAmount_lte: BigDecimal - newFeeAmount_in: [BigDecimal!] - newFeeAmount_not_in: [BigDecimal!] - newXSushiBurned: BigDecimal - newXSushiBurned_not: BigDecimal - newXSushiBurned_gt: BigDecimal - newXSushiBurned_lt: BigDecimal - newXSushiBurned_gte: BigDecimal - newXSushiBurned_lte: BigDecimal - newXSushiBurned_in: [BigDecimal!] - newXSushiBurned_not_in: [BigDecimal!] - newXSushiMinted: BigDecimal - newXSushiMinted_not: BigDecimal - newXSushiMinted_gt: BigDecimal - newXSushiMinted_lt: BigDecimal - newXSushiMinted_gte: BigDecimal - newXSushiMinted_lte: BigDecimal - newXSushiMinted_in: [BigDecimal!] - newXSushiMinted_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [WeekSnapshot_filter] - or: [WeekSnapshot_filter] -} - -enum WeekSnapshot_orderBy { - id - date - userCount - transactionCount - sushiSupply - xSushiSupply - sushiStaked - sushiHarvested - totalFeeAmount - xSushiBurned - xSushiMinted - xSushiSushiRatio - sushiXsushiRatio - apr1m - apr3m - apr6m - apr12m - newTransactions - newSushiStaked - newSushiHarvested - newFeeAmount - newXSushiBurned - newXSushiMinted -} - -type XSushi { - id: ID! - userCount: BigInt! - transactionCount: BigInt! - sushiSupply: BigDecimal! - xSushiSupply: BigDecimal! - sushiStaked: BigDecimal! - sushiHarvested: BigDecimal! - totalFeeAmount: BigDecimal! - xSushiBurned: BigDecimal! - xSushiMinted: BigDecimal! - xSushiSushiRatio: BigDecimal! - sushiXsushiRatio: BigDecimal! - apr1m: BigDecimal! - apr3m: BigDecimal! - apr6m: BigDecimal! - apr12m: BigDecimal! - aprUpdatedAtTimestamp: BigInt! -} - -input XSushi_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - userCount: BigInt - userCount_not: BigInt - userCount_gt: BigInt - userCount_lt: BigInt - userCount_gte: BigInt - userCount_lte: BigInt - userCount_in: [BigInt!] - userCount_not_in: [BigInt!] - transactionCount: BigInt - transactionCount_not: BigInt - transactionCount_gt: BigInt - transactionCount_lt: BigInt - transactionCount_gte: BigInt - transactionCount_lte: BigInt - transactionCount_in: [BigInt!] - transactionCount_not_in: [BigInt!] - sushiSupply: BigDecimal - sushiSupply_not: BigDecimal - sushiSupply_gt: BigDecimal - sushiSupply_lt: BigDecimal - sushiSupply_gte: BigDecimal - sushiSupply_lte: BigDecimal - sushiSupply_in: [BigDecimal!] - sushiSupply_not_in: [BigDecimal!] - xSushiSupply: BigDecimal - xSushiSupply_not: BigDecimal - xSushiSupply_gt: BigDecimal - xSushiSupply_lt: BigDecimal - xSushiSupply_gte: BigDecimal - xSushiSupply_lte: BigDecimal - xSushiSupply_in: [BigDecimal!] - xSushiSupply_not_in: [BigDecimal!] - sushiStaked: BigDecimal - sushiStaked_not: BigDecimal - sushiStaked_gt: BigDecimal - sushiStaked_lt: BigDecimal - sushiStaked_gte: BigDecimal - sushiStaked_lte: BigDecimal - sushiStaked_in: [BigDecimal!] - sushiStaked_not_in: [BigDecimal!] - sushiHarvested: BigDecimal - sushiHarvested_not: BigDecimal - sushiHarvested_gt: BigDecimal - sushiHarvested_lt: BigDecimal - sushiHarvested_gte: BigDecimal - sushiHarvested_lte: BigDecimal - sushiHarvested_in: [BigDecimal!] - sushiHarvested_not_in: [BigDecimal!] - totalFeeAmount: BigDecimal - totalFeeAmount_not: BigDecimal - totalFeeAmount_gt: BigDecimal - totalFeeAmount_lt: BigDecimal - totalFeeAmount_gte: BigDecimal - totalFeeAmount_lte: BigDecimal - totalFeeAmount_in: [BigDecimal!] - totalFeeAmount_not_in: [BigDecimal!] - xSushiBurned: BigDecimal - xSushiBurned_not: BigDecimal - xSushiBurned_gt: BigDecimal - xSushiBurned_lt: BigDecimal - xSushiBurned_gte: BigDecimal - xSushiBurned_lte: BigDecimal - xSushiBurned_in: [BigDecimal!] - xSushiBurned_not_in: [BigDecimal!] - xSushiMinted: BigDecimal - xSushiMinted_not: BigDecimal - xSushiMinted_gt: BigDecimal - xSushiMinted_lt: BigDecimal - xSushiMinted_gte: BigDecimal - xSushiMinted_lte: BigDecimal - xSushiMinted_in: [BigDecimal!] - xSushiMinted_not_in: [BigDecimal!] - xSushiSushiRatio: BigDecimal - xSushiSushiRatio_not: BigDecimal - xSushiSushiRatio_gt: BigDecimal - xSushiSushiRatio_lt: BigDecimal - xSushiSushiRatio_gte: BigDecimal - xSushiSushiRatio_lte: BigDecimal - xSushiSushiRatio_in: [BigDecimal!] - xSushiSushiRatio_not_in: [BigDecimal!] - sushiXsushiRatio: BigDecimal - sushiXsushiRatio_not: BigDecimal - sushiXsushiRatio_gt: BigDecimal - sushiXsushiRatio_lt: BigDecimal - sushiXsushiRatio_gte: BigDecimal - sushiXsushiRatio_lte: BigDecimal - sushiXsushiRatio_in: [BigDecimal!] - sushiXsushiRatio_not_in: [BigDecimal!] - apr1m: BigDecimal - apr1m_not: BigDecimal - apr1m_gt: BigDecimal - apr1m_lt: BigDecimal - apr1m_gte: BigDecimal - apr1m_lte: BigDecimal - apr1m_in: [BigDecimal!] - apr1m_not_in: [BigDecimal!] - apr3m: BigDecimal - apr3m_not: BigDecimal - apr3m_gt: BigDecimal - apr3m_lt: BigDecimal - apr3m_gte: BigDecimal - apr3m_lte: BigDecimal - apr3m_in: [BigDecimal!] - apr3m_not_in: [BigDecimal!] - apr6m: BigDecimal - apr6m_not: BigDecimal - apr6m_gt: BigDecimal - apr6m_lt: BigDecimal - apr6m_gte: BigDecimal - apr6m_lte: BigDecimal - apr6m_in: [BigDecimal!] - apr6m_not_in: [BigDecimal!] - apr12m: BigDecimal - apr12m_not: BigDecimal - apr12m_gt: BigDecimal - apr12m_lt: BigDecimal - apr12m_gte: BigDecimal - apr12m_lte: BigDecimal - apr12m_in: [BigDecimal!] - apr12m_not_in: [BigDecimal!] - aprUpdatedAtTimestamp: BigInt - aprUpdatedAtTimestamp_not: BigInt - aprUpdatedAtTimestamp_gt: BigInt - aprUpdatedAtTimestamp_lt: BigInt - aprUpdatedAtTimestamp_gte: BigInt - aprUpdatedAtTimestamp_lte: BigInt - aprUpdatedAtTimestamp_in: [BigInt!] - aprUpdatedAtTimestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [XSushi_filter] - or: [XSushi_filter] -} - -enum XSushi_orderBy { - id - userCount - transactionCount - sushiSupply - xSushiSupply - sushiStaked - sushiHarvested - totalFeeAmount - xSushiBurned - xSushiMinted - xSushiSushiRatio - sushiXsushiRatio - apr1m - apr3m - apr6m - apr12m - aprUpdatedAtTimestamp -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/sushi-v2/fragments/pool-fields.ts b/packages/graph-client/src/subgraphs/sushi-v2/fragments/pool-fields.ts deleted file mode 100644 index ffc4a3e18f..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/fragments/pool-fields.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { graphql } from '../graphql' - -export const PoolFieldsFragment = graphql(` - fragment PoolFields on Pair @_unmask { - id - token0 { - name - id - decimals - symbol - } - token1 { - name - id - decimals - symbol - } - createdAtBlockNumber - createdAtTimestamp - reserve0 - reserve1 - totalSupply - liquidityUSD: reserveUSD - liquidityNative: reserveETH - token0Price - token1Price - volumeUSD - txCount - } -`) diff --git a/packages/graph-client/src/subgraphs/sushi-v2/graphql.ts b/packages/graph-client/src/subgraphs/sushi-v2/graphql.ts deleted file mode 100644 index f63cba0e01..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './sushi-v2-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/sushi-v2/index.ts b/packages/graph-client/src/subgraphs/sushi-v2/index.ts deleted file mode 100644 index 001281615f..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './queries/burns' -export * from './queries/day-datas' -export * from './queries/factory' -export * from './queries/liquidity-positions' -export * from './queries/mints' -export * from './queries/pool' -export * from './queries/pools' -export * from './queries/swaps' -export * from './queries/tokens' -export * from './queries/transactions' diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/burns.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/burns.ts deleted file mode 100644 index ca27da5d1d..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/burns.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2BurnsQuery = graphql(` - query Burns($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Burn_orderBy, $orderDirection: OrderDirection, $where: Burn_filter) { - burns(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - sender - liquidity - amount0 - amount1 - amountUSD - logIndex - transaction { - id - createdAtTimestamp: timestamp - createdAtBlock: blockNumber - } - } - } -`) - -export type GetSushiV2Burns = VariablesOf & - ChainIdVariable - -export async function getSushiV2Burns( - { chainId, ...variables }: GetSushiV2Burns, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2BurnsQuery, - variables, - options, - }) - - if (result) { - return result.burns - } - - throw new FetchError(chainId, 'Failed to fetch burns') -} - -export type SushiV2Burns = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/day-datas.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/day-datas.ts deleted file mode 100644 index b736dc2b16..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/day-datas.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2DayDatasQuery = graphql(` - query DayDatas($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: UniswapDayData_orderBy, $orderDirection: OrderDirection, $where: UniswapDayData_filter) { - uniswapDayDatas(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - date - dailyVolumeUSD - dailyVolumeUntracked - totalLiquidityUSD - txCount - } - } -`) - -export type GetSushiV2DayDatas = VariablesOf & - ChainIdVariable - -export async function getSushiV2DayDatas( - { chainId, ...variables }: GetSushiV2DayDatas, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2DayDatasQuery, - variables, - options, - }) - - return result.uniswapDayDatas.map((dayData) => ({ - id: dayData.id, - date: dayData.date, - volumeUSD: Number(dayData.dailyVolumeUSD), - volumeUSDUntracked: Number(dayData.dailyVolumeUntracked), - liquidityUSD: Number(dayData.totalLiquidityUSD), - txCount: Number(dayData.txCount), - feesUSD: Number(dayData.totalLiquidityUSD) * 0.003, - })) -} - -export type SushiV2DayDatas = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/factory.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/factory.ts deleted file mode 100644 index 3e43d4d7f2..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/factory.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2FactoriesQuery = graphql(` - query Factories { - uniswapFactories(first: 1) { - id - totalLiquidityUSD - untrackedVolumeUSD - totalVolumeUSD - poolCount: pairCount - } - } -`) - -export type GetSushiV2Factory = VariablesOf & - ChainIdVariable - -export async function getSushiV2Factory( - { chainId, ...variables }: GetSushiV2Factory, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await request( - { - url, - document: SushiV2FactoriesQuery, - variables, - }, - options, - ) - - if (result.uniswapFactories[0]) { - return convertIdToMultichainId( - copyIdToAddress(addChainId(chainId, result.uniswapFactories[0])), - ) - } - - throw new FetchError(chainId, 'Failed to fetch factory') -} - -export type SushiV2Factory = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/liquidity-positions.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/liquidity-positions.ts deleted file mode 100644 index ed85ad9ae6..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/liquidity-positions.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import { type SushiSwapV2ChainId, publicClientConfig } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' -import { SushiSwapProtocol } from 'sushi/types' -import { createPublicClient, erc20Abi } from 'viem' - -import { FetchError } from 'src/lib/fetch-error' -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { Hex } from 'src/lib/types/hex' -import { graphql } from '../graphql' - -export const SushiV2LiquidityPositionsQuery = graphql(` - query LiquidityPositions($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: LiquidityPosition_orderBy, $orderDirection: OrderDirection, $where: LiquidityPosition_filter) { - liquidityPositions(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - balance: liquidityTokenBalance - pair { - id - } - user { - id - } - } - } -`) - -export type GetSushiV2LiquidityPositions = VariablesOf< - typeof SushiV2LiquidityPositionsQuery -> & - ChainIdVariable - -export async function getSushiV2LiquidityPositions( - { chainId, ...variables }: GetSushiV2LiquidityPositions, - options?: RequestOptions, -) { - try { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2LiquidityPositionsQuery, - variables, - options, - }) - - const transformed = result.liquidityPositions.map((position) => { - const pool = { - ...convertIdToMultichainId( - copyIdToAddress(addChainId(chainId, position.pair)), - ), - protocol: SushiSwapProtocol.SUSHISWAP_V2, - } - - return { - id: position.id, - balance: position.balance, - pool, - user: position.user.id as Hex, - } - }) - - const client = createPublicClient(publicClientConfig[chainId]) - const balances = await client.multicall({ - contracts: transformed.map( - (pos) => - ({ - abi: erc20Abi, - functionName: 'balanceOf', - address: pos.pool.address, - args: [pos.user], - }) as const, - ), - allowFailure: false, - }) - - transformed.forEach((pos, i) => { - pos.balance = String(balances[i]!) - }) - - return transformed - } catch { - throw new FetchError(chainId, 'Failed to fetch liquidity positions') - } -} - -export type SushiV2LiquidityPositions = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/mints.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/mints.ts deleted file mode 100644 index b6d7ab7bfc..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/mints.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2MintsQuery = graphql(` - query Mints($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Mint_orderBy, $orderDirection: OrderDirection, $where: Mint_filter) { - mints(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - sender - liquidity - amount0 - amount1 - amountUSD - logIndex - transaction { - id - createdAtTimestamp: timestamp - createdAtBlock: blockNumber - } - } - } -`) - -export type GetSushiV2Mints = VariablesOf & - ChainIdVariable - -export async function getSushiV2Mints( - { chainId, ...variables }: GetSushiV2Mints, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2MintsQuery, - variables, - options, - }) - - return result.mints -} - -export type SushiV2Mints = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/pool-with-buckets.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/pool-with-buckets.ts deleted file mode 100644 index ec06613bfd..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/pool-with-buckets.ts +++ /dev/null @@ -1,87 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { Hex } from 'src/lib/types/hex' -import { transformBucketsV2ToStd } from 'src/subgraphs/sushi-v2/transforms/bucket-v2-to-std' -import { transformPoolV2ToBase } from 'src/subgraphs/sushi-v2/transforms/pool-v2-to-base' -import type { PoolBase, PoolV2, PoolWithBuckets } from 'sushi/types' -import { PoolFieldsFragment } from '../fragments/pool-fields' -import { graphql } from '../graphql' - -export const SushiV2PoolBucketsQuery = graphql( - ` - query PoolBuckets($id: ID!, $id_Bytes: Bytes!, $block: Block_height, $hourDataFirst: Int = 168, $dayDataFirst: Int = 1000) { - pair(id: $id, block: $block) { - ...PoolFields - - poolHourData: pairHourData(first: $hourDataFirst, orderBy: hourStartUnix, orderDirection: desc) { - id - date: hourStartUnix - liquidityUSD: reserveUSD - volumeUSD: hourlyVolumeUSD - txCount: hourlyTxns - } - } - - poolDayData: pairDayDatas(first: $dayDataFirst, orderBy: date, orderDirection: desc, where: { pairAddress: $id_Bytes }) { - id - date - liquidityUSD: reserveUSD - volumeUSD: dailyVolumeUSD - txCount: dailyTxns - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV2PoolBuckets = Omit< - VariablesOf, - 'id_Bytes' -> & - ChainIdVariable - -export type SushiV2PoolBuckets = PoolWithBuckets> - -export async function getSushiV2PoolBuckets( - { chainId, ...variables }: GetSushiV2PoolBuckets, - options?: RequestOptions, -): Promise { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - if (variables?.dayDataFirst || 0 > 1000) { - throw new Error( - 'dayDataFirst must be less than or equal to 1000, paging is not implemented', - ) - } - - const result = await request( - { - url, - document: SushiV2PoolBucketsQuery, - variables: { - ...variables, - id: variables.id.toLowerCase(), - id_Bytes: variables.id.toLowerCase() as Hex, - }, - }, - options, - ) - - if (result.pair) { - return { - ...transformPoolV2ToBase(result.pair, chainId), - poolHourData: transformBucketsV2ToStd(result.pair.poolHourData), - poolDayData: transformBucketsV2ToStd(result.poolDayData), - } - } - - throw new FetchError( - chainId, - `Failed to fetch pool ${chainId}:${variables.id}`, - ) -} diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/pool.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/pool.ts deleted file mode 100644 index 285686c144..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/pool.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' -import type { PoolBase, PoolV2 } from 'sushi/types' - -import { FetchError } from 'src/lib/fetch-error' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { transformPoolV2ToBase } from 'src/subgraphs/sushi-v2/transforms/pool-v2-to-base' -import { PoolFieldsFragment } from '../fragments/pool-fields' -import { graphql } from '../graphql' - -export const SushiV2PoolQuery = graphql( - ` - query Pool($id: ID!, $block: Block_height) { - pool: pair(id: $id, block: $block) { - ...PoolFields - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV2Pool = VariablesOf & - ChainIdVariable - -export async function getSushiV2Pool( - { chainId, ...variables }: GetSushiV2Pool, - options?: RequestOptions, -): Promise> { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await request( - { url, document: SushiV2PoolQuery, variables }, - options, - ) - - if (result.pool) { - return transformPoolV2ToBase(result.pool, chainId) - } - - throw new FetchError( - chainId, - `Failed to fetch pool ${chainId}:${variables.id}`, - ) -} - -export type SushiV2Pool = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/pools.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/pools.ts deleted file mode 100644 index d9cf360d55..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/pools.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' -import type { PoolBase, PoolV2 } from 'sushi/types' - -import { FetchError } from 'src/lib/fetch-error' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { transformPoolV2ToBase } from 'src/subgraphs/sushi-v2/transforms/pool-v2-to-base' -import { PoolFieldsFragment } from '../fragments/pool-fields' -import { graphql } from '../graphql' - -export const SushiV2PoolsQuery = graphql( - ` - query Pools($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Pair_orderBy, $orderDirection: OrderDirection, $where: Pair_filter) { - pairs(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - ...PoolFields - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV2Pools = VariablesOf & - ChainIdVariable - -export type SushiV2Pools = PoolV2[] - -export async function getSushiV2Pools( - { chainId, ...variables }: GetSushiV2Pools, - options?: RequestOptions, -): Promise { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2PoolsQuery, - variables, - options, - }) - - if (result) { - return result.pairs.map((pool) => transformPoolV2ToBase(pool, chainId)) - } - - throw new FetchError(chainId, 'Failed to fetch pools') -} diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/swaps.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/swaps.ts deleted file mode 100644 index ad128c5b90..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/swaps.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2SwapsQuery = graphql(` - query Swaps($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Swap_orderBy, $orderDirection: OrderDirection, $where: Swap_filter) { - swaps(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - sender - to - amount0In - amount1In - amount0Out - amount1Out - amountUSD - logIndex - amountUSD - logIndex - transaction { - id - createdAtTimestamp: timestamp - createdAtBlock: blockNumber - } - } - } -`) - -export type GetSushiV2Swaps = VariablesOf & - ChainIdVariable - -export async function getSushiV2Swaps( - { chainId, ...variables }: GetSushiV2Swaps, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2SwapsQuery, - variables, - options, - }) - - return result.swaps -} - -export type SushiV2Swaps = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/tokens.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/tokens.ts deleted file mode 100644 index c7bcd61c82..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/tokens.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2TokensQuery = graphql(` - query Tokens($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Token_orderBy, $orderDirection: OrderDirection, $where: Token_filter) { - tokens(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - name - symbol - decimals - volumeUSD: tradeVolumeUSD - totalLiquidity - } - } -`) - -export type GetSushiV2Tokens = VariablesOf & - ChainIdVariable - -export async function getSushiV2Tokens( - { chainId, ...variables }: GetSushiV2Tokens, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2TokensQuery, - variables, - options, - }) - - return result.tokens.map((token) => - convertIdToMultichainId(copyIdToAddress(addChainId(chainId, token))), - ) -} - -export type SushiV2Tokens = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/queries/transactions.ts b/packages/graph-client/src/subgraphs/sushi-v2/queries/transactions.ts deleted file mode 100644 index eb9ab4744f..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/queries/transactions.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { SUSHISWAP_V2_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV2TransactionsQuery = graphql(` - query Transactions($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $where: Transaction_filter) { - transactions(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - createdAtTimestamp: timestamp - createdAtBlock: blockNumber - mints { - id - sender - liquidity - amount0 - amount1 - amountUSD - logIndex - } - burns { - id - sender - liquidity - amount0 - amount1 - amountUSD - logIndex - } - swaps { - id - sender - to - amount0In - amount1In - amount0Out - amount1Out - amountUSD - logIndex - } - } - } -`) - -export type GetSushiV2Transactions = VariablesOf< - typeof SushiV2TransactionsQuery -> & - ChainIdVariable - -export async function getSushiV2Transactions( - { chainId, ...variables }: GetSushiV2Transactions, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V2_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV2TransactionsQuery, - variables, - options, - }) - - return result.transactions -} - -export type SushiV2Transactions = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/sushi-v2/schema.graphql b/packages/graph-client/src/subgraphs/sushi-v2/schema.graphql deleted file mode 100644 index c000f6a9c3..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/schema.graphql +++ /dev/null @@ -1,3197 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -type Bundle { - id: ID! - ethPrice: BigDecimal! -} - -input Bundle_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - ethPrice: BigDecimal - ethPrice_not: BigDecimal - ethPrice_gt: BigDecimal - ethPrice_lt: BigDecimal - ethPrice_gte: BigDecimal - ethPrice_lte: BigDecimal - ethPrice_in: [BigDecimal!] - ethPrice_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Bundle_filter] - or: [Bundle_filter] -} - -enum Bundle_orderBy { - id - ethPrice -} - -type Burn { - id: Bytes! - transaction: Transaction! - timestamp: BigInt! - pair: Pair! - liquidity: BigDecimal! - sender: Bytes - amount0: BigDecimal - amount1: BigDecimal - to: Bytes - logIndex: BigInt - amountUSD: BigDecimal - needsComplete: Boolean! - feeTo: Bytes - feeLiquidity: BigDecimal -} - -input Burn_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pair: String - pair_not: String - pair_gt: String - pair_lt: String - pair_gte: String - pair_lte: String - pair_in: [String!] - pair_not_in: [String!] - pair_contains: String - pair_contains_nocase: String - pair_not_contains: String - pair_not_contains_nocase: String - pair_starts_with: String - pair_starts_with_nocase: String - pair_not_starts_with: String - pair_not_starts_with_nocase: String - pair_ends_with: String - pair_ends_with_nocase: String - pair_not_ends_with: String - pair_not_ends_with_nocase: String - pair_: Pair_filter - liquidity: BigDecimal - liquidity_not: BigDecimal - liquidity_gt: BigDecimal - liquidity_lt: BigDecimal - liquidity_gte: BigDecimal - liquidity_lte: BigDecimal - liquidity_in: [BigDecimal!] - liquidity_not_in: [BigDecimal!] - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - to: Bytes - to_not: Bytes - to_gt: Bytes - to_lt: Bytes - to_gte: Bytes - to_lte: Bytes - to_in: [Bytes!] - to_not_in: [Bytes!] - to_contains: Bytes - to_not_contains: Bytes - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - needsComplete: Boolean - needsComplete_not: Boolean - needsComplete_in: [Boolean!] - needsComplete_not_in: [Boolean!] - feeTo: Bytes - feeTo_not: Bytes - feeTo_gt: Bytes - feeTo_lt: Bytes - feeTo_gte: Bytes - feeTo_lte: Bytes - feeTo_in: [Bytes!] - feeTo_not_in: [Bytes!] - feeTo_contains: Bytes - feeTo_not_contains: Bytes - feeLiquidity: BigDecimal - feeLiquidity_not: BigDecimal - feeLiquidity_gt: BigDecimal - feeLiquidity_lt: BigDecimal - feeLiquidity_gte: BigDecimal - feeLiquidity_lte: BigDecimal - feeLiquidity_in: [BigDecimal!] - feeLiquidity_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Burn_filter] - or: [Burn_filter] -} - -enum Burn_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - timestamp - pair - pair__id - pair__reserve0 - pair__reserve1 - pair__totalSupply - pair__reserveETH - pair__reserveUSD - pair__trackedReserveETH - pair__token0Price - pair__token1Price - pair__volumeToken0 - pair__volumeToken1 - pair__volumeUSD - pair__untrackedVolumeUSD - pair__txCount - pair__createdAtTimestamp - pair__createdAtBlockNumber - pair__liquidityProviderCount - liquidity - sender - amount0 - amount1 - to - logIndex - amountUSD - needsComplete - feeTo - feeLiquidity -} - -scalar Bytes - -"8 bytes signed integer\n" -scalar Int8 - -type LiquidityPosition { - id: Bytes! - user: User! - pair: Pair! - liquidityTokenBalance: BigDecimal! -} - -type LiquidityPositionSnapshot { - id: Bytes! - liquidityPosition: LiquidityPosition! - timestamp: Int! - block: Int! - user: User! - pair: Pair! - token0PriceUSD: BigDecimal! - token1PriceUSD: BigDecimal! - reserve0: BigDecimal! - reserve1: BigDecimal! - reserveUSD: BigDecimal! - liquidityTokenTotalSupply: BigDecimal! - liquidityTokenBalance: BigDecimal! -} - -input LiquidityPositionSnapshot_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - liquidityPosition: String - liquidityPosition_not: String - liquidityPosition_gt: String - liquidityPosition_lt: String - liquidityPosition_gte: String - liquidityPosition_lte: String - liquidityPosition_in: [String!] - liquidityPosition_not_in: [String!] - liquidityPosition_contains: String - liquidityPosition_contains_nocase: String - liquidityPosition_not_contains: String - liquidityPosition_not_contains_nocase: String - liquidityPosition_starts_with: String - liquidityPosition_starts_with_nocase: String - liquidityPosition_not_starts_with: String - liquidityPosition_not_starts_with_nocase: String - liquidityPosition_ends_with: String - liquidityPosition_ends_with_nocase: String - liquidityPosition_not_ends_with: String - liquidityPosition_not_ends_with_nocase: String - liquidityPosition_: LiquidityPosition_filter - timestamp: Int - timestamp_not: Int - timestamp_gt: Int - timestamp_lt: Int - timestamp_gte: Int - timestamp_lte: Int - timestamp_in: [Int!] - timestamp_not_in: [Int!] - block: Int - block_not: Int - block_gt: Int - block_lt: Int - block_gte: Int - block_lte: Int - block_in: [Int!] - block_not_in: [Int!] - user: String - user_not: String - user_gt: String - user_lt: String - user_gte: String - user_lte: String - user_in: [String!] - user_not_in: [String!] - user_contains: String - user_contains_nocase: String - user_not_contains: String - user_not_contains_nocase: String - user_starts_with: String - user_starts_with_nocase: String - user_not_starts_with: String - user_not_starts_with_nocase: String - user_ends_with: String - user_ends_with_nocase: String - user_not_ends_with: String - user_not_ends_with_nocase: String - user_: User_filter - pair: String - pair_not: String - pair_gt: String - pair_lt: String - pair_gte: String - pair_lte: String - pair_in: [String!] - pair_not_in: [String!] - pair_contains: String - pair_contains_nocase: String - pair_not_contains: String - pair_not_contains_nocase: String - pair_starts_with: String - pair_starts_with_nocase: String - pair_not_starts_with: String - pair_not_starts_with_nocase: String - pair_ends_with: String - pair_ends_with_nocase: String - pair_not_ends_with: String - pair_not_ends_with_nocase: String - pair_: Pair_filter - token0PriceUSD: BigDecimal - token0PriceUSD_not: BigDecimal - token0PriceUSD_gt: BigDecimal - token0PriceUSD_lt: BigDecimal - token0PriceUSD_gte: BigDecimal - token0PriceUSD_lte: BigDecimal - token0PriceUSD_in: [BigDecimal!] - token0PriceUSD_not_in: [BigDecimal!] - token1PriceUSD: BigDecimal - token1PriceUSD_not: BigDecimal - token1PriceUSD_gt: BigDecimal - token1PriceUSD_lt: BigDecimal - token1PriceUSD_gte: BigDecimal - token1PriceUSD_lte: BigDecimal - token1PriceUSD_in: [BigDecimal!] - token1PriceUSD_not_in: [BigDecimal!] - reserve0: BigDecimal - reserve0_not: BigDecimal - reserve0_gt: BigDecimal - reserve0_lt: BigDecimal - reserve0_gte: BigDecimal - reserve0_lte: BigDecimal - reserve0_in: [BigDecimal!] - reserve0_not_in: [BigDecimal!] - reserve1: BigDecimal - reserve1_not: BigDecimal - reserve1_gt: BigDecimal - reserve1_lt: BigDecimal - reserve1_gte: BigDecimal - reserve1_lte: BigDecimal - reserve1_in: [BigDecimal!] - reserve1_not_in: [BigDecimal!] - reserveUSD: BigDecimal - reserveUSD_not: BigDecimal - reserveUSD_gt: BigDecimal - reserveUSD_lt: BigDecimal - reserveUSD_gte: BigDecimal - reserveUSD_lte: BigDecimal - reserveUSD_in: [BigDecimal!] - reserveUSD_not_in: [BigDecimal!] - liquidityTokenTotalSupply: BigDecimal - liquidityTokenTotalSupply_not: BigDecimal - liquidityTokenTotalSupply_gt: BigDecimal - liquidityTokenTotalSupply_lt: BigDecimal - liquidityTokenTotalSupply_gte: BigDecimal - liquidityTokenTotalSupply_lte: BigDecimal - liquidityTokenTotalSupply_in: [BigDecimal!] - liquidityTokenTotalSupply_not_in: [BigDecimal!] - liquidityTokenBalance: BigDecimal - liquidityTokenBalance_not: BigDecimal - liquidityTokenBalance_gt: BigDecimal - liquidityTokenBalance_lt: BigDecimal - liquidityTokenBalance_gte: BigDecimal - liquidityTokenBalance_lte: BigDecimal - liquidityTokenBalance_in: [BigDecimal!] - liquidityTokenBalance_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [LiquidityPositionSnapshot_filter] - or: [LiquidityPositionSnapshot_filter] -} - -enum LiquidityPositionSnapshot_orderBy { - id - liquidityPosition - liquidityPosition__id - liquidityPosition__liquidityTokenBalance - timestamp - block - user - user__id - user__usdSwapped - pair - pair__id - pair__reserve0 - pair__reserve1 - pair__totalSupply - pair__reserveETH - pair__reserveUSD - pair__trackedReserveETH - pair__token0Price - pair__token1Price - pair__volumeToken0 - pair__volumeToken1 - pair__volumeUSD - pair__untrackedVolumeUSD - pair__txCount - pair__createdAtTimestamp - pair__createdAtBlockNumber - pair__liquidityProviderCount - token0PriceUSD - token1PriceUSD - reserve0 - reserve1 - reserveUSD - liquidityTokenTotalSupply - liquidityTokenBalance -} - -input LiquidityPosition_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - user: String - user_not: String - user_gt: String - user_lt: String - user_gte: String - user_lte: String - user_in: [String!] - user_not_in: [String!] - user_contains: String - user_contains_nocase: String - user_not_contains: String - user_not_contains_nocase: String - user_starts_with: String - user_starts_with_nocase: String - user_not_starts_with: String - user_not_starts_with_nocase: String - user_ends_with: String - user_ends_with_nocase: String - user_not_ends_with: String - user_not_ends_with_nocase: String - user_: User_filter - pair: String - pair_not: String - pair_gt: String - pair_lt: String - pair_gte: String - pair_lte: String - pair_in: [String!] - pair_not_in: [String!] - pair_contains: String - pair_contains_nocase: String - pair_not_contains: String - pair_not_contains_nocase: String - pair_starts_with: String - pair_starts_with_nocase: String - pair_not_starts_with: String - pair_not_starts_with_nocase: String - pair_ends_with: String - pair_ends_with_nocase: String - pair_not_ends_with: String - pair_not_ends_with_nocase: String - pair_: Pair_filter - liquidityTokenBalance: BigDecimal - liquidityTokenBalance_not: BigDecimal - liquidityTokenBalance_gt: BigDecimal - liquidityTokenBalance_lt: BigDecimal - liquidityTokenBalance_gte: BigDecimal - liquidityTokenBalance_lte: BigDecimal - liquidityTokenBalance_in: [BigDecimal!] - liquidityTokenBalance_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [LiquidityPosition_filter] - or: [LiquidityPosition_filter] -} - -enum LiquidityPosition_orderBy { - id - user - user__id - user__usdSwapped - pair - pair__id - pair__reserve0 - pair__reserve1 - pair__totalSupply - pair__reserveETH - pair__reserveUSD - pair__trackedReserveETH - pair__token0Price - pair__token1Price - pair__volumeToken0 - pair__volumeToken1 - pair__volumeUSD - pair__untrackedVolumeUSD - pair__txCount - pair__createdAtTimestamp - pair__createdAtBlockNumber - pair__liquidityProviderCount - liquidityTokenBalance -} - -type Mint { - id: Bytes! - transaction: Transaction! - timestamp: BigInt! - pair: Pair! - to: Bytes! - liquidity: BigDecimal! - sender: Bytes - amount0: BigDecimal - amount1: BigDecimal - logIndex: BigInt - amountUSD: BigDecimal - feeTo: Bytes - feeLiquidity: BigDecimal -} - -input Mint_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pair: String - pair_not: String - pair_gt: String - pair_lt: String - pair_gte: String - pair_lte: String - pair_in: [String!] - pair_not_in: [String!] - pair_contains: String - pair_contains_nocase: String - pair_not_contains: String - pair_not_contains_nocase: String - pair_starts_with: String - pair_starts_with_nocase: String - pair_not_starts_with: String - pair_not_starts_with_nocase: String - pair_ends_with: String - pair_ends_with_nocase: String - pair_not_ends_with: String - pair_not_ends_with_nocase: String - pair_: Pair_filter - to: Bytes - to_not: Bytes - to_gt: Bytes - to_lt: Bytes - to_gte: Bytes - to_lte: Bytes - to_in: [Bytes!] - to_not_in: [Bytes!] - to_contains: Bytes - to_not_contains: Bytes - liquidity: BigDecimal - liquidity_not: BigDecimal - liquidity_gt: BigDecimal - liquidity_lt: BigDecimal - liquidity_gte: BigDecimal - liquidity_lte: BigDecimal - liquidity_in: [BigDecimal!] - liquidity_not_in: [BigDecimal!] - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - feeTo: Bytes - feeTo_not: Bytes - feeTo_gt: Bytes - feeTo_lt: Bytes - feeTo_gte: Bytes - feeTo_lte: Bytes - feeTo_in: [Bytes!] - feeTo_not_in: [Bytes!] - feeTo_contains: Bytes - feeTo_not_contains: Bytes - feeLiquidity: BigDecimal - feeLiquidity_not: BigDecimal - feeLiquidity_gt: BigDecimal - feeLiquidity_lt: BigDecimal - feeLiquidity_gte: BigDecimal - feeLiquidity_lte: BigDecimal - feeLiquidity_in: [BigDecimal!] - feeLiquidity_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Mint_filter] - or: [Mint_filter] -} - -enum Mint_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - timestamp - pair - pair__id - pair__reserve0 - pair__reserve1 - pair__totalSupply - pair__reserveETH - pair__reserveUSD - pair__trackedReserveETH - pair__token0Price - pair__token1Price - pair__volumeToken0 - pair__volumeToken1 - pair__volumeUSD - pair__untrackedVolumeUSD - pair__txCount - pair__createdAtTimestamp - pair__createdAtBlockNumber - pair__liquidityProviderCount - to - liquidity - sender - amount0 - amount1 - logIndex - amountUSD - feeTo - feeLiquidity -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Pair { - id: Bytes! - token0: Token! - token1: Token! - reserve0: BigDecimal! - reserve1: BigDecimal! - totalSupply: BigDecimal! - reserveETH: BigDecimal! - reserveUSD: BigDecimal! - trackedReserveETH: BigDecimal! - token0Price: BigDecimal! - token1Price: BigDecimal! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - txCount: BigInt! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - liquidityProviderCount: BigInt! - pairHourData(skip: Int = 0, first: Int = 100, orderBy: PairHourData_orderBy, orderDirection: OrderDirection, where: PairHourData_filter): [PairHourData!]! - liquidityPositions(skip: Int = 0, first: Int = 100, orderBy: LiquidityPosition_orderBy, orderDirection: OrderDirection, where: LiquidityPosition_filter): [LiquidityPosition!]! - liquidityPositionSnapshots(skip: Int = 0, first: Int = 100, orderBy: LiquidityPositionSnapshot_orderBy, orderDirection: OrderDirection, where: LiquidityPositionSnapshot_filter): [LiquidityPositionSnapshot!]! - mints(skip: Int = 0, first: Int = 100, orderBy: Mint_orderBy, orderDirection: OrderDirection, where: Mint_filter): [Mint!]! - burns(skip: Int = 0, first: Int = 100, orderBy: Burn_orderBy, orderDirection: OrderDirection, where: Burn_filter): [Burn!]! - swaps(skip: Int = 0, first: Int = 100, orderBy: Swap_orderBy, orderDirection: OrderDirection, where: Swap_filter): [Swap!]! -} - -type PairDayData { - id: Bytes! - date: Int! - pairAddress: Bytes! - token0: Token! - token1: Token! - reserve0: BigDecimal! - reserve1: BigDecimal! - totalSupply: BigDecimal - reserveUSD: BigDecimal! - dailyVolumeToken0: BigDecimal! - dailyVolumeToken1: BigDecimal! - dailyVolumeUSD: BigDecimal! - dailyTxns: BigInt! -} - -input PairDayData_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - pairAddress: Bytes - pairAddress_not: Bytes - pairAddress_gt: Bytes - pairAddress_lt: Bytes - pairAddress_gte: Bytes - pairAddress_lte: Bytes - pairAddress_in: [Bytes!] - pairAddress_not_in: [Bytes!] - pairAddress_contains: Bytes - pairAddress_not_contains: Bytes - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - reserve0: BigDecimal - reserve0_not: BigDecimal - reserve0_gt: BigDecimal - reserve0_lt: BigDecimal - reserve0_gte: BigDecimal - reserve0_lte: BigDecimal - reserve0_in: [BigDecimal!] - reserve0_not_in: [BigDecimal!] - reserve1: BigDecimal - reserve1_not: BigDecimal - reserve1_gt: BigDecimal - reserve1_lt: BigDecimal - reserve1_gte: BigDecimal - reserve1_lte: BigDecimal - reserve1_in: [BigDecimal!] - reserve1_not_in: [BigDecimal!] - totalSupply: BigDecimal - totalSupply_not: BigDecimal - totalSupply_gt: BigDecimal - totalSupply_lt: BigDecimal - totalSupply_gte: BigDecimal - totalSupply_lte: BigDecimal - totalSupply_in: [BigDecimal!] - totalSupply_not_in: [BigDecimal!] - reserveUSD: BigDecimal - reserveUSD_not: BigDecimal - reserveUSD_gt: BigDecimal - reserveUSD_lt: BigDecimal - reserveUSD_gte: BigDecimal - reserveUSD_lte: BigDecimal - reserveUSD_in: [BigDecimal!] - reserveUSD_not_in: [BigDecimal!] - dailyVolumeToken0: BigDecimal - dailyVolumeToken0_not: BigDecimal - dailyVolumeToken0_gt: BigDecimal - dailyVolumeToken0_lt: BigDecimal - dailyVolumeToken0_gte: BigDecimal - dailyVolumeToken0_lte: BigDecimal - dailyVolumeToken0_in: [BigDecimal!] - dailyVolumeToken0_not_in: [BigDecimal!] - dailyVolumeToken1: BigDecimal - dailyVolumeToken1_not: BigDecimal - dailyVolumeToken1_gt: BigDecimal - dailyVolumeToken1_lt: BigDecimal - dailyVolumeToken1_gte: BigDecimal - dailyVolumeToken1_lte: BigDecimal - dailyVolumeToken1_in: [BigDecimal!] - dailyVolumeToken1_not_in: [BigDecimal!] - dailyVolumeUSD: BigDecimal - dailyVolumeUSD_not: BigDecimal - dailyVolumeUSD_gt: BigDecimal - dailyVolumeUSD_lt: BigDecimal - dailyVolumeUSD_gte: BigDecimal - dailyVolumeUSD_lte: BigDecimal - dailyVolumeUSD_in: [BigDecimal!] - dailyVolumeUSD_not_in: [BigDecimal!] - dailyTxns: BigInt - dailyTxns_not: BigInt - dailyTxns_gt: BigInt - dailyTxns_lt: BigInt - dailyTxns_gte: BigInt - dailyTxns_lte: BigInt - dailyTxns_in: [BigInt!] - dailyTxns_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PairDayData_filter] - or: [PairDayData_filter] -} - -enum PairDayData_orderBy { - id - date - pairAddress - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__tradeVolume - token0__tradeVolumeUSD - token0__untrackedVolumeUSD - token0__txCount - token0__totalLiquidity - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__tradeVolume - token1__tradeVolumeUSD - token1__untrackedVolumeUSD - token1__txCount - token1__totalLiquidity - token1__derivedETH - reserve0 - reserve1 - totalSupply - reserveUSD - dailyVolumeToken0 - dailyVolumeToken1 - dailyVolumeUSD - dailyTxns -} - -type PairHourData { - id: Bytes! - hourStartUnix: Int! - pair: Pair! - reserve0: BigDecimal! - reserve1: BigDecimal! - totalSupply: BigDecimal - reserveUSD: BigDecimal! - hourlyVolumeToken0: BigDecimal! - hourlyVolumeToken1: BigDecimal! - hourlyVolumeUSD: BigDecimal! - hourlyTxns: BigInt! -} - -input PairHourData_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - hourStartUnix: Int - hourStartUnix_not: Int - hourStartUnix_gt: Int - hourStartUnix_lt: Int - hourStartUnix_gte: Int - hourStartUnix_lte: Int - hourStartUnix_in: [Int!] - hourStartUnix_not_in: [Int!] - pair: String - pair_not: String - pair_gt: String - pair_lt: String - pair_gte: String - pair_lte: String - pair_in: [String!] - pair_not_in: [String!] - pair_contains: String - pair_contains_nocase: String - pair_not_contains: String - pair_not_contains_nocase: String - pair_starts_with: String - pair_starts_with_nocase: String - pair_not_starts_with: String - pair_not_starts_with_nocase: String - pair_ends_with: String - pair_ends_with_nocase: String - pair_not_ends_with: String - pair_not_ends_with_nocase: String - pair_: Pair_filter - reserve0: BigDecimal - reserve0_not: BigDecimal - reserve0_gt: BigDecimal - reserve0_lt: BigDecimal - reserve0_gte: BigDecimal - reserve0_lte: BigDecimal - reserve0_in: [BigDecimal!] - reserve0_not_in: [BigDecimal!] - reserve1: BigDecimal - reserve1_not: BigDecimal - reserve1_gt: BigDecimal - reserve1_lt: BigDecimal - reserve1_gte: BigDecimal - reserve1_lte: BigDecimal - reserve1_in: [BigDecimal!] - reserve1_not_in: [BigDecimal!] - totalSupply: BigDecimal - totalSupply_not: BigDecimal - totalSupply_gt: BigDecimal - totalSupply_lt: BigDecimal - totalSupply_gte: BigDecimal - totalSupply_lte: BigDecimal - totalSupply_in: [BigDecimal!] - totalSupply_not_in: [BigDecimal!] - reserveUSD: BigDecimal - reserveUSD_not: BigDecimal - reserveUSD_gt: BigDecimal - reserveUSD_lt: BigDecimal - reserveUSD_gte: BigDecimal - reserveUSD_lte: BigDecimal - reserveUSD_in: [BigDecimal!] - reserveUSD_not_in: [BigDecimal!] - hourlyVolumeToken0: BigDecimal - hourlyVolumeToken0_not: BigDecimal - hourlyVolumeToken0_gt: BigDecimal - hourlyVolumeToken0_lt: BigDecimal - hourlyVolumeToken0_gte: BigDecimal - hourlyVolumeToken0_lte: BigDecimal - hourlyVolumeToken0_in: [BigDecimal!] - hourlyVolumeToken0_not_in: [BigDecimal!] - hourlyVolumeToken1: BigDecimal - hourlyVolumeToken1_not: BigDecimal - hourlyVolumeToken1_gt: BigDecimal - hourlyVolumeToken1_lt: BigDecimal - hourlyVolumeToken1_gte: BigDecimal - hourlyVolumeToken1_lte: BigDecimal - hourlyVolumeToken1_in: [BigDecimal!] - hourlyVolumeToken1_not_in: [BigDecimal!] - hourlyVolumeUSD: BigDecimal - hourlyVolumeUSD_not: BigDecimal - hourlyVolumeUSD_gt: BigDecimal - hourlyVolumeUSD_lt: BigDecimal - hourlyVolumeUSD_gte: BigDecimal - hourlyVolumeUSD_lte: BigDecimal - hourlyVolumeUSD_in: [BigDecimal!] - hourlyVolumeUSD_not_in: [BigDecimal!] - hourlyTxns: BigInt - hourlyTxns_not: BigInt - hourlyTxns_gt: BigInt - hourlyTxns_lt: BigInt - hourlyTxns_gte: BigInt - hourlyTxns_lte: BigInt - hourlyTxns_in: [BigInt!] - hourlyTxns_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PairHourData_filter] - or: [PairHourData_filter] -} - -enum PairHourData_orderBy { - id - hourStartUnix - pair - pair__id - pair__reserve0 - pair__reserve1 - pair__totalSupply - pair__reserveETH - pair__reserveUSD - pair__trackedReserveETH - pair__token0Price - pair__token1Price - pair__volumeToken0 - pair__volumeToken1 - pair__volumeUSD - pair__untrackedVolumeUSD - pair__txCount - pair__createdAtTimestamp - pair__createdAtBlockNumber - pair__liquidityProviderCount - reserve0 - reserve1 - totalSupply - reserveUSD - hourlyVolumeToken0 - hourlyVolumeToken1 - hourlyVolumeUSD - hourlyTxns -} - -input Pair_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - reserve0: BigDecimal - reserve0_not: BigDecimal - reserve0_gt: BigDecimal - reserve0_lt: BigDecimal - reserve0_gte: BigDecimal - reserve0_lte: BigDecimal - reserve0_in: [BigDecimal!] - reserve0_not_in: [BigDecimal!] - reserve1: BigDecimal - reserve1_not: BigDecimal - reserve1_gt: BigDecimal - reserve1_lt: BigDecimal - reserve1_gte: BigDecimal - reserve1_lte: BigDecimal - reserve1_in: [BigDecimal!] - reserve1_not_in: [BigDecimal!] - totalSupply: BigDecimal - totalSupply_not: BigDecimal - totalSupply_gt: BigDecimal - totalSupply_lt: BigDecimal - totalSupply_gte: BigDecimal - totalSupply_lte: BigDecimal - totalSupply_in: [BigDecimal!] - totalSupply_not_in: [BigDecimal!] - reserveETH: BigDecimal - reserveETH_not: BigDecimal - reserveETH_gt: BigDecimal - reserveETH_lt: BigDecimal - reserveETH_gte: BigDecimal - reserveETH_lte: BigDecimal - reserveETH_in: [BigDecimal!] - reserveETH_not_in: [BigDecimal!] - reserveUSD: BigDecimal - reserveUSD_not: BigDecimal - reserveUSD_gt: BigDecimal - reserveUSD_lt: BigDecimal - reserveUSD_gte: BigDecimal - reserveUSD_lte: BigDecimal - reserveUSD_in: [BigDecimal!] - reserveUSD_not_in: [BigDecimal!] - trackedReserveETH: BigDecimal - trackedReserveETH_not: BigDecimal - trackedReserveETH_gt: BigDecimal - trackedReserveETH_lt: BigDecimal - trackedReserveETH_gte: BigDecimal - trackedReserveETH_lte: BigDecimal - trackedReserveETH_in: [BigDecimal!] - trackedReserveETH_not_in: [BigDecimal!] - token0Price: BigDecimal - token0Price_not: BigDecimal - token0Price_gt: BigDecimal - token0Price_lt: BigDecimal - token0Price_gte: BigDecimal - token0Price_lte: BigDecimal - token0Price_in: [BigDecimal!] - token0Price_not_in: [BigDecimal!] - token1Price: BigDecimal - token1Price_not: BigDecimal - token1Price_gt: BigDecimal - token1Price_lt: BigDecimal - token1Price_gte: BigDecimal - token1Price_lte: BigDecimal - token1Price_in: [BigDecimal!] - token1Price_not_in: [BigDecimal!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - createdAtBlockNumber: BigInt - createdAtBlockNumber_not: BigInt - createdAtBlockNumber_gt: BigInt - createdAtBlockNumber_lt: BigInt - createdAtBlockNumber_gte: BigInt - createdAtBlockNumber_lte: BigInt - createdAtBlockNumber_in: [BigInt!] - createdAtBlockNumber_not_in: [BigInt!] - liquidityProviderCount: BigInt - liquidityProviderCount_not: BigInt - liquidityProviderCount_gt: BigInt - liquidityProviderCount_lt: BigInt - liquidityProviderCount_gte: BigInt - liquidityProviderCount_lte: BigInt - liquidityProviderCount_in: [BigInt!] - liquidityProviderCount_not_in: [BigInt!] - pairHourData_: PairHourData_filter - liquidityPositions_: LiquidityPosition_filter - liquidityPositionSnapshots_: LiquidityPositionSnapshot_filter - mints_: Mint_filter - burns_: Burn_filter - swaps_: Swap_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Pair_filter] - or: [Pair_filter] -} - -enum Pair_orderBy { - id - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__tradeVolume - token0__tradeVolumeUSD - token0__untrackedVolumeUSD - token0__txCount - token0__totalLiquidity - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__tradeVolume - token1__tradeVolumeUSD - token1__untrackedVolumeUSD - token1__txCount - token1__totalLiquidity - token1__derivedETH - reserve0 - reserve1 - totalSupply - reserveETH - reserveUSD - trackedReserveETH - token0Price - token1Price - volumeToken0 - volumeToken1 - volumeUSD - untrackedVolumeUSD - txCount - createdAtTimestamp - createdAtBlockNumber - liquidityProviderCount - pairHourData - liquidityPositions - liquidityPositionSnapshots - mints - burns - swaps -} - -type Query { - uniswapFactory( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): UniswapFactory - uniswapFactories( - skip: Int = 0 - first: Int = 100 - orderBy: UniswapFactory_orderBy - orderDirection: OrderDirection - where: UniswapFactory_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [UniswapFactory!]! - token( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Token - tokens( - skip: Int = 0 - first: Int = 100 - orderBy: Token_orderBy - orderDirection: OrderDirection - where: Token_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Token!]! - pair( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pair - pairs( - skip: Int = 0 - first: Int = 100 - orderBy: Pair_orderBy - orderDirection: OrderDirection - where: Pair_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pair!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - liquidityPosition( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LiquidityPosition - liquidityPositions( - skip: Int = 0 - first: Int = 100 - orderBy: LiquidityPosition_orderBy - orderDirection: OrderDirection - where: LiquidityPosition_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LiquidityPosition!]! - liquidityPositionSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LiquidityPositionSnapshot - liquidityPositionSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: LiquidityPositionSnapshot_orderBy - orderDirection: OrderDirection - where: LiquidityPositionSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LiquidityPositionSnapshot!]! - transaction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Transaction - transactions( - skip: Int = 0 - first: Int = 100 - orderBy: Transaction_orderBy - orderDirection: OrderDirection - where: Transaction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Transaction!]! - mint( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Mint - mints( - skip: Int = 0 - first: Int = 100 - orderBy: Mint_orderBy - orderDirection: OrderDirection - where: Mint_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Mint!]! - burn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Burn - burns( - skip: Int = 0 - first: Int = 100 - orderBy: Burn_orderBy - orderDirection: OrderDirection - where: Burn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Burn!]! - swap( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Swap - swaps( - skip: Int = 0 - first: Int = 100 - orderBy: Swap_orderBy - orderDirection: OrderDirection - where: Swap_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Swap!]! - bundle( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Bundle - bundles( - skip: Int = 0 - first: Int = 100 - orderBy: Bundle_orderBy - orderDirection: OrderDirection - where: Bundle_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Bundle!]! - uniswapDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): UniswapDayData - uniswapDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: UniswapDayData_orderBy - orderDirection: OrderDirection - where: UniswapDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [UniswapDayData!]! - pairHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PairHourData - pairHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PairHourData_orderBy - orderDirection: OrderDirection - where: PairHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PairHourData!]! - pairDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PairDayData - pairDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PairDayData_orderBy - orderDirection: OrderDirection - where: PairDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PairDayData!]! - tokenDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenDayData - tokenDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TokenDayData_orderBy - orderDirection: OrderDirection - where: TokenDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenDayData!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Subscription { - uniswapFactory( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): UniswapFactory - uniswapFactories( - skip: Int = 0 - first: Int = 100 - orderBy: UniswapFactory_orderBy - orderDirection: OrderDirection - where: UniswapFactory_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [UniswapFactory!]! - token( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Token - tokens( - skip: Int = 0 - first: Int = 100 - orderBy: Token_orderBy - orderDirection: OrderDirection - where: Token_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Token!]! - pair( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pair - pairs( - skip: Int = 0 - first: Int = 100 - orderBy: Pair_orderBy - orderDirection: OrderDirection - where: Pair_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pair!]! - user( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): User - users( - skip: Int = 0 - first: Int = 100 - orderBy: User_orderBy - orderDirection: OrderDirection - where: User_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [User!]! - liquidityPosition( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LiquidityPosition - liquidityPositions( - skip: Int = 0 - first: Int = 100 - orderBy: LiquidityPosition_orderBy - orderDirection: OrderDirection - where: LiquidityPosition_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LiquidityPosition!]! - liquidityPositionSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LiquidityPositionSnapshot - liquidityPositionSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: LiquidityPositionSnapshot_orderBy - orderDirection: OrderDirection - where: LiquidityPositionSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LiquidityPositionSnapshot!]! - transaction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Transaction - transactions( - skip: Int = 0 - first: Int = 100 - orderBy: Transaction_orderBy - orderDirection: OrderDirection - where: Transaction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Transaction!]! - mint( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Mint - mints( - skip: Int = 0 - first: Int = 100 - orderBy: Mint_orderBy - orderDirection: OrderDirection - where: Mint_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Mint!]! - burn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Burn - burns( - skip: Int = 0 - first: Int = 100 - orderBy: Burn_orderBy - orderDirection: OrderDirection - where: Burn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Burn!]! - swap( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Swap - swaps( - skip: Int = 0 - first: Int = 100 - orderBy: Swap_orderBy - orderDirection: OrderDirection - where: Swap_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Swap!]! - bundle( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Bundle - bundles( - skip: Int = 0 - first: Int = 100 - orderBy: Bundle_orderBy - orderDirection: OrderDirection - where: Bundle_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Bundle!]! - uniswapDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): UniswapDayData - uniswapDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: UniswapDayData_orderBy - orderDirection: OrderDirection - where: UniswapDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [UniswapDayData!]! - pairHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PairHourData - pairHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PairHourData_orderBy - orderDirection: OrderDirection - where: PairHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PairHourData!]! - pairDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PairDayData - pairDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PairDayData_orderBy - orderDirection: OrderDirection - where: PairDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PairDayData!]! - tokenDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenDayData - tokenDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TokenDayData_orderBy - orderDirection: OrderDirection - where: TokenDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenDayData!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Swap { - id: Bytes! - transaction: Transaction! - timestamp: BigInt! - pair: Pair! - sender: Bytes! - from: Bytes! - amount0In: BigDecimal! - amount1In: BigDecimal! - amount0Out: BigDecimal! - amount1Out: BigDecimal! - to: Bytes! - logIndex: BigInt - amountUSD: BigDecimal! -} - -input Swap_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pair: String - pair_not: String - pair_gt: String - pair_lt: String - pair_gte: String - pair_lte: String - pair_in: [String!] - pair_not_in: [String!] - pair_contains: String - pair_contains_nocase: String - pair_not_contains: String - pair_not_contains_nocase: String - pair_starts_with: String - pair_starts_with_nocase: String - pair_not_starts_with: String - pair_not_starts_with_nocase: String - pair_ends_with: String - pair_ends_with_nocase: String - pair_not_ends_with: String - pair_not_ends_with_nocase: String - pair_: Pair_filter - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - from: Bytes - from_not: Bytes - from_gt: Bytes - from_lt: Bytes - from_gte: Bytes - from_lte: Bytes - from_in: [Bytes!] - from_not_in: [Bytes!] - from_contains: Bytes - from_not_contains: Bytes - amount0In: BigDecimal - amount0In_not: BigDecimal - amount0In_gt: BigDecimal - amount0In_lt: BigDecimal - amount0In_gte: BigDecimal - amount0In_lte: BigDecimal - amount0In_in: [BigDecimal!] - amount0In_not_in: [BigDecimal!] - amount1In: BigDecimal - amount1In_not: BigDecimal - amount1In_gt: BigDecimal - amount1In_lt: BigDecimal - amount1In_gte: BigDecimal - amount1In_lte: BigDecimal - amount1In_in: [BigDecimal!] - amount1In_not_in: [BigDecimal!] - amount0Out: BigDecimal - amount0Out_not: BigDecimal - amount0Out_gt: BigDecimal - amount0Out_lt: BigDecimal - amount0Out_gte: BigDecimal - amount0Out_lte: BigDecimal - amount0Out_in: [BigDecimal!] - amount0Out_not_in: [BigDecimal!] - amount1Out: BigDecimal - amount1Out_not: BigDecimal - amount1Out_gt: BigDecimal - amount1Out_lt: BigDecimal - amount1Out_gte: BigDecimal - amount1Out_lte: BigDecimal - amount1Out_in: [BigDecimal!] - amount1Out_not_in: [BigDecimal!] - to: Bytes - to_not: Bytes - to_gt: Bytes - to_lt: Bytes - to_gte: Bytes - to_lte: Bytes - to_in: [Bytes!] - to_not_in: [Bytes!] - to_contains: Bytes - to_not_contains: Bytes - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Swap_filter] - or: [Swap_filter] -} - -enum Swap_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - timestamp - pair - pair__id - pair__reserve0 - pair__reserve1 - pair__totalSupply - pair__reserveETH - pair__reserveUSD - pair__trackedReserveETH - pair__token0Price - pair__token1Price - pair__volumeToken0 - pair__volumeToken1 - pair__volumeUSD - pair__untrackedVolumeUSD - pair__txCount - pair__createdAtTimestamp - pair__createdAtBlockNumber - pair__liquidityProviderCount - sender - from - amount0In - amount1In - amount0Out - amount1Out - to - logIndex - amountUSD -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type Token { - id: Bytes! - symbol: String! - name: String! - decimals: BigInt! - totalSupply: BigInt! - tradeVolume: BigDecimal! - tradeVolumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - txCount: BigInt! - totalLiquidity: BigDecimal! - derivedETH: BigDecimal! - tokenDayData(skip: Int = 0, first: Int = 100, orderBy: TokenDayData_orderBy, orderDirection: OrderDirection, where: TokenDayData_filter): [TokenDayData!]! - pairDayDataBase(skip: Int = 0, first: Int = 100, orderBy: PairDayData_orderBy, orderDirection: OrderDirection, where: PairDayData_filter): [PairDayData!]! - pairDayDataQuote(skip: Int = 0, first: Int = 100, orderBy: PairDayData_orderBy, orderDirection: OrderDirection, where: PairDayData_filter): [PairDayData!]! - pairBase(skip: Int = 0, first: Int = 100, orderBy: Pair_orderBy, orderDirection: OrderDirection, where: Pair_filter): [Pair!]! - pairQuote(skip: Int = 0, first: Int = 100, orderBy: Pair_orderBy, orderDirection: OrderDirection, where: Pair_filter): [Pair!]! -} - -type TokenDayData { - id: Bytes! - date: Int! - token: Token! - dailyVolumeToken: BigDecimal! - dailyVolumeETH: BigDecimal! - dailyVolumeUSD: BigDecimal! - dailyTxns: BigInt! - totalLiquidityToken: BigDecimal! - totalLiquidityETH: BigDecimal! - totalLiquidityUSD: BigDecimal! - priceUSD: BigDecimal! -} - -input TokenDayData_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - token: String - token_not: String - token_gt: String - token_lt: String - token_gte: String - token_lte: String - token_in: [String!] - token_not_in: [String!] - token_contains: String - token_contains_nocase: String - token_not_contains: String - token_not_contains_nocase: String - token_starts_with: String - token_starts_with_nocase: String - token_not_starts_with: String - token_not_starts_with_nocase: String - token_ends_with: String - token_ends_with_nocase: String - token_not_ends_with: String - token_not_ends_with_nocase: String - token_: Token_filter - dailyVolumeToken: BigDecimal - dailyVolumeToken_not: BigDecimal - dailyVolumeToken_gt: BigDecimal - dailyVolumeToken_lt: BigDecimal - dailyVolumeToken_gte: BigDecimal - dailyVolumeToken_lte: BigDecimal - dailyVolumeToken_in: [BigDecimal!] - dailyVolumeToken_not_in: [BigDecimal!] - dailyVolumeETH: BigDecimal - dailyVolumeETH_not: BigDecimal - dailyVolumeETH_gt: BigDecimal - dailyVolumeETH_lt: BigDecimal - dailyVolumeETH_gte: BigDecimal - dailyVolumeETH_lte: BigDecimal - dailyVolumeETH_in: [BigDecimal!] - dailyVolumeETH_not_in: [BigDecimal!] - dailyVolumeUSD: BigDecimal - dailyVolumeUSD_not: BigDecimal - dailyVolumeUSD_gt: BigDecimal - dailyVolumeUSD_lt: BigDecimal - dailyVolumeUSD_gte: BigDecimal - dailyVolumeUSD_lte: BigDecimal - dailyVolumeUSD_in: [BigDecimal!] - dailyVolumeUSD_not_in: [BigDecimal!] - dailyTxns: BigInt - dailyTxns_not: BigInt - dailyTxns_gt: BigInt - dailyTxns_lt: BigInt - dailyTxns_gte: BigInt - dailyTxns_lte: BigInt - dailyTxns_in: [BigInt!] - dailyTxns_not_in: [BigInt!] - totalLiquidityToken: BigDecimal - totalLiquidityToken_not: BigDecimal - totalLiquidityToken_gt: BigDecimal - totalLiquidityToken_lt: BigDecimal - totalLiquidityToken_gte: BigDecimal - totalLiquidityToken_lte: BigDecimal - totalLiquidityToken_in: [BigDecimal!] - totalLiquidityToken_not_in: [BigDecimal!] - totalLiquidityETH: BigDecimal - totalLiquidityETH_not: BigDecimal - totalLiquidityETH_gt: BigDecimal - totalLiquidityETH_lt: BigDecimal - totalLiquidityETH_gte: BigDecimal - totalLiquidityETH_lte: BigDecimal - totalLiquidityETH_in: [BigDecimal!] - totalLiquidityETH_not_in: [BigDecimal!] - totalLiquidityUSD: BigDecimal - totalLiquidityUSD_not: BigDecimal - totalLiquidityUSD_gt: BigDecimal - totalLiquidityUSD_lt: BigDecimal - totalLiquidityUSD_gte: BigDecimal - totalLiquidityUSD_lte: BigDecimal - totalLiquidityUSD_in: [BigDecimal!] - totalLiquidityUSD_not_in: [BigDecimal!] - priceUSD: BigDecimal - priceUSD_not: BigDecimal - priceUSD_gt: BigDecimal - priceUSD_lt: BigDecimal - priceUSD_gte: BigDecimal - priceUSD_lte: BigDecimal - priceUSD_in: [BigDecimal!] - priceUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [TokenDayData_filter] - or: [TokenDayData_filter] -} - -enum TokenDayData_orderBy { - id - date - token - token__id - token__symbol - token__name - token__decimals - token__totalSupply - token__tradeVolume - token__tradeVolumeUSD - token__untrackedVolumeUSD - token__txCount - token__totalLiquidity - token__derivedETH - dailyVolumeToken - dailyVolumeETH - dailyVolumeUSD - dailyTxns - totalLiquidityToken - totalLiquidityETH - totalLiquidityUSD - priceUSD -} - -input Token_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - symbol: String - symbol_not: String - symbol_gt: String - symbol_lt: String - symbol_gte: String - symbol_lte: String - symbol_in: [String!] - symbol_not_in: [String!] - symbol_contains: String - symbol_contains_nocase: String - symbol_not_contains: String - symbol_not_contains_nocase: String - symbol_starts_with: String - symbol_starts_with_nocase: String - symbol_not_starts_with: String - symbol_not_starts_with_nocase: String - symbol_ends_with: String - symbol_ends_with_nocase: String - symbol_not_ends_with: String - symbol_not_ends_with_nocase: String - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - decimals: BigInt - decimals_not: BigInt - decimals_gt: BigInt - decimals_lt: BigInt - decimals_gte: BigInt - decimals_lte: BigInt - decimals_in: [BigInt!] - decimals_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - tradeVolume: BigDecimal - tradeVolume_not: BigDecimal - tradeVolume_gt: BigDecimal - tradeVolume_lt: BigDecimal - tradeVolume_gte: BigDecimal - tradeVolume_lte: BigDecimal - tradeVolume_in: [BigDecimal!] - tradeVolume_not_in: [BigDecimal!] - tradeVolumeUSD: BigDecimal - tradeVolumeUSD_not: BigDecimal - tradeVolumeUSD_gt: BigDecimal - tradeVolumeUSD_lt: BigDecimal - tradeVolumeUSD_gte: BigDecimal - tradeVolumeUSD_lte: BigDecimal - tradeVolumeUSD_in: [BigDecimal!] - tradeVolumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - totalLiquidity: BigDecimal - totalLiquidity_not: BigDecimal - totalLiquidity_gt: BigDecimal - totalLiquidity_lt: BigDecimal - totalLiquidity_gte: BigDecimal - totalLiquidity_lte: BigDecimal - totalLiquidity_in: [BigDecimal!] - totalLiquidity_not_in: [BigDecimal!] - derivedETH: BigDecimal - derivedETH_not: BigDecimal - derivedETH_gt: BigDecimal - derivedETH_lt: BigDecimal - derivedETH_gte: BigDecimal - derivedETH_lte: BigDecimal - derivedETH_in: [BigDecimal!] - derivedETH_not_in: [BigDecimal!] - tokenDayData_: TokenDayData_filter - pairDayDataBase_: PairDayData_filter - pairDayDataQuote_: PairDayData_filter - pairBase_: Pair_filter - pairQuote_: Pair_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Token_filter] - or: [Token_filter] -} - -enum Token_orderBy { - id - symbol - name - decimals - totalSupply - tradeVolume - tradeVolumeUSD - untrackedVolumeUSD - txCount - totalLiquidity - derivedETH - tokenDayData - pairDayDataBase - pairDayDataQuote - pairBase - pairQuote -} - -type Transaction { - id: Bytes! - blockNumber: BigInt! - timestamp: BigInt! - mints(skip: Int = 0, first: Int = 100, orderBy: Mint_orderBy, orderDirection: OrderDirection, where: Mint_filter): [Mint!]! - burns(skip: Int = 0, first: Int = 100, orderBy: Burn_orderBy, orderDirection: OrderDirection, where: Burn_filter): [Burn!]! - swaps(skip: Int = 0, first: Int = 100, orderBy: Swap_orderBy, orderDirection: OrderDirection, where: Swap_filter): [Swap!]! -} - -input Transaction_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - mints: [String!] - mints_not: [String!] - mints_contains: [String!] - mints_contains_nocase: [String!] - mints_not_contains: [String!] - mints_not_contains_nocase: [String!] - mints_: Mint_filter - burns: [String!] - burns_not: [String!] - burns_contains: [String!] - burns_contains_nocase: [String!] - burns_not_contains: [String!] - burns_not_contains_nocase: [String!] - burns_: Burn_filter - swaps: [String!] - swaps_not: [String!] - swaps_contains: [String!] - swaps_contains_nocase: [String!] - swaps_not_contains: [String!] - swaps_not_contains_nocase: [String!] - swaps_: Swap_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Transaction_filter] - or: [Transaction_filter] -} - -enum Transaction_orderBy { - id - blockNumber - timestamp - mints - burns - swaps -} - -type UniswapDayData { - id: Bytes! - date: Int! - dailyVolumeETH: BigDecimal! - dailyVolumeUSD: BigDecimal! - dailyVolumeUntracked: BigDecimal! - totalVolumeETH: BigDecimal! - totalLiquidityETH: BigDecimal! - totalVolumeUSD: BigDecimal! - totalLiquidityUSD: BigDecimal! - txCount: BigInt! -} - -input UniswapDayData_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - dailyVolumeETH: BigDecimal - dailyVolumeETH_not: BigDecimal - dailyVolumeETH_gt: BigDecimal - dailyVolumeETH_lt: BigDecimal - dailyVolumeETH_gte: BigDecimal - dailyVolumeETH_lte: BigDecimal - dailyVolumeETH_in: [BigDecimal!] - dailyVolumeETH_not_in: [BigDecimal!] - dailyVolumeUSD: BigDecimal - dailyVolumeUSD_not: BigDecimal - dailyVolumeUSD_gt: BigDecimal - dailyVolumeUSD_lt: BigDecimal - dailyVolumeUSD_gte: BigDecimal - dailyVolumeUSD_lte: BigDecimal - dailyVolumeUSD_in: [BigDecimal!] - dailyVolumeUSD_not_in: [BigDecimal!] - dailyVolumeUntracked: BigDecimal - dailyVolumeUntracked_not: BigDecimal - dailyVolumeUntracked_gt: BigDecimal - dailyVolumeUntracked_lt: BigDecimal - dailyVolumeUntracked_gte: BigDecimal - dailyVolumeUntracked_lte: BigDecimal - dailyVolumeUntracked_in: [BigDecimal!] - dailyVolumeUntracked_not_in: [BigDecimal!] - totalVolumeETH: BigDecimal - totalVolumeETH_not: BigDecimal - totalVolumeETH_gt: BigDecimal - totalVolumeETH_lt: BigDecimal - totalVolumeETH_gte: BigDecimal - totalVolumeETH_lte: BigDecimal - totalVolumeETH_in: [BigDecimal!] - totalVolumeETH_not_in: [BigDecimal!] - totalLiquidityETH: BigDecimal - totalLiquidityETH_not: BigDecimal - totalLiquidityETH_gt: BigDecimal - totalLiquidityETH_lt: BigDecimal - totalLiquidityETH_gte: BigDecimal - totalLiquidityETH_lte: BigDecimal - totalLiquidityETH_in: [BigDecimal!] - totalLiquidityETH_not_in: [BigDecimal!] - totalVolumeUSD: BigDecimal - totalVolumeUSD_not: BigDecimal - totalVolumeUSD_gt: BigDecimal - totalVolumeUSD_lt: BigDecimal - totalVolumeUSD_gte: BigDecimal - totalVolumeUSD_lte: BigDecimal - totalVolumeUSD_in: [BigDecimal!] - totalVolumeUSD_not_in: [BigDecimal!] - totalLiquidityUSD: BigDecimal - totalLiquidityUSD_not: BigDecimal - totalLiquidityUSD_gt: BigDecimal - totalLiquidityUSD_lt: BigDecimal - totalLiquidityUSD_gte: BigDecimal - totalLiquidityUSD_lte: BigDecimal - totalLiquidityUSD_in: [BigDecimal!] - totalLiquidityUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [UniswapDayData_filter] - or: [UniswapDayData_filter] -} - -enum UniswapDayData_orderBy { - id - date - dailyVolumeETH - dailyVolumeUSD - dailyVolumeUntracked - totalVolumeETH - totalLiquidityETH - totalVolumeUSD - totalLiquidityUSD - txCount -} - -type UniswapFactory { - id: Bytes! - pairCount: Int! - totalVolumeUSD: BigDecimal! - totalVolumeETH: BigDecimal! - untrackedVolumeUSD: BigDecimal! - totalLiquidityUSD: BigDecimal! - totalLiquidityETH: BigDecimal! - txCount: BigInt! -} - -input UniswapFactory_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - pairCount: Int - pairCount_not: Int - pairCount_gt: Int - pairCount_lt: Int - pairCount_gte: Int - pairCount_lte: Int - pairCount_in: [Int!] - pairCount_not_in: [Int!] - totalVolumeUSD: BigDecimal - totalVolumeUSD_not: BigDecimal - totalVolumeUSD_gt: BigDecimal - totalVolumeUSD_lt: BigDecimal - totalVolumeUSD_gte: BigDecimal - totalVolumeUSD_lte: BigDecimal - totalVolumeUSD_in: [BigDecimal!] - totalVolumeUSD_not_in: [BigDecimal!] - totalVolumeETH: BigDecimal - totalVolumeETH_not: BigDecimal - totalVolumeETH_gt: BigDecimal - totalVolumeETH_lt: BigDecimal - totalVolumeETH_gte: BigDecimal - totalVolumeETH_lte: BigDecimal - totalVolumeETH_in: [BigDecimal!] - totalVolumeETH_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - totalLiquidityUSD: BigDecimal - totalLiquidityUSD_not: BigDecimal - totalLiquidityUSD_gt: BigDecimal - totalLiquidityUSD_lt: BigDecimal - totalLiquidityUSD_gte: BigDecimal - totalLiquidityUSD_lte: BigDecimal - totalLiquidityUSD_in: [BigDecimal!] - totalLiquidityUSD_not_in: [BigDecimal!] - totalLiquidityETH: BigDecimal - totalLiquidityETH_not: BigDecimal - totalLiquidityETH_gt: BigDecimal - totalLiquidityETH_lt: BigDecimal - totalLiquidityETH_gte: BigDecimal - totalLiquidityETH_lte: BigDecimal - totalLiquidityETH_in: [BigDecimal!] - totalLiquidityETH_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [UniswapFactory_filter] - or: [UniswapFactory_filter] -} - -enum UniswapFactory_orderBy { - id - pairCount - totalVolumeUSD - totalVolumeETH - untrackedVolumeUSD - totalLiquidityUSD - totalLiquidityETH - txCount -} - -type User { - id: Bytes! - liquidityPositions(skip: Int = 0, first: Int = 100, orderBy: LiquidityPosition_orderBy, orderDirection: OrderDirection, where: LiquidityPosition_filter): [LiquidityPosition!] - usdSwapped: BigDecimal! -} - -input User_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - liquidityPositions_: LiquidityPosition_filter - usdSwapped: BigDecimal - usdSwapped_not: BigDecimal - usdSwapped_gt: BigDecimal - usdSwapped_lt: BigDecimal - usdSwapped_gte: BigDecimal - usdSwapped_lte: BigDecimal - usdSwapped_in: [BigDecimal!] - usdSwapped_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [User_filter] - or: [User_filter] -} - -enum User_orderBy { - id - liquidityPositions - usdSwapped -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/sushi-v2/transforms/bucket-v2-to-std.ts b/packages/graph-client/src/subgraphs/sushi-v2/transforms/bucket-v2-to-std.ts deleted file mode 100644 index 9da42677a1..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/transforms/bucket-v2-to-std.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { ResultOf } from 'gql.tada' -import type { SushiV2PoolBucketsQuery } from 'src/subgraphs/sushi-v2/queries/pool-with-buckets' -import type { PoolBucket } from 'sushi/types' - -type FetchedBucket = NonNullable< - ResultOf['pair'] ->['poolHourData'][number] - -export function transformBucketsV2ToStd( - buckets: FetchedBucket[], -): PoolBucket[] { - return buckets.map(transformBucketV2ToStd) -} - -export function transformBucketV2ToStd(bucket: FetchedBucket): PoolBucket { - return { - id: bucket.id, - date: Number(bucket.date), - liquidityUSD: Number(bucket.liquidityUSD), - volumeUSD: Number(bucket.volumeUSD), - feesUSD: Number(bucket.volumeUSD) * 0.003, - txCount: Number(bucket.txCount), - } -} diff --git a/packages/graph-client/src/subgraphs/sushi-v2/transforms/pool-v2-to-base.ts b/packages/graph-client/src/subgraphs/sushi-v2/transforms/pool-v2-to-base.ts deleted file mode 100644 index c7ac8aa876..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v2/transforms/pool-v2-to-base.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { ResultOf } from 'gql.tada' -import type { PoolFieldsFragment } from 'src/subgraphs/sushi-v2/fragments/pool-fields' -import type { SushiSwapV2ChainId } from 'sushi/config' -import { - getIdFromChainIdAddress, - withoutScientificNotation, -} from 'sushi/format' -import { type PoolBase, type PoolV2, SushiSwapProtocol } from 'sushi/types' - -type ToPick = - | 'id' - | 'token0' - | 'token1' - | 'reserve0' - | 'reserve1' - | 'totalSupply' - | 'liquidityUSD' - | 'volumeUSD' - | 'txCount' - | 'token0Price' - | 'token1Price' - -type RequiredBase = Pick, ToPick> - -export function transformPoolV2ToBase( - pool: T, - chainId: SushiSwapV2ChainId, -): PoolV2 { - return { - id: getIdFromChainIdAddress(chainId, pool.id), - address: pool.id, - chainId, - name: `${pool.token0.symbol}-${pool.token1.symbol}`, - - swapFee: 0.003, - - protocol: SushiSwapProtocol.SUSHISWAP_V2, - - // reserve0: BigInt(pool.reserve0), - // reserve1: BigInt(pool.reserve1), - - reserve0: BigInt( - withoutScientificNotation( - (Number(pool.reserve0) * 10 ** Number(pool.token0.decimals)).toFixed(), - )!, - ), - reserve1: BigInt( - withoutScientificNotation( - (Number(pool.reserve1) * 10 ** Number(pool.token1.decimals)).toFixed(), - )!, - ), - - liquidity: BigInt( - withoutScientificNotation( - (Number(pool.totalSupply) * 10 ** 18).toFixed(), - )!, - ), - liquidityUSD: Number(pool.liquidityUSD), - - volumeUSD: Number(pool.volumeUSD), - feesUSD: Number(pool.volumeUSD) * 0.003, - - token0: { - id: getIdFromChainIdAddress(chainId, pool.token0.id), - address: pool.token0.id, - chainId, - decimals: Number(pool.token0.decimals), - name: pool.token0.name, - symbol: pool.token0.symbol, - }, - token1: { - id: getIdFromChainIdAddress(chainId, pool.token1.id), - address: pool.token1.id, - chainId, - decimals: Number(pool.token1.decimals), - name: pool.token1.name, - symbol: pool.token1.symbol, - }, - token0Price: Number(pool.token0Price), - token1Price: Number(pool.token1Price), - txCount: Number(pool.txCount), - } -} diff --git a/packages/graph-client/src/subgraphs/sushi-v3/fragments/pool-fields.ts b/packages/graph-client/src/subgraphs/sushi-v3/fragments/pool-fields.ts deleted file mode 100644 index 5cd943dbbd..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/fragments/pool-fields.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { graphql } from '../graphql' - -export const PoolFieldsFragment = graphql(` - fragment PoolFields on Pool @_unmask { - id - token0 { - id - symbol - name - decimals - } - token1 { - id - symbol - name - decimals - } - - swapFee: feeTier - - liquidity - sqrtPrice - feeGrowthGlobal0X128 - feeGrowthGlobal1X128 - token0Price - token1Price - tick - observationIndex - - volumeToken0 - volumeToken1 - volumeUSD - untrackedVolumeUSD - - feesUSD - collectedFeesToken0 - collectedFeesToken1 - collectedFeesUSD - - reserve0: totalValueLockedToken0 - reserve1: totalValueLockedToken1 - liquidityUSD: totalValueLockedUSD - untrackedLiquidityUSD: totalValueLockedUSDUntracked - - liquidityProviderCount - txCount - - createdAtTimestamp - createdAtBlockNumber - } -`) diff --git a/packages/graph-client/src/subgraphs/sushi-v3/graphql.ts b/packages/graph-client/src/subgraphs/sushi-v3/graphql.ts deleted file mode 100644 index 09d313d696..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/graphql.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { initGraphQLTada } from 'gql.tada' -import type { Scalars } from 'src/lib/types/scalars.js' -import type { introspection } from './sushi-v3-env.js' - -export const graphql = initGraphQLTada<{ - introspection: introspection - scalars: Scalars -}>() diff --git a/packages/graph-client/src/subgraphs/sushi-v3/index.ts b/packages/graph-client/src/subgraphs/sushi-v3/index.ts deleted file mode 100644 index 8d62e4fd6d..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './queries/burns' -export * from './queries/collects' -export * from './queries/day-datas' -export * from './queries/factory' -export * from './queries/mints' -export * from './queries/pool-with-buckets' -export * from './queries/pool' -export * from './queries/pools' -export * from './queries/pools-by-token-pair' -export * from './queries/pools-with-fees' -export * from './queries/swaps' -export * from './queries/transactions' diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/burns.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/burns.ts deleted file mode 100644 index 65be7966bb..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/burns.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV3BurnsQuery = graphql(` - query Burns($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Burn_orderBy, $orderDirection: OrderDirection, $where: Burn_filter) { - burns(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - owner - origin - amount - amount0 - amount1 - amountUSD - logIndex - transaction { - id - timestamp - blockNumber - } - } - } -`) - -export type GetSushiV3Burns = VariablesOf & - ChainIdVariable - -export async function getSushiV3Burns( - { chainId, ...variables }: GetSushiV3Burns, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3BurnsQuery, - variables, - options, - }) - - return result.burns -} - -export type SushiV3Burns = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/collects.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/collects.ts deleted file mode 100644 index b578d88731..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/collects.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV3CollectsQuery = graphql(` - query Collects($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Collect_orderBy, $orderDirection: OrderDirection, $where: Collect_filter) { - collects(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - owner - amount0 - amount1 - amountUSD - logIndex - transaction { - id - timestamp - blockNumber - } - } - } -`) - -export type GetSushiV3Collects = VariablesOf & - ChainIdVariable - -export async function getSushiV3Collects( - { chainId, ...variables }: GetSushiV3Collects, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3CollectsQuery, - variables, - options, - }) - - return result.collects -} - -export type SushiV3Collects = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/day-datas.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/day-datas.ts deleted file mode 100644 index 8a77a18b63..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/day-datas.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV3DayDatasQuery = graphql(` - query DayDatas($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: UniswapDayData_orderBy, $orderDirection: OrderDirection, $where: UniswapDayData_filter) { - uniswapDayDatas(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - date - volumeUSD - volumeUSDUntracked - tvlUSD - feesUSD - txCount - } - } -`) - -export type GetSushiV3DayDatas = VariablesOf & - ChainIdVariable - -export async function getSushiV3DayDatas( - { chainId, ...variables }: GetSushiV3DayDatas, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3DayDatasQuery, - variables, - options, - }) - - return result.uniswapDayDatas.map((dayData) => ({ - id: dayData.id, - date: dayData.date, - volumeUSD: Number(dayData.volumeUSD), - volumeUSDUntracked: Number(dayData.volumeUSDUntracked), - liquidityUSD: Number(dayData.tvlUSD), - feesUSD: Number(dayData.feesUSD), - txCount: Number(dayData.txCount), - })) -} - -export type SushiV3DayDatas = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/factory.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/factory.ts deleted file mode 100644 index 94a15007f5..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/factory.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import { convertIdToMultichainId } from 'src/lib/modifiers/convert-id-to-multichain-id' -import { copyIdToAddress } from 'src/lib/modifiers/copy-id-to-address' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import type { Hex } from 'src/lib/types/hex' -import { graphql } from '../graphql' - -export const SushiV3FactoriesQuery = graphql(` - query Factories { - factories(first: 1) { - id - totalValueLockedUSD - totalVolumeUSD - poolCount - } - } -`) - -export type GetSushiV3Factory = VariablesOf & - ChainIdVariable - -export async function getSushiV3Factory( - { chainId, ...variables }: GetSushiV3Factory, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await request( - { - url, - document: SushiV3FactoriesQuery, - variables, - }, - options, - ) - - if (result.factories[0]) { - const factory = result.factories[0] - - return convertIdToMultichainId( - copyIdToAddress( - addChainId(chainId, factory as typeof factory & { id: Hex }), - ), - ) - } - - throw new FetchError(chainId, 'Failed to fetch factory') -} - -export type SushiV3Factory = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/mints.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/mints.ts deleted file mode 100644 index 8ed800fda2..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/mints.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import { addChainId } from 'src/lib/modifiers/add-chain-id' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV3MintsQuery = graphql(` - query Mints($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Mint_orderBy, $orderDirection: OrderDirection, $where: Mint_filter) { - mints(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - owner - sender - origin - amount - amount0 - amount1 - amountUSD - logIndex - transaction { - id - timestamp - blockNumber - } - } - } -`) - -export type GetSushiV3Mints = VariablesOf & - ChainIdVariable - -export async function getSushiV3Mints( - { chainId, ...variables }: GetSushiV3Mints, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3MintsQuery, - variables, - options, - }) - - if (result) { - return result.mints.map((mint) => addChainId(chainId, mint)) - } - - throw new FetchError(chainId, 'Failed to fetch mints') -} - -export type SushiV3Mints = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/pool-with-buckets.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/pool-with-buckets.ts deleted file mode 100644 index 403ce4d7a3..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/pool-with-buckets.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' -import type { PoolBase, PoolV3, PoolWithBuckets } from 'sushi/types' - -import { FetchError } from 'src/lib/fetch-error' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { PoolFieldsFragment } from 'src/subgraphs/sushi-v3/fragments/pool-fields' -import { transformBucketsV3ToStd } from 'src/subgraphs/sushi-v3/transforms/bucket-v3-to-std' -import { transformPoolV3ToBase } from 'src/subgraphs/sushi-v3/transforms/pool-v3-to-base' -import { graphql } from '../graphql' - -export const SushiV3PoolBucketsQuery = graphql( - ` - query Pool($id: ID!, $block: Block_height, $hourDataFirst: Int = 168, $dayDataFirst: Int = 1000) { - pool(id: $id, block: $block) { - ...PoolFields - - poolHourData(first: $hourDataFirst, orderBy: periodStartUnix, orderDirection: desc) { - id - date: periodStartUnix - liquidityUSD: tvlUSD - volumeUSD - feesUSD - txCount - } - - poolDayData(first: $dayDataFirst, orderBy: date, orderDirection: desc) { - id - date - liquidityUSD: tvlUSD - volumeUSD - feesUSD - txCount - } - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV3PoolBuckets = VariablesOf< - typeof SushiV3PoolBucketsQuery -> & - ChainIdVariable - -export type SushiV3PoolBuckets = PoolWithBuckets> - -export async function getSushiV3PoolBuckets( - { chainId, ...variables }: GetSushiV3PoolBuckets, - options?: RequestOptions, -): Promise { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await request( - { url, document: SushiV3PoolBucketsQuery, variables }, - options, - ) - - if (result.pool) { - return { - ...transformPoolV3ToBase(result.pool, chainId), - poolHourData: transformBucketsV3ToStd(result.pool.poolHourData), - poolDayData: transformBucketsV3ToStd(result.pool.poolDayData), - } - } - - throw new FetchError( - chainId, - `Failed to fetch pool ${chainId}:${variables.id}`, - ) -} diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/pool.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/pool.ts deleted file mode 100644 index 29c6fc25e1..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/pool.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' -import type { PoolBase, PoolV3 } from 'sushi/types' - -import { FetchError } from 'src/lib/fetch-error' -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { PoolFieldsFragment } from 'src/subgraphs/sushi-v3/fragments/pool-fields' -import { transformPoolV3ToBase } from 'src/subgraphs/sushi-v3/transforms/pool-v3-to-base' -import { graphql } from '../graphql' - -export const SushiV3PoolQuery = graphql( - ` - query Pool($id: ID!, $block: Block_height) { - pool(id: $id, block: $block) { - ...PoolFields - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV3Pool = VariablesOf & - ChainIdVariable - -export type SushiV3Pool = PoolV3 - -export async function getSushiV3Pool( - { chainId, ...variables }: GetSushiV3Pool, - options?: RequestOptions, -): Promise { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await request( - { url, document: SushiV3PoolQuery, variables }, - options, - ) - - if (result.pool) { - return transformPoolV3ToBase(result.pool, chainId) - } - - throw new FetchError( - chainId, - `Failed to fetch pool ${chainId}:${variables.id}`, - ) -} diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/pools-by-token-pair.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/pools-by-token-pair.ts deleted file mode 100644 index ac93505260..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/pools-by-token-pair.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { type RequestOptions, request } from 'src/lib/request' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { PoolFieldsFragment } from 'src/subgraphs/sushi-v3/fragments/pool-fields' -import { transformPoolV3ToBase } from 'src/subgraphs/sushi-v3/transforms/pool-v3-to-base' -import type { PoolBase, PoolV3 } from 'sushi/types' -import { graphql } from '../graphql' - -export const SushiV3PoolsByTokenPairQuery = graphql( - ` - query PoolsByTokenPair($where: Pool_filter!) { - pools(first: 1000, where: $where) { - ...PoolFields - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV3PoolsByTokenPair = { - token0: `0x${string}` - token1: `0x${string}` -} & ChainIdVariable - -export type SushiV3PoolsByTokenPair = PoolV3 - -export async function getSushiV3PoolsByTokenPair( - { chainId, ..._variables }: GetSushiV3PoolsByTokenPair, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const tokens = [_variables.token0, _variables.token1].sort() as [ - `0x${string}`, - `0x${string}`, - ] - - const variables: VariablesOf = { - where: { - token0: tokens[0].toLowerCase(), - token1: tokens[1].toLowerCase(), - }, - } - - const result = await request( - { - url, - document: SushiV3PoolsByTokenPairQuery, - variables, - }, - options, - ) - - return result.pools.map((pool) => transformPoolV3ToBase(pool, chainId)) -} diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/pools-with-fees.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/pools-with-fees.ts deleted file mode 100644 index 3162339f91..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/pools-with-fees.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { transformPoolV3ToBase } from 'src/subgraphs/sushi-v3/transforms/pool-v3-to-base' -import { PoolFieldsFragment } from '../fragments/pool-fields' -import { graphql } from '../graphql' - -export const SushiV3PoolsWithFeesQuery = graphql( - ` - query Pools($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter) { - pools(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - ...PoolFields, - isProtocolFeeEnabled - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV3PoolsWithFees = VariablesOf< - typeof SushiV3PoolsWithFeesQuery -> & - ChainIdVariable - -export async function getSushiV3PoolsWithFees( - { chainId, ...variables }: GetSushiV3PoolsWithFees, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3PoolsWithFeesQuery, - variables, - options, - }) - - if (result) { - return result.pools.map((pool) => ({ - ...transformPoolV3ToBase(pool, chainId), - isProtocolFeeEnabled: pool.isProtocolFeeEnabled, - })) - } - - throw new FetchError(chainId, 'Failed to fetch pools') -} - -export type SushiV3PoolsWithFees = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/pools.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/pools.ts deleted file mode 100644 index 79b82bacb9..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/pools.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import { FetchError } from 'src/lib/fetch-error' -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { transformPoolV3ToBase } from 'src/subgraphs/sushi-v3/transforms/pool-v3-to-base' -import { PoolFieldsFragment } from '../fragments/pool-fields' -import { graphql } from '../graphql' - -export const SushiV3PoolsQuery = graphql( - ` - query Pools($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter) { - pools(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - ...PoolFields - } - } -`, - [PoolFieldsFragment], -) - -export type GetSushiV3Pools = VariablesOf & - ChainIdVariable - -export async function getSushiV3Pools( - { chainId, ...variables }: GetSushiV3Pools, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3PoolsQuery, - variables, - options, - }) - - if (result) { - return result.pools.map((pool) => transformPoolV3ToBase(pool, chainId)) - } - - throw new FetchError(chainId, 'Failed to fetch pools') -} - -export type SushiV3Pools = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/swaps.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/swaps.ts deleted file mode 100644 index 4cf276a570..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/swaps.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV3SwapsQuery = graphql(` - query Swaps($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Swap_orderBy, $orderDirection: OrderDirection, $where: Swap_filter) { - swaps(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - sender - recipient - origin - amount0 - amount1 - amountUSD - logIndex - transaction { - id - timestamp - blockNumber - } - } - } -`) - -export type GetSushiV3Swaps = VariablesOf & - ChainIdVariable - -export async function getSushiV3Swaps( - { chainId, ...variables }: GetSushiV3Swaps, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3SwapsQuery, - variables, - options, - }) - - return result.swaps -} - -export type SushiV3Swaps = Awaited> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/queries/transactions.ts b/packages/graph-client/src/subgraphs/sushi-v3/queries/transactions.ts deleted file mode 100644 index a5a5a6d86d..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/queries/transactions.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { VariablesOf } from 'gql.tada' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { SUSHISWAP_V3_SUBGRAPH_URL } from 'sushi/config/subgraph' - -import type { RequestOptions } from 'src/lib/request' -import { requestPaged } from 'src/lib/request-paged' -import type { ChainIdVariable } from 'src/lib/types/chainId' -import { graphql } from '../graphql' - -export const SushiV3TransactionsQuery = graphql(` - query Transactions($first: Int = 1000, $skip: Int = 0, $block: Block_height, $orderBy: Transaction_orderBy, $orderDirection: OrderDirection, $where: Transaction_filter) { - transactions(first: $first, skip: $skip, block: $block, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) { - id - timestamp - blockNumber - mints { - id - owner - sender - origin - amount - amount0 - amount1 - amountUSD - logIndex - } - burns { - id - owner - origin - amount - amount0 - amount1 - amountUSD - logIndex - } - swaps { - id - sender - recipient - origin - amount0 - amount1 - amountUSD - logIndex - } - collects { - id - owner - amount0 - amount1 - amountUSD - logIndex - } - } - } -`) - -export type GetSushiV3Transactions = VariablesOf< - typeof SushiV3TransactionsQuery -> & - ChainIdVariable - -export async function getSushiV3Transactions( - { chainId, ...variables }: GetSushiV3Transactions, - options?: RequestOptions, -) { - const url = `https://${SUSHISWAP_V3_SUBGRAPH_URL[chainId]}` - - const result = await requestPaged({ - chainId, - url, - query: SushiV3TransactionsQuery, - variables, - options, - }) - - return result.transactions -} - -export type SushiV3Transactions = Awaited< - ReturnType -> diff --git a/packages/graph-client/src/subgraphs/sushi-v3/schema.graphql b/packages/graph-client/src/subgraphs/sushi-v3/schema.graphql deleted file mode 100644 index 81ac3333f6..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/schema.graphql +++ /dev/null @@ -1,6541 +0,0 @@ -""" -Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. -""" -directive @entity on OBJECT - -"""Defined a Subgraph ID for an object type""" -directive @subgraphId(id: String!) on OBJECT - -""" -creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. -""" -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -enum Aggregation_interval { - hour - day -} - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -type Bundle { - id: ID! - ethPriceUSD: BigDecimal! -} - -input Bundle_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - ethPriceUSD: BigDecimal - ethPriceUSD_not: BigDecimal - ethPriceUSD_gt: BigDecimal - ethPriceUSD_lt: BigDecimal - ethPriceUSD_gte: BigDecimal - ethPriceUSD_lte: BigDecimal - ethPriceUSD_in: [BigDecimal!] - ethPriceUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Bundle_filter] - or: [Bundle_filter] -} - -enum Bundle_orderBy { - id - ethPriceUSD -} - -type Burn { - id: ID! - transaction: Transaction! - pool: Pool! - token0: Token! - token1: Token! - timestamp: BigInt! - owner: Bytes - origin: Bytes! - amount: BigInt! - amount0: BigDecimal! - amount1: BigDecimal! - amountUSD: BigDecimal - tickLower: BigInt! - tickUpper: BigInt! - logIndex: BigInt -} - -input Burn_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - owner: Bytes - owner_not: Bytes - owner_gt: Bytes - owner_lt: Bytes - owner_gte: Bytes - owner_lte: Bytes - owner_in: [Bytes!] - owner_not_in: [Bytes!] - owner_contains: Bytes - owner_not_contains: Bytes - origin: Bytes - origin_not: Bytes - origin_gt: Bytes - origin_lt: Bytes - origin_gte: Bytes - origin_lte: Bytes - origin_in: [Bytes!] - origin_not_in: [Bytes!] - origin_contains: Bytes - origin_not_contains: Bytes - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - tickLower: BigInt - tickLower_not: BigInt - tickLower_gt: BigInt - tickLower_lt: BigInt - tickLower_gte: BigInt - tickLower_lte: BigInt - tickLower_in: [BigInt!] - tickLower_not_in: [BigInt!] - tickUpper: BigInt - tickUpper_not: BigInt - tickUpper_gt: BigInt - tickUpper_lt: BigInt - tickUpper_gte: BigInt - tickUpper_lte: BigInt - tickUpper_in: [BigInt!] - tickUpper_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Burn_filter] - or: [Burn_filter] -} - -enum Burn_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - timestamp - owner - origin - amount - amount0 - amount1 - amountUSD - tickLower - tickUpper - logIndex -} - -scalar Bytes - -type Collect { - id: ID! - transaction: Transaction! - timestamp: BigInt! - pool: Pool! - owner: Bytes - amount0: BigDecimal! - amount1: BigDecimal! - amountUSD: BigDecimal - tickLower: BigInt! - tickUpper: BigInt! - logIndex: BigInt -} - -input Collect_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - owner: Bytes - owner_not: Bytes - owner_gt: Bytes - owner_lt: Bytes - owner_gte: Bytes - owner_lte: Bytes - owner_in: [Bytes!] - owner_not_in: [Bytes!] - owner_contains: Bytes - owner_not_contains: Bytes - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - tickLower: BigInt - tickLower_not: BigInt - tickLower_gt: BigInt - tickLower_lt: BigInt - tickLower_gte: BigInt - tickLower_lte: BigInt - tickLower_in: [BigInt!] - tickLower_not_in: [BigInt!] - tickUpper: BigInt - tickUpper_not: BigInt - tickUpper_gt: BigInt - tickUpper_lt: BigInt - tickUpper_gte: BigInt - tickUpper_lte: BigInt - tickUpper_in: [BigInt!] - tickUpper_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Collect_filter] - or: [Collect_filter] -} - -enum Collect_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - timestamp - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - owner - amount0 - amount1 - amountUSD - tickLower - tickUpper - logIndex -} - -type DecreaseEvent { - id: ID! - pool: Pool! - tokenID: BigInt! - position: Position! - amount0: BigInt! - amount1: BigInt! - token0: Token! - token1: Token! - timeStamp: BigInt! - transaction: Transaction! -} - -input DecreaseEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - tokenID: BigInt - tokenID_not: BigInt - tokenID_gt: BigInt - tokenID_lt: BigInt - tokenID_gte: BigInt - tokenID_lte: BigInt - tokenID_in: [BigInt!] - tokenID_not_in: [BigInt!] - position: String - position_not: String - position_gt: String - position_lt: String - position_gte: String - position_lte: String - position_in: [String!] - position_not_in: [String!] - position_contains: String - position_contains_nocase: String - position_not_contains: String - position_not_contains_nocase: String - position_starts_with: String - position_starts_with_nocase: String - position_not_starts_with: String - position_not_starts_with_nocase: String - position_ends_with: String - position_ends_with_nocase: String - position_not_ends_with: String - position_not_ends_with_nocase: String - position_: Position_filter - amount0: BigInt - amount0_not: BigInt - amount0_gt: BigInt - amount0_lt: BigInt - amount0_gte: BigInt - amount0_lte: BigInt - amount0_in: [BigInt!] - amount0_not_in: [BigInt!] - amount1: BigInt - amount1_not: BigInt - amount1_gt: BigInt - amount1_lt: BigInt - amount1_gte: BigInt - amount1_lte: BigInt - amount1_in: [BigInt!] - amount1_not_in: [BigInt!] - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [DecreaseEvent_filter] - or: [DecreaseEvent_filter] -} - -enum DecreaseEvent_orderBy { - id - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - tokenID - position - position__id - position__owner - position__liquidity - position__depositedToken0 - position__depositedToken1 - position__withdrawnToken0 - position__withdrawnToken1 - position__collectedToken0 - position__collectedToken1 - position__collectedFeesToken0 - position__collectedFeesToken1 - position__amountDepositedUSD - position__amountWithdrawnUSD - position__amountCollectedUSD - position__feeGrowthInside0LastX128 - position__feeGrowthInside1LastX128 - amount0 - amount1 - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - timeStamp - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice -} - -type Factory { - id: ID! - poolCount: BigInt! - txCount: BigInt! - totalVolumeUSD: BigDecimal! - totalVolumeETH: BigDecimal! - totalFeesUSD: BigDecimal! - totalFeesETH: BigDecimal! - untrackedVolumeUSD: BigDecimal! - totalValueLockedUSD: BigDecimal! - totalValueLockedETH: BigDecimal! - totalValueLockedUSDUntracked: BigDecimal! - totalValueLockedETHUntracked: BigDecimal! - owner: ID! -} - -input Factory_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - poolCount: BigInt - poolCount_not: BigInt - poolCount_gt: BigInt - poolCount_lt: BigInt - poolCount_gte: BigInt - poolCount_lte: BigInt - poolCount_in: [BigInt!] - poolCount_not_in: [BigInt!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - totalVolumeUSD: BigDecimal - totalVolumeUSD_not: BigDecimal - totalVolumeUSD_gt: BigDecimal - totalVolumeUSD_lt: BigDecimal - totalVolumeUSD_gte: BigDecimal - totalVolumeUSD_lte: BigDecimal - totalVolumeUSD_in: [BigDecimal!] - totalVolumeUSD_not_in: [BigDecimal!] - totalVolumeETH: BigDecimal - totalVolumeETH_not: BigDecimal - totalVolumeETH_gt: BigDecimal - totalVolumeETH_lt: BigDecimal - totalVolumeETH_gte: BigDecimal - totalVolumeETH_lte: BigDecimal - totalVolumeETH_in: [BigDecimal!] - totalVolumeETH_not_in: [BigDecimal!] - totalFeesUSD: BigDecimal - totalFeesUSD_not: BigDecimal - totalFeesUSD_gt: BigDecimal - totalFeesUSD_lt: BigDecimal - totalFeesUSD_gte: BigDecimal - totalFeesUSD_lte: BigDecimal - totalFeesUSD_in: [BigDecimal!] - totalFeesUSD_not_in: [BigDecimal!] - totalFeesETH: BigDecimal - totalFeesETH_not: BigDecimal - totalFeesETH_gt: BigDecimal - totalFeesETH_lt: BigDecimal - totalFeesETH_gte: BigDecimal - totalFeesETH_lte: BigDecimal - totalFeesETH_in: [BigDecimal!] - totalFeesETH_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - totalValueLockedUSD: BigDecimal - totalValueLockedUSD_not: BigDecimal - totalValueLockedUSD_gt: BigDecimal - totalValueLockedUSD_lt: BigDecimal - totalValueLockedUSD_gte: BigDecimal - totalValueLockedUSD_lte: BigDecimal - totalValueLockedUSD_in: [BigDecimal!] - totalValueLockedUSD_not_in: [BigDecimal!] - totalValueLockedETH: BigDecimal - totalValueLockedETH_not: BigDecimal - totalValueLockedETH_gt: BigDecimal - totalValueLockedETH_lt: BigDecimal - totalValueLockedETH_gte: BigDecimal - totalValueLockedETH_lte: BigDecimal - totalValueLockedETH_in: [BigDecimal!] - totalValueLockedETH_not_in: [BigDecimal!] - totalValueLockedUSDUntracked: BigDecimal - totalValueLockedUSDUntracked_not: BigDecimal - totalValueLockedUSDUntracked_gt: BigDecimal - totalValueLockedUSDUntracked_lt: BigDecimal - totalValueLockedUSDUntracked_gte: BigDecimal - totalValueLockedUSDUntracked_lte: BigDecimal - totalValueLockedUSDUntracked_in: [BigDecimal!] - totalValueLockedUSDUntracked_not_in: [BigDecimal!] - totalValueLockedETHUntracked: BigDecimal - totalValueLockedETHUntracked_not: BigDecimal - totalValueLockedETHUntracked_gt: BigDecimal - totalValueLockedETHUntracked_lt: BigDecimal - totalValueLockedETHUntracked_gte: BigDecimal - totalValueLockedETHUntracked_lte: BigDecimal - totalValueLockedETHUntracked_in: [BigDecimal!] - totalValueLockedETHUntracked_not_in: [BigDecimal!] - owner: ID - owner_not: ID - owner_gt: ID - owner_lt: ID - owner_gte: ID - owner_lte: ID - owner_in: [ID!] - owner_not_in: [ID!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Factory_filter] - or: [Factory_filter] -} - -enum Factory_orderBy { - id - poolCount - txCount - totalVolumeUSD - totalVolumeETH - totalFeesUSD - totalFeesETH - untrackedVolumeUSD - totalValueLockedUSD - totalValueLockedETH - totalValueLockedUSDUntracked - totalValueLockedETHUntracked - owner -} - -type Flash { - id: ID! - transaction: Transaction! - timestamp: BigInt! - pool: Pool! - sender: Bytes! - recipient: Bytes! - amount0: BigDecimal! - amount1: BigDecimal! - amountUSD: BigDecimal! - amount0Paid: BigDecimal! - amount1Paid: BigDecimal! - logIndex: BigInt -} - -input Flash_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - recipient: Bytes - recipient_not: Bytes - recipient_gt: Bytes - recipient_lt: Bytes - recipient_gte: Bytes - recipient_lte: Bytes - recipient_in: [Bytes!] - recipient_not_in: [Bytes!] - recipient_contains: Bytes - recipient_not_contains: Bytes - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - amount0Paid: BigDecimal - amount0Paid_not: BigDecimal - amount0Paid_gt: BigDecimal - amount0Paid_lt: BigDecimal - amount0Paid_gte: BigDecimal - amount0Paid_lte: BigDecimal - amount0Paid_in: [BigDecimal!] - amount0Paid_not_in: [BigDecimal!] - amount1Paid: BigDecimal - amount1Paid_not: BigDecimal - amount1Paid_gt: BigDecimal - amount1Paid_lt: BigDecimal - amount1Paid_gte: BigDecimal - amount1Paid_lte: BigDecimal - amount1Paid_in: [BigDecimal!] - amount1Paid_not_in: [BigDecimal!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Flash_filter] - or: [Flash_filter] -} - -enum Flash_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - timestamp - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - sender - recipient - amount0 - amount1 - amountUSD - amount0Paid - amount1Paid - logIndex -} - -type IncreaseEvent { - id: ID! - pool: Pool! - tokenID: BigInt! - position: Position! - amount0: BigInt! - amount1: BigInt! - token0: Token! - token1: Token! - timeStamp: BigInt! - transaction: Transaction! -} - -input IncreaseEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - tokenID: BigInt - tokenID_not: BigInt - tokenID_gt: BigInt - tokenID_lt: BigInt - tokenID_gte: BigInt - tokenID_lte: BigInt - tokenID_in: [BigInt!] - tokenID_not_in: [BigInt!] - position: String - position_not: String - position_gt: String - position_lt: String - position_gte: String - position_lte: String - position_in: [String!] - position_not_in: [String!] - position_contains: String - position_contains_nocase: String - position_not_contains: String - position_not_contains_nocase: String - position_starts_with: String - position_starts_with_nocase: String - position_not_starts_with: String - position_not_starts_with_nocase: String - position_ends_with: String - position_ends_with_nocase: String - position_not_ends_with: String - position_not_ends_with_nocase: String - position_: Position_filter - amount0: BigInt - amount0_not: BigInt - amount0_gt: BigInt - amount0_lt: BigInt - amount0_gte: BigInt - amount0_lte: BigInt - amount0_in: [BigInt!] - amount0_not_in: [BigInt!] - amount1: BigInt - amount1_not: BigInt - amount1_gt: BigInt - amount1_lt: BigInt - amount1_gte: BigInt - amount1_lte: BigInt - amount1_in: [BigInt!] - amount1_not_in: [BigInt!] - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - timeStamp: BigInt - timeStamp_not: BigInt - timeStamp_gt: BigInt - timeStamp_lt: BigInt - timeStamp_gte: BigInt - timeStamp_lte: BigInt - timeStamp_in: [BigInt!] - timeStamp_not_in: [BigInt!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [IncreaseEvent_filter] - or: [IncreaseEvent_filter] -} - -enum IncreaseEvent_orderBy { - id - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - tokenID - position - position__id - position__owner - position__liquidity - position__depositedToken0 - position__depositedToken1 - position__withdrawnToken0 - position__withdrawnToken1 - position__collectedToken0 - position__collectedToken1 - position__collectedFeesToken0 - position__collectedFeesToken1 - position__amountDepositedUSD - position__amountWithdrawnUSD - position__amountCollectedUSD - position__feeGrowthInside0LastX128 - position__feeGrowthInside1LastX128 - amount0 - amount1 - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - timeStamp - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice -} - -"8 bytes signed integer\n" -scalar Int8 - -type Mint { - id: ID! - transaction: Transaction! - timestamp: BigInt! - pool: Pool! - token0: Token! - token1: Token! - owner: Bytes! - sender: Bytes - origin: Bytes! - amount: BigInt! - amount0: BigDecimal! - amount1: BigDecimal! - amountUSD: BigDecimal - tickLower: BigInt! - tickUpper: BigInt! - logIndex: BigInt -} - -input Mint_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - owner: Bytes - owner_not: Bytes - owner_gt: Bytes - owner_lt: Bytes - owner_gte: Bytes - owner_lte: Bytes - owner_in: [Bytes!] - owner_not_in: [Bytes!] - owner_contains: Bytes - owner_not_contains: Bytes - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - origin: Bytes - origin_not: Bytes - origin_gt: Bytes - origin_lt: Bytes - origin_gte: Bytes - origin_lte: Bytes - origin_in: [Bytes!] - origin_not_in: [Bytes!] - origin_contains: Bytes - origin_not_contains: Bytes - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - tickLower: BigInt - tickLower_not: BigInt - tickLower_gt: BigInt - tickLower_lt: BigInt - tickLower_gte: BigInt - tickLower_lte: BigInt - tickLower_in: [BigInt!] - tickLower_not_in: [BigInt!] - tickUpper: BigInt - tickUpper_not: BigInt - tickUpper_gt: BigInt - tickUpper_lt: BigInt - tickUpper_gte: BigInt - tickUpper_lte: BigInt - tickUpper_in: [BigInt!] - tickUpper_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Mint_filter] - or: [Mint_filter] -} - -enum Mint_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - timestamp - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - owner - sender - origin - amount - amount0 - amount1 - amountUSD - tickLower - tickUpper - logIndex -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Pool { - id: ID! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - token0: Token! - token1: Token! - feeTier: BigInt! - liquidity: BigInt! - sqrtPrice: BigInt! - feeGrowthGlobal0X128: BigInt! - feeGrowthGlobal1X128: BigInt! - token0Price: BigDecimal! - token1Price: BigDecimal! - tick: BigInt - observationIndex: BigInt! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - feesUSD: BigDecimal! - txCount: BigInt! - collectedFeesToken0: BigDecimal! - collectedFeesToken1: BigDecimal! - collectedFeesUSD: BigDecimal! - totalValueLockedToken0: BigDecimal! - totalValueLockedToken1: BigDecimal! - totalValueLockedETH: BigDecimal! - totalValueLockedUSD: BigDecimal! - totalValueLockedUSDUntracked: BigDecimal! - isProtocolFeeEnabled: Boolean! - liquidityProviderCount: BigInt! - poolHourData(skip: Int = 0, first: Int = 100, orderBy: PoolHourData_orderBy, orderDirection: OrderDirection, where: PoolHourData_filter): [PoolHourData!]! - poolDayData(skip: Int = 0, first: Int = 100, orderBy: PoolDayData_orderBy, orderDirection: OrderDirection, where: PoolDayData_filter): [PoolDayData!]! - mints(skip: Int = 0, first: Int = 100, orderBy: Mint_orderBy, orderDirection: OrderDirection, where: Mint_filter): [Mint!]! - burns(skip: Int = 0, first: Int = 100, orderBy: Burn_orderBy, orderDirection: OrderDirection, where: Burn_filter): [Burn!]! - swaps(skip: Int = 0, first: Int = 100, orderBy: Swap_orderBy, orderDirection: OrderDirection, where: Swap_filter): [Swap!]! - collects(skip: Int = 0, first: Int = 100, orderBy: Collect_orderBy, orderDirection: OrderDirection, where: Collect_filter): [Collect!]! - ticks(skip: Int = 0, first: Int = 100, orderBy: Tick_orderBy, orderDirection: OrderDirection, where: Tick_filter): [Tick!]! -} - -type PoolDayData { - id: ID! - date: Int! - pool: Pool! - liquidity: BigInt! - sqrtPrice: BigInt! - token0Price: BigDecimal! - token1Price: BigDecimal! - tick: BigInt - feeGrowthGlobal0X128: BigInt! - feeGrowthGlobal1X128: BigInt! - tvlUSD: BigDecimal! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - feesUSD: BigDecimal! - txCount: BigInt! - open: BigDecimal! - high: BigDecimal! - low: BigDecimal! - close: BigDecimal! -} - -input PoolDayData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - liquidity: BigInt - liquidity_not: BigInt - liquidity_gt: BigInt - liquidity_lt: BigInt - liquidity_gte: BigInt - liquidity_lte: BigInt - liquidity_in: [BigInt!] - liquidity_not_in: [BigInt!] - sqrtPrice: BigInt - sqrtPrice_not: BigInt - sqrtPrice_gt: BigInt - sqrtPrice_lt: BigInt - sqrtPrice_gte: BigInt - sqrtPrice_lte: BigInt - sqrtPrice_in: [BigInt!] - sqrtPrice_not_in: [BigInt!] - token0Price: BigDecimal - token0Price_not: BigDecimal - token0Price_gt: BigDecimal - token0Price_lt: BigDecimal - token0Price_gte: BigDecimal - token0Price_lte: BigDecimal - token0Price_in: [BigDecimal!] - token0Price_not_in: [BigDecimal!] - token1Price: BigDecimal - token1Price_not: BigDecimal - token1Price_gt: BigDecimal - token1Price_lt: BigDecimal - token1Price_gte: BigDecimal - token1Price_lte: BigDecimal - token1Price_in: [BigDecimal!] - token1Price_not_in: [BigDecimal!] - tick: BigInt - tick_not: BigInt - tick_gt: BigInt - tick_lt: BigInt - tick_gte: BigInt - tick_lte: BigInt - tick_in: [BigInt!] - tick_not_in: [BigInt!] - feeGrowthGlobal0X128: BigInt - feeGrowthGlobal0X128_not: BigInt - feeGrowthGlobal0X128_gt: BigInt - feeGrowthGlobal0X128_lt: BigInt - feeGrowthGlobal0X128_gte: BigInt - feeGrowthGlobal0X128_lte: BigInt - feeGrowthGlobal0X128_in: [BigInt!] - feeGrowthGlobal0X128_not_in: [BigInt!] - feeGrowthGlobal1X128: BigInt - feeGrowthGlobal1X128_not: BigInt - feeGrowthGlobal1X128_gt: BigInt - feeGrowthGlobal1X128_lt: BigInt - feeGrowthGlobal1X128_gte: BigInt - feeGrowthGlobal1X128_lte: BigInt - feeGrowthGlobal1X128_in: [BigInt!] - feeGrowthGlobal1X128_not_in: [BigInt!] - tvlUSD: BigDecimal - tvlUSD_not: BigDecimal - tvlUSD_gt: BigDecimal - tvlUSD_lt: BigDecimal - tvlUSD_gte: BigDecimal - tvlUSD_lte: BigDecimal - tvlUSD_in: [BigDecimal!] - tvlUSD_not_in: [BigDecimal!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - open: BigDecimal - open_not: BigDecimal - open_gt: BigDecimal - open_lt: BigDecimal - open_gte: BigDecimal - open_lte: BigDecimal - open_in: [BigDecimal!] - open_not_in: [BigDecimal!] - high: BigDecimal - high_not: BigDecimal - high_gt: BigDecimal - high_lt: BigDecimal - high_gte: BigDecimal - high_lte: BigDecimal - high_in: [BigDecimal!] - high_not_in: [BigDecimal!] - low: BigDecimal - low_not: BigDecimal - low_gt: BigDecimal - low_lt: BigDecimal - low_gte: BigDecimal - low_lte: BigDecimal - low_in: [BigDecimal!] - low_not_in: [BigDecimal!] - close: BigDecimal - close_not: BigDecimal - close_gt: BigDecimal - close_lt: BigDecimal - close_gte: BigDecimal - close_lte: BigDecimal - close_in: [BigDecimal!] - close_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PoolDayData_filter] - or: [PoolDayData_filter] -} - -enum PoolDayData_orderBy { - id - date - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - liquidity - sqrtPrice - token0Price - token1Price - tick - feeGrowthGlobal0X128 - feeGrowthGlobal1X128 - tvlUSD - volumeToken0 - volumeToken1 - volumeUSD - feesUSD - txCount - open - high - low - close -} - -type PoolHourData { - id: ID! - periodStartUnix: Int! - pool: Pool! - liquidity: BigInt! - sqrtPrice: BigInt! - token0Price: BigDecimal! - token1Price: BigDecimal! - tick: BigInt - feeGrowthGlobal0X128: BigInt! - feeGrowthGlobal1X128: BigInt! - tvlUSD: BigDecimal! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - feesUSD: BigDecimal! - txCount: BigInt! - open: BigDecimal! - high: BigDecimal! - low: BigDecimal! - close: BigDecimal! -} - -input PoolHourData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - periodStartUnix: Int - periodStartUnix_not: Int - periodStartUnix_gt: Int - periodStartUnix_lt: Int - periodStartUnix_gte: Int - periodStartUnix_lte: Int - periodStartUnix_in: [Int!] - periodStartUnix_not_in: [Int!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - liquidity: BigInt - liquidity_not: BigInt - liquidity_gt: BigInt - liquidity_lt: BigInt - liquidity_gte: BigInt - liquidity_lte: BigInt - liquidity_in: [BigInt!] - liquidity_not_in: [BigInt!] - sqrtPrice: BigInt - sqrtPrice_not: BigInt - sqrtPrice_gt: BigInt - sqrtPrice_lt: BigInt - sqrtPrice_gte: BigInt - sqrtPrice_lte: BigInt - sqrtPrice_in: [BigInt!] - sqrtPrice_not_in: [BigInt!] - token0Price: BigDecimal - token0Price_not: BigDecimal - token0Price_gt: BigDecimal - token0Price_lt: BigDecimal - token0Price_gte: BigDecimal - token0Price_lte: BigDecimal - token0Price_in: [BigDecimal!] - token0Price_not_in: [BigDecimal!] - token1Price: BigDecimal - token1Price_not: BigDecimal - token1Price_gt: BigDecimal - token1Price_lt: BigDecimal - token1Price_gte: BigDecimal - token1Price_lte: BigDecimal - token1Price_in: [BigDecimal!] - token1Price_not_in: [BigDecimal!] - tick: BigInt - tick_not: BigInt - tick_gt: BigInt - tick_lt: BigInt - tick_gte: BigInt - tick_lte: BigInt - tick_in: [BigInt!] - tick_not_in: [BigInt!] - feeGrowthGlobal0X128: BigInt - feeGrowthGlobal0X128_not: BigInt - feeGrowthGlobal0X128_gt: BigInt - feeGrowthGlobal0X128_lt: BigInt - feeGrowthGlobal0X128_gte: BigInt - feeGrowthGlobal0X128_lte: BigInt - feeGrowthGlobal0X128_in: [BigInt!] - feeGrowthGlobal0X128_not_in: [BigInt!] - feeGrowthGlobal1X128: BigInt - feeGrowthGlobal1X128_not: BigInt - feeGrowthGlobal1X128_gt: BigInt - feeGrowthGlobal1X128_lt: BigInt - feeGrowthGlobal1X128_gte: BigInt - feeGrowthGlobal1X128_lte: BigInt - feeGrowthGlobal1X128_in: [BigInt!] - feeGrowthGlobal1X128_not_in: [BigInt!] - tvlUSD: BigDecimal - tvlUSD_not: BigDecimal - tvlUSD_gt: BigDecimal - tvlUSD_lt: BigDecimal - tvlUSD_gte: BigDecimal - tvlUSD_lte: BigDecimal - tvlUSD_in: [BigDecimal!] - tvlUSD_not_in: [BigDecimal!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - open: BigDecimal - open_not: BigDecimal - open_gt: BigDecimal - open_lt: BigDecimal - open_gte: BigDecimal - open_lte: BigDecimal - open_in: [BigDecimal!] - open_not_in: [BigDecimal!] - high: BigDecimal - high_not: BigDecimal - high_gt: BigDecimal - high_lt: BigDecimal - high_gte: BigDecimal - high_lte: BigDecimal - high_in: [BigDecimal!] - high_not_in: [BigDecimal!] - low: BigDecimal - low_not: BigDecimal - low_gt: BigDecimal - low_lt: BigDecimal - low_gte: BigDecimal - low_lte: BigDecimal - low_in: [BigDecimal!] - low_not_in: [BigDecimal!] - close: BigDecimal - close_not: BigDecimal - close_gt: BigDecimal - close_lt: BigDecimal - close_gte: BigDecimal - close_lte: BigDecimal - close_in: [BigDecimal!] - close_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PoolHourData_filter] - or: [PoolHourData_filter] -} - -enum PoolHourData_orderBy { - id - periodStartUnix - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - liquidity - sqrtPrice - token0Price - token1Price - tick - feeGrowthGlobal0X128 - feeGrowthGlobal1X128 - tvlUSD - volumeToken0 - volumeToken1 - volumeUSD - feesUSD - txCount - open - high - low - close -} - -input Pool_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - createdAtBlockNumber: BigInt - createdAtBlockNumber_not: BigInt - createdAtBlockNumber_gt: BigInt - createdAtBlockNumber_lt: BigInt - createdAtBlockNumber_gte: BigInt - createdAtBlockNumber_lte: BigInt - createdAtBlockNumber_in: [BigInt!] - createdAtBlockNumber_not_in: [BigInt!] - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - feeTier: BigInt - feeTier_not: BigInt - feeTier_gt: BigInt - feeTier_lt: BigInt - feeTier_gte: BigInt - feeTier_lte: BigInt - feeTier_in: [BigInt!] - feeTier_not_in: [BigInt!] - liquidity: BigInt - liquidity_not: BigInt - liquidity_gt: BigInt - liquidity_lt: BigInt - liquidity_gte: BigInt - liquidity_lte: BigInt - liquidity_in: [BigInt!] - liquidity_not_in: [BigInt!] - sqrtPrice: BigInt - sqrtPrice_not: BigInt - sqrtPrice_gt: BigInt - sqrtPrice_lt: BigInt - sqrtPrice_gte: BigInt - sqrtPrice_lte: BigInt - sqrtPrice_in: [BigInt!] - sqrtPrice_not_in: [BigInt!] - feeGrowthGlobal0X128: BigInt - feeGrowthGlobal0X128_not: BigInt - feeGrowthGlobal0X128_gt: BigInt - feeGrowthGlobal0X128_lt: BigInt - feeGrowthGlobal0X128_gte: BigInt - feeGrowthGlobal0X128_lte: BigInt - feeGrowthGlobal0X128_in: [BigInt!] - feeGrowthGlobal0X128_not_in: [BigInt!] - feeGrowthGlobal1X128: BigInt - feeGrowthGlobal1X128_not: BigInt - feeGrowthGlobal1X128_gt: BigInt - feeGrowthGlobal1X128_lt: BigInt - feeGrowthGlobal1X128_gte: BigInt - feeGrowthGlobal1X128_lte: BigInt - feeGrowthGlobal1X128_in: [BigInt!] - feeGrowthGlobal1X128_not_in: [BigInt!] - token0Price: BigDecimal - token0Price_not: BigDecimal - token0Price_gt: BigDecimal - token0Price_lt: BigDecimal - token0Price_gte: BigDecimal - token0Price_lte: BigDecimal - token0Price_in: [BigDecimal!] - token0Price_not_in: [BigDecimal!] - token1Price: BigDecimal - token1Price_not: BigDecimal - token1Price_gt: BigDecimal - token1Price_lt: BigDecimal - token1Price_gte: BigDecimal - token1Price_lte: BigDecimal - token1Price_in: [BigDecimal!] - token1Price_not_in: [BigDecimal!] - tick: BigInt - tick_not: BigInt - tick_gt: BigInt - tick_lt: BigInt - tick_gte: BigInt - tick_lte: BigInt - tick_in: [BigInt!] - tick_not_in: [BigInt!] - observationIndex: BigInt - observationIndex_not: BigInt - observationIndex_gt: BigInt - observationIndex_lt: BigInt - observationIndex_gte: BigInt - observationIndex_lte: BigInt - observationIndex_in: [BigInt!] - observationIndex_not_in: [BigInt!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - collectedFeesToken0: BigDecimal - collectedFeesToken0_not: BigDecimal - collectedFeesToken0_gt: BigDecimal - collectedFeesToken0_lt: BigDecimal - collectedFeesToken0_gte: BigDecimal - collectedFeesToken0_lte: BigDecimal - collectedFeesToken0_in: [BigDecimal!] - collectedFeesToken0_not_in: [BigDecimal!] - collectedFeesToken1: BigDecimal - collectedFeesToken1_not: BigDecimal - collectedFeesToken1_gt: BigDecimal - collectedFeesToken1_lt: BigDecimal - collectedFeesToken1_gte: BigDecimal - collectedFeesToken1_lte: BigDecimal - collectedFeesToken1_in: [BigDecimal!] - collectedFeesToken1_not_in: [BigDecimal!] - collectedFeesUSD: BigDecimal - collectedFeesUSD_not: BigDecimal - collectedFeesUSD_gt: BigDecimal - collectedFeesUSD_lt: BigDecimal - collectedFeesUSD_gte: BigDecimal - collectedFeesUSD_lte: BigDecimal - collectedFeesUSD_in: [BigDecimal!] - collectedFeesUSD_not_in: [BigDecimal!] - totalValueLockedToken0: BigDecimal - totalValueLockedToken0_not: BigDecimal - totalValueLockedToken0_gt: BigDecimal - totalValueLockedToken0_lt: BigDecimal - totalValueLockedToken0_gte: BigDecimal - totalValueLockedToken0_lte: BigDecimal - totalValueLockedToken0_in: [BigDecimal!] - totalValueLockedToken0_not_in: [BigDecimal!] - totalValueLockedToken1: BigDecimal - totalValueLockedToken1_not: BigDecimal - totalValueLockedToken1_gt: BigDecimal - totalValueLockedToken1_lt: BigDecimal - totalValueLockedToken1_gte: BigDecimal - totalValueLockedToken1_lte: BigDecimal - totalValueLockedToken1_in: [BigDecimal!] - totalValueLockedToken1_not_in: [BigDecimal!] - totalValueLockedETH: BigDecimal - totalValueLockedETH_not: BigDecimal - totalValueLockedETH_gt: BigDecimal - totalValueLockedETH_lt: BigDecimal - totalValueLockedETH_gte: BigDecimal - totalValueLockedETH_lte: BigDecimal - totalValueLockedETH_in: [BigDecimal!] - totalValueLockedETH_not_in: [BigDecimal!] - totalValueLockedUSD: BigDecimal - totalValueLockedUSD_not: BigDecimal - totalValueLockedUSD_gt: BigDecimal - totalValueLockedUSD_lt: BigDecimal - totalValueLockedUSD_gte: BigDecimal - totalValueLockedUSD_lte: BigDecimal - totalValueLockedUSD_in: [BigDecimal!] - totalValueLockedUSD_not_in: [BigDecimal!] - totalValueLockedUSDUntracked: BigDecimal - totalValueLockedUSDUntracked_not: BigDecimal - totalValueLockedUSDUntracked_gt: BigDecimal - totalValueLockedUSDUntracked_lt: BigDecimal - totalValueLockedUSDUntracked_gte: BigDecimal - totalValueLockedUSDUntracked_lte: BigDecimal - totalValueLockedUSDUntracked_in: [BigDecimal!] - totalValueLockedUSDUntracked_not_in: [BigDecimal!] - isProtocolFeeEnabled: Boolean - isProtocolFeeEnabled_not: Boolean - isProtocolFeeEnabled_in: [Boolean!] - isProtocolFeeEnabled_not_in: [Boolean!] - liquidityProviderCount: BigInt - liquidityProviderCount_not: BigInt - liquidityProviderCount_gt: BigInt - liquidityProviderCount_lt: BigInt - liquidityProviderCount_gte: BigInt - liquidityProviderCount_lte: BigInt - liquidityProviderCount_in: [BigInt!] - liquidityProviderCount_not_in: [BigInt!] - poolHourData_: PoolHourData_filter - poolDayData_: PoolDayData_filter - mints_: Mint_filter - burns_: Burn_filter - swaps_: Swap_filter - collects_: Collect_filter - ticks_: Tick_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Pool_filter] - or: [Pool_filter] -} - -enum Pool_orderBy { - id - createdAtTimestamp - createdAtBlockNumber - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - feeTier - liquidity - sqrtPrice - feeGrowthGlobal0X128 - feeGrowthGlobal1X128 - token0Price - token1Price - tick - observationIndex - volumeToken0 - volumeToken1 - volumeUSD - untrackedVolumeUSD - feesUSD - txCount - collectedFeesToken0 - collectedFeesToken1 - collectedFeesUSD - totalValueLockedToken0 - totalValueLockedToken1 - totalValueLockedETH - totalValueLockedUSD - totalValueLockedUSDUntracked - isProtocolFeeEnabled - liquidityProviderCount - poolHourData - poolDayData - mints - burns - swaps - collects - ticks -} - -type Position { - id: ID! - owner: Bytes! - pool: Pool! - token0: Token! - token1: Token! - tickLower: Tick! - tickUpper: Tick! - liquidity: BigInt! - depositedToken0: BigDecimal! - depositedToken1: BigDecimal! - withdrawnToken0: BigDecimal! - withdrawnToken1: BigDecimal! - collectedToken0: BigDecimal! - collectedToken1: BigDecimal! - collectedFeesToken0: BigDecimal! - collectedFeesToken1: BigDecimal! - amountDepositedUSD: BigDecimal! - amountWithdrawnUSD: BigDecimal! - amountCollectedUSD: BigDecimal! - transaction: Transaction! - feeGrowthInside0LastX128: BigInt! - feeGrowthInside1LastX128: BigInt! - increaseEvents(skip: Int = 0, first: Int = 100, orderBy: IncreaseEvent_orderBy, orderDirection: OrderDirection, where: IncreaseEvent_filter): [IncreaseEvent!]! - decreaseEvents(skip: Int = 0, first: Int = 100, orderBy: IncreaseEvent_orderBy, orderDirection: OrderDirection, where: IncreaseEvent_filter): [IncreaseEvent!]! -} - -type PositionSnapshot { - id: ID! - owner: Bytes! - pool: Pool! - position: Position! - blockNumber: BigInt! - timestamp: BigInt! - liquidity: BigInt! - depositedToken0: BigDecimal! - depositedToken1: BigDecimal! - withdrawnToken0: BigDecimal! - withdrawnToken1: BigDecimal! - collectedFeesToken0: BigDecimal! - collectedFeesToken1: BigDecimal! - transaction: Transaction! - feeGrowthInside0LastX128: BigInt! - feeGrowthInside1LastX128: BigInt! -} - -input PositionSnapshot_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - owner: Bytes - owner_not: Bytes - owner_gt: Bytes - owner_lt: Bytes - owner_gte: Bytes - owner_lte: Bytes - owner_in: [Bytes!] - owner_not_in: [Bytes!] - owner_contains: Bytes - owner_not_contains: Bytes - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - position: String - position_not: String - position_gt: String - position_lt: String - position_gte: String - position_lte: String - position_in: [String!] - position_not_in: [String!] - position_contains: String - position_contains_nocase: String - position_not_contains: String - position_not_contains_nocase: String - position_starts_with: String - position_starts_with_nocase: String - position_not_starts_with: String - position_not_starts_with_nocase: String - position_ends_with: String - position_ends_with_nocase: String - position_not_ends_with: String - position_not_ends_with_nocase: String - position_: Position_filter - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - liquidity: BigInt - liquidity_not: BigInt - liquidity_gt: BigInt - liquidity_lt: BigInt - liquidity_gte: BigInt - liquidity_lte: BigInt - liquidity_in: [BigInt!] - liquidity_not_in: [BigInt!] - depositedToken0: BigDecimal - depositedToken0_not: BigDecimal - depositedToken0_gt: BigDecimal - depositedToken0_lt: BigDecimal - depositedToken0_gte: BigDecimal - depositedToken0_lte: BigDecimal - depositedToken0_in: [BigDecimal!] - depositedToken0_not_in: [BigDecimal!] - depositedToken1: BigDecimal - depositedToken1_not: BigDecimal - depositedToken1_gt: BigDecimal - depositedToken1_lt: BigDecimal - depositedToken1_gte: BigDecimal - depositedToken1_lte: BigDecimal - depositedToken1_in: [BigDecimal!] - depositedToken1_not_in: [BigDecimal!] - withdrawnToken0: BigDecimal - withdrawnToken0_not: BigDecimal - withdrawnToken0_gt: BigDecimal - withdrawnToken0_lt: BigDecimal - withdrawnToken0_gte: BigDecimal - withdrawnToken0_lte: BigDecimal - withdrawnToken0_in: [BigDecimal!] - withdrawnToken0_not_in: [BigDecimal!] - withdrawnToken1: BigDecimal - withdrawnToken1_not: BigDecimal - withdrawnToken1_gt: BigDecimal - withdrawnToken1_lt: BigDecimal - withdrawnToken1_gte: BigDecimal - withdrawnToken1_lte: BigDecimal - withdrawnToken1_in: [BigDecimal!] - withdrawnToken1_not_in: [BigDecimal!] - collectedFeesToken0: BigDecimal - collectedFeesToken0_not: BigDecimal - collectedFeesToken0_gt: BigDecimal - collectedFeesToken0_lt: BigDecimal - collectedFeesToken0_gte: BigDecimal - collectedFeesToken0_lte: BigDecimal - collectedFeesToken0_in: [BigDecimal!] - collectedFeesToken0_not_in: [BigDecimal!] - collectedFeesToken1: BigDecimal - collectedFeesToken1_not: BigDecimal - collectedFeesToken1_gt: BigDecimal - collectedFeesToken1_lt: BigDecimal - collectedFeesToken1_gte: BigDecimal - collectedFeesToken1_lte: BigDecimal - collectedFeesToken1_in: [BigDecimal!] - collectedFeesToken1_not_in: [BigDecimal!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - feeGrowthInside0LastX128: BigInt - feeGrowthInside0LastX128_not: BigInt - feeGrowthInside0LastX128_gt: BigInt - feeGrowthInside0LastX128_lt: BigInt - feeGrowthInside0LastX128_gte: BigInt - feeGrowthInside0LastX128_lte: BigInt - feeGrowthInside0LastX128_in: [BigInt!] - feeGrowthInside0LastX128_not_in: [BigInt!] - feeGrowthInside1LastX128: BigInt - feeGrowthInside1LastX128_not: BigInt - feeGrowthInside1LastX128_gt: BigInt - feeGrowthInside1LastX128_lt: BigInt - feeGrowthInside1LastX128_gte: BigInt - feeGrowthInside1LastX128_lte: BigInt - feeGrowthInside1LastX128_in: [BigInt!] - feeGrowthInside1LastX128_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [PositionSnapshot_filter] - or: [PositionSnapshot_filter] -} - -enum PositionSnapshot_orderBy { - id - owner - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - position - position__id - position__owner - position__liquidity - position__depositedToken0 - position__depositedToken1 - position__withdrawnToken0 - position__withdrawnToken1 - position__collectedToken0 - position__collectedToken1 - position__collectedFeesToken0 - position__collectedFeesToken1 - position__amountDepositedUSD - position__amountWithdrawnUSD - position__amountCollectedUSD - position__feeGrowthInside0LastX128 - position__feeGrowthInside1LastX128 - blockNumber - timestamp - liquidity - depositedToken0 - depositedToken1 - withdrawnToken0 - withdrawnToken1 - collectedFeesToken0 - collectedFeesToken1 - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - feeGrowthInside0LastX128 - feeGrowthInside1LastX128 -} - -input Position_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - owner: Bytes - owner_not: Bytes - owner_gt: Bytes - owner_lt: Bytes - owner_gte: Bytes - owner_lte: Bytes - owner_in: [Bytes!] - owner_not_in: [Bytes!] - owner_contains: Bytes - owner_not_contains: Bytes - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - tickLower: String - tickLower_not: String - tickLower_gt: String - tickLower_lt: String - tickLower_gte: String - tickLower_lte: String - tickLower_in: [String!] - tickLower_not_in: [String!] - tickLower_contains: String - tickLower_contains_nocase: String - tickLower_not_contains: String - tickLower_not_contains_nocase: String - tickLower_starts_with: String - tickLower_starts_with_nocase: String - tickLower_not_starts_with: String - tickLower_not_starts_with_nocase: String - tickLower_ends_with: String - tickLower_ends_with_nocase: String - tickLower_not_ends_with: String - tickLower_not_ends_with_nocase: String - tickLower_: Tick_filter - tickUpper: String - tickUpper_not: String - tickUpper_gt: String - tickUpper_lt: String - tickUpper_gte: String - tickUpper_lte: String - tickUpper_in: [String!] - tickUpper_not_in: [String!] - tickUpper_contains: String - tickUpper_contains_nocase: String - tickUpper_not_contains: String - tickUpper_not_contains_nocase: String - tickUpper_starts_with: String - tickUpper_starts_with_nocase: String - tickUpper_not_starts_with: String - tickUpper_not_starts_with_nocase: String - tickUpper_ends_with: String - tickUpper_ends_with_nocase: String - tickUpper_not_ends_with: String - tickUpper_not_ends_with_nocase: String - tickUpper_: Tick_filter - liquidity: BigInt - liquidity_not: BigInt - liquidity_gt: BigInt - liquidity_lt: BigInt - liquidity_gte: BigInt - liquidity_lte: BigInt - liquidity_in: [BigInt!] - liquidity_not_in: [BigInt!] - depositedToken0: BigDecimal - depositedToken0_not: BigDecimal - depositedToken0_gt: BigDecimal - depositedToken0_lt: BigDecimal - depositedToken0_gte: BigDecimal - depositedToken0_lte: BigDecimal - depositedToken0_in: [BigDecimal!] - depositedToken0_not_in: [BigDecimal!] - depositedToken1: BigDecimal - depositedToken1_not: BigDecimal - depositedToken1_gt: BigDecimal - depositedToken1_lt: BigDecimal - depositedToken1_gte: BigDecimal - depositedToken1_lte: BigDecimal - depositedToken1_in: [BigDecimal!] - depositedToken1_not_in: [BigDecimal!] - withdrawnToken0: BigDecimal - withdrawnToken0_not: BigDecimal - withdrawnToken0_gt: BigDecimal - withdrawnToken0_lt: BigDecimal - withdrawnToken0_gte: BigDecimal - withdrawnToken0_lte: BigDecimal - withdrawnToken0_in: [BigDecimal!] - withdrawnToken0_not_in: [BigDecimal!] - withdrawnToken1: BigDecimal - withdrawnToken1_not: BigDecimal - withdrawnToken1_gt: BigDecimal - withdrawnToken1_lt: BigDecimal - withdrawnToken1_gte: BigDecimal - withdrawnToken1_lte: BigDecimal - withdrawnToken1_in: [BigDecimal!] - withdrawnToken1_not_in: [BigDecimal!] - collectedToken0: BigDecimal - collectedToken0_not: BigDecimal - collectedToken0_gt: BigDecimal - collectedToken0_lt: BigDecimal - collectedToken0_gte: BigDecimal - collectedToken0_lte: BigDecimal - collectedToken0_in: [BigDecimal!] - collectedToken0_not_in: [BigDecimal!] - collectedToken1: BigDecimal - collectedToken1_not: BigDecimal - collectedToken1_gt: BigDecimal - collectedToken1_lt: BigDecimal - collectedToken1_gte: BigDecimal - collectedToken1_lte: BigDecimal - collectedToken1_in: [BigDecimal!] - collectedToken1_not_in: [BigDecimal!] - collectedFeesToken0: BigDecimal - collectedFeesToken0_not: BigDecimal - collectedFeesToken0_gt: BigDecimal - collectedFeesToken0_lt: BigDecimal - collectedFeesToken0_gte: BigDecimal - collectedFeesToken0_lte: BigDecimal - collectedFeesToken0_in: [BigDecimal!] - collectedFeesToken0_not_in: [BigDecimal!] - collectedFeesToken1: BigDecimal - collectedFeesToken1_not: BigDecimal - collectedFeesToken1_gt: BigDecimal - collectedFeesToken1_lt: BigDecimal - collectedFeesToken1_gte: BigDecimal - collectedFeesToken1_lte: BigDecimal - collectedFeesToken1_in: [BigDecimal!] - collectedFeesToken1_not_in: [BigDecimal!] - amountDepositedUSD: BigDecimal - amountDepositedUSD_not: BigDecimal - amountDepositedUSD_gt: BigDecimal - amountDepositedUSD_lt: BigDecimal - amountDepositedUSD_gte: BigDecimal - amountDepositedUSD_lte: BigDecimal - amountDepositedUSD_in: [BigDecimal!] - amountDepositedUSD_not_in: [BigDecimal!] - amountWithdrawnUSD: BigDecimal - amountWithdrawnUSD_not: BigDecimal - amountWithdrawnUSD_gt: BigDecimal - amountWithdrawnUSD_lt: BigDecimal - amountWithdrawnUSD_gte: BigDecimal - amountWithdrawnUSD_lte: BigDecimal - amountWithdrawnUSD_in: [BigDecimal!] - amountWithdrawnUSD_not_in: [BigDecimal!] - amountCollectedUSD: BigDecimal - amountCollectedUSD_not: BigDecimal - amountCollectedUSD_gt: BigDecimal - amountCollectedUSD_lt: BigDecimal - amountCollectedUSD_gte: BigDecimal - amountCollectedUSD_lte: BigDecimal - amountCollectedUSD_in: [BigDecimal!] - amountCollectedUSD_not_in: [BigDecimal!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - feeGrowthInside0LastX128: BigInt - feeGrowthInside0LastX128_not: BigInt - feeGrowthInside0LastX128_gt: BigInt - feeGrowthInside0LastX128_lt: BigInt - feeGrowthInside0LastX128_gte: BigInt - feeGrowthInside0LastX128_lte: BigInt - feeGrowthInside0LastX128_in: [BigInt!] - feeGrowthInside0LastX128_not_in: [BigInt!] - feeGrowthInside1LastX128: BigInt - feeGrowthInside1LastX128_not: BigInt - feeGrowthInside1LastX128_gt: BigInt - feeGrowthInside1LastX128_lt: BigInt - feeGrowthInside1LastX128_gte: BigInt - feeGrowthInside1LastX128_lte: BigInt - feeGrowthInside1LastX128_in: [BigInt!] - feeGrowthInside1LastX128_not_in: [BigInt!] - increaseEvents_: IncreaseEvent_filter - decreaseEvents_: IncreaseEvent_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Position_filter] - or: [Position_filter] -} - -enum Position_orderBy { - id - owner - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - tickLower - tickLower__id - tickLower__poolAddress - tickLower__tickIdx - tickLower__liquidityGross - tickLower__liquidityNet - tickLower__price0 - tickLower__price1 - tickLower__volumeToken0 - tickLower__volumeToken1 - tickLower__volumeUSD - tickLower__untrackedVolumeUSD - tickLower__feesUSD - tickLower__collectedFeesToken0 - tickLower__collectedFeesToken1 - tickLower__collectedFeesUSD - tickLower__createdAtTimestamp - tickLower__createdAtBlockNumber - tickLower__liquidityProviderCount - tickLower__feeGrowthOutside0X128 - tickLower__feeGrowthOutside1X128 - tickUpper - tickUpper__id - tickUpper__poolAddress - tickUpper__tickIdx - tickUpper__liquidityGross - tickUpper__liquidityNet - tickUpper__price0 - tickUpper__price1 - tickUpper__volumeToken0 - tickUpper__volumeToken1 - tickUpper__volumeUSD - tickUpper__untrackedVolumeUSD - tickUpper__feesUSD - tickUpper__collectedFeesToken0 - tickUpper__collectedFeesToken1 - tickUpper__collectedFeesUSD - tickUpper__createdAtTimestamp - tickUpper__createdAtBlockNumber - tickUpper__liquidityProviderCount - tickUpper__feeGrowthOutside0X128 - tickUpper__feeGrowthOutside1X128 - liquidity - depositedToken0 - depositedToken1 - withdrawnToken0 - withdrawnToken1 - collectedToken0 - collectedToken1 - collectedFeesToken0 - collectedFeesToken1 - amountDepositedUSD - amountWithdrawnUSD - amountCollectedUSD - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - feeGrowthInside0LastX128 - feeGrowthInside1LastX128 - increaseEvents - decreaseEvents -} - -type Query { - factory( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Factory - factories( - skip: Int = 0 - first: Int = 100 - orderBy: Factory_orderBy - orderDirection: OrderDirection - where: Factory_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Factory!]! - bundle( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Bundle - bundles( - skip: Int = 0 - first: Int = 100 - orderBy: Bundle_orderBy - orderDirection: OrderDirection - where: Bundle_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Bundle!]! - token( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Token - tokens( - skip: Int = 0 - first: Int = 100 - orderBy: Token_orderBy - orderDirection: OrderDirection - where: Token_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Token!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - tick( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Tick - ticks( - skip: Int = 0 - first: Int = 100 - orderBy: Tick_orderBy - orderDirection: OrderDirection - where: Tick_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Tick!]! - position( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Position - positions( - skip: Int = 0 - first: Int = 100 - orderBy: Position_orderBy - orderDirection: OrderDirection - where: Position_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Position!]! - positionSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PositionSnapshot - positionSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PositionSnapshot_orderBy - orderDirection: OrderDirection - where: PositionSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PositionSnapshot!]! - transaction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Transaction - transactions( - skip: Int = 0 - first: Int = 100 - orderBy: Transaction_orderBy - orderDirection: OrderDirection - where: Transaction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Transaction!]! - mint( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Mint - mints( - skip: Int = 0 - first: Int = 100 - orderBy: Mint_orderBy - orderDirection: OrderDirection - where: Mint_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Mint!]! - burn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Burn - burns( - skip: Int = 0 - first: Int = 100 - orderBy: Burn_orderBy - orderDirection: OrderDirection - where: Burn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Burn!]! - swap( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Swap - swaps( - skip: Int = 0 - first: Int = 100 - orderBy: Swap_orderBy - orderDirection: OrderDirection - where: Swap_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Swap!]! - collect( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Collect - collects( - skip: Int = 0 - first: Int = 100 - orderBy: Collect_orderBy - orderDirection: OrderDirection - where: Collect_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Collect!]! - flash( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Flash - flashes( - skip: Int = 0 - first: Int = 100 - orderBy: Flash_orderBy - orderDirection: OrderDirection - where: Flash_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Flash!]! - uniswapDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): UniswapDayData - uniswapDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: UniswapDayData_orderBy - orderDirection: OrderDirection - where: UniswapDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [UniswapDayData!]! - poolDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PoolDayData - poolDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PoolDayData_orderBy - orderDirection: OrderDirection - where: PoolDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PoolDayData!]! - poolHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PoolHourData - poolHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PoolHourData_orderBy - orderDirection: OrderDirection - where: PoolHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PoolHourData!]! - tickHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TickHourData - tickHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TickHourData_orderBy - orderDirection: OrderDirection - where: TickHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TickHourData!]! - tickDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TickDayData - tickDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TickDayData_orderBy - orderDirection: OrderDirection - where: TickDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TickDayData!]! - tokenDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenDayData - tokenDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TokenDayData_orderBy - orderDirection: OrderDirection - where: TokenDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenDayData!]! - tokenHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenHourData - tokenHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TokenHourData_orderBy - orderDirection: OrderDirection - where: TokenHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenHourData!]! - increaseEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IncreaseEvent - increaseEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IncreaseEvent_orderBy - orderDirection: OrderDirection - where: IncreaseEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IncreaseEvent!]! - decreaseEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): DecreaseEvent - decreaseEvents( - skip: Int = 0 - first: Int = 100 - orderBy: DecreaseEvent_orderBy - orderDirection: OrderDirection - where: DecreaseEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [DecreaseEvent!]! - setProtocolFeeEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SetProtocolFeeEvent - setProtocolFeeEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SetProtocolFeeEvent_orderBy - orderDirection: OrderDirection - where: SetProtocolFeeEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SetProtocolFeeEvent!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type SetProtocolFeeEvent { - id: ID! - pool: Pool! - logIndex: BigInt! - new0: BigInt! - new1: BigInt! - old0: BigInt! - old1: BigInt! - timestamp: BigInt! -} - -input SetProtocolFeeEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - new0: BigInt - new0_not: BigInt - new0_gt: BigInt - new0_lt: BigInt - new0_gte: BigInt - new0_lte: BigInt - new0_in: [BigInt!] - new0_not_in: [BigInt!] - new1: BigInt - new1_not: BigInt - new1_gt: BigInt - new1_lt: BigInt - new1_gte: BigInt - new1_lte: BigInt - new1_in: [BigInt!] - new1_not_in: [BigInt!] - old0: BigInt - old0_not: BigInt - old0_gt: BigInt - old0_lt: BigInt - old0_gte: BigInt - old0_lte: BigInt - old0_in: [BigInt!] - old0_not_in: [BigInt!] - old1: BigInt - old1_not: BigInt - old1_gt: BigInt - old1_lt: BigInt - old1_gte: BigInt - old1_lte: BigInt - old1_in: [BigInt!] - old1_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [SetProtocolFeeEvent_filter] - or: [SetProtocolFeeEvent_filter] -} - -enum SetProtocolFeeEvent_orderBy { - id - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - logIndex - new0 - new1 - old0 - old1 - timestamp -} - -type Subscription { - factory( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Factory - factories( - skip: Int = 0 - first: Int = 100 - orderBy: Factory_orderBy - orderDirection: OrderDirection - where: Factory_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Factory!]! - bundle( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Bundle - bundles( - skip: Int = 0 - first: Int = 100 - orderBy: Bundle_orderBy - orderDirection: OrderDirection - where: Bundle_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Bundle!]! - token( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Token - tokens( - skip: Int = 0 - first: Int = 100 - orderBy: Token_orderBy - orderDirection: OrderDirection - where: Token_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Token!]! - pool( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Pool - pools( - skip: Int = 0 - first: Int = 100 - orderBy: Pool_orderBy - orderDirection: OrderDirection - where: Pool_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Pool!]! - tick( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Tick - ticks( - skip: Int = 0 - first: Int = 100 - orderBy: Tick_orderBy - orderDirection: OrderDirection - where: Tick_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Tick!]! - position( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Position - positions( - skip: Int = 0 - first: Int = 100 - orderBy: Position_orderBy - orderDirection: OrderDirection - where: Position_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Position!]! - positionSnapshot( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PositionSnapshot - positionSnapshots( - skip: Int = 0 - first: Int = 100 - orderBy: PositionSnapshot_orderBy - orderDirection: OrderDirection - where: PositionSnapshot_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PositionSnapshot!]! - transaction( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Transaction - transactions( - skip: Int = 0 - first: Int = 100 - orderBy: Transaction_orderBy - orderDirection: OrderDirection - where: Transaction_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Transaction!]! - mint( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Mint - mints( - skip: Int = 0 - first: Int = 100 - orderBy: Mint_orderBy - orderDirection: OrderDirection - where: Mint_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Mint!]! - burn( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Burn - burns( - skip: Int = 0 - first: Int = 100 - orderBy: Burn_orderBy - orderDirection: OrderDirection - where: Burn_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Burn!]! - swap( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Swap - swaps( - skip: Int = 0 - first: Int = 100 - orderBy: Swap_orderBy - orderDirection: OrderDirection - where: Swap_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Swap!]! - collect( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Collect - collects( - skip: Int = 0 - first: Int = 100 - orderBy: Collect_orderBy - orderDirection: OrderDirection - where: Collect_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Collect!]! - flash( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Flash - flashes( - skip: Int = 0 - first: Int = 100 - orderBy: Flash_orderBy - orderDirection: OrderDirection - where: Flash_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Flash!]! - uniswapDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): UniswapDayData - uniswapDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: UniswapDayData_orderBy - orderDirection: OrderDirection - where: UniswapDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [UniswapDayData!]! - poolDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PoolDayData - poolDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PoolDayData_orderBy - orderDirection: OrderDirection - where: PoolDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PoolDayData!]! - poolHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): PoolHourData - poolHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: PoolHourData_orderBy - orderDirection: OrderDirection - where: PoolHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [PoolHourData!]! - tickHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TickHourData - tickHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TickHourData_orderBy - orderDirection: OrderDirection - where: TickHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TickHourData!]! - tickDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TickDayData - tickDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TickDayData_orderBy - orderDirection: OrderDirection - where: TickDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TickDayData!]! - tokenDayData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenDayData - tokenDayDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TokenDayData_orderBy - orderDirection: OrderDirection - where: TokenDayData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenDayData!]! - tokenHourData( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenHourData - tokenHourDatas( - skip: Int = 0 - first: Int = 100 - orderBy: TokenHourData_orderBy - orderDirection: OrderDirection - where: TokenHourData_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenHourData!]! - increaseEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IncreaseEvent - increaseEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IncreaseEvent_orderBy - orderDirection: OrderDirection - where: IncreaseEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IncreaseEvent!]! - decreaseEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): DecreaseEvent - decreaseEvents( - skip: Int = 0 - first: Int = 100 - orderBy: DecreaseEvent_orderBy - orderDirection: OrderDirection - where: DecreaseEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [DecreaseEvent!]! - setProtocolFeeEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SetProtocolFeeEvent - setProtocolFeeEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SetProtocolFeeEvent_orderBy - orderDirection: OrderDirection - where: SetProtocolFeeEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SetProtocolFeeEvent!]! - - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Swap { - id: ID! - transaction: Transaction! - timestamp: BigInt! - pool: Pool! - token0: Token! - token1: Token! - sender: Bytes! - recipient: Bytes! - origin: Bytes! - amount0: BigDecimal! - amount1: BigDecimal! - amountUSD: BigDecimal! - sqrtPriceX96: BigInt! - tick: BigInt! - logIndex: BigInt -} - -input Swap_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transaction: String - transaction_not: String - transaction_gt: String - transaction_lt: String - transaction_gte: String - transaction_lte: String - transaction_in: [String!] - transaction_not_in: [String!] - transaction_contains: String - transaction_contains_nocase: String - transaction_not_contains: String - transaction_not_contains_nocase: String - transaction_starts_with: String - transaction_starts_with_nocase: String - transaction_not_starts_with: String - transaction_not_starts_with_nocase: String - transaction_ends_with: String - transaction_ends_with_nocase: String - transaction_not_ends_with: String - transaction_not_ends_with_nocase: String - transaction_: Transaction_filter - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - token0: String - token0_not: String - token0_gt: String - token0_lt: String - token0_gte: String - token0_lte: String - token0_in: [String!] - token0_not_in: [String!] - token0_contains: String - token0_contains_nocase: String - token0_not_contains: String - token0_not_contains_nocase: String - token0_starts_with: String - token0_starts_with_nocase: String - token0_not_starts_with: String - token0_not_starts_with_nocase: String - token0_ends_with: String - token0_ends_with_nocase: String - token0_not_ends_with: String - token0_not_ends_with_nocase: String - token0_: Token_filter - token1: String - token1_not: String - token1_gt: String - token1_lt: String - token1_gte: String - token1_lte: String - token1_in: [String!] - token1_not_in: [String!] - token1_contains: String - token1_contains_nocase: String - token1_not_contains: String - token1_not_contains_nocase: String - token1_starts_with: String - token1_starts_with_nocase: String - token1_not_starts_with: String - token1_not_starts_with_nocase: String - token1_ends_with: String - token1_ends_with_nocase: String - token1_not_ends_with: String - token1_not_ends_with_nocase: String - token1_: Token_filter - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - recipient: Bytes - recipient_not: Bytes - recipient_gt: Bytes - recipient_lt: Bytes - recipient_gte: Bytes - recipient_lte: Bytes - recipient_in: [Bytes!] - recipient_not_in: [Bytes!] - recipient_contains: Bytes - recipient_not_contains: Bytes - origin: Bytes - origin_not: Bytes - origin_gt: Bytes - origin_lt: Bytes - origin_gte: Bytes - origin_lte: Bytes - origin_in: [Bytes!] - origin_not_in: [Bytes!] - origin_contains: Bytes - origin_not_contains: Bytes - amount0: BigDecimal - amount0_not: BigDecimal - amount0_gt: BigDecimal - amount0_lt: BigDecimal - amount0_gte: BigDecimal - amount0_lte: BigDecimal - amount0_in: [BigDecimal!] - amount0_not_in: [BigDecimal!] - amount1: BigDecimal - amount1_not: BigDecimal - amount1_gt: BigDecimal - amount1_lt: BigDecimal - amount1_gte: BigDecimal - amount1_lte: BigDecimal - amount1_in: [BigDecimal!] - amount1_not_in: [BigDecimal!] - amountUSD: BigDecimal - amountUSD_not: BigDecimal - amountUSD_gt: BigDecimal - amountUSD_lt: BigDecimal - amountUSD_gte: BigDecimal - amountUSD_lte: BigDecimal - amountUSD_in: [BigDecimal!] - amountUSD_not_in: [BigDecimal!] - sqrtPriceX96: BigInt - sqrtPriceX96_not: BigInt - sqrtPriceX96_gt: BigInt - sqrtPriceX96_lt: BigInt - sqrtPriceX96_gte: BigInt - sqrtPriceX96_lte: BigInt - sqrtPriceX96_in: [BigInt!] - sqrtPriceX96_not_in: [BigInt!] - tick: BigInt - tick_not: BigInt - tick_gt: BigInt - tick_lt: BigInt - tick_gte: BigInt - tick_lte: BigInt - tick_in: [BigInt!] - tick_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Swap_filter] - or: [Swap_filter] -} - -enum Swap_orderBy { - id - transaction - transaction__id - transaction__blockNumber - transaction__timestamp - transaction__gasUsed - transaction__gasPrice - timestamp - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - token0 - token0__id - token0__symbol - token0__name - token0__decimals - token0__totalSupply - token0__volume - token0__volumeUSD - token0__untrackedVolumeUSD - token0__feesUSD - token0__txCount - token0__poolCount - token0__totalValueLocked - token0__totalValueLockedUSD - token0__totalValueLockedUSDUntracked - token0__derivedETH - token1 - token1__id - token1__symbol - token1__name - token1__decimals - token1__totalSupply - token1__volume - token1__volumeUSD - token1__untrackedVolumeUSD - token1__feesUSD - token1__txCount - token1__poolCount - token1__totalValueLocked - token1__totalValueLockedUSD - token1__totalValueLockedUSDUntracked - token1__derivedETH - sender - recipient - origin - amount0 - amount1 - amountUSD - sqrtPriceX96 - tick - logIndex -} - -type Tick { - id: ID! - poolAddress: String - tickIdx: BigInt! - pool: Pool! - liquidityGross: BigInt! - liquidityNet: BigInt! - price0: BigDecimal! - price1: BigDecimal! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - feesUSD: BigDecimal! - collectedFeesToken0: BigDecimal! - collectedFeesToken1: BigDecimal! - collectedFeesUSD: BigDecimal! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - liquidityProviderCount: BigInt! - feeGrowthOutside0X128: BigInt! - feeGrowthOutside1X128: BigInt! -} - -type TickDayData { - id: ID! - date: Int! - pool: Pool! - tick: Tick! - liquidityGross: BigInt! - liquidityNet: BigInt! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - feesUSD: BigDecimal! - feeGrowthOutside0X128: BigInt! - feeGrowthOutside1X128: BigInt! -} - -input TickDayData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - tick: String - tick_not: String - tick_gt: String - tick_lt: String - tick_gte: String - tick_lte: String - tick_in: [String!] - tick_not_in: [String!] - tick_contains: String - tick_contains_nocase: String - tick_not_contains: String - tick_not_contains_nocase: String - tick_starts_with: String - tick_starts_with_nocase: String - tick_not_starts_with: String - tick_not_starts_with_nocase: String - tick_ends_with: String - tick_ends_with_nocase: String - tick_not_ends_with: String - tick_not_ends_with_nocase: String - tick_: Tick_filter - liquidityGross: BigInt - liquidityGross_not: BigInt - liquidityGross_gt: BigInt - liquidityGross_lt: BigInt - liquidityGross_gte: BigInt - liquidityGross_lte: BigInt - liquidityGross_in: [BigInt!] - liquidityGross_not_in: [BigInt!] - liquidityNet: BigInt - liquidityNet_not: BigInt - liquidityNet_gt: BigInt - liquidityNet_lt: BigInt - liquidityNet_gte: BigInt - liquidityNet_lte: BigInt - liquidityNet_in: [BigInt!] - liquidityNet_not_in: [BigInt!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - feeGrowthOutside0X128: BigInt - feeGrowthOutside0X128_not: BigInt - feeGrowthOutside0X128_gt: BigInt - feeGrowthOutside0X128_lt: BigInt - feeGrowthOutside0X128_gte: BigInt - feeGrowthOutside0X128_lte: BigInt - feeGrowthOutside0X128_in: [BigInt!] - feeGrowthOutside0X128_not_in: [BigInt!] - feeGrowthOutside1X128: BigInt - feeGrowthOutside1X128_not: BigInt - feeGrowthOutside1X128_gt: BigInt - feeGrowthOutside1X128_lt: BigInt - feeGrowthOutside1X128_gte: BigInt - feeGrowthOutside1X128_lte: BigInt - feeGrowthOutside1X128_in: [BigInt!] - feeGrowthOutside1X128_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [TickDayData_filter] - or: [TickDayData_filter] -} - -enum TickDayData_orderBy { - id - date - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - tick - tick__id - tick__poolAddress - tick__tickIdx - tick__liquidityGross - tick__liquidityNet - tick__price0 - tick__price1 - tick__volumeToken0 - tick__volumeToken1 - tick__volumeUSD - tick__untrackedVolumeUSD - tick__feesUSD - tick__collectedFeesToken0 - tick__collectedFeesToken1 - tick__collectedFeesUSD - tick__createdAtTimestamp - tick__createdAtBlockNumber - tick__liquidityProviderCount - tick__feeGrowthOutside0X128 - tick__feeGrowthOutside1X128 - liquidityGross - liquidityNet - volumeToken0 - volumeToken1 - volumeUSD - feesUSD - feeGrowthOutside0X128 - feeGrowthOutside1X128 -} - -type TickHourData { - id: ID! - periodStartUnix: Int! - pool: Pool! - tick: Tick! - liquidityGross: BigInt! - liquidityNet: BigInt! - volumeToken0: BigDecimal! - volumeToken1: BigDecimal! - volumeUSD: BigDecimal! - feesUSD: BigDecimal! -} - -input TickHourData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - periodStartUnix: Int - periodStartUnix_not: Int - periodStartUnix_gt: Int - periodStartUnix_lt: Int - periodStartUnix_gte: Int - periodStartUnix_lte: Int - periodStartUnix_in: [Int!] - periodStartUnix_not_in: [Int!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - tick: String - tick_not: String - tick_gt: String - tick_lt: String - tick_gte: String - tick_lte: String - tick_in: [String!] - tick_not_in: [String!] - tick_contains: String - tick_contains_nocase: String - tick_not_contains: String - tick_not_contains_nocase: String - tick_starts_with: String - tick_starts_with_nocase: String - tick_not_starts_with: String - tick_not_starts_with_nocase: String - tick_ends_with: String - tick_ends_with_nocase: String - tick_not_ends_with: String - tick_not_ends_with_nocase: String - tick_: Tick_filter - liquidityGross: BigInt - liquidityGross_not: BigInt - liquidityGross_gt: BigInt - liquidityGross_lt: BigInt - liquidityGross_gte: BigInt - liquidityGross_lte: BigInt - liquidityGross_in: [BigInt!] - liquidityGross_not_in: [BigInt!] - liquidityNet: BigInt - liquidityNet_not: BigInt - liquidityNet_gt: BigInt - liquidityNet_lt: BigInt - liquidityNet_gte: BigInt - liquidityNet_lte: BigInt - liquidityNet_in: [BigInt!] - liquidityNet_not_in: [BigInt!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [TickHourData_filter] - or: [TickHourData_filter] -} - -enum TickHourData_orderBy { - id - periodStartUnix - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - tick - tick__id - tick__poolAddress - tick__tickIdx - tick__liquidityGross - tick__liquidityNet - tick__price0 - tick__price1 - tick__volumeToken0 - tick__volumeToken1 - tick__volumeUSD - tick__untrackedVolumeUSD - tick__feesUSD - tick__collectedFeesToken0 - tick__collectedFeesToken1 - tick__collectedFeesUSD - tick__createdAtTimestamp - tick__createdAtBlockNumber - tick__liquidityProviderCount - tick__feeGrowthOutside0X128 - tick__feeGrowthOutside1X128 - liquidityGross - liquidityNet - volumeToken0 - volumeToken1 - volumeUSD - feesUSD -} - -input Tick_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - poolAddress: String - poolAddress_not: String - poolAddress_gt: String - poolAddress_lt: String - poolAddress_gte: String - poolAddress_lte: String - poolAddress_in: [String!] - poolAddress_not_in: [String!] - poolAddress_contains: String - poolAddress_contains_nocase: String - poolAddress_not_contains: String - poolAddress_not_contains_nocase: String - poolAddress_starts_with: String - poolAddress_starts_with_nocase: String - poolAddress_not_starts_with: String - poolAddress_not_starts_with_nocase: String - poolAddress_ends_with: String - poolAddress_ends_with_nocase: String - poolAddress_not_ends_with: String - poolAddress_not_ends_with_nocase: String - tickIdx: BigInt - tickIdx_not: BigInt - tickIdx_gt: BigInt - tickIdx_lt: BigInt - tickIdx_gte: BigInt - tickIdx_lte: BigInt - tickIdx_in: [BigInt!] - tickIdx_not_in: [BigInt!] - pool: String - pool_not: String - pool_gt: String - pool_lt: String - pool_gte: String - pool_lte: String - pool_in: [String!] - pool_not_in: [String!] - pool_contains: String - pool_contains_nocase: String - pool_not_contains: String - pool_not_contains_nocase: String - pool_starts_with: String - pool_starts_with_nocase: String - pool_not_starts_with: String - pool_not_starts_with_nocase: String - pool_ends_with: String - pool_ends_with_nocase: String - pool_not_ends_with: String - pool_not_ends_with_nocase: String - pool_: Pool_filter - liquidityGross: BigInt - liquidityGross_not: BigInt - liquidityGross_gt: BigInt - liquidityGross_lt: BigInt - liquidityGross_gte: BigInt - liquidityGross_lte: BigInt - liquidityGross_in: [BigInt!] - liquidityGross_not_in: [BigInt!] - liquidityNet: BigInt - liquidityNet_not: BigInt - liquidityNet_gt: BigInt - liquidityNet_lt: BigInt - liquidityNet_gte: BigInt - liquidityNet_lte: BigInt - liquidityNet_in: [BigInt!] - liquidityNet_not_in: [BigInt!] - price0: BigDecimal - price0_not: BigDecimal - price0_gt: BigDecimal - price0_lt: BigDecimal - price0_gte: BigDecimal - price0_lte: BigDecimal - price0_in: [BigDecimal!] - price0_not_in: [BigDecimal!] - price1: BigDecimal - price1_not: BigDecimal - price1_gt: BigDecimal - price1_lt: BigDecimal - price1_gte: BigDecimal - price1_lte: BigDecimal - price1_in: [BigDecimal!] - price1_not_in: [BigDecimal!] - volumeToken0: BigDecimal - volumeToken0_not: BigDecimal - volumeToken0_gt: BigDecimal - volumeToken0_lt: BigDecimal - volumeToken0_gte: BigDecimal - volumeToken0_lte: BigDecimal - volumeToken0_in: [BigDecimal!] - volumeToken0_not_in: [BigDecimal!] - volumeToken1: BigDecimal - volumeToken1_not: BigDecimal - volumeToken1_gt: BigDecimal - volumeToken1_lt: BigDecimal - volumeToken1_gte: BigDecimal - volumeToken1_lte: BigDecimal - volumeToken1_in: [BigDecimal!] - volumeToken1_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - collectedFeesToken0: BigDecimal - collectedFeesToken0_not: BigDecimal - collectedFeesToken0_gt: BigDecimal - collectedFeesToken0_lt: BigDecimal - collectedFeesToken0_gte: BigDecimal - collectedFeesToken0_lte: BigDecimal - collectedFeesToken0_in: [BigDecimal!] - collectedFeesToken0_not_in: [BigDecimal!] - collectedFeesToken1: BigDecimal - collectedFeesToken1_not: BigDecimal - collectedFeesToken1_gt: BigDecimal - collectedFeesToken1_lt: BigDecimal - collectedFeesToken1_gte: BigDecimal - collectedFeesToken1_lte: BigDecimal - collectedFeesToken1_in: [BigDecimal!] - collectedFeesToken1_not_in: [BigDecimal!] - collectedFeesUSD: BigDecimal - collectedFeesUSD_not: BigDecimal - collectedFeesUSD_gt: BigDecimal - collectedFeesUSD_lt: BigDecimal - collectedFeesUSD_gte: BigDecimal - collectedFeesUSD_lte: BigDecimal - collectedFeesUSD_in: [BigDecimal!] - collectedFeesUSD_not_in: [BigDecimal!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - createdAtBlockNumber: BigInt - createdAtBlockNumber_not: BigInt - createdAtBlockNumber_gt: BigInt - createdAtBlockNumber_lt: BigInt - createdAtBlockNumber_gte: BigInt - createdAtBlockNumber_lte: BigInt - createdAtBlockNumber_in: [BigInt!] - createdAtBlockNumber_not_in: [BigInt!] - liquidityProviderCount: BigInt - liquidityProviderCount_not: BigInt - liquidityProviderCount_gt: BigInt - liquidityProviderCount_lt: BigInt - liquidityProviderCount_gte: BigInt - liquidityProviderCount_lte: BigInt - liquidityProviderCount_in: [BigInt!] - liquidityProviderCount_not_in: [BigInt!] - feeGrowthOutside0X128: BigInt - feeGrowthOutside0X128_not: BigInt - feeGrowthOutside0X128_gt: BigInt - feeGrowthOutside0X128_lt: BigInt - feeGrowthOutside0X128_gte: BigInt - feeGrowthOutside0X128_lte: BigInt - feeGrowthOutside0X128_in: [BigInt!] - feeGrowthOutside0X128_not_in: [BigInt!] - feeGrowthOutside1X128: BigInt - feeGrowthOutside1X128_not: BigInt - feeGrowthOutside1X128_gt: BigInt - feeGrowthOutside1X128_lt: BigInt - feeGrowthOutside1X128_gte: BigInt - feeGrowthOutside1X128_lte: BigInt - feeGrowthOutside1X128_in: [BigInt!] - feeGrowthOutside1X128_not_in: [BigInt!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Tick_filter] - or: [Tick_filter] -} - -enum Tick_orderBy { - id - poolAddress - tickIdx - pool - pool__id - pool__createdAtTimestamp - pool__createdAtBlockNumber - pool__feeTier - pool__liquidity - pool__sqrtPrice - pool__feeGrowthGlobal0X128 - pool__feeGrowthGlobal1X128 - pool__token0Price - pool__token1Price - pool__tick - pool__observationIndex - pool__volumeToken0 - pool__volumeToken1 - pool__volumeUSD - pool__untrackedVolumeUSD - pool__feesUSD - pool__txCount - pool__collectedFeesToken0 - pool__collectedFeesToken1 - pool__collectedFeesUSD - pool__totalValueLockedToken0 - pool__totalValueLockedToken1 - pool__totalValueLockedETH - pool__totalValueLockedUSD - pool__totalValueLockedUSDUntracked - pool__isProtocolFeeEnabled - pool__liquidityProviderCount - liquidityGross - liquidityNet - price0 - price1 - volumeToken0 - volumeToken1 - volumeUSD - untrackedVolumeUSD - feesUSD - collectedFeesToken0 - collectedFeesToken1 - collectedFeesUSD - createdAtTimestamp - createdAtBlockNumber - liquidityProviderCount - feeGrowthOutside0X128 - feeGrowthOutside1X128 -} - -"A string representation of microseconds UNIX timestamp (16 digits)\n" -scalar Timestamp - -type Token { - id: ID! - symbol: String! - name: String! - decimals: BigInt! - totalSupply: BigInt! - volume: BigDecimal! - volumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - feesUSD: BigDecimal! - txCount: BigInt! - poolCount: BigInt! - totalValueLocked: BigDecimal! - totalValueLockedUSD: BigDecimal! - totalValueLockedUSDUntracked: BigDecimal! - derivedETH: BigDecimal! - whitelistPools(skip: Int = 0, first: Int = 100, orderBy: Pool_orderBy, orderDirection: OrderDirection, where: Pool_filter): [Pool!]! - tokenDayData(skip: Int = 0, first: Int = 100, orderBy: TokenDayData_orderBy, orderDirection: OrderDirection, where: TokenDayData_filter): [TokenDayData!]! -} - -type TokenDayData { - id: ID! - date: Int! - token: Token! - volume: BigDecimal! - volumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - totalValueLocked: BigDecimal! - totalValueLockedUSD: BigDecimal! - priceUSD: BigDecimal! - feesUSD: BigDecimal! - open: BigDecimal! - high: BigDecimal! - low: BigDecimal! - close: BigDecimal! -} - -input TokenDayData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - token: String - token_not: String - token_gt: String - token_lt: String - token_gte: String - token_lte: String - token_in: [String!] - token_not_in: [String!] - token_contains: String - token_contains_nocase: String - token_not_contains: String - token_not_contains_nocase: String - token_starts_with: String - token_starts_with_nocase: String - token_not_starts_with: String - token_not_starts_with_nocase: String - token_ends_with: String - token_ends_with_nocase: String - token_not_ends_with: String - token_not_ends_with_nocase: String - token_: Token_filter - volume: BigDecimal - volume_not: BigDecimal - volume_gt: BigDecimal - volume_lt: BigDecimal - volume_gte: BigDecimal - volume_lte: BigDecimal - volume_in: [BigDecimal!] - volume_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - totalValueLocked: BigDecimal - totalValueLocked_not: BigDecimal - totalValueLocked_gt: BigDecimal - totalValueLocked_lt: BigDecimal - totalValueLocked_gte: BigDecimal - totalValueLocked_lte: BigDecimal - totalValueLocked_in: [BigDecimal!] - totalValueLocked_not_in: [BigDecimal!] - totalValueLockedUSD: BigDecimal - totalValueLockedUSD_not: BigDecimal - totalValueLockedUSD_gt: BigDecimal - totalValueLockedUSD_lt: BigDecimal - totalValueLockedUSD_gte: BigDecimal - totalValueLockedUSD_lte: BigDecimal - totalValueLockedUSD_in: [BigDecimal!] - totalValueLockedUSD_not_in: [BigDecimal!] - priceUSD: BigDecimal - priceUSD_not: BigDecimal - priceUSD_gt: BigDecimal - priceUSD_lt: BigDecimal - priceUSD_gte: BigDecimal - priceUSD_lte: BigDecimal - priceUSD_in: [BigDecimal!] - priceUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - open: BigDecimal - open_not: BigDecimal - open_gt: BigDecimal - open_lt: BigDecimal - open_gte: BigDecimal - open_lte: BigDecimal - open_in: [BigDecimal!] - open_not_in: [BigDecimal!] - high: BigDecimal - high_not: BigDecimal - high_gt: BigDecimal - high_lt: BigDecimal - high_gte: BigDecimal - high_lte: BigDecimal - high_in: [BigDecimal!] - high_not_in: [BigDecimal!] - low: BigDecimal - low_not: BigDecimal - low_gt: BigDecimal - low_lt: BigDecimal - low_gte: BigDecimal - low_lte: BigDecimal - low_in: [BigDecimal!] - low_not_in: [BigDecimal!] - close: BigDecimal - close_not: BigDecimal - close_gt: BigDecimal - close_lt: BigDecimal - close_gte: BigDecimal - close_lte: BigDecimal - close_in: [BigDecimal!] - close_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [TokenDayData_filter] - or: [TokenDayData_filter] -} - -enum TokenDayData_orderBy { - id - date - token - token__id - token__symbol - token__name - token__decimals - token__totalSupply - token__volume - token__volumeUSD - token__untrackedVolumeUSD - token__feesUSD - token__txCount - token__poolCount - token__totalValueLocked - token__totalValueLockedUSD - token__totalValueLockedUSDUntracked - token__derivedETH - volume - volumeUSD - untrackedVolumeUSD - totalValueLocked - totalValueLockedUSD - priceUSD - feesUSD - open - high - low - close -} - -type TokenHourData { - id: ID! - periodStartUnix: Int! - token: Token! - volume: BigDecimal! - volumeUSD: BigDecimal! - untrackedVolumeUSD: BigDecimal! - totalValueLocked: BigDecimal! - totalValueLockedUSD: BigDecimal! - priceUSD: BigDecimal! - feesUSD: BigDecimal! - open: BigDecimal! - high: BigDecimal! - low: BigDecimal! - close: BigDecimal! -} - -input TokenHourData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - periodStartUnix: Int - periodStartUnix_not: Int - periodStartUnix_gt: Int - periodStartUnix_lt: Int - periodStartUnix_gte: Int - periodStartUnix_lte: Int - periodStartUnix_in: [Int!] - periodStartUnix_not_in: [Int!] - token: String - token_not: String - token_gt: String - token_lt: String - token_gte: String - token_lte: String - token_in: [String!] - token_not_in: [String!] - token_contains: String - token_contains_nocase: String - token_not_contains: String - token_not_contains_nocase: String - token_starts_with: String - token_starts_with_nocase: String - token_not_starts_with: String - token_not_starts_with_nocase: String - token_ends_with: String - token_ends_with_nocase: String - token_not_ends_with: String - token_not_ends_with_nocase: String - token_: Token_filter - volume: BigDecimal - volume_not: BigDecimal - volume_gt: BigDecimal - volume_lt: BigDecimal - volume_gte: BigDecimal - volume_lte: BigDecimal - volume_in: [BigDecimal!] - volume_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - totalValueLocked: BigDecimal - totalValueLocked_not: BigDecimal - totalValueLocked_gt: BigDecimal - totalValueLocked_lt: BigDecimal - totalValueLocked_gte: BigDecimal - totalValueLocked_lte: BigDecimal - totalValueLocked_in: [BigDecimal!] - totalValueLocked_not_in: [BigDecimal!] - totalValueLockedUSD: BigDecimal - totalValueLockedUSD_not: BigDecimal - totalValueLockedUSD_gt: BigDecimal - totalValueLockedUSD_lt: BigDecimal - totalValueLockedUSD_gte: BigDecimal - totalValueLockedUSD_lte: BigDecimal - totalValueLockedUSD_in: [BigDecimal!] - totalValueLockedUSD_not_in: [BigDecimal!] - priceUSD: BigDecimal - priceUSD_not: BigDecimal - priceUSD_gt: BigDecimal - priceUSD_lt: BigDecimal - priceUSD_gte: BigDecimal - priceUSD_lte: BigDecimal - priceUSD_in: [BigDecimal!] - priceUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - open: BigDecimal - open_not: BigDecimal - open_gt: BigDecimal - open_lt: BigDecimal - open_gte: BigDecimal - open_lte: BigDecimal - open_in: [BigDecimal!] - open_not_in: [BigDecimal!] - high: BigDecimal - high_not: BigDecimal - high_gt: BigDecimal - high_lt: BigDecimal - high_gte: BigDecimal - high_lte: BigDecimal - high_in: [BigDecimal!] - high_not_in: [BigDecimal!] - low: BigDecimal - low_not: BigDecimal - low_gt: BigDecimal - low_lt: BigDecimal - low_gte: BigDecimal - low_lte: BigDecimal - low_in: [BigDecimal!] - low_not_in: [BigDecimal!] - close: BigDecimal - close_not: BigDecimal - close_gt: BigDecimal - close_lt: BigDecimal - close_gte: BigDecimal - close_lte: BigDecimal - close_in: [BigDecimal!] - close_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [TokenHourData_filter] - or: [TokenHourData_filter] -} - -enum TokenHourData_orderBy { - id - periodStartUnix - token - token__id - token__symbol - token__name - token__decimals - token__totalSupply - token__volume - token__volumeUSD - token__untrackedVolumeUSD - token__feesUSD - token__txCount - token__poolCount - token__totalValueLocked - token__totalValueLockedUSD - token__totalValueLockedUSDUntracked - token__derivedETH - volume - volumeUSD - untrackedVolumeUSD - totalValueLocked - totalValueLockedUSD - priceUSD - feesUSD - open - high - low - close -} - -input Token_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - symbol: String - symbol_not: String - symbol_gt: String - symbol_lt: String - symbol_gte: String - symbol_lte: String - symbol_in: [String!] - symbol_not_in: [String!] - symbol_contains: String - symbol_contains_nocase: String - symbol_not_contains: String - symbol_not_contains_nocase: String - symbol_starts_with: String - symbol_starts_with_nocase: String - symbol_not_starts_with: String - symbol_not_starts_with_nocase: String - symbol_ends_with: String - symbol_ends_with_nocase: String - symbol_not_ends_with: String - symbol_not_ends_with_nocase: String - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - decimals: BigInt - decimals_not: BigInt - decimals_gt: BigInt - decimals_lt: BigInt - decimals_gte: BigInt - decimals_lte: BigInt - decimals_in: [BigInt!] - decimals_not_in: [BigInt!] - totalSupply: BigInt - totalSupply_not: BigInt - totalSupply_gt: BigInt - totalSupply_lt: BigInt - totalSupply_gte: BigInt - totalSupply_lte: BigInt - totalSupply_in: [BigInt!] - totalSupply_not_in: [BigInt!] - volume: BigDecimal - volume_not: BigDecimal - volume_gt: BigDecimal - volume_lt: BigDecimal - volume_gte: BigDecimal - volume_lte: BigDecimal - volume_in: [BigDecimal!] - volume_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - untrackedVolumeUSD: BigDecimal - untrackedVolumeUSD_not: BigDecimal - untrackedVolumeUSD_gt: BigDecimal - untrackedVolumeUSD_lt: BigDecimal - untrackedVolumeUSD_gte: BigDecimal - untrackedVolumeUSD_lte: BigDecimal - untrackedVolumeUSD_in: [BigDecimal!] - untrackedVolumeUSD_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - poolCount: BigInt - poolCount_not: BigInt - poolCount_gt: BigInt - poolCount_lt: BigInt - poolCount_gte: BigInt - poolCount_lte: BigInt - poolCount_in: [BigInt!] - poolCount_not_in: [BigInt!] - totalValueLocked: BigDecimal - totalValueLocked_not: BigDecimal - totalValueLocked_gt: BigDecimal - totalValueLocked_lt: BigDecimal - totalValueLocked_gte: BigDecimal - totalValueLocked_lte: BigDecimal - totalValueLocked_in: [BigDecimal!] - totalValueLocked_not_in: [BigDecimal!] - totalValueLockedUSD: BigDecimal - totalValueLockedUSD_not: BigDecimal - totalValueLockedUSD_gt: BigDecimal - totalValueLockedUSD_lt: BigDecimal - totalValueLockedUSD_gte: BigDecimal - totalValueLockedUSD_lte: BigDecimal - totalValueLockedUSD_in: [BigDecimal!] - totalValueLockedUSD_not_in: [BigDecimal!] - totalValueLockedUSDUntracked: BigDecimal - totalValueLockedUSDUntracked_not: BigDecimal - totalValueLockedUSDUntracked_gt: BigDecimal - totalValueLockedUSDUntracked_lt: BigDecimal - totalValueLockedUSDUntracked_gte: BigDecimal - totalValueLockedUSDUntracked_lte: BigDecimal - totalValueLockedUSDUntracked_in: [BigDecimal!] - totalValueLockedUSDUntracked_not_in: [BigDecimal!] - derivedETH: BigDecimal - derivedETH_not: BigDecimal - derivedETH_gt: BigDecimal - derivedETH_lt: BigDecimal - derivedETH_gte: BigDecimal - derivedETH_lte: BigDecimal - derivedETH_in: [BigDecimal!] - derivedETH_not_in: [BigDecimal!] - whitelistPools: [String!] - whitelistPools_not: [String!] - whitelistPools_contains: [String!] - whitelistPools_contains_nocase: [String!] - whitelistPools_not_contains: [String!] - whitelistPools_not_contains_nocase: [String!] - whitelistPools_: Pool_filter - tokenDayData_: TokenDayData_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Token_filter] - or: [Token_filter] -} - -enum Token_orderBy { - id - symbol - name - decimals - totalSupply - volume - volumeUSD - untrackedVolumeUSD - feesUSD - txCount - poolCount - totalValueLocked - totalValueLockedUSD - totalValueLockedUSDUntracked - derivedETH - whitelistPools - tokenDayData -} - -type Transaction { - id: ID! - blockNumber: BigInt! - timestamp: BigInt! - gasUsed: BigInt! - gasPrice: BigInt! - mints(skip: Int = 0, first: Int = 100, orderBy: Mint_orderBy, orderDirection: OrderDirection, where: Mint_filter): [Mint!]! - burns(skip: Int = 0, first: Int = 100, orderBy: Burn_orderBy, orderDirection: OrderDirection, where: Burn_filter): [Burn!]! - swaps(skip: Int = 0, first: Int = 100, orderBy: Swap_orderBy, orderDirection: OrderDirection, where: Swap_filter): [Swap!]! - flashed(skip: Int = 0, first: Int = 100, orderBy: Flash_orderBy, orderDirection: OrderDirection, where: Flash_filter): [Flash!]! - collects(skip: Int = 0, first: Int = 100, orderBy: Collect_orderBy, orderDirection: OrderDirection, where: Collect_filter): [Collect!]! -} - -input Transaction_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - mints_: Mint_filter - burns_: Burn_filter - swaps_: Swap_filter - flashed_: Flash_filter - collects_: Collect_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Transaction_filter] - or: [Transaction_filter] -} - -enum Transaction_orderBy { - id - blockNumber - timestamp - gasUsed - gasPrice - mints - burns - swaps - flashed - collects -} - -type UniswapDayData { - id: ID! - date: Int! - volumeETH: BigDecimal! - volumeUSD: BigDecimal! - volumeUSDUntracked: BigDecimal! - feesUSD: BigDecimal! - txCount: BigInt! - tvlUSD: BigDecimal! -} - -input UniswapDayData_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - date: Int - date_not: Int - date_gt: Int - date_lt: Int - date_gte: Int - date_lte: Int - date_in: [Int!] - date_not_in: [Int!] - volumeETH: BigDecimal - volumeETH_not: BigDecimal - volumeETH_gt: BigDecimal - volumeETH_lt: BigDecimal - volumeETH_gte: BigDecimal - volumeETH_lte: BigDecimal - volumeETH_in: [BigDecimal!] - volumeETH_not_in: [BigDecimal!] - volumeUSD: BigDecimal - volumeUSD_not: BigDecimal - volumeUSD_gt: BigDecimal - volumeUSD_lt: BigDecimal - volumeUSD_gte: BigDecimal - volumeUSD_lte: BigDecimal - volumeUSD_in: [BigDecimal!] - volumeUSD_not_in: [BigDecimal!] - volumeUSDUntracked: BigDecimal - volumeUSDUntracked_not: BigDecimal - volumeUSDUntracked_gt: BigDecimal - volumeUSDUntracked_lt: BigDecimal - volumeUSDUntracked_gte: BigDecimal - volumeUSDUntracked_lte: BigDecimal - volumeUSDUntracked_in: [BigDecimal!] - volumeUSDUntracked_not_in: [BigDecimal!] - feesUSD: BigDecimal - feesUSD_not: BigDecimal - feesUSD_gt: BigDecimal - feesUSD_lt: BigDecimal - feesUSD_gte: BigDecimal - feesUSD_lte: BigDecimal - feesUSD_in: [BigDecimal!] - feesUSD_not_in: [BigDecimal!] - txCount: BigInt - txCount_not: BigInt - txCount_gt: BigInt - txCount_lt: BigInt - txCount_gte: BigInt - txCount_lte: BigInt - txCount_in: [BigInt!] - txCount_not_in: [BigInt!] - tvlUSD: BigDecimal - tvlUSD_not: BigDecimal - tvlUSD_gt: BigDecimal - tvlUSD_lt: BigDecimal - tvlUSD_gte: BigDecimal - tvlUSD_lte: BigDecimal - tvlUSD_in: [BigDecimal!] - tvlUSD_not_in: [BigDecimal!] - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [UniswapDayData_filter] - or: [UniswapDayData_filter] -} - -enum UniswapDayData_orderBy { - id - date - volumeETH - volumeUSD - volumeUSDUntracked - feesUSD - txCount - tvlUSD -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - - """The block number""" - number: Int! - - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes -} - -"""The type for the top-level _meta field""" -type _Meta_ { - "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n" - block: _Block_! - - """The deployment ID""" - deployment: String! - - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/sushi-v3/transforms/bucket-v3-to-std.ts b/packages/graph-client/src/subgraphs/sushi-v3/transforms/bucket-v3-to-std.ts deleted file mode 100644 index a49e14b8ec..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/transforms/bucket-v3-to-std.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { ResultOf } from 'gql.tada' -import type { SushiV3PoolBucketsQuery } from 'src/subgraphs/sushi-v3/queries/pool-with-buckets' -import type { PoolBucket } from 'sushi/types' - -type FetchedBucket = NonNullable< - ResultOf['pool'] ->['poolHourData'][number] - -export function transformBucketsV3ToStd( - buckets: FetchedBucket[], -): PoolBucket[] { - return buckets.map(transformBucketV3ToStd) -} - -export function transformBucketV3ToStd(bucket: FetchedBucket): PoolBucket { - return { - id: bucket.id, - date: Number(bucket.date), - liquidityUSD: Number(bucket.liquidityUSD), - volumeUSD: Number(bucket.volumeUSD), - feesUSD: Number(bucket.feesUSD), - txCount: Number(bucket.txCount), - } -} diff --git a/packages/graph-client/src/subgraphs/sushi-v3/transforms/pool-v3-to-base.ts b/packages/graph-client/src/subgraphs/sushi-v3/transforms/pool-v3-to-base.ts deleted file mode 100644 index d59971cf54..0000000000 --- a/packages/graph-client/src/subgraphs/sushi-v3/transforms/pool-v3-to-base.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type { ResultOf } from 'gql.tada' -import type { PoolFieldsFragment } from 'src/subgraphs/sushi-v3/fragments/pool-fields' -import type { SushiSwapV3ChainId } from 'sushi/config' -import { - getIdFromChainIdAddress, - withoutScientificNotation, -} from 'sushi/format' -import { - type Address, - type PoolBase, - type PoolV3, - SushiSwapProtocol, -} from 'sushi/types' - -type ToPick = - | 'id' - | 'token0' - | 'token1' - | 'reserve0' - | 'reserve1' - | 'liquidityUSD' - | 'volumeUSD' - | 'txCount' - | 'swapFee' - | 'liquidity' - | 'feeGrowthGlobal0X128' - | 'feeGrowthGlobal1X128' - | 'observationIndex' - | 'sqrtPrice' - | 'tick' - | 'token0Price' - | 'token1Price' - -type RequiredBase = Pick, ToPick> - -export function transformPoolV3ToBase( - pool: T, - chainId: SushiSwapV3ChainId, -): PoolV3 { - const swapFee = Number(pool.swapFee) / 1000000 - - return { - id: getIdFromChainIdAddress(chainId, pool.id as Address), - address: pool.id as Address, - chainId, - name: `${pool.token0.symbol}-${pool.token1.symbol}`, - - swapFee: swapFee, - // twapEnabled: pool.twapEnabled, - - feeGrowthGlobal0X128: BigInt(pool.feeGrowthGlobal0X128), - feeGrowthGlobal1X128: BigInt(pool.feeGrowthGlobal1X128), - observationIndex: BigInt(pool.observationIndex), - sqrtPrice: BigInt(pool.sqrtPrice), - tick: BigInt(pool.tick ?? 0), - - protocol: SushiSwapProtocol.SUSHISWAP_V3, - - reserve0: BigInt( - withoutScientificNotation( - (Number(pool.reserve0) * 10 ** Number(pool.token0.decimals)).toFixed(), - )!, - ), - reserve1: BigInt( - withoutScientificNotation( - (Number(pool.reserve1) * 10 ** Number(pool.token1.decimals)).toFixed(), - )!, - ), - liquidity: BigInt(pool.liquidity), - liquidityUSD: Number(pool.liquidityUSD), - - volumeUSD: Number(pool.volumeUSD), - feesUSD: Number(pool.volumeUSD) * swapFee, - - token0: { - id: getIdFromChainIdAddress(chainId, pool.token0.id as Address), - address: pool.token0.id as Address, - chainId, - decimals: Number(pool.token0.decimals), - name: pool.token0.name, - symbol: pool.token0.symbol, - }, - token1: { - id: getIdFromChainIdAddress(chainId, pool.token1.id as Address), - address: pool.token1.id as Address, - chainId, - decimals: Number(pool.token1.decimals), - name: pool.token1.name, - symbol: pool.token1.symbol, - }, - - token0Price: Number(pool.token0Price), - token1Price: Number(pool.token1Price), - - txCount: Number(pool.txCount), - } -} diff --git a/packages/graph-client/tsconfig.json b/packages/graph-client/tsconfig.json index 92d3b82567..08f8548baa 100644 --- a/packages/graph-client/tsconfig.json +++ b/packages/graph-client/tsconfig.json @@ -17,12 +17,6 @@ { "name": "@0no-co/graphqlsp", "schemas": [ - { - "name": "blocks", - "schema": "./src/subgraphs/blocks/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/blocks/blocks-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/blocks/blocks-cache.d.ts" - }, { "name": "bonds", "schema": "./src/subgraphs/bonds/schema.graphql", @@ -48,47 +42,11 @@ "tadaTurboLocation": "./src/subgraphs/furo/furo-cache.d.ts" }, { - "name": "master-chef-v1", - "schema": "./src/subgraphs/master-chef-v1/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/master-chef-v1/master-chef-v1-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/master-chef-v1/master-chef-v1-cache.d.ts" - }, - { - "name": "master-chef-v2", - "schema": "./src/subgraphs/master-chef-v2/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/master-chef-v2/master-chef-v2-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/master-chef-v2/master-chef-v2-cache.d.ts" - }, - { - "name": "mini-chef", - "schema": "./src/subgraphs/mini-chef/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/mini-chef/mini-chef-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/mini-chef/mini-chef-cache.d.ts" - }, - { - "name": "steer", - "schema": "./src/subgraphs/steer/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/steer/steer-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/steer/steer-cache.d.ts" - }, - { - "name": "sushi-bar", - "schema": "./src/subgraphs/sushi-bar/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/sushi-bar/sushi-bar-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/sushi-bar/sushi-bar-cache.d.ts" - }, - { - "name": "sushi-v2", - "schema": "./src/subgraphs/sushi-v2/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/sushi-v2/sushi-v2-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/sushi-v2/sushi-v2-cache.d.ts" - }, - { - "name": "sushi-v3", - "schema": "./src/subgraphs/sushi-v3/schema.graphql", - "tadaOutputLocation": "./src/subgraphs/sushi-v3/sushi-v3-env.d.ts", - "tadaTurboLocation": "./src/subgraphs/sushi-v3/sushi-v3-cache.d.ts" - }, + "name": "data-api", + "schema": "./src/subgraphs/data-api/schema.graphql", + "tadaOutputLocation": "./src/subgraphs/data-api/data-api-env.d.ts", + "tadaTurboLocation": "./src/subgraphs/data-api/data-api-cache.d.ts" + } ] } ] diff --git a/packages/react-query/package.json b/packages/react-query/package.json index c5daee12a9..6f94b6c1ce 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -56,6 +56,7 @@ "@sentry/nextjs": "7.110.0", "@sushiswap/client": "workspace:*", "@sushiswap/database": "workspace:*", + "@sushiswap/graph-client": "workspace:*", "@sushiswap/jest-config": "workspace:*", "@tsconfig/node20": "20.1.4", "@tsconfig/strictest": "2.0.2", diff --git a/packages/react-query/src/hooks/pools/useConcentratedLiquidityPoolStats.ts b/packages/react-query/src/hooks/pools/useConcentratedLiquidityPoolStats.ts index e5dde6d5b4..7d4409857f 100644 --- a/packages/react-query/src/hooks/pools/useConcentratedLiquidityPoolStats.ts +++ b/packages/react-query/src/hooks/pools/useConcentratedLiquidityPoolStats.ts @@ -1,6 +1,5 @@ import '@sushiswap/database' - -import { getPool } from '@sushiswap/client' +import { getV3Pool } from '@sushiswap/graph-client/data-api' import { useQuery } from '@tanstack/react-query' import { ChainId } from 'sushi/chain' import { Amount, Token } from 'sushi/currency' @@ -22,7 +21,7 @@ export const useConcentratedLiquidityPoolStats = ({ queryFn: async () => { if (!chainId || !address) return undefined - const data = await getPool({ chainId, address }) + const data = await getV3Pool({ chainId: Number(chainId), address }) if (data) { return { ...data, diff --git a/packages/steer-sdk/src/types/steer-vault.ts b/packages/steer-sdk/src/types/steer-vault.ts index df8e499930..4f665e3c51 100644 --- a/packages/steer-sdk/src/types/steer-vault.ts +++ b/packages/steer-sdk/src/types/steer-vault.ts @@ -1,4 +1,3 @@ -import type { SteerStrategy } from '@sushiswap/database' import type { Token } from 'sushi/types' import type { SteerVaultId } from './steer-vault-id' @@ -34,7 +33,8 @@ export type SteerVault = T & { token0: Token token1: Token - strategy: SteerStrategy + strategy: string + description: string payloadHash: string isEnabled: boolean diff --git a/packages/sushi/src/chain/constants.ts b/packages/sushi/src/chain/constants.ts index d50215545d..3bcbe99f25 100644 --- a/packages/sushi/src/chain/constants.ts +++ b/packages/sushi/src/chain/constants.ts @@ -136,3 +136,10 @@ export const ChainKey = { [ChainId.ROOTSTOCK]: 'rootstock', } as const export type ChainKey = (typeof ChainKey)[keyof typeof ChainKey] + +export const NetworkNameKey = Object.fromEntries( + Object.entries(ChainKey).map(([key, value]) => [value, Number(key)]), +) as { [key in ChainKey]: ChainId } + +export const isNetworkNameKey = (key: string): key is ChainKey => + Object.keys(NetworkNameKey).includes(key) diff --git a/packages/sushi/src/chain/index.ts b/packages/sushi/src/chain/index.ts index f274cd12d2..360eccf8ff 100644 --- a/packages/sushi/src/chain/index.ts +++ b/packages/sushi/src/chain/index.ts @@ -1,4 +1,10 @@ -import { ChainId } from './constants.js' +import { + ChainId, + ChainKey, + NetworkNameKey, + isChainId, + isNetworkNameKey, +} from './constants.js' import raw from './generated.js' const additional = [] as const @@ -239,6 +245,27 @@ export const chainName = Object.fromEntries( RAW.map((data): [number, string] => [data.chainId, Chain.fromRaw(data).name]), ) +export const getChainInfo = ( + input: string, +): + | { chainId: ChainId; networkName: ChainKey } + | { chainId: undefined; networkName: undefined } => { + const _networkName = input.toLowerCase() + const _chainId = parseInt(input) + + if (isChainId(_chainId)) { + const networkName = ChainKey[_chainId] + return { chainId: _chainId, networkName } + } + + if (isNetworkNameKey(_networkName)) { + const chainId = NetworkNameKey[_networkName] + return { chainId, networkName: _networkName } + } + + return { chainId: undefined, networkName: undefined } +} + export * from './constants.js' export default chains diff --git a/packages/sushi/src/config/subgraph/hosts.ts b/packages/sushi/src/config/subgraph/hosts.ts index a308bc5dee..cbf6962b2b 100644 --- a/packages/sushi/src/config/subgraph/hosts.ts +++ b/packages/sushi/src/config/subgraph/hosts.ts @@ -33,3 +33,8 @@ const DECENTRALIZED_NETWORK_KEY = SUSHI_DOMAIN_RESTRICTED_API_KEY export const DECENTRALIZED_HOST_BY_SUBGRAPH_ID = `gateway-arbitrum.network.thegraph.com/api/${DECENTRALIZED_NETWORK_KEY}/subgraphs/id` export const DECENTRALIZED_HOST_BY_DEPLOYMENT_ID = `gateway-arbitrum.network.thegraph.com/api/${DECENTRALIZED_NETWORK_KEY}/deployments/id` + +export const SUSHI_DATA_API_HOST = + process.env['SUSHI_DATA_API_HOST'] || + process.env['NEXT_PUBLIC_SUSHI_DATA_API_HOST'] || + 'data.sushi.com/graphql' diff --git a/packages/sushi/src/config/subgraph/subgraphs/data-api.ts b/packages/sushi/src/config/subgraph/subgraphs/data-api.ts new file mode 100644 index 0000000000..0973390905 --- /dev/null +++ b/packages/sushi/src/config/subgraph/subgraphs/data-api.ts @@ -0,0 +1,3 @@ +import { SUSHI_DATA_API_HOST } from '../hosts.js' + +export const SUSHI_DATA_API_URL = `${SUSHI_DATA_API_HOST}/graphql` diff --git a/packages/sushi/src/config/subgraph/subgraphs/index.ts b/packages/sushi/src/config/subgraph/subgraphs/index.ts index 2e7eb25374..5e8564f3ec 100644 --- a/packages/sushi/src/config/subgraph/subgraphs/index.ts +++ b/packages/sushi/src/config/subgraph/subgraphs/index.ts @@ -7,3 +7,4 @@ export * from './mini-chef.js' export * from './sushi-bar.js' export * from './sushiswap-v2.js' export * from './sushiswap-v3.js' +export * from './data-api.js' diff --git a/packages/sushi/src/format/hash.ts b/packages/sushi/src/format/hash.ts new file mode 100644 index 0000000000..42e7e75ea1 --- /dev/null +++ b/packages/sushi/src/format/hash.ts @@ -0,0 +1,10 @@ +// shorten the checksummed version of the input hash to have 0x + 4 characters at start and end +export function shortenHash(hash: string, characters = 4): string { + try { + return `${hash.substring(0, characters + 2)}...${hash.substring( + hash.length - characters, + )}` + } catch { + throw `Invalid 'hash' parameter '${hash}'.` + } +} diff --git a/packages/sushi/src/format/index.ts b/packages/sushi/src/format/index.ts index 711d0d218b..f2a8879d2d 100644 --- a/packages/sushi/src/format/index.ts +++ b/packages/sushi/src/format/index.ts @@ -1,4 +1,5 @@ export * from './address.js' +export * from './hash.js' export * from './id.js' export * from './number.js' export * from './percent.js' diff --git a/packages/sushi/src/types/sushi-pool/pool-v3.ts b/packages/sushi/src/types/sushi-pool/pool-v3.ts index 7386c71c6b..cc7374f2ab 100644 --- a/packages/sushi/src/types/sushi-pool/pool-v3.ts +++ b/packages/sushi/src/types/sushi-pool/pool-v3.ts @@ -3,6 +3,7 @@ import type { PoolId } from './pool-id.js' import { SushiSwapProtocol, type SushiSwapV3Protocol } from './protocol.js' type Extension = { + isProtocolFeeEnabled?: boolean sqrtPrice: bigint tick: bigint observationIndex: bigint diff --git a/packages/sushi/src/types/sushi-pool/pool-with-aprs.ts b/packages/sushi/src/types/sushi-pool/pool-with-aprs.ts index cc65841e5b..1d024c5a5a 100644 --- a/packages/sushi/src/types/sushi-pool/pool-with-aprs.ts +++ b/packages/sushi/src/types/sushi-pool/pool-with-aprs.ts @@ -10,15 +10,15 @@ export type PoolWithIncentiveApr = T & { } export type PoolWithFeeAprs = T & { - feeApr1h: number + // feeApr1h: number feeApr1d: number - feeApr1w: number - feeApr1m: number + // feeApr1w: number + // feeApr1m: number } export type PoolWithTotalAprs = T & { - totalApr1h: number + // totalApr1h: number totalApr1d: number - totalApr1w: number - totalApr1m: number + // totalApr1w: number + // totalApr1m: number } diff --git a/packages/ui/src/components/data-table/data-table.tsx b/packages/ui/src/components/data-table/data-table.tsx index f935f37758..2d350f64c3 100644 --- a/packages/ui/src/components/data-table/data-table.tsx +++ b/packages/ui/src/components/data-table/data-table.tsx @@ -58,6 +58,7 @@ interface DataTableProps { onSortingChange?: OnChangeFn onPaginationChange?: OnChangeFn rowRenderer?: (row: Row, value: ReactNode) => ReactNode + showColumnHeaders?: boolean } export function DataTable({ @@ -73,6 +74,7 @@ export function DataTable({ onSortingChange, onPaginationChange, rowRenderer, + showColumnHeaders = true, }: DataTableProps) { const [rowSelection, setRowSelection] = React.useState({}) const [columnVisibility, setColumnVisibility] = @@ -113,33 +115,36 @@ export function DataTable({
{toolbar ? toolbar(table) : null} - - {table.getHeaderGroups().map((headerGroup) => ( - - {headerGroup.headers.map((header) => { - return ( - - {header.isPlaceholder ? null : ( - - )} - - ) - })} - - ))} - + {showColumnHeaders ? ( + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => { + return ( + + {header.isPlaceholder ? null : ( + + )} + + ) + })} + + ))} + + ) : null} + {loading ? ( Array.from({ length: 3 }) diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx index eb19167561..d9cad0e7a5 100644 --- a/packages/ui/src/components/dialog.tsx +++ b/packages/ui/src/components/dialog.tsx @@ -126,12 +126,14 @@ const DialogContent = React.forwardRef< {...props} > {children} - - - + {_hideClose ? null : ( + + + + )} ), diff --git a/packages/ui/src/components/index.ts b/packages/ui/src/components/index.ts index 6fa930234b..eaed0e2200 100644 --- a/packages/ui/src/components/index.ts +++ b/packages/ui/src/components/index.ts @@ -59,3 +59,4 @@ export * from './toggle' export * from './tooltip' export * from './typography' export * from './widget' +export * from './sheet' diff --git a/packages/ui/src/components/navigation.tsx b/packages/ui/src/components/navigation.tsx index de73718645..5ad1188c98 100644 --- a/packages/ui/src/components/navigation.tsx +++ b/packages/ui/src/components/navigation.tsx @@ -14,6 +14,50 @@ import { NavigationMenuTrigger, } from './navigation-menu' +const COMPANY_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ + { + title: 'Blog', + href: '/blog', + description: + 'Stay up to date with the latest product developments at Sushi.', + }, +] + +const PROTOCOL_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ + { + title: 'Forum', + href: 'https://forum.sushi.com', + description: 'View and discuss proposals for SushiSwap.', + }, + { + title: 'Vote', + href: 'https://snapshot.org/#/sushigov.eth', + description: + 'As a Sushi holder, you can vote on proposals to shape the future of SushiSwap.', + }, +] + +const PARTNER_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ + { + title: 'Partner with Sushi', + href: '/partner', + description: 'Incentivize your token with Sushi rewards.', + }, + { + title: 'List enquiry', + href: '/tokenlist-request', + description: 'Get your token on our default token list.', + }, +] + +const SUPPORT_NAVIGATION_LINKS: NavigationElementDropdown['items'] = [ + { + title: 'Academy', + href: '/academy', + description: 'Everything you need to get up to speed with DeFi.', + }, +] + const navigationContainerVariants = cva( 'px-4 sticky flex items-center flex-grow gap-4 top-0 z-50 min-h-[56px] max-h-[56px] h-[56px]', { @@ -41,7 +85,6 @@ const NavigationContainer: React.FC = ({ }) => { return (
-
{children}
@@ -95,7 +138,6 @@ export type NavigationElement = interface NavProps extends VariantProps { leftElements: NavigationElement[] rightElement?: React.ReactNode - chainId?: number } const Navigation: React.FC = ({ @@ -107,7 +149,7 @@ const Navigation: React.FC = ({ const SingleItem = (entry: NavigationElementSingle) => { return ( = ({ return DropdownItem(el) case NavigationElementType.Custom: return ( -
el.item
+
{el.item}
) } }) @@ -160,9 +202,80 @@ const Navigation: React.FC = ({ return ( - - {leftElements} - +
+ + + + + + + +
    +
    + Company +
    + {COMPANY_NAVIGATION_LINKS.map((component) => ( + + {component.description} + + ))} +
    +
    +
    + Protocol +
    + {PROTOCOL_NAVIGATION_LINKS.map((component) => ( + + {component.description} + + ))} +
    +
    +
    + Partnership +
    + {PARTNER_NAVIGATION_LINKS.map((component) => ( + + {component.description} + + ))} +
    +
    +
    + Support +
    + {SUPPORT_NAVIGATION_LINKS.map((component) => ( + + {component.description} + + ))} +
    +
    +
+
+
+
+
+ + {leftElements} + +
{rightElement ? rightElement : null}
diff --git a/packages/ui/src/components/network-selector.tsx b/packages/ui/src/components/network-selector.tsx index 82485c8fcc..2346de9e63 100644 --- a/packages/ui/src/components/network-selector.tsx +++ b/packages/ui/src/components/network-selector.tsx @@ -45,6 +45,7 @@ const PREFERRED_CHAINID_ORDER: ChainId[] = [ export interface NetworkSelectorProps { showAptos?: boolean + hideNetworkName?: boolean networks: readonly T[] selected: T onSelect: NetworkSelectorOnSelectCallback diff --git a/packages/ui/src/components/sheet.tsx b/packages/ui/src/components/sheet.tsx index 8d7df8ff03..81837181c3 100644 --- a/packages/ui/src/components/sheet.tsx +++ b/packages/ui/src/components/sheet.tsx @@ -56,26 +56,35 @@ const sheetVariants = cva( interface SheetContentProps extends React.ComponentPropsWithoutRef, - VariantProps {} + VariantProps { + hideClose?: boolean +} const SheetContent = React.forwardRef< React.ElementRef, SheetContentProps ->(({ side = 'right', className, children, ...props }, ref) => ( - - - - {children} - - - - - -)) +>( + ( + { side = 'right', hideClose = false, className, children, ...props }, + ref, + ) => ( + + + + {children} + {hideClose ? null : ( + + + + )} + + + ), +) SheetContent.displayName = SheetPrimitive.Content.displayName const SheetHeader = ({ diff --git a/packages/ui/src/components/skeleton.tsx b/packages/ui/src/components/skeleton.tsx index ca8e8b382a..a76b9ba18c 100644 --- a/packages/ui/src/components/skeleton.tsx +++ b/packages/ui/src/components/skeleton.tsx @@ -86,4 +86,111 @@ function SkeletonText({ ) } -export { SkeletonBox, SkeletonCircle, SkeletonText } +type ChartType = 'area' | 'bar' + +function ChartLoadingStateMask({ + type, + height, +}: { type: ChartType; height: number }) { + switch (type) { + case 'area': + return ( + + + + ) + case 'bar': + return ( + + {Array.from({ length: 25 }).map((_, i) => { + const _height = Math.random() * height * 0.8 + 20 + return ( + + ) + })} + + ) + default: + return null + } +} + +function SkeletonChartAxes({ + height, +}: { + height: number +}) { + return ( + + + + + + + + ) +} + +function SkeletonChart({ + height, + type, +}: { + height: number + type: ChartType +}) { + return ( +
+ + + + +
+ ) +} + +export { SkeletonBox, SkeletonCircle, SkeletonText, SkeletonChart } diff --git a/packages/ui/src/icons/BagIcon.tsx b/packages/ui/src/icons/BagIcon.tsx new file mode 100644 index 0000000000..231283a06d --- /dev/null +++ b/packages/ui/src/icons/BagIcon.tsx @@ -0,0 +1,27 @@ +import React from 'react' + +import { IconComponent } from '../types' + +export const BagIcon: IconComponent = (props) => { + return ( + + + + + ) +} diff --git a/packages/ui/src/icons/JazzIcon.tsx b/packages/ui/src/icons/JazzIcon.tsx index decb567cbb..1b06e438a0 100644 --- a/packages/ui/src/icons/JazzIcon.tsx +++ b/packages/ui/src/icons/JazzIcon.tsx @@ -9,7 +9,7 @@ interface JazzIconProps { address: string } -const Jazzicon = dynamic(() => import('react-jazzicon'), { ssr: false }) +const Jazzicon = dynamic(() => import('react-jazzicon')) export const JazzIcon: FC = ({ diameter, address }) => { return diff --git a/packages/ui/src/icons/SushiLiteIcon.tsx b/packages/ui/src/icons/SushiLiteIcon.tsx new file mode 100644 index 0000000000..b2dc93f12c --- /dev/null +++ b/packages/ui/src/icons/SushiLiteIcon.tsx @@ -0,0 +1,27 @@ +import React from 'react' + +import { IconComponent } from '../types' + +export const SushiLiteIcon: IconComponent = (props) => { + return ( + + + + + ) +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 913742af91..65c768dab1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -961,94 +961,6 @@ importers: config/typescript: {} - jobs/pool: - dependencies: - '@ethersproject/address': - specifier: 5.7.0 - version: 5.7.0 - '@ethersproject/bignumber': - specifier: 5.7.0 - version: 5.7.0 - '@sushiswap/bonds-sdk': - specifier: workspace:* - version: link:../../packages/bonds-sdk - '@sushiswap/client': - specifier: workspace:* - version: link:../../packages/client - '@sushiswap/database': - specifier: workspace:* - version: link:../../packages/database - '@sushiswap/graph-client': - specifier: workspace:* - version: link:../../packages/graph-client - '@sushiswap/steer-sdk': - specifier: workspace:* - version: link:../../packages/steer-sdk - '@wagmi/core': - specifier: 2.13.1 - version: 2.13.1(@tanstack/query-core@5.51.16)(@types/react@18.2.14)(immer@9.0.21)(react@18.2.0)(typescript@5.4.5)(viem@2.18.6(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@6.0.3)(zod@3.23.8)) - '@whatwg-node/fetch': - specifier: 0.8.4 - version: 0.8.4 - connect-timeout: - specifier: 1.9.0 - version: 1.9.0 - date-fns: - specifier: 2.29.3 - version: 2.29.3 - ethers: - specifier: 5.7.2 - version: 5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) - express: - specifier: 4.18.2 - version: 4.18.2 - lodash.zip: - specifier: 4.2.0 - version: 4.2.0 - sushi: - specifier: workspace:* - version: link:../../packages/sushi - tsx: - specifier: ^4.7.1 - version: 4.7.1 - viem: - specifier: 2.18.6 - version: 2.18.6(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@6.0.3)(zod@3.23.8) - zod: - specifier: 3.23.8 - version: 3.23.8 - devDependencies: - '@sushiswap/jest-config': - specifier: workspace:* - version: link:../../config/jest - '@swc/core': - specifier: 1.4.2 - version: 1.4.2(@swc/helpers@0.5.6) - '@swc/helpers': - specifier: 0.5.6 - version: 0.5.6 - '@tsconfig/esm': - specifier: 1.0.4 - version: 1.0.4 - '@tsconfig/node18': - specifier: 18.2.2 - version: 18.2.2 - '@types/connect-timeout': - specifier: 0.0.36 - version: 0.0.36 - '@types/express': - specifier: 4.17.15 - version: 4.17.15 - '@types/lodash.zip': - specifier: 4.2.7 - version: 4.2.7 - dotenv: - specifier: 16.0.3 - version: 16.0.3 - typescript: - specifier: 5.4.5 - version: 5.4.5 - packages/bonds-sdk: dependencies: react: @@ -1420,6 +1332,9 @@ importers: '@sushiswap/database': specifier: workspace:* version: link:../database + '@sushiswap/graph-client': + specifier: workspace:* + version: link:../graph-client '@sushiswap/jest-config': specifier: workspace:* version: link:../../config/jest @@ -4944,7 +4859,6 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -4952,7 +4866,6 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead '@identity-connect/api@0.6.3': resolution: {integrity: sha512-wLbGY10+YBtYfEPyA1in5c6TvS2dm7vv8kz1hA+pdSOEOniguBoZOtSXpaIfnjL7t7NBVZNRZ9NaMp4rpgcQHQ==} @@ -8499,9 +8412,6 @@ packages: '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@swc/helpers@0.5.6': - resolution: {integrity: sha512-aYX01Ke9hunpoCexYAgQucEpARGQ5w/cqHFrIR+e9gdKb1QWTsVJuTJ2ozQzIAxLyRQe/m+2RqzkyOOGiMKRQA==} - '@swc/types@0.1.6': resolution: {integrity: sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==} @@ -8746,9 +8656,6 @@ packages: '@types/connect-history-api-fallback@1.5.4': resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} - '@types/connect-timeout@0.0.36': - resolution: {integrity: sha512-rfw+RJU9gd0JeOJSkfRVixCETnw1ezx6Uo3exetKBeIKY4GaL/MVb4XCjmB4dgeZQ5vkcLlpYLVSbYIeqDu25g==} - '@types/connect@3.4.35': resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} @@ -8863,6 +8770,9 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/debug@4.1.8': + resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} + '@types/detect-port@1.3.3': resolution: {integrity: sha512-bV/jQlAJ/nPY3XqSatkGpu+nGzou+uSwrH1cROhn+jBFg47yaNH+blW4C7p9KhopC7QxCv/6M86s37k8dMk0Yg==} @@ -8908,9 +8818,6 @@ packages: '@types/express-serve-static-core@4.17.35': resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} - '@types/express@4.17.15': - resolution: {integrity: sha512-Yv0k4bXGOH+8a+7bELd2PqHQsuiANB+A8a4gnQrkRWzrkKlb6KHaVvyXhqs04sVW/OWlbPyYxRgYlIXLfrufMQ==} - '@types/express@4.17.17': resolution: {integrity: sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==} @@ -8971,9 +8878,15 @@ packages: '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + '@types/istanbul-lib-report@3.0.0': + resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} + '@types/istanbul-lib-report@3.0.3': resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + '@types/istanbul-reports@3.0.1': + resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} + '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} @@ -9028,9 +8941,6 @@ packages: '@types/lodash.uniqby@4.7.9': resolution: {integrity: sha512-rjrXji/seS6BZJRgXrU2h6FqxRVufsbq/HE0Tx0SdgbtlWr2YmD/M64BlYEYYlaMcpZwy32IYVkMfUMYlPuv0w==} - '@types/lodash.zip@4.2.7': - resolution: {integrity: sha512-wRtK2bZ0HYXkJkeldrD35qOquGn5GOmp8+o886N18Aqw2DGFLP7JCTEb00j3xQZ+PCMTyfMS2OMbLUwah+bcyg==} - '@types/lodash.zip@4.2.9': resolution: {integrity: sha512-cJvqtEzLgHUPF6H6v7K6Q/yIc1DAYpsUkHD1Q7bUOAcCE0b7drzoUMi/Toj0MjQI3WeM6rI6v295mkenAQ+R7A==} @@ -11641,10 +11551,6 @@ packages: resolution: {integrity: sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==} engines: {node: '>=0.8'} - connect-timeout@1.9.0: - resolution: {integrity: sha512-q4bsBIPd+eSGtnh/u6EBOKfuG+4YvwsN0idlOsg6KAw71Qpi0DCf2eCc/Va63QU9qdOeYC8katxoC+rHMNygZg==} - engines: {node: '>= 0.8'} - connect@3.7.0: resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} @@ -12162,10 +12068,6 @@ packages: dataloader@1.4.0: resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} - date-fns@2.29.3: - resolution: {integrity: sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==} - engines: {node: '>=0.11'} - date-fns@2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} @@ -19911,7 +19813,6 @@ packages: rimraf@2.6.3: resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} - deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@2.7.1: @@ -20895,6 +20796,9 @@ packages: peerDependencies: postcss: ^8.2.15 + stylis@4.2.0: + resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} + stylis@4.3.2: resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} @@ -23102,7 +23006,7 @@ snapshots: rc-util: 5.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - stylis: 4.3.2 + stylis: 4.2.0 '@ant-design/icons-svg@4.4.2': {} @@ -27014,32 +26918,6 @@ snapshots: - bufferutil - utf-8-validate - '@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3)': - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - bech32: 1.1.4 - ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@6.0.3) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@ethersproject/random@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 @@ -27201,7 +27079,7 @@ snapshots: '@grpc/grpc-js@1.9.2': dependencies: '@grpc/proto-loader': 0.7.9 - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@grpc/proto-loader@0.7.9': dependencies: @@ -27451,7 +27329,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 20.14.14 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -27478,7 +27356,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.1.0 + '@types/node': 20.14.14 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -27535,7 +27413,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.19 + '@jridgewell/trace-mapping': 0.3.25 '@types/node': 22.1.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 @@ -27682,9 +27560,9 @@ snapshots: '@jest/types@29.6.3': dependencies: '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports': 3.0.4 - '@types/node': 22.1.0 + '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-reports': 3.0.1 + '@types/node': 20.14.14 '@types/yargs': 17.0.24 chalk: 4.1.2 @@ -27737,7 +27615,7 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 '@json-rpc-tools/provider@1.7.6(bufferutil@4.0.8)(utf-8-validate@5.0.10)': @@ -32950,7 +32828,7 @@ snapshots: '@swc/core-win32-x64-msvc@1.4.2': optional: true - '@swc/core@1.4.2(@swc/helpers@0.5.6)': + '@swc/core@1.4.2': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.6 @@ -32965,7 +32843,7 @@ snapshots: '@swc/core-win32-arm64-msvc': 1.4.2 '@swc/core-win32-ia32-msvc': 1.4.2 '@swc/core-win32-x64-msvc': 1.4.2 - '@swc/helpers': 0.5.6 + optional: true '@swc/counter@0.1.3': {} @@ -32974,13 +32852,10 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.3 - '@swc/helpers@0.5.6': - dependencies: - tslib: 2.6.2 - '@swc/types@0.1.6': dependencies: '@swc/counter': 0.1.3 + optional: true '@szmarczak/http-timer@1.1.2': dependencies: @@ -33250,7 +33125,7 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@types/responselike': 1.0.0 '@types/chai-subset@1.3.3': @@ -33270,21 +33145,17 @@ snapshots: '@types/concat-stream@1.6.1': dependencies: - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@types/concat-stream@2.0.0': dependencies: - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 4.17.35 '@types/node': 22.1.0 - '@types/connect-timeout@0.0.36': - dependencies: - '@types/express': 4.17.17 - '@types/connect@3.4.35': dependencies: '@types/node': 20.14.14 @@ -33431,6 +33302,10 @@ snapshots: dependencies: '@types/ms': 0.7.34 + '@types/debug@4.1.8': + dependencies: + '@types/ms': 0.7.34 + '@types/detect-port@1.3.3': {} '@types/doctrine@0.0.3': {} @@ -33476,13 +33351,6 @@ snapshots: '@types/range-parser': 1.2.4 '@types/send': 0.17.1 - '@types/express@4.17.15': - dependencies: - '@types/body-parser': 1.19.2 - '@types/express-serve-static-core': 4.17.35 - '@types/qs': 6.9.8 - '@types/serve-static': 1.15.2 - '@types/express@4.17.17': dependencies: '@types/body-parser': 1.19.2 @@ -33500,7 +33368,7 @@ snapshots: '@types/form-data@0.0.33': dependencies: - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@types/geojson@7946.0.10': {} @@ -33543,10 +33411,18 @@ snapshots: '@types/istanbul-lib-coverage@2.0.6': {} + '@types/istanbul-lib-report@3.0.0': + dependencies: + '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-lib-report@3.0.3': dependencies: '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports@3.0.1': + dependencies: + '@types/istanbul-lib-report': 3.0.0 + '@types/istanbul-reports@3.0.4': dependencies: '@types/istanbul-lib-report': 3.0.3 @@ -33580,7 +33456,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@types/koa-compose@3.2.8': dependencies: @@ -33617,10 +33493,6 @@ snapshots: dependencies: '@types/lodash': 4.14.197 - '@types/lodash.zip@4.2.7': - dependencies: - '@types/lodash': 4.14.197 - '@types/lodash.zip@4.2.9': dependencies: '@types/lodash': 4.14.197 @@ -33792,7 +33664,7 @@ snapshots: '@types/responselike@1.0.0': dependencies: - '@types/node': 22.1.0 + '@types/node': 20.14.14 '@types/retry@0.12.0': {} @@ -35610,10 +35482,6 @@ snapshots: dependencies: acorn: 8.11.3 - acorn-jsx@5.3.2(acorn@8.12.0): - dependencies: - acorn: 8.12.0 - acorn-node@1.8.2: dependencies: acorn: 7.4.1 @@ -38022,13 +37890,6 @@ snapshots: connect-history-api-fallback@2.0.0: {} - connect-timeout@1.9.0: - dependencies: - http-errors: 1.6.3 - ms: 2.0.0 - on-finished: 2.3.0 - on-headers: 1.0.2 - connect@3.7.0: dependencies: debug: 2.6.9 @@ -38674,8 +38535,6 @@ snapshots: dataloader@1.4.0: {} - date-fns@2.29.3: {} - date-fns@2.30.0: dependencies: '@babel/runtime': 7.24.5 @@ -40420,8 +40279,8 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.12.0 - acorn-jsx: 5.3.2(acorn@8.12.0) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 esprima@1.2.2: {} @@ -40883,42 +40742,6 @@ snapshots: - bufferutil - utf-8-validate - ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3): - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/contracts': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/json-wallets': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/solidity': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/units': 5.7.0 - '@ethersproject/wallet': 5.7.0 - '@ethersproject/web': 5.7.1 - '@ethersproject/wordlists': 5.7.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - ethjs-unit@0.1.6: dependencies: bn.js: 4.11.6 @@ -43772,7 +43595,7 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.22.13 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -43790,7 +43613,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 20.14.14 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -44034,7 +43857,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 20.14.14 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -47173,7 +46996,7 @@ snapshots: postcss-load-config@4.0.1(postcss@8.4.23)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 - yaml: 2.3.1 + yaml: 2.4.1 optionalDependencies: postcss: 8.4.23 ts-node: 10.9.2(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5) @@ -47181,7 +47004,7 @@ snapshots: postcss-load-config@4.0.1(postcss@8.4.23)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)): dependencies: lilconfig: 2.1.0 - yaml: 2.3.1 + yaml: 2.4.1 optionalDependencies: postcss: 8.4.23 ts-node: 10.9.2(@types/node@20.14.14)(typescript@5.5.4) @@ -47189,7 +47012,7 @@ snapshots: postcss-load-config@4.0.1(postcss@8.4.23)(ts-node@10.9.2(@types/node@22.1.0)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 - yaml: 2.3.1 + yaml: 2.4.1 optionalDependencies: postcss: 8.4.23 ts-node: 10.9.2(@types/node@22.1.0)(typescript@5.4.5) @@ -47197,7 +47020,7 @@ snapshots: postcss-load-config@4.0.1(postcss@8.4.38)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 - yaml: 2.3.1 + yaml: 2.4.1 optionalDependencies: postcss: 8.4.38 ts-node: 10.9.1(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5) @@ -47205,7 +47028,7 @@ snapshots: postcss-load-config@4.0.1(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 - yaml: 2.3.1 + yaml: 2.4.1 optionalDependencies: postcss: 8.4.38 ts-node: 10.9.2(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5) @@ -50430,6 +50253,8 @@ snapshots: postcss: 8.4.23 postcss-selector-parser: 6.0.13 + stylis@4.2.0: {} + stylis@4.3.2: {} stylus-lookup@5.0.1: @@ -50659,7 +50484,7 @@ snapshots: postcss-nested: 6.0.1(postcss@8.4.23) postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 - resolve: 1.22.4 + resolve: 1.22.8 sucrase: 3.34.0 transitivePeerDependencies: - ts-node @@ -50687,7 +50512,7 @@ snapshots: postcss-nested: 6.0.1(postcss@8.4.23) postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 - resolve: 1.22.4 + resolve: 1.22.8 sucrase: 3.34.0 transitivePeerDependencies: - ts-node @@ -50715,7 +50540,7 @@ snapshots: postcss-nested: 6.0.1(postcss@8.4.23) postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 - resolve: 1.22.4 + resolve: 1.22.8 sucrase: 3.34.0 transitivePeerDependencies: - ts-node @@ -51147,7 +50972,7 @@ snapshots: json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.5.4 + semver: 7.6.0 typescript: 5.4.5 yargs-parser: 21.1.1 optionalDependencies: @@ -51164,7 +50989,7 @@ snapshots: json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.5.4 + semver: 7.6.0 typescript: 5.5.4 yargs-parser: 21.1.1 optionalDependencies: @@ -51195,7 +51020,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.6) + '@swc/core': 1.4.2 ts-node@10.9.1(@swc/core@1.4.2)(@types/node@16.18.11)(typescript@5.4.5): dependencies: @@ -51215,7 +51040,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.6) + '@swc/core': 1.4.2 ts-node@10.9.1(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5): dependencies: @@ -51235,7 +51060,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.6) + '@swc/core': 1.4.2 ts-node@10.9.2(@swc/core@1.4.2)(@types/node@20.14.14)(typescript@5.4.5): dependencies: @@ -51255,7 +51080,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.6) + '@swc/core': 1.4.2 ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4): dependencies: @@ -51348,7 +51173,7 @@ snapshots: sucrase: 3.34.0 tree-kill: 1.2.2 optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.6) + '@swc/core': 1.4.2 postcss: 8.4.38 typescript: 5.4.5 transitivePeerDependencies: @@ -51372,7 +51197,7 @@ snapshots: sucrase: 3.34.0 tree-kill: 1.2.2 optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.6) + '@swc/core': 1.4.2 postcss: 8.4.38 typescript: 5.4.5 transitivePeerDependencies: @@ -51680,7 +51505,7 @@ snapshots: unified-engine@10.1.0: dependencies: '@types/concat-stream': 2.0.0 - '@types/debug': 4.1.12 + '@types/debug': 4.1.8 '@types/is-empty': 1.2.1 '@types/node': 18.11.18 '@types/unist': 2.0.7 @@ -53488,11 +53313,6 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - ws@7.4.6(bufferutil@4.0.8)(utf-8-validate@6.0.3): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8