diff --git a/apps/moloch-v3-subgraph/README.md b/apps/moloch-v3-subgraph/README.md index f0ad4c3f..8cc38aa5 100644 --- a/apps/moloch-v3-subgraph/README.md +++ b/apps/moloch-v3-subgraph/README.md @@ -1,71 +1,51 @@ # DAOhaus v3 Subgraph -The v3 subgraph currently supports goerli. It's deployed here: https://api.thegraph.com/subgraphs/name/hausdao/daohaus-v3-goerli/graphql +## Deployment + +Complete steps 1-3 for each network. + +These require installing the graph cli locally and auth tokens for deployment to the hosted service or studio subgraphs + +`npm install -g @graphprotocol/graph-cli` -## Local Development +`graph auth --studio ` -### Subgraph yaml Generation +### 1. Subgraph yaml Generation `nx run moloch-v3-subgraph:generate-config --network=goerli` + `nx run moloch-v3-subgraph:generate-config --network=xdai` + `nx run moloch-v3-subgraph:generate-config --network=mainnet` + `nx run moloch-v3-subgraph:generate-config --network=optimism` + `nx run moloch-v3-subgraph:generate-config --network=arbitrum-one` + `nx run moloch-v3-subgraph:generate-config --network=matic` -`nx run moloch-v3-subgraph:generate-config --network=sepolia` -`nx run moloch-v3-subgraph:generate-config --network=base` -Supported Networks: +`nx run moloch-v3-subgraph:generate-config --network=sepolia` -- goerli -- gnosis -- mainnet -- optimism -- arbitrum-one -- polygon +`nx run moloch-v3-subgraph:generate-config --network=base` -### Generate Subgraph Code +### 2. Generate Subgraph Code To generate subgraph code, run the following command: `nx run moloch-v3-subgraph:generate-code` -## Deployment - -`nx run moloch-v3-subgraph:graph-deploy --name=hausdao/daohaus-v3-goerli --network=goerli` -`nx run moloch-v3-subgraph:graph-deploy --name=hausdao/daohaus-v3-optimism --network=optimism` -`nx run moloch-v3-subgraph:graph-deploy --name=hausdao/daohaus-v3-arbitrum --network=arbitrum-one` -`nx run moloch-v3-subgraph:graph-deploy --name=hausdao/daohaus-v3-polygon --network=matic` -`nx run moloch-v3-subgraph:graph-deploy --name=hausdao/daohaus-v3-sepolia-2 --network=sepolia` +## Deploy -### mainnet and gnosis chain deployment to studio +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3 --network=mainnet --semver=` -`cd apps/moloch-v3-subgraph` -`graph deploy --studio daohaus-v3` +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-base --network=base --semver=` -todo: get this nx command running with a version: -`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3 --network=mainnet` -`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-gnosis --network=gnosis` -`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-base --network=base` - -_These require installing the graph cli locally and auth tokens for deployment to the hosted service or studio subgraphs_ -`npm install -g @graphprotocol/graph-cli` +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-sepolia-2 --network=sepolia --semver=` -Supported names: +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-polygon --network=matic --semver=` -- `hausdao/daohaus-v3-goerli` -- `hausdao/daohaus-v3-gnosis` -- `hausdao/daohaus-v3-optimism` -- `hausdao/daohaus-v3-arbitrum` -- `hausdao/daohaus-v3-polygon` -- `daohaus-v3` -- `daohaus-v3-gnosis` +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-arbitrum --network=arbitrum-one --semver=` -Playgrounds: +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-optimism --network=optimism --semver=` -- https://thegraph.com/hosted-service/subgraph/hausdao/daohaus-v3-goerli -- https://thegraph.com/hosted-service/subgraph/hausdao/daohaus-v3-optimism -- https://thegraph.com/hosted-service/subgraph/hausdao/daohaus-v3-arbitrum -- https://thegraph.com/hosted-service/subgraph/hausdao/daohaus-v3-polygon -- https://thegraph.com/explorer/subgraph?id=GfHFdFmiSwW1PKtnDhhcxhArwtTjVuMnXxQ5XcETF1bP&view=Overview -- https://thegraph.com/explorer/subgraphs/5oXHJGgAWTSEXHK5FGf7mcxYtk6rSz7MJV5ccvGfoW6q?view=Overview&chain=mainnet +`nx run moloch-v3-subgraph:graph-deploy-studio --name=daohaus-v3-gnosis --network=xdai --semver=` diff --git a/libs/abis/package.json b/libs/abis/package.json index ba56009e..b1a2f01c 100644 --- a/libs/abis/package.json +++ b/libs/abis/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/abis", - "version": "0.5.0", + "version": "0.5.1", "type": "commonjs", "repository": { "type": "git", diff --git a/libs/connect-context/package.json b/libs/connect-context/package.json index 457fd9e7..016bfc90 100644 --- a/libs/connect-context/package.json +++ b/libs/connect-context/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/connect-context", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/connect/package.json b/libs/connect/package.json index 68058454..a754a025 100644 --- a/libs/connect/package.json +++ b/libs/connect/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/connect", - "version": "0.5.0", + "version": "0.5.1", "peerDependencies": { "react-router-dom": "^6.4.3" }, diff --git a/libs/contract-utils/package.json b/libs/contract-utils/package.json index 23e3c0a4..805171a5 100644 --- a/libs/contract-utils/package.json +++ b/libs/contract-utils/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/contract-utils", - "version": "0.5.0", + "version": "0.5.1", "type": "commonjs", "repository": { "type": "git", diff --git a/libs/data-fetch-utils/package.json b/libs/data-fetch-utils/package.json index fec4ceaf..9aed6420 100644 --- a/libs/data-fetch-utils/package.json +++ b/libs/data-fetch-utils/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/data-fetch-utils", - "version": "0.5.0", + "version": "0.5.1", "type": "commonjs", "repository": { "type": "git", diff --git a/libs/form-builder-base/package.json b/libs/form-builder-base/package.json index 26e15850..5c7a76c7 100644 --- a/libs/form-builder-base/package.json +++ b/libs/form-builder-base/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/form-builder-base", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/form-builder/package.json b/libs/form-builder/package.json index 5f5377fd..fdbd72e2 100644 --- a/libs/form-builder/package.json +++ b/libs/form-builder/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/form-builder", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/keychain-utils/package.json b/libs/keychain-utils/package.json index 2fc0a781..af864afb 100644 --- a/libs/keychain-utils/package.json +++ b/libs/keychain-utils/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/keychain-utils", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/moloch-v3-data/package.json b/libs/moloch-v3-data/package.json index 7a133f9b..96eb04fd 100644 --- a/libs/moloch-v3-data/package.json +++ b/libs/moloch-v3-data/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/moloch-v3-data", - "version": "0.5.0", + "version": "0.5.1", "type": "commonjs", "repository": { "type": "git", diff --git a/libs/moloch-v3-data/src/daos.ts b/libs/moloch-v3-data/src/daos.ts index 27a2cb34..60c90f5f 100644 --- a/libs/moloch-v3-data/src/daos.ts +++ b/libs/moloch-v3-data/src/daos.ts @@ -9,6 +9,7 @@ import { import { ENDPOINTS, getGraphUrl, + GRAPH_API_KEYS, Keychain, ValidNetwork, } from '@daohaus/keychain-utils'; @@ -35,7 +36,7 @@ import { listTokenBalances } from './vaults'; export const findDao = async ({ networkId, dao, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, includeTokens = false, }: { networkId: ValidNetwork; @@ -139,7 +140,7 @@ export const listDaos = async ({ pageSize: DEFAULT_RECORDS_PER_PAGE, offset: 0, }, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: IListQueryArguments): Promise< IListQueryResults > => { diff --git a/libs/moloch-v3-data/src/members.ts b/libs/moloch-v3-data/src/members.ts index 003186c8..3006026c 100644 --- a/libs/moloch-v3-data/src/members.ts +++ b/libs/moloch-v3-data/src/members.ts @@ -6,7 +6,12 @@ import { IListQueryArguments, IListQueryResults, } from '@daohaus/data-fetch-utils'; -import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils'; +import { + getGraphUrl, + GRAPH_API_KEYS, + Keychain, + ValidNetwork, +} from '@daohaus/keychain-utils'; import { nowInSeconds, MolochV3MembershipQuery } from '@daohaus/utils'; import { Dao_Filter, @@ -39,7 +44,7 @@ export const findMember = async ({ networkId, dao, memberAddress, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: { networkId: ValidNetwork; dao: string; @@ -80,7 +85,7 @@ export const listMembers = async ({ pageSize: DEFAULT_RECORDS_PER_PAGE, offset: 0, }, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: IListQueryArguments): Promise< IListQueryResults > => { @@ -122,7 +127,7 @@ export const listDaosByMember = async ({ orderDirection: 'desc', }, networkIds, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: ICrossNetworkMemberListArguments< Dao_OrderBy, Dao_Filter, @@ -170,7 +175,7 @@ export const listProposalVotesByMember = async ({ pageSize: DEFAULT_RECORDS_PER_PAGE, offset: 0, }, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: IListQueryArguments & { memberAddress: string; }): Promise< diff --git a/libs/moloch-v3-data/src/proposals.ts b/libs/moloch-v3-data/src/proposals.ts index d1486181..3f6789d3 100644 --- a/libs/moloch-v3-data/src/proposals.ts +++ b/libs/moloch-v3-data/src/proposals.ts @@ -6,7 +6,12 @@ import { IListQueryArguments, IListQueryResults, } from '@daohaus/data-fetch-utils'; -import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils'; +import { + getGraphUrl, + GRAPH_API_KEYS, + Keychain, + ValidNetwork, +} from '@daohaus/keychain-utils'; import { ListVotesDocument, ListVotesQuery, @@ -37,7 +42,7 @@ export const findProposal = async ({ dao, proposalId, connectedAddress, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: { networkId: ValidNetwork; dao: string; diff --git a/libs/moloch-v3-data/src/records.ts b/libs/moloch-v3-data/src/records.ts index 0ca8f557..08e8dfdf 100644 --- a/libs/moloch-v3-data/src/records.ts +++ b/libs/moloch-v3-data/src/records.ts @@ -6,7 +6,12 @@ import { IListQueryArguments, IListQueryResults, } from '@daohaus/data-fetch-utils'; -import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils'; +import { + getGraphUrl, + GRAPH_API_KEYS, + Keychain, + ValidNetwork, +} from '@daohaus/keychain-utils'; import { addParsedContent, createPaging, @@ -30,7 +35,7 @@ import { export const findRecord = async ({ networkId, recordId, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: { networkId: ValidNetwork; recordId: string; @@ -72,7 +77,7 @@ export const listRecords = async ({ pageSize: DEFAULT_RECORDS_PER_PAGE, offset: 0, }, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: IListQueryArguments): Promise< IListQueryResults< Record_OrderBy, diff --git a/libs/moloch-v3-data/src/transactions.ts b/libs/moloch-v3-data/src/transactions.ts index ea6a6b31..3e196d19 100644 --- a/libs/moloch-v3-data/src/transactions.ts +++ b/libs/moloch-v3-data/src/transactions.ts @@ -6,7 +6,12 @@ import { IListQueryArguments, IListQueryResults, } from '@daohaus/data-fetch-utils'; -import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils'; +import { + getGraphUrl, + GRAPH_API_KEYS, + Keychain, + ValidNetwork, +} from '@daohaus/keychain-utils'; import { createPaging, DEFAULT_RECORDS_PER_PAGE } from './utils'; import { EventTransaction_Filter, @@ -22,7 +27,7 @@ import { export const findTransaction = async ({ networkId, txHash, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: { networkId: ValidNetwork; txHash: string; @@ -62,7 +67,7 @@ export const listTransactions = async ({ pageSize: DEFAULT_RECORDS_PER_PAGE, offset: 0, }, - graphApiKeys, + graphApiKeys = GRAPH_API_KEYS, }: IListQueryArguments< EventTransaction_OrderBy, EventTransaction_Filter diff --git a/libs/moloch-v3-fields/package.json b/libs/moloch-v3-fields/package.json index ff0f72f4..90992a71 100644 --- a/libs/moloch-v3-fields/package.json +++ b/libs/moloch-v3-fields/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/moloch-v3-fields", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/moloch-v3-hooks/package.json b/libs/moloch-v3-hooks/package.json index cd18cc39..2f0d50b5 100644 --- a/libs/moloch-v3-hooks/package.json +++ b/libs/moloch-v3-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/moloch-v3-hooks", - "version": "0.5.0", + "version": "0.5.1", "peerDependencies": { "react-query": "^3.39.3" }, diff --git a/libs/moloch-v3-legos/package.json b/libs/moloch-v3-legos/package.json index e3fffa77..0d429e10 100644 --- a/libs/moloch-v3-legos/package.json +++ b/libs/moloch-v3-legos/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/moloch-v3-legos", - "version": "0.5.0", + "version": "0.5.1", "type": "commonjs", "repository": { "type": "git", diff --git a/libs/moloch-v3-macro-ui/package.json b/libs/moloch-v3-macro-ui/package.json index 84864427..f0eee540 100644 --- a/libs/moloch-v3-macro-ui/package.json +++ b/libs/moloch-v3-macro-ui/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/moloch-v3-macro-ui", - "version": "0.5.0", + "version": "0.5.1", "peerDependencies": { "react-router-dom": "^6.4.3" }, diff --git a/libs/profile-data/package.json b/libs/profile-data/package.json index a41d638c..1cfe8e48 100644 --- a/libs/profile-data/package.json +++ b/libs/profile-data/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/profile-data", - "version": "0.5.0", + "version": "0.5.1", "type": "commonjs", "repository": { "type": "git", diff --git a/libs/tx-builder/package.json b/libs/tx-builder/package.json index 6678cccc..fd786649 100644 --- a/libs/tx-builder/package.json +++ b/libs/tx-builder/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/tx-builder", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/ui/package.json b/libs/ui/package.json index 5f6607d5..a495bd7e 100644 --- a/libs/ui/package.json +++ b/libs/ui/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/ui", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/utils/package.json b/libs/utils/package.json index 64606819..f5d2ccc0 100644 --- a/libs/utils/package.json +++ b/libs/utils/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/utils", - "version": "0.5.0", + "version": "0.5.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo" diff --git a/libs/wizard-form-builder/package.json b/libs/wizard-form-builder/package.json index 0d276116..6168db13 100644 --- a/libs/wizard-form-builder/package.json +++ b/libs/wizard-form-builder/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/wizard-form-builder", - "version": "0.2.0", + "version": "0.2.1", "repository": { "type": "git", "url": "https://github.com/HausDAO/monorepo"