diff --git a/apps/admin/src/components/HomeDashboard.tsx b/apps/admin/src/components/HomeDashboard.tsx index 5721ca3d..cbab545b 100644 --- a/apps/admin/src/components/HomeDashboard.tsx +++ b/apps/admin/src/components/HomeDashboard.tsx @@ -11,6 +11,7 @@ import { widthQuery, } from '@daohaus/ui'; import { + GRAPH_API_KEYS, HAUS_NETWORK_DATA, isValidNetwork, ValidNetwork, @@ -52,10 +53,7 @@ export const HomeDashboard = () => { daoFilter: { name_contains_nocase: debouncedSearchTerm }, memberFilter: getDelegateFilter(filterDelegate, address), ordering: SORT_FIELDS[sortBy].ordering, - graphApiKeys: { - '0x1': process.env['NX_GRAPH_API_KEY_MAINNET'], - '0x64': process.env['NX_GRAPH_API_KEY_MAINNET'], - }, + graphApiKeys: GRAPH_API_KEYS, }); if (query.data?.daos && shouldUpdate) { setDaoData(query.data.daos); diff --git a/apps/moloch-v3-subgraph/README.md b/apps/moloch-v3-subgraph/README.md index b3a41d2e..f0ad4c3f 100644 --- a/apps/moloch-v3-subgraph/README.md +++ b/apps/moloch-v3-subgraph/README.md @@ -36,7 +36,7 @@ To generate subgraph code, run the following command: `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 --network=sepolia` +`nx run moloch-v3-subgraph:graph-deploy --name=hausdao/daohaus-v3-sepolia-2 --network=sepolia` ### mainnet and gnosis chain deployment to studio diff --git a/apps/moloch-v3-subgraph/schema.graphql b/apps/moloch-v3-subgraph/schema.graphql index a178d4e0..87a54f1d 100644 --- a/apps/moloch-v3-subgraph/schema.graphql +++ b/apps/moloch-v3-subgraph/schema.graphql @@ -199,6 +199,7 @@ type Proposal @entity { contentURIType: String "votes scoped to this proposal" votes: [Vote!] @derivedFrom(field: "proposal") + record: Record } type Vote @entity { @@ -230,6 +231,8 @@ type Record @entity { contentType: String! content: String! queryType: String + proposals: [Proposal!] @derivedFrom(field: "record") + parentId: String } type Member @entity { diff --git a/apps/moloch-v3-subgraph/src/baal-mapping.ts b/apps/moloch-v3-subgraph/src/baal-mapping.ts index c98596ad..99411d14 100644 --- a/apps/moloch-v3-subgraph/src/baal-mapping.ts +++ b/apps/moloch-v3-subgraph/src/baal-mapping.ts @@ -259,6 +259,11 @@ export function handleSubmitProposal(event: SubmitProposal): void { if (contentURIType.error == 'none') { proposal.contentURIType = contentURIType.data; } + + const relatedRecordId = getStringFromJson(object, 'relatedRecordId'); + if (relatedRecordId.error == 'none') { + proposal.record = relatedRecordId.data; + } } proposal.save(); diff --git a/apps/moloch-v3-subgraph/src/util/parser.ts b/apps/moloch-v3-subgraph/src/util/parser.ts index 59398365..f2310e54 100644 --- a/apps/moloch-v3-subgraph/src/util/parser.ts +++ b/apps/moloch-v3-subgraph/src/util/parser.ts @@ -200,6 +200,12 @@ export function createDaoDatabaseRecord( entity.contentType = 'json'; entity.content = event.params.content; + // connect to parent record - for comments + const parentId = getStringFromJson(object, 'parentId'); + if (parentId.error == 'none') { + entity.parentId = parentId.data; + } + const table = getStringFromJson(object, 'table'); if (table.error != 'none') { return false; diff --git a/apps/summon-safe/src/utils/graphql.ts b/apps/summon-safe/src/utils/graphql.ts index 483d8e64..4e170907 100644 --- a/apps/summon-safe/src/utils/graphql.ts +++ b/apps/summon-safe/src/utils/graphql.ts @@ -1,4 +1,4 @@ -import { ValidNetwork } from '@daohaus/keychain-utils'; +import { GRAPH_API_KEYS, ValidNetwork } from '@daohaus/keychain-utils'; import { listDaos } from '@daohaus/moloch-v3-data'; export const fetchDaos = async ( @@ -8,10 +8,7 @@ export const fetchDaos = async ( const query = await listDaos({ networkId, filter: { safeAddress }, - graphApiKeys: { - '0x1': process.env.NX_GRAPH_API_KEY_MAINNET, - '0x64': process.env.NX_GRAPH_API_KEY_MAINNET, - }, + graphApiKeys: GRAPH_API_KEYS, }); if (query.error) { console.error('An error has occurred', query.error); diff --git a/libs/keychain-utils/src/endpoints.ts b/libs/keychain-utils/src/endpoints.ts index 7209fa7d..e2d05a28 100644 --- a/libs/keychain-utils/src/endpoints.ts +++ b/libs/keychain-utils/src/endpoints.ts @@ -6,17 +6,17 @@ export const ENDPOINTS: KeychainList = { 'https://gateway.thegraph.com/api/[api-key]/subgraphs/id/GfHFdFmiSwW1PKtnDhhcxhArwtTjVuMnXxQ5XcETF1bP', '0x5': 'https://api.thegraph.com/subgraphs/name/hausdao/daohaus-v3-goerli', '0x64': - 'https://gateway.thegraph.com/api/[api-key]/subgraphs/id/5oXHJGgAWTSEXHK5FGf7mcxYtk6rSz7MJV5ccvGfoW6q', + 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/6x9FK3iuhVFaH9sZ39m8bKB5eckax8sjxooBPNKWWK8r', '0x89': - 'https://api.thegraph.com/subgraphs/name/hausdao/daohaus-v3-polygon', + 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/A4su27JYXR5TkPZmiFHzzqMJnmYttfU3FyrdNBDnnu8T', '0xa': - 'https://api.thegraph.com/subgraphs/name/hausdao/daohaus-v3-optimism', + 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/CgH5vtz9CJPdcSmD3XEh8fCVDjQjnRwrSawg71T1ySXW', '0xa4b1': - 'https://api.thegraph.com/subgraphs/name/hausdao/daohaus-v3-arbitrum', + 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/GPACxuMWrrPSEJpFqupnePJNMfuArpFabrXLnWvXU2bp', '0xaa36a7': - 'https://api.thegraph.com/subgraphs/name/hausdao/daohaus-v3-sepolia-2', + 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3k93SNY5Y1r4YYWEuPY9mpCm2wnGoYDKRtk82QZJ3Kvw', '0x2105': - 'https://api.studio.thegraph.com/query/36740/daohaus-v3-base/version/latest', + 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/7yh4eHJ4qpHEiLPAk9BXhL5YgYrTrRE6gWy8x4oHyAqW', }, EXPLORER: { '0x1': 'https://etherscan.io', @@ -133,6 +133,11 @@ export const HAUS_RPC = { export const GRAPH_API_KEYS = { '0x1': process.env['NX_GRAPH_API_KEY_MAINNET'], '0x64': process.env['NX_GRAPH_API_KEY_MAINNET'], + '0xaa36a7': process.env['NX_GRAPH_API_KEY_MAINNET'], + '0x2105': process.env['NX_GRAPH_API_KEY_MAINNET'], + '0xa4b1': process.env['NX_GRAPH_API_KEY_MAINNET'], + '0x89': process.env['NX_GRAPH_API_KEY_MAINNET'], + '0xa': process.env['NX_GRAPH_API_KEY_MAINNET'], }; export type PinataApiKeys = { diff --git a/libs/moloch-v3-fields/src/utils/fieldHelpers.ts b/libs/moloch-v3-fields/src/utils/fieldHelpers.ts index 02706acb..b0331a87 100644 --- a/libs/moloch-v3-fields/src/utils/fieldHelpers.ts +++ b/libs/moloch-v3-fields/src/utils/fieldHelpers.ts @@ -1,4 +1,8 @@ -import { HAUS_NETWORK_DATA, ValidNetwork } from '@daohaus/keychain-utils'; +import { + GRAPH_API_KEYS, + HAUS_NETWORK_DATA, + ValidNetwork, +} from '@daohaus/keychain-utils'; import { findMember, FindMemberQuery, @@ -155,9 +159,7 @@ export const isActiveMember = async ({ networkId: daochain, dao: daoid, memberAddress: address.toLowerCase(), - graphApiKeys: { - '0x1': process.env['NX_GRAPH_API_KEY_MAINNET'], - }, + graphApiKeys: GRAPH_API_KEYS, }); if ( diff --git a/libs/moloch-v3-macro-ui/src/components/ProposalCard/ProposalCardOverview.tsx b/libs/moloch-v3-macro-ui/src/components/ProposalCard/ProposalCardOverview.tsx index a114c000..db7053bd 100644 --- a/libs/moloch-v3-macro-ui/src/components/ProposalCard/ProposalCardOverview.tsx +++ b/libs/moloch-v3-macro-ui/src/components/ProposalCard/ProposalCardOverview.tsx @@ -35,6 +35,7 @@ const OverviewBox = styled.div<{ $allowLinks?: boolean }>` } .description { margin-bottom: auto; + word-break: break-word; } @media ${widthQuery.md} { .description { diff --git a/yarn.lock b/yarn.lock index 03c31834..7df920bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10513,6 +10513,11 @@ dotenv@^16.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== +dotenv@^16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + dotenv@^8.0.0: version "8.6.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"