diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml
index 7d4a87f1..8dbfa5a8 100644
--- a/.github/workflows/preview-build.yml
+++ b/.github/workflows/preview-build.yml
@@ -35,13 +35,26 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- cache: "pnpm"
+
+ - name: Get pnpm store directory
+ id: pnpm-cache
+ shell: bash
+ run: |
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+ - uses: actions/cache@v3
+ name: Setup pnpm cache
+ with:
+ path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build dapp
- run: CI=false pnpm run davi:build-graph-client && pnpm run davi:dev
+ run: pnpm run davi:build-graph-client && CI=false pnpm run davi:build
- name: Archive artifacts
uses: actions/upload-artifact@v2
diff --git a/.github/workflows/tests-format.yml b/.github/workflows/tests-format.yml
index f616cc3c..62d677df 100644
--- a/.github/workflows/tests-format.yml
+++ b/.github/workflows/tests-format.yml
@@ -39,7 +39,20 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- cache: "pnpm"
+
+ - name: Get pnpm store directory
+ id: pnpm-cache
+ shell: bash
+ run: |
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+ - uses: actions/cache@v3
+ name: Setup pnpm cache
+ with:
+ path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+ restore-keys: |
+ ${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
diff --git a/apps/davi/package.json b/apps/davi/package.json
index 1cbccae6..f72d7415 100644
--- a/apps/davi/package.json
+++ b/apps/davi/package.json
@@ -65,6 +65,7 @@
"@tiptap/extension-highlight": "^2.0.0-beta.32",
"@tiptap/extension-link": "^2.0.0-beta.209",
"@tiptap/extension-placeholder": "^2.0.0-beta.48",
+ "@tiptap/pm": "^2.0.0-beta.219",
"@tiptap/react": "^2.0.0-beta.105",
"@tiptap/starter-kit": "^2.0.0-beta.171",
"@types/node": "^16.11.7",
@@ -90,8 +91,8 @@
"ethers": "^5.7.2",
"git-revision-webpack-plugin": "^3.0.6",
"graphql": "^16.6.0",
- "hardhat": "^2.9.1",
- "hardhat-dependency-compiler": "^1.1.2",
+ "hardhat": "^2.12.7",
+ "hardhat-dependency-compiler": "^1.1.3",
"highlight.js": "^11.6.0",
"i18next": "^21.6.16",
"i18next-browser-languagedetector": "^7.0.1",
diff --git a/apps/davi/public/locales/en/translation.json b/apps/davi/public/locales/en/translation.json
index c9584d42..b0aed855 100644
--- a/apps/davi/public/locales/en/translation.json
+++ b/apps/davi/public/locales/en/translation.json
@@ -231,6 +231,7 @@
"quorum": "Quorum",
"backToOverview": "Back to Overview",
"backToDiscussion": "Back to Discussion",
+ "originalDiscussion": "Original Discussion",
"seeAllProposals": "See all proposals",
"createdBy": "Created by",
"proposalInfoCard": {
diff --git a/apps/davi/src/Modules/Guilds/pages/Proposal/Proposal.tsx b/apps/davi/src/Modules/Guilds/pages/Proposal/Proposal.tsx
index 40115cd5..ac0bb8c1 100644
--- a/apps/davi/src/Modules/Guilds/pages/Proposal/Proposal.tsx
+++ b/apps/davi/src/Modules/Guilds/pages/Proposal/Proposal.tsx
@@ -146,7 +146,7 @@ const ProposalPage: React.FC = () => {
marginTop={'5px;'}
>
{' '}
- {t('proposal.backToDiscussion')}
+ {t('proposal.originalDiscussion')}
) : (
diff --git a/apps/davi/src/clients/apollo.ts b/apps/davi/src/clients/apollo.ts
index 17c3c85b..750fc962 100644
--- a/apps/davi/src/clients/apollo.ts
+++ b/apps/davi/src/clients/apollo.ts
@@ -3,77 +3,70 @@ import {
InMemoryCache,
NormalizedCacheObject,
} from '@apollo/client';
-import { SupportedSubgraphs } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { SupportedSubgraph } from 'stores/types';
+import { CHAIN_ID, MAINNET_ID } from 'utils';
// FIX: Add subgraphs URIs here
-export const subgraphClientsUris: {
- [chainId in SUPPORTED_DAVI_NETWORKS]: {
- [supportedSubgraph in SupportedSubgraphs]: string;
- };
-} = {
- [SUPPORTED_DAVI_NETWORKS.MAINNET_ID]: {
- Guilds: '',
- 'Governance1.5': '',
+export const subgraphClientsUris: Record<
+ CHAIN_ID,
+ Record
+> = {
+ [CHAIN_ID.MAINNET]: {
+ [SupportedSubgraph.Guilds]: '',
+ [SupportedSubgraph.Governance1_5]: '',
},
- [SUPPORTED_DAVI_NETWORKS.ARBITRUM_ID]: {
- Guilds: '',
- 'Governance1.5': '',
+ [CHAIN_ID.ARBITRUM]: {
+ [SupportedSubgraph.Guilds]: '',
+ [SupportedSubgraph.Governance1_5]: '',
},
- [SUPPORTED_DAVI_NETWORKS.GNOSIS_ID]: {
+ [CHAIN_ID.GNOSIS]: {
Guilds: process.env.REACT_APP_DXGOV_GUILD_GRAPHQL_ENDPOINT_GNOSIS,
'Governance1.5': process.env.REACT_APP_DXGOV_DAO_GRAPHQL_ENDPOINT_GNOSIS,
},
// testnets
- [SUPPORTED_DAVI_NETWORKS.ARBITRUM_TESTNET_ID]: {
- Guilds: '',
- 'Governance1.5': '',
+ [CHAIN_ID.ARBITRUM_TESTNET]: {
+ [SupportedSubgraph.Guilds]: '',
+ [SupportedSubgraph.Governance1_5]: '',
},
- [SUPPORTED_DAVI_NETWORKS.GOERLI_ID]: {
- Guilds: '',
- 'Governance1.5': '',
+ [CHAIN_ID.GOERLI]: {
+ [SupportedSubgraph.Guilds]: '',
+ [SupportedSubgraph.Governance1_5]: '',
},
- [SUPPORTED_DAVI_NETWORKS.LOCALHOST_ID]: {
+ [CHAIN_ID.LOCALHOST]: {
Guilds: 'http://127.0.0.1:8000/subgraphs/name/dxdao/guilds',
'Governance1.5': 'http://127.0.0.1:8000/subgraphs/name/dxdao/dao',
},
};
-const setupApolloClient = (network: SUPPORTED_DAVI_NETWORKS) => {
+const setupApolloClient = (chainId: CHAIN_ID) => {
return {
- Guilds: new ApolloClient({
- uri: subgraphClientsUris[network]['Guilds'],
+ [SupportedSubgraph.Guilds]: new ApolloClient({
+ uri: subgraphClientsUris[chainId][SupportedSubgraph.Guilds],
cache: new InMemoryCache(),
}),
- 'Governance1.5': new ApolloClient({
- uri: subgraphClientsUris[network]['Governance1.5'],
+ [SupportedSubgraph.Governance1_5]: new ApolloClient({
+ uri: subgraphClientsUris[chainId][SupportedSubgraph.Governance1_5],
cache: new InMemoryCache(),
}),
};
};
-export const apolloClient: {
- [chainId in SUPPORTED_DAVI_NETWORKS]: {
- [supportedSubgraph in SupportedSubgraphs]: ApolloClient;
- };
-} = {
- [SUPPORTED_DAVI_NETWORKS.MAINNET_ID]: setupApolloClient(
- SUPPORTED_DAVI_NETWORKS.MAINNET_ID
- ),
- [SUPPORTED_DAVI_NETWORKS.GNOSIS_ID]: setupApolloClient(
- SUPPORTED_DAVI_NETWORKS.GNOSIS_ID
- ),
- [SUPPORTED_DAVI_NETWORKS.ARBITRUM_ID]: setupApolloClient(
- SUPPORTED_DAVI_NETWORKS.ARBITRUM_ID
- ),
+export const apolloClient: Record<
+ CHAIN_ID,
+ Record>
+> = {
+ [CHAIN_ID.MAINNET]: setupApolloClient(CHAIN_ID.MAINNET),
+ [CHAIN_ID.GNOSIS]: setupApolloClient(CHAIN_ID.GNOSIS),
+ [CHAIN_ID.ARBITRUM]: setupApolloClient(CHAIN_ID.ARBITRUM),
// testnets
- [SUPPORTED_DAVI_NETWORKS.GOERLI_ID]: setupApolloClient(
- SUPPORTED_DAVI_NETWORKS.GOERLI_ID
- ),
- [SUPPORTED_DAVI_NETWORKS.ARBITRUM_TESTNET_ID]: setupApolloClient(
- SUPPORTED_DAVI_NETWORKS.ARBITRUM_TESTNET_ID
- ),
- [SUPPORTED_DAVI_NETWORKS.LOCALHOST_ID]: setupApolloClient(
- SUPPORTED_DAVI_NETWORKS.LOCALHOST_ID
- ),
+ [CHAIN_ID.GOERLI]: setupApolloClient(CHAIN_ID.GOERLI),
+ [CHAIN_ID.ARBITRUM_TESTNET]: setupApolloClient(CHAIN_ID.ARBITRUM_TESTNET),
+ [CHAIN_ID.LOCALHOST]: setupApolloClient(CHAIN_ID.LOCALHOST),
+};
+
+export const getApolloClient = (
+ subgraph: SupportedSubgraph,
+ chainId: CHAIN_ID = MAINNET_ID
+) => {
+ return apolloClient?.[chainId]?.[subgraph];
};
diff --git a/apps/davi/src/index.tsx b/apps/davi/src/index.tsx
index a13ab46e..754edd73 100644
--- a/apps/davi/src/index.tsx
+++ b/apps/davi/src/index.tsx
@@ -8,13 +8,13 @@ import 'react-toastify/dist/ReactToastify.css';
import { useNetwork, WagmiConfig } from 'wagmi';
import EnsureReadOnlyConnection from 'components/Web3Modals/EnsureReadOnlyConnection';
import SyncRouterWithWagmi from 'components/Web3Modals/SyncRouterWithWagmi';
-import { useEffect, useMemo } from 'react';
+import { useEffect } from 'react';
import { loadFathom } from 'analytics/fathom';
import { SITE_ID } from 'configs';
import { ApolloProvider } from '@apollo/client';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import { wagmiClient } from 'clients/wagmi';
-import { DEFAULT_CHAIN_ID } from 'utils';
+import { SupportedSubgraph } from 'stores/types';
initializeI18Next();
@@ -30,8 +30,6 @@ moment.updateLocale('en', {
const Root = () => {
const { chain } = useNetwork();
- const chainId = useMemo(() => chain?.id || DEFAULT_CHAIN_ID, [chain]);
-
useEffect(() => {
loadFathom(SITE_ID)
.then(() => {
@@ -43,7 +41,9 @@ const Root = () => {
}, []);
return (
-
+
diff --git a/apps/davi/src/stores/index.tsx b/apps/davi/src/stores/index.tsx
index d9c96f31..b3a2c564 100644
--- a/apps/davi/src/stores/index.tsx
+++ b/apps/davi/src/stores/index.tsx
@@ -91,10 +91,10 @@ export const HookStoreProvider: React.FC<
}, [daoBytecodeHash, dataSource]);
useEffect(() => {
- const getDataSourceAvailability = () => {
+ const getDataSourceAvailability = async () => {
if (governanceType) {
const isDefaultSourceAvailable =
- governanceType.checkDataSourceAvailability(chain?.id);
+ await governanceType.checkDataSourceAvailability(chain?.id);
if (isDefaultSourceAvailable && dataSource !== 'primary') {
setTargetDataSource('primary');
}
diff --git a/apps/davi/src/stores/modules/1_5/checkDataSourceAvailability.ts b/apps/davi/src/stores/modules/1_5/checkDataSourceAvailability.ts
index 7cc8b6ae..79f374b0 100644
--- a/apps/davi/src/stores/modules/1_5/checkDataSourceAvailability.ts
+++ b/apps/davi/src/stores/modules/1_5/checkDataSourceAvailability.ts
@@ -1,7 +1,51 @@
import { subgraphClientsUris } from 'clients/apollo';
+import { SupportedSubgraph } from 'stores/types';
-// TODO: Check for health of connection if found
+export const checkDataSourceAvailability = async chainId => {
+ try {
+ if (!!subgraphClientsUris?.[chainId]?.[SupportedSubgraph.Governance1_5]) {
+ console.debug('No subgraph URL for this chain, using fallback');
+ return false;
+ }
-export const checkDataSourceAvailability = chainId => {
- return !!subgraphClientsUris[chainId]['Governance1.5'];
+ const query = `{
+ _meta {
+ block {
+ number
+ timestamp
+ }
+ }
+ }`;
+
+ const response = await fetch(
+ subgraphClientsUris[chainId][SupportedSubgraph.Governance1_5],
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({ query }),
+ }
+ );
+ const { data, errors } = await response.json();
+
+ if (data?._meta?.block?.timestamp < Math.floor(Date.now() / 1000) - 600) {
+ console.debug('Subgraph out of sync, using fallback');
+ return false;
+ }
+ if (errors) {
+ console.debug('Error occurred checking source health');
+ console.error(errors);
+ return false;
+ }
+ if (data) {
+ console.debug('Subgraph exists and is above 10 minutes in sync');
+ return true;
+ } else {
+ console.debug('No default data source data, using fallback');
+ return false;
+ }
+ } catch {
+ return false;
+ }
};
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetAllPermissions/useGetAllPermissions.ts b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetAllPermissions/useGetAllPermissions.ts
index dee55b5d..47cde3a7 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetAllPermissions/useGetAllPermissions.ts
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetAllPermissions/useGetAllPermissions.ts
@@ -3,23 +3,21 @@ import {
getDaoPermissionsQuery,
} from '.graphclient';
import { useQuery } from '@apollo/client';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import { BigNumber } from 'ethers';
import { useMemo } from 'react';
-import { FetcherHooksInterface } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useNetwork } from 'wagmi';
type IUseGetAllPermissions = FetcherHooksInterface['useGetAllPermissions'];
export const useGetAllPermissions: IUseGetAllPermissions = daoId => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getDaoPermissionsDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetMemberList/useGetMemberList.ts b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetMemberList/useGetMemberList.ts
index 8237b1dd..59f65836 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetMemberList/useGetMemberList.ts
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetMemberList/useGetMemberList.ts
@@ -1,9 +1,8 @@
import { useMemo } from 'react';
import { useQuery } from '@apollo/client';
import { useNetwork } from 'wagmi';
-import { FetcherHooksInterface } from 'stores/types';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
+import { getApolloClient } from 'clients/apollo';
import { getMemberList1_5Document, getMemberList1_5Query } from '.graphclient';
import { BigNumber } from 'ethers';
@@ -11,12 +10,11 @@ type IUseGetMemberList = FetcherHooksInterface['useGetMemberList'];
export const useGetMemberList: IUseGetMemberList = (daoId: string) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getMemberList1_5Document,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetNumberOfActiveProposals/index.tsx b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetNumberOfActiveProposals/index.tsx
index c3a0a295..3e3aa5b9 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetNumberOfActiveProposals/index.tsx
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGetNumberOfActiveProposals/index.tsx
@@ -1,4 +1,3 @@
-import { useMemo } from 'react';
import { BigNumber } from 'ethers';
import { useNetwork } from 'wagmi';
import { useQuery } from '@apollo/client';
@@ -7,9 +6,8 @@ import {
getDaoNumberOfActiveProposalsDocument,
getDaoNumberOfActiveProposalsQuery,
} from '.graphclient';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
-import { apolloClient } from 'clients/apollo';
-import { FetcherHooksInterface } from 'stores/types';
+import { getApolloClient } from 'clients/apollo';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
type IUseGetNumberOfActiveProposals =
FetcherHooksInterface['useGetNumberOfActiveProposals'];
@@ -17,7 +15,6 @@ type IUseGetNumberOfActiveProposals =
export const useGetNumberOfActiveProposals: IUseGetNumberOfActiveProposals =
daoId => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
// TODO: This query gets all "Submitted" proposals. We should define what an active proposal is, and fetch accordingly
@@ -25,7 +22,7 @@ export const useGetNumberOfActiveProposals: IUseGetNumberOfActiveProposals =
useQuery(
getDaoNumberOfActiveProposalsDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
id: daoId?.toLowerCase(),
},
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildConfig/useGuildConfig.ts b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildConfig/useGuildConfig.ts
index 56af32ac..530a7919 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildConfig/useGuildConfig.ts
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildConfig/useGuildConfig.ts
@@ -3,11 +3,10 @@ import {
getGuildConfig1_5Query,
} from '.graphclient';
import { useQuery } from '@apollo/client';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import { useMemo } from 'react';
-import { FetcherHooksInterface } from 'stores/types';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { GuildConfigProps } from 'types/types.guilds';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
import { useNetwork } from 'wagmi';
type IUseGuildConfig = FetcherHooksInterface['useGuildConfig'];
@@ -17,12 +16,11 @@ export const useGuildConfig: IUseGuildConfig = (
proposalId?: `0x${string}`
) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getGuildConfig1_5Document,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildProposalIds/index.tsx b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildProposalIds/index.tsx
index fd1f2b74..95fe275e 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildProposalIds/index.tsx
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useGuildProposalIds/index.tsx
@@ -1,8 +1,6 @@
-import { useMemo } from 'react';
-import { FetcherHooksInterface } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useNetwork } from 'wagmi';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import {
getDaoProposalIdsDocument,
getDaoProposalIdsQuery,
@@ -13,12 +11,11 @@ type IUseGuildProposalIds = FetcherHooksInterface['useGuildProposalIds'];
export const useGuildProposalIds: IUseGuildProposalIds = daoId => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, error, loading } = useQuery(
getDaoProposalIdsDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
id: daoId?.toLowerCase(),
},
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useMemberCount/useMemberCount.ts b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useMemberCount/useMemberCount.ts
index 81bd81a6..d841d4bc 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useMemberCount/useMemberCount.ts
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useMemberCount/useMemberCount.ts
@@ -1,21 +1,19 @@
import { useMemo } from 'react';
import { useQuery } from '@apollo/client';
import { useNetwork } from 'wagmi';
-import { FetcherHooksInterface } from 'stores/types';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
+import { getApolloClient } from 'clients/apollo';
import { getMemberList1_5Document, getMemberList1_5Query } from '.graphclient';
type IUseMemberCount = FetcherHooksInterface['useMemberCount'];
export const useMemberCount: IUseMemberCount = (daoId: `0x${string}`) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getMemberList1_5Document,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposal/index.tsx b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposal/index.tsx
index 0700325b..47e0459d 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposal/index.tsx
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposal/index.tsx
@@ -4,9 +4,8 @@ import { unix } from 'moment';
import { useQuery } from '@apollo/client';
import { getDaoProposalDocument, getDaoProposalQuery } from '.graphclient';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
-import { FetcherHooksInterface } from 'stores/types';
-import { apolloClient } from 'clients/apollo';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
+import { getApolloClient } from 'clients/apollo';
import { ContractState, Proposal } from 'types/types.guilds.d';
import { useProposalCalls } from '../../rpc/useProposalCalls';
import { BigNumber } from 'ethers';
@@ -15,12 +14,11 @@ type IUseProposal = FetcherHooksInterface['useProposal'];
export const useProposal: IUseProposal = (daoId, proposalId) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, error } = useQuery(
getDaoProposalDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
id: daoId?.toLowerCase(),
proposalId: proposalId?.toLowerCase(),
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposalVotesOfVoter/index.tsx b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposalVotesOfVoter/index.tsx
index 2ceb3467..99911b5d 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposalVotesOfVoter/index.tsx
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useProposalVotesOfVoter/index.tsx
@@ -1,8 +1,7 @@
import { useQuery } from '@apollo/client';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import { useMemo } from 'react';
-import { FetcherHooksInterface } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useNetwork } from 'wagmi';
import {
getDaoVotesOfVoterDocument,
@@ -18,12 +17,11 @@ export const useProposalVotesOfVoter: IUseProposalVotesOfVoter = (
userAddress
) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, error, loading } = useQuery(
getDaoVotesOfVoterDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
id: daoId?.toLowerCase(),
proposalId: proposalId?.toLowerCase(),
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useTotalLocked/useTotalLocked.ts b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useTotalLocked/useTotalLocked.ts
index 71082b6a..d7213634 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useTotalLocked/useTotalLocked.ts
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useTotalLocked/useTotalLocked.ts
@@ -1,10 +1,9 @@
import { getTotalLockedDocument, getTotalLockedQuery } from '.graphclient';
import { useQuery } from '@apollo/client';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import { BigNumber } from 'ethers';
import { useMemo } from 'react';
-import { FetcherHooksInterface } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useNetwork } from 'wagmi';
type IUseTotalLocked = FetcherHooksInterface['useTotalLocked'];
@@ -14,12 +13,11 @@ export const useTotalLocked: IUseTotalLocked = (
proposalId?: string
) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getTotalLockedDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useVotingPowerOf/useVotingPowerOf.ts b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useVotingPowerOf/useVotingPowerOf.ts
index 61e3b241..ff8b7ea1 100644
--- a/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useVotingPowerOf/useVotingPowerOf.ts
+++ b/apps/davi/src/stores/modules/1_5/fetchers/subgraph/useVotingPowerOf/useVotingPowerOf.ts
@@ -1,10 +1,9 @@
import { getVotingPowerOfDocument, getVotingPowerOfQuery } from '.graphclient';
import { useQuery } from '@apollo/client';
-import { apolloClient } from 'clients/apollo';
+import { getApolloClient } from 'clients/apollo';
import { BigNumber } from 'ethers';
import { useMemo } from 'react';
-import { FetcherHooksInterface } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useNetwork } from 'wagmi';
type IUseVotingPowerOf = FetcherHooksInterface['useVotingPowerOf'];
@@ -14,12 +13,11 @@ export const useVotingPowerOf: IUseVotingPowerOf = ({
userAddress,
}) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getVotingPowerOfDocument,
{
- client: apolloClient[chainId]['Governance1.5'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
id: daoId?.toLowerCase(),
userAddress: userAddress?.toLowerCase(),
diff --git a/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/checkDataSourceAvailability.ts b/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/checkDataSourceAvailability.ts
deleted file mode 100644
index 28ab04e7..00000000
--- a/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/checkDataSourceAvailability.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { subgraphClientsUris } from 'clients/apollo';
-
-// TODO: Check for health of connection if found
-
-export const checkDataSourceAvailability = chainId => {
- return !!subgraphClientsUris[chainId]['Guilds'];
-};
diff --git a/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/index.ts b/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/index.ts
index 207df36d..bd35f743 100644
--- a/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/index.ts
+++ b/apps/davi/src/stores/modules/guilds/SnapshotERC20Guild/index.ts
@@ -42,7 +42,7 @@ import {
useVotingPowerOf,
useMemberCount,
} from './fetchers/rpc';
-import { checkDataSourceAvailability } from './checkDataSourceAvailability';
+import { checkDataSourceAvailability } from '../common/checkDataSourceAvailability';
import localBytecodes from 'bytecodes/local.json';
import prodBytecodes from 'bytecodes/prod.json';
diff --git a/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/checkDataSourceAvailability.ts b/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/checkDataSourceAvailability.ts
deleted file mode 100644
index 28ab04e7..00000000
--- a/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/checkDataSourceAvailability.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { subgraphClientsUris } from 'clients/apollo';
-
-// TODO: Check for health of connection if found
-
-export const checkDataSourceAvailability = chainId => {
- return !!subgraphClientsUris[chainId]['Guilds'];
-};
diff --git a/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/index.ts b/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/index.ts
index c0e98c00..2874816f 100644
--- a/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/index.ts
+++ b/apps/davi/src/stores/modules/guilds/SnapshotRepERC20Guild/index.ts
@@ -41,7 +41,7 @@ import {
useVotingPowerOf,
useMemberCount,
} from './fetchers/rpc';
-import { checkDataSourceAvailability } from './checkDataSourceAvailability';
+import { checkDataSourceAvailability } from '../common/checkDataSourceAvailability';
import localBytecodes from 'bytecodes/local.json';
import prodBytecodes from 'bytecodes/prod.json';
diff --git a/apps/davi/src/stores/modules/guilds/common/checkDataSourceAvailability.ts b/apps/davi/src/stores/modules/guilds/common/checkDataSourceAvailability.ts
new file mode 100644
index 00000000..88624931
--- /dev/null
+++ b/apps/davi/src/stores/modules/guilds/common/checkDataSourceAvailability.ts
@@ -0,0 +1,51 @@
+import { subgraphClientsUris } from 'clients/apollo';
+import { SupportedSubgraph } from 'stores/types';
+
+export const checkDataSourceAvailability = async chainId => {
+ try {
+ if (!subgraphClientsUris?.[chainId]?.[SupportedSubgraph.Guilds]) {
+ console.debug('No subgraph URL for this chain, using fallback');
+ return false;
+ }
+
+ const query = `{
+ _meta {
+ block {
+ number
+ timestamp
+ }
+ }
+ }`;
+
+ const response = await fetch(
+ subgraphClientsUris[chainId][SupportedSubgraph.Guilds],
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({ query }),
+ }
+ );
+ const { data, errors } = await response.json();
+
+ if (data?._meta?.block?.timestamp < Math.floor(Date.now() / 1000) - 600) {
+ console.debug('Subgraph out of sync, using fallback');
+ return false;
+ }
+ if (errors) {
+ console.debug('Error occurred checking source health');
+ console.error(errors);
+ return false;
+ }
+ if (data) {
+ console.debug('Subgraph exists and is above 10 minutes in sync');
+ return true;
+ } else {
+ console.debug('No default data source data, using fallback');
+ return false;
+ }
+ } catch {
+ return false;
+ }
+};
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetAllPermissions/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetAllPermissions/index.ts
index 148b8db1..cd499625 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetAllPermissions/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetAllPermissions/index.ts
@@ -1,4 +1,3 @@
-import { useNetwork } from 'wagmi';
import { useMemo } from 'react';
import { BigNumber } from 'ethers';
import { useQuery } from '@apollo/client';
@@ -8,15 +7,14 @@ import {
getAllFunctionCallPermissionsDocument,
getAllTokenPermissionsDocument,
} from '.graphclient';
-import { apolloClient } from 'clients/apollo';
-import { FetcherHooksInterface } from 'stores/types';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
+import { getApolloClient } from 'clients/apollo';
+import { useNetwork } from 'wagmi';
type IUseGetAllPermissions = FetcherHooksInterface['useGetAllPermissions'];
export const useGetAllPermissions: IUseGetAllPermissions = (daoId, filter) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const queryToExecute = useMemo(() => {
if (!filter) {
@@ -35,7 +33,7 @@ export const useGetAllPermissions: IUseGetAllPermissions = (daoId, filter) => {
const { data, loading, error } = useQuery(
queryToExecute,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLocaleLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetMemberList/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetMemberList/index.ts
index 0ebd99a8..702f2b22 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetMemberList/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetMemberList/index.ts
@@ -1,22 +1,19 @@
import { useMemo } from 'react';
-import { useNetwork } from 'wagmi';
import { BigNumber } from 'ethers';
import { useQuery } from '@apollo/client';
import { getMemberListDocument, getMemberListQuery } from '.graphclient';
-import { FetcherHooksInterface } from 'stores/types';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
+import { getApolloClient } from 'clients/apollo';
+import { useNetwork } from 'wagmi';
type IUseGetMemberList = FetcherHooksInterface['useGetMemberList'];
export const useGetMemberList: IUseGetMemberList = guildAddress => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
-
const { data, loading, error } = useQuery(
getMemberListDocument,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: guildAddress?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/index.ts
index 549ffe49..08082c80 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/index.ts
@@ -1,5 +1,4 @@
import { useMemo } from 'react';
-import { useNetwork } from 'wagmi';
import { useQuery } from '@apollo/client';
import { BigNumber } from 'ethers';
import {
@@ -7,18 +6,20 @@ import {
getNumberOfActiveProposalsQuery,
} from '.graphclient';
import { useListenToProposalStateChanged } from 'stores/modules/guilds/common/events/useListenToProposalStateChanged';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { useNetwork } from 'wagmi';
+import { getApolloClient } from 'clients/apollo';
+import { SupportedSubgraph } from 'stores/types';
+import { useBackoff } from '../utils/backoff';
export const useGetNumberOfActiveProposals = (guildAddress: string) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
+ const { backoff } = useBackoff();
const { data, refetch, loading, error } =
useQuery(
getNumberOfActiveProposalsDocument,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: guildAddress?.toLowerCase() },
}
);
@@ -26,7 +27,7 @@ export const useGetNumberOfActiveProposals = (guildAddress: string) => {
if (!data?.guild) return undefined;
return BigNumber.from(data.guild.proposals.length);
}, [data]);
- useListenToProposalStateChanged(guildAddress, refetch);
+ useListenToProposalStateChanged(guildAddress, () => backoff(refetch));
return {
data: transformedData,
isLoading: loading,
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/query.graphql b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/query.graphql
index 738ec980..a53825ea 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/query.graphql
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetNumberOfActiveProposals/query.graphql
@@ -6,5 +6,10 @@ query getNumberOfActiveProposals($id: ID!) {
id
}
}
+ _meta {
+ block {
+ number
+ }
+ }
}
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/index.ts
index be335b47..4a75a07c 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/index.ts
@@ -1,24 +1,24 @@
import { useMemo } from 'react';
import { useQuery } from '@apollo/client';
import { BigNumber } from 'ethers';
-import { useNetwork } from 'wagmi';
import { useTranslation } from 'react-i18next';
import { getVotesDocument, getVotesQuery } from '.graphclient';
import { useHookStoreProvider } from 'stores';
-import { FetcherHooksInterface } from 'stores/types';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { getBigNumberPercentage } from 'utils/bnPercentage';
import { useListenToVoteAdded } from 'stores/modules/guilds/common/events';
import useProposalMetadata from 'hooks/Guilds/useProposalMetadata';
import { getGuildOptionLabel } from 'utils/proposals';
import { Vote } from 'types/types.guilds.d';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { useNetwork } from 'wagmi';
+import { getApolloClient } from 'clients/apollo';
+import { useBackoff } from '../utils/backoff';
type IUseGetVotes = FetcherHooksInterface['useGetVotes'];
export const useGetVotes: IUseGetVotes = (guildId, proposal) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
+ const { backoff } = useBackoff();
const {
hooks: {
@@ -29,7 +29,7 @@ export const useGetVotes: IUseGetVotes = (guildId, proposal) => {
const { data, refetch, loading, error } = useQuery(
getVotesDocument,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: proposal?.id },
}
);
@@ -57,7 +57,7 @@ export const useGetVotes: IUseGetVotes = (guildId, proposal) => {
});
}, [data?.proposal?.votes, proposalMetadata, t, totalLocked]);
- useListenToVoteAdded(guildId, refetch, proposal?.id);
+ useListenToVoteAdded(guildId, () => backoff(refetch), proposal?.id);
return {
data: parsedData,
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/query.graphql b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/query.graphql
index be8af74f..df17593c 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/query.graphql
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGetVotes/query.graphql
@@ -7,5 +7,10 @@ query getVotes($id: ID!) {
option
}
}
+ _meta {
+ block {
+ number
+ }
+ }
}
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildConfig/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildConfig/index.ts
index da7ce309..98144ee0 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildConfig/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildConfig/index.ts
@@ -1,24 +1,23 @@
-import { useNetwork } from 'wagmi';
import { useMemo } from 'react';
import { BigNumber } from 'ethers';
import { useQuery } from '@apollo/client';
import { getGuildConfigDocument, getGuildConfigQuery } from '.graphclient';
-import { SUPPORTED_DAVI_NETWORKS, ZERO_ADDRESS } from 'utils';
-import { apolloClient } from 'clients/apollo';
+import { ZERO_ADDRESS } from 'utils';
import { GuildConfigProps } from 'types/types.guilds';
-import { FetcherHooksInterface } from 'stores/types';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useVotingPowerForProposalExecution } from 'Modules/Guilds/Hooks/useVotingPowerForProposalExecution';
+import { useNetwork } from 'wagmi';
+import { getApolloClient } from 'clients/apollo';
type IUseGuildConfig = FetcherHooksInterface['useGuildConfig'];
export const useGuildConfig: IUseGuildConfig = (guildAddress, proposalId?) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getGuildConfigDocument,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: guildAddress?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildProposalIds/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildProposalIds/index.ts
index f400521d..a7007a39 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildProposalIds/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useGuildProposalIds/index.ts
@@ -1,24 +1,22 @@
-import { useNetwork } from 'wagmi';
import { useMemo } from 'react';
import { useQuery } from '@apollo/client';
import {
getGuildProposalIdsQuery,
getGuildProposalIdsDocument,
} from '.graphclient';
-import { FetcherHooksInterface } from 'stores/types';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
+import { useNetwork } from 'wagmi';
+import { getApolloClient } from 'clients/apollo';
type IUseGuildProposalIds = FetcherHooksInterface['useGuildProposalIds'];
export const useGuildProposalIds: IUseGuildProposalIds = daoId => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, loading, error } = useQuery(
getGuildProposalIdsDocument,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: { id: daoId?.toLowerCase() },
}
);
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/index.ts
index ee12ae22..2b383dfa 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/index.ts
@@ -1,12 +1,11 @@
import { useMemo } from 'react';
-import { useNetwork } from 'wagmi';
import { useTranslation } from 'react-i18next';
import { BigNumber } from 'ethers';
import { unix } from 'moment';
import { useQuery } from '@apollo/client';
import { getProposalDocument, getProposalQuery } from '.graphclient';
import { useHookStoreProvider } from 'stores';
-import { FetcherHooksInterface } from 'stores/types';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useProposalCalls } from 'stores/modules/guilds/common/fetchers/rpc';
import { ContractState, Proposal } from 'types/types.guilds.d';
import { getBigNumberPercentage } from 'utils/bnPercentage';
@@ -16,19 +15,19 @@ import {
useListenToProposalStateChanged,
useListenToVoteAdded,
} from 'stores/modules/guilds/common/events';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { useNetwork } from 'wagmi';
+import { getApolloClient } from 'clients/apollo';
+import { useBackoff } from '../utils/backoff';
type IUseProposal = FetcherHooksInterface['useProposal'];
export const useProposal: IUseProposal = (daoId, proposalId) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
const { data, refetch, error } = useQuery(
getProposalDocument,
{
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
id: daoId?.toLowerCase(),
proposalId: proposalId?.toLowerCase(),
@@ -44,6 +43,7 @@ export const useProposal: IUseProposal = (daoId, proposalId) => {
} = useHookStoreProvider();
const { t } = useTranslation();
+ const { backoff } = useBackoff();
const { data: proposalMetadata } = useProposalMetadata(proposal?.contentHash);
const { data: totalLocked } = useTotalLocked(daoId, proposalId);
@@ -116,8 +116,8 @@ export const useProposal: IUseProposal = (daoId, proposalId) => {
if (parsedProposalData && options) parsedProposalData.options = options;
- useListenToProposalStateChanged(daoId, refetch, proposalId);
- useListenToVoteAdded(daoId, refetch, proposalId);
+ useListenToProposalStateChanged(daoId, () => backoff(refetch), proposalId);
+ useListenToVoteAdded(daoId, () => backoff(refetch), proposalId);
return {
data: parsedProposalData,
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/query.graphql b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/query.graphql
index b84c2628..d60edff6 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/query.graphql
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposal/query.graphql
@@ -23,5 +23,10 @@ query getProposal($id: ID!, $proposalId: ID!) {
}
}
}
+ _meta {
+ block {
+ number
+ }
+ }
}
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/index.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/index.ts
index 070731de..02e4a4a4 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/index.ts
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/index.ts
@@ -1,5 +1,4 @@
-import { useNetwork } from 'wagmi';
-import { FetcherHooksInterface } from 'stores/types';
+import { FetcherHooksInterface, SupportedSubgraph } from 'stores/types';
import { useQuery } from '@apollo/client';
import {
getProposalVotesOfVoterDocument,
@@ -8,8 +7,9 @@ import {
import { useListenToVoteAdded } from 'stores/modules/guilds/common/events';
import { useMemo } from 'react';
import { BigNumber } from 'ethers';
-import { apolloClient } from 'clients/apollo';
-import { SUPPORTED_DAVI_NETWORKS } from 'utils';
+import { useNetwork } from 'wagmi';
+import { getApolloClient } from 'clients/apollo';
+import { useBackoff } from '../utils/backoff';
type IUseProposalVotesOfVoter =
FetcherHooksInterface['useProposalVotesOfVoter'];
@@ -20,15 +20,14 @@ export const useProposalVotesOfVoter: IUseProposalVotesOfVoter = (
userAddress: `0x${string}`
) => {
const { chain } = useNetwork();
- const chainId: SUPPORTED_DAVI_NETWORKS = useMemo(() => chain?.id, [chain]);
- const userAddressToLower = userAddress.toLowerCase();
+ const { backoff } = useBackoff();
const { data, refetch, loading, error } =
useQuery(getProposalVotesOfVoterDocument, {
- client: apolloClient[chainId]['Guilds'],
+ client: getApolloClient(SupportedSubgraph.Guilds, chain?.id),
variables: {
proposalId: proposalId,
- userAddress: userAddressToLower,
+ userAddress: userAddress?.toLowerCase(),
},
});
@@ -48,7 +47,8 @@ export const useProposalVotesOfVoter: IUseProposalVotesOfVoter = (
}
}, [data?.proposal?.votes]);
- useListenToVoteAdded(daoAddress, refetch, proposalId);
+ // Listen for events
+ useListenToVoteAdded(daoAddress, () => backoff(refetch), proposalId);
return {
data: parsedData,
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/query.graphql b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/query.graphql
index 8e7d3dae..a7fda4ae 100644
--- a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/query.graphql
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/useProposalVotesOfVoter/query.graphql
@@ -5,5 +5,10 @@ query getProposalVotesOfVoter($proposalId: ID!, $userAddress: String!) {
votingPower
}
}
+ _meta {
+ block {
+ number
+ }
+ }
}
diff --git a/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/utils/backoff.ts b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/utils/backoff.ts
new file mode 100644
index 00000000..82bfdee7
--- /dev/null
+++ b/apps/davi/src/stores/modules/guilds/common/fetchers/subgraph/utils/backoff.ts
@@ -0,0 +1,36 @@
+import { useBlockNumber } from 'wagmi';
+
+export const useBackoff = () => {
+ const { data: block } = useBlockNumber({
+ watch: true,
+ });
+ let currentBlock = 0;
+
+ // Backoff and retry logic
+ const backoff = (fun, successFun, failureFun, exponent) => {
+ setTimeout(async () => {
+ const { data } = await fun();
+ if (currentBlock < 1) {
+ console.log('Still fetching current block');
+ } else if (data?._meta.block.number > currentBlock) {
+ successFun();
+ } else if (exponent <= 20) {
+ backoff(fun, successFun, failureFun, exponent + 1);
+ } else {
+ failureFun();
+ }
+ }, Math.pow(2, exponent) + Math.random() * 10000);
+ };
+
+ return {
+ backoff: async (refetch: () => any) => {
+ currentBlock = block;
+ backoff(
+ refetch,
+ () => (currentBlock = 0),
+ () => console.log('Failed to fetch new data'),
+ 0
+ );
+ },
+ };
+};
diff --git a/apps/davi/src/stores/types.ts b/apps/davi/src/stores/types.ts
index 7fb7c1cd..1a1a371d 100644
--- a/apps/davi/src/stores/types.ts
+++ b/apps/davi/src/stores/types.ts
@@ -22,7 +22,10 @@ type SupportedGovernanceSystem =
| 'SnapshotRepERC20Guild'
| 'Governance1_5';
-export type SupportedSubgraphs = 'Guilds' | 'Governance1.5';
+export enum SupportedSubgraph {
+ Guilds = 'Guilds',
+ Governance1_5 = 'Governance1.5',
+}
// TODO: Wrap fetcher return types in a common FetcherHookReturn type which has common loading / error statuses
export interface FetcherHooksInterface {
@@ -217,7 +220,7 @@ export interface FullGovernanceImplementation {
bytecodes: `0x${string}`[];
hooks: HooksInterfaceWithFallback;
capabilities: GovernanceCapabilities;
- checkDataSourceAvailability: (chainId: number) => boolean;
+ checkDataSourceAvailability: (chainId: number) => Promise;
}
export interface GovernanceTypeInterface
diff --git a/apps/davi/src/utils/constants.ts b/apps/davi/src/utils/constants.ts
index ebf3de1c..d0f26569 100644
--- a/apps/davi/src/utils/constants.ts
+++ b/apps/davi/src/utils/constants.ts
@@ -25,8 +25,6 @@ export const CACHE_METADATA_ENS = 'cache.dxvote.eth';
const defaultAlchemyKey = 'FvNKXPCxtzFYrtP4r45pmtxOR0AMCtQv';
-export const DISCOURSE_URL_ROOT = 'https://daotalk.org';
-
export const MAINNET_ID = 1;
export const GNOSIS_ID = 100;
export const LOCALHOST_ID = 1337;
@@ -37,13 +35,13 @@ export const ARBITRUM_TESTNET_ID = 421611;
export const DEFAULT_CHAIN_ID =
process.env.NODE_ENV === 'development' ? LOCALHOST_ID : MAINNET_ID;
-export enum SUPPORTED_DAVI_NETWORKS {
- MAINNET_ID = 1,
- GOERLI_ID = 5,
- ARBITRUM_ID = 42161,
- ARBITRUM_TESTNET_ID = 421611,
- LOCALHOST_ID = 1337,
- GNOSIS_ID = 100,
+export enum CHAIN_ID {
+ MAINNET = MAINNET_ID,
+ GOERLI = GOERLI_ID,
+ ARBITRUM = ARBITRUM_ID,
+ ARBITRUM_TESTNET = ARBITRUM_TESTNET_ID,
+ LOCALHOST = LOCALHOST_ID,
+ GNOSIS = GNOSIS_ID,
}
export const POKT_NETWORK_URLS = {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8196cd96..29b439f3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -85,6 +85,7 @@ importers:
'@tiptap/extension-highlight': ^2.0.0-beta.32
'@tiptap/extension-link': ^2.0.0-beta.209
'@tiptap/extension-placeholder': ^2.0.0-beta.48
+ '@tiptap/pm': ^2.0.0-beta.219
'@tiptap/react': ^2.0.0-beta.105
'@tiptap/starter-kit': ^2.0.0-beta.171
'@types/diff': ^5.0.2
@@ -124,8 +125,8 @@ importers:
ethers: ^5.7.2
git-revision-webpack-plugin: ^3.0.6
graphql: ^16.6.0
- hardhat: ^2.9.1
- hardhat-dependency-compiler: ^1.1.2
+ hardhat: ^2.12.7
+ hardhat-dependency-compiler: ^1.1.3
hardhat-ethernal: ^1.0.0
highlight.js: ^11.6.0
i18next: ^21.6.16
@@ -204,9 +205,9 @@ importers:
'@graphql-mesh/runtime': 0.46.5_graphql@16.6.0
'@graphql-mesh/store': 0.9.5_graphql@16.6.0
'@graphql-mesh/utils': 0.43.5_graphql@16.6.0
- '@nomiclabs/hardhat-ethers': 2.2.1_gsql6crh4t5imixi2nhgp37drm
- '@nomiclabs/hardhat-truffle5': 2.0.7_uoc6ciyj3xhodavqe55pqj6luu
- '@nomiclabs/hardhat-web3': 2.0.0_hardhat@2.12.3+web3@1.8.1
+ '@nomiclabs/hardhat-ethers': 2.2.1_wknqauzjtp3mhprkntsmqpccee
+ '@nomiclabs/hardhat-truffle5': 2.0.7_j44zv7qsf6saqi6s773mmrgwbq
+ '@nomiclabs/hardhat-web3': 2.0.0_hardhat@2.13.0+web3@1.8.1
'@orbisclub/orbis-sdk': 0.3.99
'@pnpm/merge-lockfile-changes': 4.0.3
'@tanstack/react-query': 4.20.9_biqbaboplfbrettd7655fr4n2y
@@ -214,6 +215,7 @@ importers:
'@tiptap/extension-highlight': 2.0.0-beta.202
'@tiptap/extension-link': 2.0.0-beta.209
'@tiptap/extension-placeholder': 2.0.0-beta.202
+ '@tiptap/pm': 2.0.0-beta.220
'@tiptap/react': 2.0.0-beta.202_biqbaboplfbrettd7655fr4n2y
'@tiptap/starter-kit': 2.0.0-beta.202
'@types/node': 16.18.3
@@ -239,8 +241,8 @@ importers:
ethers: 5.7.2
git-revision-webpack-plugin: 3.0.6
graphql: 16.6.0
- hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
- hardhat-dependency-compiler: 1.1.3_hardhat@2.12.3
+ hardhat: 2.13.0_z6wznmtyb6ovnulj6iujpct7um
+ hardhat-dependency-compiler: 1.1.3_hardhat@2.13.0
highlight.js: 11.6.0
i18next: 21.10.0
i18next-browser-languagedetector: 7.0.1
@@ -324,7 +326,7 @@ importers:
cypress-react-selector: 2.3.20
cypress-wait-until: 1.7.2
eslint: 8.30.0
- hardhat-ethernal: 1.1.1_3mpss4owsstbijogechjg2qcye
+ hardhat-ethernal: 1.1.1_3z474dof7abixsfj5y5c6mbhv4
jest-styled-components: 7.1.1_styled-components@5.3.6
lint-staged: 12.5.0
node-polyfill-webpack-plugin: 2.0.1_webpack@4.44.2
@@ -8002,6 +8004,10 @@ packages:
- utf-8-validate
dev: false
+ /@linaria/core/3.0.0-beta.13:
+ resolution: {integrity: sha512-3zEi5plBCOsEzUneRVuQb+2SAx3qaC1dj0FfFAI6zIJQoDWu0dlSwKijMRack7oO9tUWrchfj3OkKQAd1LBdVg==}
+ dev: false
+
/@mapbox/node-pre-gyp/1.0.10:
resolution: {integrity: sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==}
hasBin: true
@@ -8446,7 +8452,8 @@ packages:
hardhat: ^2.0.0
dependencies:
ethers: 5.7.2
- hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
+ hardhat: 2.12.3
+ dev: true
/@nomiclabs/hardhat-ethers/2.2.1_hardhat@2.12.3:
resolution: {integrity: sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg==}
@@ -8457,6 +8464,15 @@ packages:
hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
dev: true
+ /@nomiclabs/hardhat-ethers/2.2.1_wknqauzjtp3mhprkntsmqpccee:
+ resolution: {integrity: sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg==}
+ peerDependencies:
+ ethers: ^5.0.0
+ hardhat: ^2.0.0
+ dependencies:
+ ethers: 5.7.2
+ hardhat: 2.13.0_z6wznmtyb6ovnulj6iujpct7um
+
/@nomiclabs/hardhat-etherscan/3.1.2_hardhat@2.12.3:
resolution: {integrity: sha512-IEikeOVq0C/7CY6aD74d8L4BpGoc/FNiN6ldiPVg0QIFIUSu4FSGA1dmtJZJKk1tjpwgrfTLQNWnigtEaN9REg==}
peerDependencies:
@@ -8502,6 +8518,32 @@ packages:
- web3-utils
dev: true
+ /@nomiclabs/hardhat-truffle5/2.0.7_j44zv7qsf6saqi6s773mmrgwbq:
+ resolution: {integrity: sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==}
+ peerDependencies:
+ '@nomiclabs/hardhat-web3': ^2.0.0
+ hardhat: ^2.6.4
+ web3: ^1.0.0-beta.36
+ dependencies:
+ '@nomiclabs/hardhat-web3': 2.0.0_hardhat@2.13.0+web3@1.8.1
+ '@nomiclabs/truffle-contract': 4.5.10_web3@1.8.1
+ '@types/chai': 4.3.4
+ chai: 4.3.7
+ ethereumjs-util: 7.1.5
+ fs-extra: 7.0.1
+ hardhat: 2.13.0_z6wznmtyb6ovnulj6iujpct7um
+ web3: 1.8.1
+ transitivePeerDependencies:
+ - bufferutil
+ - encoding
+ - supports-color
+ - utf-8-validate
+ - web3-core-helpers
+ - web3-core-promievent
+ - web3-eth-abi
+ - web3-utils
+ dev: false
+
/@nomiclabs/hardhat-truffle5/2.0.7_uoc6ciyj3xhodavqe55pqj6luu:
resolution: {integrity: sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==}
peerDependencies:
@@ -8515,7 +8557,7 @@ packages:
chai: 4.3.7
ethereumjs-util: 7.1.5
fs-extra: 7.0.1
- hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
+ hardhat: 2.12.3
web3: 1.8.1
transitivePeerDependencies:
- bufferutil
@@ -8526,6 +8568,7 @@ packages:
- web3-core-promievent
- web3-eth-abi
- web3-utils
+ dev: true
/@nomiclabs/hardhat-web3/2.0.0_hardhat@2.12.3:
resolution: {integrity: sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==}
@@ -8544,8 +8587,20 @@ packages:
web3: ^1.0.0-beta.36
dependencies:
'@types/bignumber.js': 5.0.0
- hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
+ hardhat: 2.12.3
web3: 1.8.1
+ dev: true
+
+ /@nomiclabs/hardhat-web3/2.0.0_hardhat@2.13.0+web3@1.8.1:
+ resolution: {integrity: sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==}
+ peerDependencies:
+ hardhat: ^2.0.0
+ web3: ^1.0.0-beta.36
+ dependencies:
+ '@types/bignumber.js': 5.0.0
+ hardhat: 2.13.0_z6wznmtyb6ovnulj6iujpct7um
+ web3: 1.8.1
+ dev: false
/@nomiclabs/truffle-contract/4.5.10:
resolution: {integrity: sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ==}
@@ -9010,6 +9065,38 @@ packages:
resolution: {integrity: sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA==}
dev: true
+ /@remirror/core-constants/2.0.0:
+ resolution: {integrity: sha512-vpePPMecHJllBqCWXl6+FIcZqS+tRUM2kSCCKFeEo1H3XUEv3ocijBIPhnlSAa7g6maX+12ATTgxrOsLpWVr2g==}
+ dependencies:
+ '@babel/runtime': 7.20.1
+ dev: false
+
+ /@remirror/core-helpers/2.0.1:
+ resolution: {integrity: sha512-s8M1pn33aBUhduvD1QR02uUQMegnFkGaTr4c1iBzxTTyg0rbQstzuQ7Q8TkL6n64JtgCdJS9jLz2dONb2meBKQ==}
+ dependencies:
+ '@babel/runtime': 7.20.1
+ '@linaria/core': 3.0.0-beta.13
+ '@remirror/core-constants': 2.0.0
+ '@remirror/types': 1.0.0
+ '@types/object.omit': 3.0.0
+ '@types/object.pick': 1.3.2
+ '@types/throttle-debounce': 2.1.0
+ case-anything: 2.1.10
+ dash-get: 1.0.2
+ deepmerge: 4.2.2
+ fast-deep-equal: 3.1.3
+ make-error: 1.3.6
+ object.omit: 3.0.0
+ object.pick: 1.3.0
+ throttle-debounce: 3.0.1
+ dev: false
+
+ /@remirror/types/1.0.0:
+ resolution: {integrity: sha512-7HQbW7k8VxrAtfzs9FxwO6XSDabn8tSFDi1wwzShOnU+cvaYpfxu0ygyTk3TpXsag1hgFKY3ZIlAfB4WVz2LkQ==}
+ dependencies:
+ type-fest: 2.19.0
+ dev: false
+
/@remix-run/router/1.0.3:
resolution: {integrity: sha512-ceuyTSs7PZ/tQqi19YZNBc5X7kj1f8p+4DIyrcIYFY9h+hd1OKm4RqtiWldR9eGEvIiJfsqwM4BsuCtRIuEw6Q==}
engines: {node: '>=14'}
@@ -10470,7 +10557,7 @@ packages:
'@pmmmwh/react-refresh-webpack-plugin': 0.5.9_webpack@4.44.2
'@storybook/node-logger': 6.5.13
'@storybook/react': 6.5.13_u7mmoyqfty2flmkfggora6dwra
- '@storybook/react-docgen-typescript-plugin': 1.0.2--canary.7.391457fcf6c823971cf02d8e74dbf8e242872b26.0_kez4q42cbkzhbdaaypir545cty
+ '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.cd77847.0_kez4q42cbkzhbdaaypir545cty
'@types/babel__core': 7.1.20
babel-plugin-react-docgen: 4.2.1
pnp-webpack-plugin: 1.7.0_typescript@4.9.4
@@ -10515,8 +10602,8 @@ packages:
util-deprecate: 1.0.2
dev: true
- /@storybook/react-docgen-typescript-plugin/1.0.2--canary.7.391457fcf6c823971cf02d8e74dbf8e242872b26.0_kez4q42cbkzhbdaaypir545cty:
- resolution: {integrity: sha512-QDa+qccIygDjdfg6Z/CjPWlNY5ia+oFvy8pK5XCGsNXCpTfVL8gbGa63tonCUeNxqioWLOpysUGsyHR+t4uzPg==}
+ /@storybook/react-docgen-typescript-plugin/1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0_3fkjkrd3audxnith3e7fo4fnxi:
+ resolution: {integrity: sha512-eVg3BxlOm2P+chijHBTByr90IZVUtgRW56qEOLX7xlww2NBuKrcavBlcmn+HH7GIUktquWkMPtvy6e0W0NgA5w==}
peerDependencies:
typescript: '>= 3.x'
webpack: '>= 4'
@@ -10529,15 +10616,15 @@ packages:
react-docgen-typescript: 2.2.2_typescript@4.9.4
tslib: 2.5.0
typescript: 4.9.4
- webpack: 4.44.2
+ webpack: 5.75.0
transitivePeerDependencies:
- supports-color
dev: true
- /@storybook/react-docgen-typescript-plugin/1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0_3fkjkrd3audxnith3e7fo4fnxi:
- resolution: {integrity: sha512-eVg3BxlOm2P+chijHBTByr90IZVUtgRW56qEOLX7xlww2NBuKrcavBlcmn+HH7GIUktquWkMPtvy6e0W0NgA5w==}
+ /@storybook/react-docgen-typescript-plugin/1.0.6--canary.9.cd77847.0_kez4q42cbkzhbdaaypir545cty:
+ resolution: {integrity: sha512-I4oBYmnUCX5IsrZhg+ST72dubSIV4wdwY+SfqJiJ3NHvDpdb240ZjdHAmjIy/yJh5rh42Fl4jbG8Tr4SzwV53Q==}
peerDependencies:
- typescript: '>= 3.x'
+ typescript: '>= 4.x'
webpack: '>= 4'
dependencies:
debug: 4.3.4
@@ -10548,7 +10635,7 @@ packages:
react-docgen-typescript: 2.2.2_typescript@4.9.4
tslib: 2.5.0
typescript: 4.9.4
- webpack: 5.75.0
+ webpack: 4.44.2
transitivePeerDependencies:
- supports-color
dev: true
@@ -11439,6 +11526,31 @@ packages:
'@tiptap/core': 2.0.0-beta.202
dev: false
+ /@tiptap/pm/2.0.0-beta.220:
+ resolution: {integrity: sha512-O9mGcmwUpEr630HY9RylIyZJKnpXi3xWINWNiAEfRJ1br5j5pHRoVRJQ1HzU+6+Z+i/8qp3zRHGLTBqihaZETA==}
+ peerDependencies:
+ '@tiptap/core': ^2.0.0-beta.209
+ dependencies:
+ prosemirror-changeset: 2.2.0
+ prosemirror-collab: 1.3.0
+ prosemirror-commands: 1.3.1
+ prosemirror-dropcursor: 1.5.0
+ prosemirror-gapcursor: 1.3.1
+ prosemirror-history: 1.3.0
+ prosemirror-inputrules: 1.2.0
+ prosemirror-keymap: 1.2.0
+ prosemirror-markdown: 1.10.1
+ prosemirror-menu: 1.2.1
+ prosemirror-model: 1.18.2
+ prosemirror-schema-basic: 1.2.1
+ prosemirror-schema-list: 1.2.2
+ prosemirror-state: 1.4.2
+ prosemirror-tables: 1.3.2
+ prosemirror-trailing-node: 2.0.3_pittxnjafysooc5fjh2fcbuwfq
+ prosemirror-transform: 1.7.0
+ prosemirror-view: 1.29.1
+ dev: false
+
/@tiptap/react/2.0.0-beta.202_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-K0vjWOhqBFSN68wdIWvfUOer38GbBdOi80cZH7bafZQbka2gD8l6v0qknwM4KxOiq9FpqGBOVmGQs0ukgWGSDA==}
peerDependencies:
@@ -12250,6 +12362,14 @@ packages:
resolution: {integrity: sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ==}
dev: true
+ /@types/object.omit/3.0.0:
+ resolution: {integrity: sha512-I27IoPpH250TUzc9FzXd0P1BV/BMJuzqD3jOz98ehf9dQqGkxlq+hO1bIqZGWqCg5bVOy0g4AUVJtnxe0klDmw==}
+ dev: false
+
+ /@types/object.pick/1.3.2:
+ resolution: {integrity: sha512-sn7L+qQ6RLPdXRoiaE7bZ/Ek+o4uICma/lBFPyJEKDTPTBP1W8u0c4baj3EiS4DiqLs+Hk+KUGvMVJtAw3ePJg==}
+ dev: false
+
/@types/parse-json/4.0.0:
resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==}
@@ -12445,6 +12565,10 @@ packages:
'@types/jest': 27.5.2
dev: true
+ /@types/throttle-debounce/2.1.0:
+ resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==}
+ dev: false
+
/@types/trusted-types/2.0.2:
resolution: {integrity: sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==}
@@ -13528,7 +13652,7 @@ packages:
form-data-encoder: 1.7.1
formdata-node: 4.4.1
node-fetch: 2.6.8
- undici: 5.12.0
+ undici: 5.20.0
web-streams-polyfill: 3.2.1
transitivePeerDependencies:
- encoding
@@ -13543,7 +13667,7 @@ packages:
form-data-encoder: 1.7.1
formdata-node: 4.4.1
node-fetch: 2.6.8
- undici: 5.12.0
+ undici: 5.20.0
web-streams-polyfill: 3.2.1
transitivePeerDependencies:
- encoding
@@ -13558,7 +13682,7 @@ packages:
form-data-encoder: 1.7.1
formdata-node: 4.4.1
node-fetch: 2.6.8
- undici: 5.12.0
+ undici: 5.20.0
urlpattern-polyfill: 6.0.2
web-streams-polyfill: 3.2.1
transitivePeerDependencies:
@@ -16841,6 +16965,11 @@ packages:
multiformats: 9.9.0
dev: false
+ /case-anything/2.1.10:
+ resolution: {integrity: sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==}
+ engines: {node: '>=12.13'}
+ dev: false
+
/case-sensitive-paths-webpack-plugin/2.4.0:
resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==}
engines: {node: '>=4'}
@@ -18039,6 +18168,10 @@ packages:
/create-require/1.1.1:
resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}
+ /crelt/1.0.5:
+ resolution: {integrity: sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==}
+ dev: false
+
/cron/1.8.2:
resolution: {integrity: sha512-Gk2c4y6xKEO8FSAUTklqtfSr7oTq0CiPQeLBG5Fl0qoXpZyMcj1SG59YL+hqq04bu6/IuEA7lMkYDAplQNKkyg==}
dependencies:
@@ -18563,6 +18696,10 @@ packages:
resolution: {integrity: sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==}
dev: true
+ /dash-get/1.0.2:
+ resolution: {integrity: sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ==}
+ dev: false
+
/dashdash/1.14.1:
resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
engines: {node: '>=0.10'}
@@ -19411,9 +19548,9 @@ packages:
engines: {node: '>=16.0.0', npm: '>=7.0.0'}
dependencies:
debug: 4.3.4
- native-fetch: 4.0.2_undici@5.12.0
+ native-fetch: 4.0.2_undici@5.20.0
receptacle: 1.3.2
- undici: 5.12.0
+ undici: 5.20.0
transitivePeerDependencies:
- supports-color
dev: false
@@ -19953,6 +20090,11 @@ packages:
/entities/2.2.0:
resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==}
+ /entities/3.0.1:
+ resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==}
+ engines: {node: '>=0.12'}
+ dev: false
+
/entities/4.4.0:
resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==}
engines: {node: '>=0.12'}
@@ -23707,6 +23849,16 @@ packages:
hardhat: ^2.0.0
dependencies:
hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
+ dev: true
+
+ /hardhat-dependency-compiler/1.1.3_hardhat@2.13.0:
+ resolution: {integrity: sha512-bCDqsOxGST6WkbMvj4lPchYWidNSSBm5CFnkyAex1T11cGmr9otZTGl81W6f9pmrtBXbKCvr3OSuNJ6Q394sAw==}
+ engines: {node: '>=14.14.0'}
+ peerDependencies:
+ hardhat: ^2.0.0
+ dependencies:
+ hardhat: 2.13.0_z6wznmtyb6ovnulj6iujpct7um
+ dev: false
/hardhat-deploy/0.11.20:
resolution: {integrity: sha512-6G2aFLW0mfZxY0ljDf8rxzEJkVh57gr3Eia5H2DeBIQNJh0dhBV2Y5LDq4E4J9K4Crq0DjpxGNTshEtAB9eWxA==}
@@ -23737,13 +23889,27 @@ packages:
hardhat: ^2.9.1
dependencies:
'@firebase/firestore-types': 2.2.0
- '@nomiclabs/hardhat-ethers': 2.2.1_gsql6crh4t5imixi2nhgp37drm
+ '@nomiclabs/hardhat-ethers': 2.2.1_hardhat@2.12.3
firebase: 8.2.6
hardhat: 2.12.3_z6wznmtyb6ovnulj6iujpct7um
transitivePeerDependencies:
- '@firebase/app-types'
dev: true
+ /hardhat-ethernal/1.1.1_3z474dof7abixsfj5y5c6mbhv4:
+ resolution: {integrity: sha512-I7drNE1t7+vknZzmF9jfw762XPM6SurlKBABlYbJupYgZOVjwcVBsm9qvE3+jIrS2L6T1z2hXzhU67KEF1XOCA==}
+ peerDependencies:
+ '@nomiclabs/hardhat-ethers': npm:hardhat-deploy-ethers@^0.3.0-beta.10
+ hardhat: ^2.9.1
+ dependencies:
+ '@firebase/firestore-types': 2.2.0
+ '@nomiclabs/hardhat-ethers': 2.2.1_wknqauzjtp3mhprkntsmqpccee
+ firebase: 8.2.6
+ hardhat: 2.13.0_z6wznmtyb6ovnulj6iujpct7um
+ transitivePeerDependencies:
+ - '@firebase/app-types'
+ dev: true
+
/hardhat-gas-reporter/1.0.9_hardhat@2.12.3:
resolution: {integrity: sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==}
peerDependencies:
@@ -23884,7 +24050,7 @@ packages:
solc: 0.7.3_debug@4.3.4
source-map-support: 0.5.21
stacktrace-parser: 0.1.10
- ts-node: 10.9.1_rniibfx3zftzehea7t244vwgdu
+ ts-node: 10.9.1_typescript@4.9.4
tsort: 0.0.1
typescript: 4.9.4
undici: 5.12.0
@@ -23894,6 +24060,77 @@ packages:
- bufferutil
- supports-color
- utf-8-validate
+ dev: true
+
+ /hardhat/2.13.0_z6wznmtyb6ovnulj6iujpct7um:
+ resolution: {integrity: sha512-ZlzBOLML1QGlm6JWyVAG8lVTEAoOaVm1in/RU2zoGAnYEoD1Rp4T+ZMvrLNhHaaeS9hfjJ1gJUBfiDr4cx+htQ==}
+ engines: {node: '>=14.0.0'}
+ hasBin: true
+ peerDependencies:
+ ts-node: '*'
+ typescript: '*'
+ peerDependenciesMeta:
+ ts-node:
+ optional: true
+ typescript:
+ optional: true
+ dependencies:
+ '@ethersproject/abi': 5.7.0
+ '@metamask/eth-sig-util': 4.0.1
+ '@nomicfoundation/ethereumjs-block': 4.0.0
+ '@nomicfoundation/ethereumjs-blockchain': 6.0.0
+ '@nomicfoundation/ethereumjs-common': 3.0.0
+ '@nomicfoundation/ethereumjs-evm': 1.0.0
+ '@nomicfoundation/ethereumjs-rlp': 4.0.0
+ '@nomicfoundation/ethereumjs-statemanager': 1.0.0
+ '@nomicfoundation/ethereumjs-trie': 5.0.0
+ '@nomicfoundation/ethereumjs-tx': 4.0.0
+ '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-vm': 6.0.0
+ '@nomicfoundation/solidity-analyzer': 0.1.0
+ '@sentry/node': 5.30.0
+ '@types/bn.js': 5.1.1
+ '@types/lru-cache': 5.1.1
+ abort-controller: 3.0.0
+ adm-zip: 0.4.16
+ aggregate-error: 3.1.0
+ ansi-escapes: 4.3.2
+ chalk: 2.4.2
+ chokidar: 3.5.3
+ ci-info: 2.0.0
+ debug: 4.3.4
+ enquirer: 2.3.6
+ env-paths: 2.2.1
+ ethereum-cryptography: 1.1.2
+ ethereumjs-abi: 0.6.8
+ find-up: 2.1.0
+ fp-ts: 1.19.3
+ fs-extra: 7.0.1
+ glob: 7.2.0
+ immutable: 4.1.0
+ io-ts: 1.10.4
+ keccak: 3.0.2
+ lodash: 4.17.21
+ mnemonist: 0.38.5
+ mocha: 10.1.0
+ p-map: 4.0.0
+ qs: 6.11.0
+ raw-body: 2.5.1
+ resolve: 1.17.0
+ semver: 6.3.0
+ solc: 0.7.3_debug@4.3.4
+ source-map-support: 0.5.21
+ stacktrace-parser: 0.1.10
+ ts-node: 10.9.1_rniibfx3zftzehea7t244vwgdu
+ tsort: 0.0.1
+ typescript: 4.9.4
+ undici: 5.20.0
+ uuid: 8.3.2
+ ws: 7.5.9
+ transitivePeerDependencies:
+ - bufferutil
+ - supports-color
+ - utf-8-validate
/harmony-reflect/1.6.2:
resolution: {integrity: sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==}
@@ -27107,7 +27344,7 @@ packages:
iso-url: 1.2.1
it-stream-types: 1.0.5
uint8arrays: 4.0.3
- ws: 8.11.0
+ ws: 8.12.0
transitivePeerDependencies:
- bufferutil
- utf-8-validate
@@ -28999,6 +29236,12 @@ packages:
/lines-and-columns/1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ /linkify-it/4.0.1:
+ resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==}
+ dependencies:
+ uc.micro: 1.0.6
+ dev: false
+
/linkifyjs/3.0.5:
resolution: {integrity: sha512-1Y9XQH65eQKA9p2xtk+zxvnTeQBG7rdAXSkUG97DmuI/Xhji9uaUzaWxRj6rf9YC0v8KKHkxav7tnLX82Sz5Fg==}
dev: false
@@ -29590,6 +29833,17 @@ packages:
/markdown-escapes/1.0.4:
resolution: {integrity: sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==}
+ /markdown-it/13.0.1:
+ resolution: {integrity: sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==}
+ hasBin: true
+ dependencies:
+ argparse: 2.0.1
+ entities: 3.0.1
+ linkify-it: 4.0.1
+ mdurl: 1.0.1
+ uc.micro: 1.0.6
+ dev: false
+
/markdown-table/1.1.3:
resolution: {integrity: sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==}
dev: true
@@ -29674,7 +29928,6 @@ packages:
/mdurl/1.0.1:
resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==}
- dev: true
/media-typer/0.3.0:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
@@ -30695,12 +30948,12 @@ packages:
dependencies:
node-fetch: 2.6.8
- /native-fetch/4.0.2_undici@5.12.0:
+ /native-fetch/4.0.2_undici@5.20.0:
resolution: {integrity: sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg==}
peerDependencies:
undici: '*'
dependencies:
- undici: 5.12.0
+ undici: 5.20.0
dev: false
/natural-compare-lite/1.4.0:
@@ -31261,6 +31514,13 @@ packages:
define-properties: 1.1.4
es-abstract: 1.20.4
+ /object.omit/3.0.0:
+ resolution: {integrity: sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ is-extendable: 1.0.1
+ dev: false
+
/object.pick/1.3.0:
resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==}
engines: {node: '>=0.10.0'}
@@ -33558,6 +33818,18 @@ packages:
xtend: 4.0.2
dev: true
+ /prosemirror-changeset/2.2.0:
+ resolution: {integrity: sha512-QM7ohGtkpVpwVGmFb8wqVhaz9+6IUXcIQBGZ81YNAKYuHiFJ1ShvSzab4pKqTinJhwciZbrtBEk/2WsqSt2PYg==}
+ dependencies:
+ prosemirror-transform: 1.7.0
+ dev: false
+
+ /prosemirror-collab/1.3.0:
+ resolution: {integrity: sha512-+S/IJ69G2cUu2IM5b3PBekuxs94HO1CxJIWOFrLQXUaUDKL/JfBx+QcH31ldBlBXyDEUl+k3Vltfi1E1MKp2mA==}
+ dependencies:
+ prosemirror-state: 1.4.2
+ dev: false
+
/prosemirror-commands/1.3.1:
resolution: {integrity: sha512-XTporPgoECkOQACVw0JTe3RZGi+fls3/byqt+tXwGTkD7qLuB4KdVrJamDMJf4kfKga3uB8hZ+kUUyZ5oWpnfg==}
dependencies:
@@ -33591,6 +33863,13 @@ packages:
rope-sequence: 1.3.3
dev: false
+ /prosemirror-inputrules/1.2.0:
+ resolution: {integrity: sha512-eAW/M/NTSSzpCOxfR8Abw6OagdG0MiDAiWHQMQveIsZtoKVYzm0AflSPq/ymqJd56/Su1YPbwy9lM13wgHOFmQ==}
+ dependencies:
+ prosemirror-state: 1.4.2
+ prosemirror-transform: 1.7.0
+ dev: false
+
/prosemirror-keymap/1.2.0:
resolution: {integrity: sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==}
dependencies:
@@ -33598,12 +33877,40 @@ packages:
w3c-keyname: 2.2.6
dev: false
+ /prosemirror-markdown/1.10.1:
+ resolution: {integrity: sha512-s7iaTLiX+qO5z8kF2NcMmy2T7mIlxzkS4Sp3vTKSYChPtbMpg6YxFkU0Y06rUg2WtKlvBu7v1bXzlGBkfjUWAA==}
+ dependencies:
+ markdown-it: 13.0.1
+ prosemirror-model: 1.18.2
+ dev: false
+
+ /prosemirror-menu/1.2.1:
+ resolution: {integrity: sha512-sBirXxVfHalZO4f1ZS63WzewINK4182+7dOmoMeBkqYO8wqMBvBS7wQuwVOHnkMWPEh0+N0LJ856KYUN+vFkmQ==}
+ dependencies:
+ crelt: 1.0.5
+ prosemirror-commands: 1.3.1
+ prosemirror-history: 1.3.0
+ prosemirror-state: 1.4.2
+ dev: false
+
/prosemirror-model/1.18.2:
resolution: {integrity: sha512-uOQorJr20qVvqp2hs2RdWtWoidQxJ1ceE11bSmkf57XS989mdg1zKPJIp5HOHfY8/KjXPn3cLZqUYYwRrfBBPw==}
dependencies:
orderedmap: 2.1.0
dev: false
+ /prosemirror-model/1.19.0:
+ resolution: {integrity: sha512-/CvFGJnwc41EJSfDkQLly1cAJJJmBpZwwUJtwZPTjY2RqZJfM8HVbCreOY/jti8wTRbVyjagcylyGoeJH/g/3w==}
+ dependencies:
+ orderedmap: 2.1.0
+ dev: false
+
+ /prosemirror-schema-basic/1.2.1:
+ resolution: {integrity: sha512-vYBdIHsYKSDIqYmPBC7lnwk9DsKn8PnVqK97pMYP5MLEDFqWIX75JiaJTzndBii4bRuNqhC2UfDOfM3FKhlBHg==}
+ dependencies:
+ prosemirror-model: 1.19.0
+ dev: false
+
/prosemirror-schema-list/1.2.2:
resolution: {integrity: sha512-rd0pqSDp86p0MUMKG903g3I9VmElFkQpkZ2iOd3EOVg1vo5Cst51rAsoE+5IPy0LPXq64eGcCYlW1+JPNxOj2w==}
dependencies:
@@ -33615,15 +33922,41 @@ packages:
/prosemirror-state/1.4.2:
resolution: {integrity: sha512-puuzLD2mz/oTdfgd8msFbe0A42j5eNudKAAPDB0+QJRw8cO1ygjLmhLrg9RvDpf87Dkd6D4t93qdef00KKNacQ==}
dependencies:
- prosemirror-model: 1.18.2
+ prosemirror-model: 1.19.0
+ prosemirror-transform: 1.7.0
+ prosemirror-view: 1.29.1
+ dev: false
+
+ /prosemirror-tables/1.3.2:
+ resolution: {integrity: sha512-/9JTeN6s58Zq66HXaxP6uf8PAmc7XXKZFPlOGVtLvxEd6xBP6WtzaJB9wBjiGUzwbdhdMEy7V62yuHqk/3VrnQ==}
+ dependencies:
+ prosemirror-keymap: 1.2.0
+ prosemirror-model: 1.19.0
+ prosemirror-state: 1.4.2
prosemirror-transform: 1.7.0
prosemirror-view: 1.29.1
dev: false
+ /prosemirror-trailing-node/2.0.3_pittxnjafysooc5fjh2fcbuwfq:
+ resolution: {integrity: sha512-lGrjMrn97KWkjQSW/FjdvnhJmqFACmQIyr6lKYApvHitDnKsCoZz6XzrHB7RZYHni/0NxQmZ01p/2vyK2SkvaA==}
+ peerDependencies:
+ prosemirror-model: ^1
+ prosemirror-state: ^1
+ prosemirror-view: ^1
+ dependencies:
+ '@babel/runtime': 7.20.1
+ '@remirror/core-constants': 2.0.0
+ '@remirror/core-helpers': 2.0.1
+ escape-string-regexp: 4.0.0
+ prosemirror-model: 1.18.2
+ prosemirror-state: 1.4.2
+ prosemirror-view: 1.29.1
+ dev: false
+
/prosemirror-transform/1.7.0:
resolution: {integrity: sha512-O4T697Cqilw06Zvc3Wm+e237R6eZtJL/xGMliCi+Uo8VL6qHk6afz1qq0zNjT3eZMuYwnP8ZS0+YxX/tfcE9TQ==}
dependencies:
- prosemirror-model: 1.18.2
+ prosemirror-model: 1.19.0
dev: false
/prosemirror-view/1.29.1:
@@ -37785,6 +38118,11 @@ packages:
/throat/6.0.1:
resolution: {integrity: sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==}
+ /throttle-debounce/3.0.1:
+ resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==}
+ engines: {node: '>=10'}
+ dev: false
+
/throttled-queue/2.1.4:
resolution: {integrity: sha512-YGdk8sdmr4ge3g+doFj/7RLF5kLM+Mi7DEciu9PHxnMJZMeVuZeTj31g4VE7ekUffx/IdbvrtOCiz62afg0mkg==}
dev: false
@@ -38467,7 +38805,6 @@ packages:
/type-fest/2.19.0:
resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==}
engines: {node: '>=12.20'}
- dev: true
/type-is/1.6.18:
resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
@@ -38593,6 +38930,10 @@ packages:
resolution: {integrity: sha512-dXVsz3M4j+5tTiovFVyVqssXBu5HM47//YSOeZ9fQkdDKkfzv2v3PP1jmH6FUyPW+yCSn7aBVK1fGGKNhowdDA==}
dev: false
+ /uc.micro/1.0.6:
+ resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==}
+ dev: false
+
/uglify-js/2.8.29:
resolution: {integrity: sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==}
engines: {node: '>=0.8.0'}
@@ -38708,6 +39049,12 @@ packages:
dependencies:
busboy: 1.6.0
+ /undici/5.20.0:
+ resolution: {integrity: sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==}
+ engines: {node: '>=12.18'}
+ dependencies:
+ busboy: 1.6.0
+
/unfetch/4.2.0:
resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==}
dev: true
@@ -41373,6 +41720,7 @@ packages:
optional: true
utf-8-validate:
optional: true
+ dev: true
/ws/8.12.0:
resolution: {integrity: sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==}