diff --git a/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/[proposalId]/page.tsx b/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/[proposalId]/page.tsx index 4b0b82ce2..e53aca25e 100644 --- a/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/[proposalId]/page.tsx +++ b/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/[proposalId]/page.tsx @@ -1,8 +1,13 @@ "use client"; import { useEffect, useState } from "react"; import { Hashicon } from "@emeraldpay/hashicon-react"; -import { InformationCircleIcon, UserIcon } from "@heroicons/react/24/outline"; +import { + AdjustmentsHorizontalIcon, + InformationCircleIcon, + UserIcon, +} from "@heroicons/react/24/outline"; import { ArrowPathIcon } from "@heroicons/react/24/solid"; +import { usePathname, useRouter } from "next/navigation"; import { toast } from "react-toastify"; import { Address, encodeAbiParameters, formatUnits } from "viem"; import { useAccount, useToken } from "wagmi"; @@ -23,10 +28,12 @@ import { DisputeButton } from "@/components/DisputeButton"; import { LoadingSpinner } from "@/components/LoadingSpinner"; import MarkdownWrapper from "@/components/MarkdownWrapper"; import { Skeleton } from "@/components/Skeleton"; +import { QUERY_PARAMS } from "@/constants/query-params"; import { usePubSubContext } from "@/contexts/pubsub.context"; import { useChainIdFromPath } from "@/hooks/useChainIdFromPath"; import { useContractWriteWithConfirmations } from "@/hooks/useContractWriteWithConfirmations"; import { useConvictionRead } from "@/hooks/useConvictionRead"; +import { useDisableButtons } from "@/hooks/useDisableButtons"; import { useMetadataIpfsFetch } from "@/hooks/useIpfsFetch"; import { useSubgraphQuery } from "@/hooks/useSubgraphQuery"; import { alloABI } from "@/src/generated"; @@ -46,7 +53,9 @@ export default function Page({ }; }) { const [convictionRefreshing, setConvictionRefreshing] = useState(true); - const { isDisconnected, address } = useAccount(); + const router = useRouter(); + + const { address } = useAccount(); const [, proposalNumber] = proposalId.split("-"); const { data } = useSubgraphQuery({ query: getProposalDataDocument, @@ -75,6 +84,7 @@ export default function Page({ hash: proposalData?.metadataHash, enabled: !proposalData?.metadata, }); + const path = usePathname(); const metadata = proposalData?.metadata ?? ipfsResult; const isProposerConnected = proposalData?.submitter === address?.toLowerCase(); @@ -92,6 +102,8 @@ export default function Page({ chainId, }); + const { tooltipMessage, isConnected, missmatchUrl } = useDisableButtons(); + const { currentConvictionPct, thresholdPct, @@ -145,6 +157,15 @@ export default function Page({ }, }); + const manageSupportClicked = () => { + const pathSegments = path.split("/"); + pathSegments.pop(); + if (pathSegments.length === 3) { + pathSegments.pop(); + } + const newPath = pathSegments.join("/"); + router.push(newPath + `?${QUERY_PARAMS.poolPage.allocationView}=true`); + }; const distributeErrorName = useErrorDetails(errorDistribute); useEffect(() => { if (isErrorDistribute && distributeErrorName.errorName !== undefined) { @@ -261,6 +282,26 @@ export default function Page({ : <>

Metrics

+ +
+ +
{status === "active" && !isSignalingType && ( )}
- } diff --git a/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/page.tsx b/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/page.tsx index 7c0044138..90b1906a0 100644 --- a/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/page.tsx +++ b/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/[poolId]/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect } from "react"; +import { useEffect, useRef } from "react"; import { Address } from "viem"; import { useToken } from "wagmi"; import { @@ -27,6 +27,7 @@ export default function Page({ params: { chain: string; poolId: number; garden: string }; }) { const searchParams = useCollectQueryParams(); + const proposalSectionRef = useRef(null); const { data, refetch, error } = useSubgraphQuery({ query: getPoolDataDocument, @@ -55,7 +56,6 @@ export default function Page({ }, ], }); - const strategyObj = data?.cvstrategies?.[0]; const poolTokenAddr = strategyObj?.token as Address; const proposalType = strategyObj?.config.proposalType; @@ -105,6 +105,21 @@ export default function Page({ const tokenGarden = data?.tokenGarden; + useEffect(() => { + if ( + searchParams[QUERY_PARAMS.poolPage.allocationView] !== undefined && + proposalSectionRef.current + ) { + const elementTop = + proposalSectionRef.current.getBoundingClientRect().top + window.scrollY; + window.scrollTo({ + top: elementTop - 130, + behavior: "smooth", + }); + } + // setAllocationView(searchParams[QUERY_PARAMS.poolPage.allocationView]); + }, [proposalSectionRef.current, searchParams]); + if (!tokenGarden || (!poolToken && PoolTypes[proposalType] === "funding")) { return (
@@ -146,14 +161,16 @@ export default function Page({ chainId={chain} /> )} - +
+ +
)}
diff --git a/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/page.tsx b/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/page.tsx index cd14c8866..cf30ca987 100644 --- a/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/page.tsx +++ b/apps/web/app/(app)/gardens/[chain]/[garden]/[community]/page.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useEffect, useRef, useState } from "react"; +import React, { Fragment, useEffect, useRef, useState } from "react"; import { CurrencyDollarIcon, PlusIcon, @@ -75,7 +75,6 @@ export default function Page({ { topic: "member", containerId: communityAddr }, ], }); - const registryCommunity = result?.registryCommunity; let { @@ -148,6 +147,30 @@ export default function Page({ const poolsInReview = strategies.filter((strategy) => !strategy.isEnabled); + // const [tokenDataArray, setTokenDataArray] = useState([]); + + // useEffect(() => { + // // Initialize an empty array for holding token data for each pool + // const newTokenDataArray = fundingPools.map((pool) => ({ + // poolId: pool.poolId, + // tokenData: null , + // })); + + // // Iterate over each pool and use `useToken` to get token data + // fundingPools.forEach((pool, index) => { + // const { data } = useToken({ + // address: pool.token as Address, + // chainId: +chain, + // }); + + // // Update the tokenData in the array for this specific pool + // newTokenDataArray[index].tokenData = data; + // }); + + // // Once data is fetched, update the state + // setTokenDataArray(newTokenDataArray); + // }, [fundingPools, chain]); + useEffect(() => { const newPoolId = searchParams[QUERY_PARAMS.communityPage.newPool]; const fetchedPools = poolsInReview.some((c) => c.poolId === newPoolId); @@ -318,14 +341,9 @@ export default function Page({
{fundingPools.map((pool) => ( - + + + ))}
@@ -337,10 +355,8 @@ export default function Page({ {signalingPools.map((pool) => ( ))} @@ -354,10 +370,8 @@ export default function Page({ {poolsInReview.map((pool) => ( ))} diff --git a/apps/web/components/Charts/ChartWrapper.tsx b/apps/web/components/Charts/ChartWrapper.tsx index ee2377611..60d0ccbe3 100644 --- a/apps/web/components/Charts/ChartWrapper.tsx +++ b/apps/web/components/Charts/ChartWrapper.tsx @@ -33,7 +33,7 @@ export const ChartWrapper = ({ { name: "Conviction", className: "bg-primary-content h-4 w-4 rounded-full", - info: "Accumulated pool weight for a proposal, increasing over time, based on the conviction growth param.", + info: "Accumulated pool weight for a proposal, increasing over time, based on the conviction growth.", }, { name: "Threshold", diff --git a/apps/web/components/Charts/ConvictionBarChart.tsx b/apps/web/components/Charts/ConvictionBarChart.tsx index 37a573724..1abc98b9a 100644 --- a/apps/web/components/Charts/ConvictionBarChart.tsx +++ b/apps/web/components/Charts/ConvictionBarChart.tsx @@ -22,6 +22,7 @@ type ConvictionBarChartProps = { proposalNumber: number; compact?: boolean; timeToPass?: number; + defaultChartMaxValue?: boolean; onReadyToExecute?: () => void; refreshConviction?: () => Promise; }; @@ -35,6 +36,7 @@ export const ConvictionBarChart = ({ compact, timeToPass, onReadyToExecute, + defaultChartMaxValue = false, refreshConviction, }: ConvictionBarChartProps) => { const [convictionRefreshing, setConvictionRefreshing] = useState(true); @@ -201,7 +203,7 @@ export const ConvictionBarChart = ({ disabled: true, }; - const borderRadius = [50, 0, 0, 50]; + const borderRadius = defaultChartMaxValue ? [50, 50] : [50, 0, 0, 50]; const markLine: MarkLineComponentOption = { symbol: "none", @@ -233,6 +235,12 @@ export const ConvictionBarChart = ({ }, z: 50, }; + + const chartMaxValue = + defaultChartMaxValue ? + Math.max(currentConvictionPct, proposalSupportPct, thresholdPct) + : 100; + const option: EChartsOption = { emphasis: emphasis, yAxis: { @@ -248,12 +256,12 @@ export const ConvictionBarChart = ({ axisLabel: { show: false, formatter: "{value}%", - fontSize: 10, + fontSize: 8, }, axisLine: { show: false, }, - max: 100, + max: chartMaxValue, }, tooltip: { trigger: "axis", @@ -293,7 +301,7 @@ export const ConvictionBarChart = ({ show: !compact, position: "insideRight", color: "#191919", - fontSize: 10, + fontSize: 8, formatter: "{@score} %", }, z: @@ -314,7 +322,7 @@ export const ConvictionBarChart = ({ show: !compact, position: "insideRight", color: "#FFFFFF", - fontSize: 10, + fontSize: 8, formatter: "{@score} %", width: 0, }, diff --git a/apps/web/components/Forms/PoolEditForm.tsx b/apps/web/components/Forms/PoolEditForm.tsx index ef72b04b1..1860bf36a 100644 --- a/apps/web/components/Forms/PoolEditForm.tsx +++ b/apps/web/components/Forms/PoolEditForm.tsx @@ -177,7 +177,9 @@ export default function PoolEditForm({ const shouldRenderInput = (key: string): boolean => { if ( PoolTypes[proposalType] === "signaling" && - (key === "spendingLimit" || key === "minThresholdPoints") + (key === "spendingLimit" || + key === "minThresholdPoints" || + key === "minimumConviction") ) { return false; } diff --git a/apps/web/components/Forms/PoolForm.tsx b/apps/web/components/Forms/PoolForm.tsx index a931b255a..386365256 100644 --- a/apps/web/components/Forms/PoolForm.tsx +++ b/apps/web/components/Forms/PoolForm.tsx @@ -194,7 +194,7 @@ export function PoolForm({ token, communityAddr }: Props) { rulingTime: parseTimeUnit(DEFAULT_RULING_TIMEOUT_SEC, "seconds", "days"), defaultResolution: 1, minThresholdPoints: 0, - poolTokenAddress: token.id, + poolTokenAddress: "", proposalCollateral: chain.id === polygon.id ? defaultMaticProposalColateral @@ -711,7 +711,7 @@ export function PoolForm({ token, communityAddr }: Props) { registerKey="maxAmount" type="number" placeholder="0" - suffix={token.symbol} + suffix={customTokenData?.symbol} /> )} diff --git a/apps/web/components/Forms/ProposalForm.tsx b/apps/web/components/Forms/ProposalForm.tsx index c02d741b9..7269d0dcd 100644 --- a/apps/web/components/Forms/ProposalForm.tsx +++ b/apps/web/components/Forms/ProposalForm.tsx @@ -12,10 +12,10 @@ import { CVStrategyConfig, TokenGarden, } from "#/subgraph/.graphclient"; +import { FormAddressInput } from "./FormAddressInput"; import { FormInput } from "./FormInput"; import { FormPreview, FormRow } from "./FormPreview"; import { LoadingSpinner } from "../LoadingSpinner"; -import { FormAddressInput } from "./FormAddressInput"; import { WalletBalance } from "../WalletBalance"; import { Button, EthAddress, InfoBox } from "@/components"; import { QUERY_PARAMS } from "@/constants/query-params"; diff --git a/apps/web/components/PoolCard.tsx b/apps/web/components/PoolCard.tsx index a19c177ea..e724148b8 100644 --- a/apps/web/components/PoolCard.tsx +++ b/apps/web/components/PoolCard.tsx @@ -8,11 +8,11 @@ import { } from "@heroicons/react/24/outline"; import Image from "next/image"; import { usePathname } from "next/navigation"; +import { Address, useToken } from "wagmi"; import { CVProposal, CVStrategy, CVStrategyConfig, - TokenGarden, } from "#/subgraph/.graphclient"; import { Skeleton } from "./Skeleton"; import TooltipIfOverflow from "./TooltipIfOverflow"; @@ -25,7 +25,7 @@ import { PointSystems, PoolTypes } from "@/types"; import { capitalize } from "@/utils/text"; type Props = { - tokenGarden: Pick; + token: string; pool: Pick< CVStrategy, "id" | "isEnabled" | "poolAmount" | "poolId" | "metadata" @@ -33,9 +33,10 @@ type Props = { proposals: Pick[]; config: Pick; }; + chainId: number; }; -export function PoolCard({ pool, tokenGarden }: Props) { +export function PoolCard({ pool, token, chainId }: Props) { const pathname = usePathname(); const searchParams = useCollectQueryParams(); @@ -47,6 +48,10 @@ export function PoolCard({ pool, tokenGarden }: Props) { poolAmount = poolAmount || 0; const poolType = config?.proposalType as number | undefined; + const { data: tokenGarden } = useToken({ + address: token as Address, + chainId: +chainId, + }); const isNewPool = searchParams[QUERY_PARAMS.communityPage.newPool] === pool.poolId.toString(); @@ -62,32 +67,32 @@ export function PoolCard({ pool, tokenGarden }: Props) {
-
ID #{poolId}
+
POOL ID: #{poolId}
-
+
} label="voting weight" count={capitalize(PointSystems[config?.pointSystem])} /> - } - count={proposals.length} - label="proposals" - /> - } - label="funds" - className={`${poolType && PoolTypes[poolType] === "funding" ? "visible" : "invisible"}`} - > - } + count={proposals.length} + label="proposals" /> - + )} + {isEnabled && poolType && PoolTypes[poolType] === "funding" && ( + } label="funds"> + + + )}
{!isEnabled ?
diff --git a/apps/web/components/PoolMetrics.tsx b/apps/web/components/PoolMetrics.tsx index 3aab0aead..39938013f 100644 --- a/apps/web/components/PoolMetrics.tsx +++ b/apps/web/components/PoolMetrics.tsx @@ -36,8 +36,6 @@ export const PoolMetrics: FC = ({ poolId, chainId, }) => { - const INPUT_TOKEN_MIN_VALUE = 1 / 10 ** poolToken.decimals; - const { register, handleSubmit, diff --git a/apps/web/components/ProposalCard.tsx b/apps/web/components/ProposalCard.tsx index 5663fe5e1..e46806558 100644 --- a/apps/web/components/ProposalCard.tsx +++ b/apps/web/components/ProposalCard.tsx @@ -154,32 +154,32 @@ export function ProposalCard({ const proposalCardContent = ( <>
-
+
{/* icon title and id */} -
-
+
+
-
-

- - - {metadata?.title} - - -

-
-
ID {proposalNumber}
-

- {prettyTimestamp(proposalData.createdAt ?? 0)} -

+
+ +

+ {metadata?.title} +

+
+
+
+
ID {proposalNumber}
+

+ {prettyTimestamp(proposalData.createdAt ?? 0)} +

+
-
+
{/* amount requested and proposal status */} -
+
{!isSignalingType && poolToken && (

Requested amount:

@@ -300,7 +300,7 @@ export function ProposalCard({
{!isAllocationView && stakedFilter && stakedFilter?.value > 0 && ( -

+

Your support: {poolWeightAllocatedInProposal}%

)} diff --git a/apps/web/components/Proposals.tsx b/apps/web/components/Proposals.tsx index 5ce13690e..9d1e9d5e0 100644 --- a/apps/web/components/Proposals.tsx +++ b/apps/web/components/Proposals.tsx @@ -31,6 +31,8 @@ import { PoolGovernance, ProposalCard, } from "@/components"; +import { QUERY_PARAMS } from "@/constants/query-params"; +import { useCollectQueryParams } from "@/contexts/collectQueryParams.context"; import { SubscriptionId, usePubSubContext } from "@/contexts/pubsub.context"; import { useChainIdFromPath } from "@/hooks/useChainIdFromPath"; import useCheckAllowList from "@/hooks/useCheckAllowList"; @@ -114,7 +116,7 @@ export function Proposals({ const { subscribe, unsubscribe, connected } = usePubSubContext(); const tokenDecimals = strategy.registryCommunity.garden.decimals; - + const searchParams = useCollectQueryParams(); // Queries const { data: memberData, error } = useSubgraphQuery({ query: isMemberDocument, @@ -238,6 +240,33 @@ export function Proposals({ } }, [memberActivatedStrategy]); + const disableManageSupportBtnCondition: ConditionObject[] = [ + { + condition: !memberActivatedStrategy, + message: "Must have points activated to support proposals", + }, + { + condition: !isAllowed, + message: "Address not in allowlist", + }, + ]; + + const disableManSupportButton = disableManageSupportBtnCondition.some( + (cond) => cond.condition, + ); + const { tooltipMessage, isConnected, missmatchUrl } = useDisableButtons( + disableManageSupportBtnCondition, + ); + useEffect(() => { + if ( + searchParams[QUERY_PARAMS.poolPage.allocationView] === "true" && + !disableManSupportButton && + isConnected + ) { + setAllocationView(true); + } + }, [disableManSupportButton, isConnected, searchParams]); + useEffect(() => { if (!proposals) return; @@ -335,6 +364,7 @@ export function Proposals({ console.error("Inputs not yet computed"); return; } + const proposalsDifferencesArr = getProposalsInputsDifferences( inputs, stakedFilters, @@ -396,25 +426,6 @@ export function Proposals({ }, ]; - const disableManageSupportBtnCondition: ConditionObject[] = [ - { - condition: !memberActivatedStrategy, - message: "Must have points activated to support proposals", - }, - { - condition: !isAllowed, - message: "Address not in allowlist", - }, - ]; - - const disableManSupportButton = disableManageSupportBtnCondition.some( - (cond) => cond.condition, - ); - - const { tooltipMessage, isConnected, missmatchUrl } = useDisableButtons( - disableManageSupportBtnCondition, - ); - const endedProposals = proposals.filter( (x) => ProposalStatus[x.proposalStatus] === "cancelled" || @@ -437,7 +448,7 @@ export function Proposals({ isMemberCommunity={isMemberCommunity} memberActivatedStrategy={memberActivatedStrategy} /> -
+

Proposals

@@ -552,7 +563,7 @@ export function Proposals({ } tooltip="Make changes in proposals support first" > - Allocate + Submit your support
:
diff --git a/apps/web/constants/query-params.ts b/apps/web/constants/query-params.ts index fb61002ba..42379d256 100644 --- a/apps/web/constants/query-params.ts +++ b/apps/web/constants/query-params.ts @@ -8,5 +8,6 @@ export const QUERY_PARAMS = { }, poolPage: { newProposal: "newProposal", + allocationView: "allocationView", }, } as const; diff --git a/funding.json b/funding.json index c206b5066..5ec6f49f8 100644 --- a/funding.json +++ b/funding.json @@ -1,5 +1,5 @@ { "opRetro": { - "projectId": "0xf87dc66be181007e6d394553b4498ef833f7a53059d86e6ae399b4ca8db61543" + "projectId": "0xdde46a1ddca8effe3f50996d8a674fc0ed79d2c7e9dab310cba65529f97dc2d6" } } diff --git a/pkg/contracts/src/CVStrategy/CVStrategyV0_0.sol b/pkg/contracts/src/CVStrategy/CVStrategyV0_0.sol index c299ad978..b8e20bf1d 100644 --- a/pkg/contracts/src/CVStrategy/CVStrategyV0_0.sol +++ b/pkg/contracts/src/CVStrategy/CVStrategyV0_0.sol @@ -142,21 +142,21 @@ contract CVStrategyV0_0 is BaseStrategyUpgradeable, IArbitrable, IPointStrategy, /*| CUSTOM ERRORS |*/ /*|--------------------------------------------|*/ - // error UserCannotBeZero(); // 0xd1f28288 + error UserCannotBeZero(); // 0xd1f28288 error UserNotInRegistry(); //0x6a5cfb6d error UserIsInactive(); // 0x5fccb67f error PoolIsEmpty(); // 0xed4421ad error NotImplemented(); //0xd6234725 - // error TokenCannotBeZero(); //0x596a094c + error TokenCannotBeZero(); //0x596a094c error TokenNotAllowed(); // 0xa29c4986 error AmountOverMaxRatio(); // 0x3bf5ca14 error AddressCannotBeZero(); //0xe622e040 - // error RegistryCannotBeZero(); // 0x5df4b1ef + error RegistryCannotBeZero(); // 0x5df4b1ef error SupportUnderflow(uint256 _support, int256 _delta, int256 _result); // 0x3bbc7142 error NotEnoughPointsToSupport(uint256 pointsSupport, uint256 pointsBalance); // 0xd64182fe - // error ProposalDataIsEmpty(); //0xc5f7c4c0 - // error ProposalIdCannotBeZero(); //0xf881a10d + error ProposalDataIsEmpty(); //0xc5f7c4c0 + error ProposalIdCannotBeZero(); //0xf881a10d error ProposalNotActive(uint256 _proposalId); // 0x44980d8f error ProposalNotInList(uint256 _proposalId); // 0xc1d17bef error ProposalSupportDuplicated(uint256 _proposalId, uint256 index); //0xadebb154 @@ -168,7 +168,7 @@ contract CVStrategyV0_0 is BaseStrategyUpgradeable, IArbitrable, IPointStrategy, error InsufficientCollateral(uint256 sentAmount, uint256 requiredAmount); error OnlyArbitrator(); error ProposalNotDisputed(uint256 _proposalId); - // error ArbitratorCannotBeZero(); + error ArbitratorCannotBeZero(); error OnlySubmitter(address submitter, address sender); // Goss: Support Collateral Zero // error CollateralVaultCannotBeZero(); diff --git a/pkg/subgraph/.graphclient/index.d.ts b/pkg/subgraph/.graphclient/index.d.ts index 89509858e..b2137593a 100644 --- a/pkg/subgraph/.graphclient/index.d.ts +++ b/pkg/subgraph/.graphclient/index.d.ts @@ -3672,7 +3672,7 @@ export type getCommunityQueryVariables = Exact<{ export type getCommunityQuery = { registryCommunity?: Maybe<(Pick & { members?: Maybe>>; - strategies?: Maybe & { + strategies?: Maybe & { proposals: Array>; config: Pick; })>>; diff --git a/pkg/subgraph/.graphclient/index.js b/pkg/subgraph/.graphclient/index.js index 6978c6440..95477ad79 100644 --- a/pkg/subgraph/.graphclient/index.js +++ b/pkg/subgraph/.graphclient/index.js @@ -71,29 +71,29 @@ export async function getMeshOptions() { store: rootStore.child('bareMerger') }); const documentHashMap = { - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetFactoriesDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetTokenGardensDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetMemberStrategyDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": IsMemberDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetMemberDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetPoolCreationDataDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetGardenCommunitiesDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetCommunityDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetCommunityCreationDataDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetPoolDataDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetProposalDataDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetAlloDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetStrategyByPoolDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetTokenTitleDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetCommunityTitlesDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetPoolTitlesDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetProposalTitlesDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetPassportScorerDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetPassportStrategyDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetPassportUserDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetProposalDisputesDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetArbitrableConfigsDocument, - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": GetMemberPassportAndCommunitiesDocument + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetFactoriesDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetTokenGardensDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetMemberStrategyDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": IsMemberDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetMemberDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetPoolCreationDataDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetGardenCommunitiesDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetCommunityDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetCommunityCreationDataDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetPoolDataDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetProposalDataDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetAlloDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetStrategyByPoolDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetTokenTitleDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetCommunityTitlesDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetPoolTitlesDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetProposalTitlesDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetPassportScorerDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetPassportStrategyDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetPassportUserDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetProposalDisputesDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetArbitrableConfigsDocument, + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": GetMemberPassportAndCommunitiesDocument }; additionalEnvelopPlugins.push(usePersistedOperations({ getPersistedOperation(key) { @@ -119,161 +119,161 @@ export async function getMeshOptions() { return printWithCache(GetFactoriesDocument); }, location: 'GetFactoriesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetTokenGardensDocument, get rawSDL() { return printWithCache(GetTokenGardensDocument); }, location: 'GetTokenGardensDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetMemberStrategyDocument, get rawSDL() { return printWithCache(GetMemberStrategyDocument); }, location: 'GetMemberStrategyDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: IsMemberDocument, get rawSDL() { return printWithCache(IsMemberDocument); }, location: 'IsMemberDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetMemberDocument, get rawSDL() { return printWithCache(GetMemberDocument); }, location: 'GetMemberDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetPoolCreationDataDocument, get rawSDL() { return printWithCache(GetPoolCreationDataDocument); }, location: 'GetPoolCreationDataDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetGardenCommunitiesDocument, get rawSDL() { return printWithCache(GetGardenCommunitiesDocument); }, location: 'GetGardenCommunitiesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetCommunityDocument, get rawSDL() { return printWithCache(GetCommunityDocument); }, location: 'GetCommunityDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetCommunityCreationDataDocument, get rawSDL() { return printWithCache(GetCommunityCreationDataDocument); }, location: 'GetCommunityCreationDataDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetPoolDataDocument, get rawSDL() { return printWithCache(GetPoolDataDocument); }, location: 'GetPoolDataDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetProposalDataDocument, get rawSDL() { return printWithCache(GetProposalDataDocument); }, location: 'GetProposalDataDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetAlloDocument, get rawSDL() { return printWithCache(GetAlloDocument); }, location: 'GetAlloDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetStrategyByPoolDocument, get rawSDL() { return printWithCache(GetStrategyByPoolDocument); }, location: 'GetStrategyByPoolDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetTokenTitleDocument, get rawSDL() { return printWithCache(GetTokenTitleDocument); }, location: 'GetTokenTitleDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetCommunityTitlesDocument, get rawSDL() { return printWithCache(GetCommunityTitlesDocument); }, location: 'GetCommunityTitlesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetPoolTitlesDocument, get rawSDL() { return printWithCache(GetPoolTitlesDocument); }, location: 'GetPoolTitlesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetProposalTitlesDocument, get rawSDL() { return printWithCache(GetProposalTitlesDocument); }, location: 'GetProposalTitlesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetPassportScorerDocument, get rawSDL() { return printWithCache(GetPassportScorerDocument); }, location: 'GetPassportScorerDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetPassportStrategyDocument, get rawSDL() { return printWithCache(GetPassportStrategyDocument); }, location: 'GetPassportStrategyDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetPassportUserDocument, get rawSDL() { return printWithCache(GetPassportUserDocument); }, location: 'GetPassportUserDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetProposalDisputesDocument, get rawSDL() { return printWithCache(GetProposalDisputesDocument); }, location: 'GetProposalDisputesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetArbitrableConfigsDocument, get rawSDL() { return printWithCache(GetArbitrableConfigsDocument); }, location: 'GetArbitrableConfigsDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' }, { document: GetMemberPassportAndCommunitiesDocument, get rawSDL() { return printWithCache(GetMemberPassportAndCommunitiesDocument); }, location: 'GetMemberPassportAndCommunitiesDocument.graphql', - sha256Hash: 'acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3' + sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' } ]; }, @@ -515,6 +515,7 @@ export const getCommunityDocument = gql ` isEnabled poolAmount poolId + token metadata config { proposalType diff --git a/pkg/subgraph/.graphclient/persisted_operations.json b/pkg/subgraph/.graphclient/persisted_operations.json index 352d619ab..e889d047e 100644 --- a/pkg/subgraph/.graphclient/persisted_operations.json +++ b/pkg/subgraph/.graphclient/persisted_operations.json @@ -1,3 +1,3 @@ { - "acb50b0fab324884a8123f3a0d71bcf7199e67a21f7b3317d241fb15d03a31d3": "query getFactories {\n registryFactories {\n id\n registryCommunities {\n id\n chainId\n isValid\n communityName\n covenantIpfsHash\n registerToken\n alloAddress\n members {\n memberAddress\n }\n strategies {\n id\n poolId\n isEnabled\n config {\n id\n decay\n maxRatio\n weight\n minThresholdPoints\n }\n }\n }\n }\n}\n\nquery getTokenGardens {\n tokenGardens {\n id\n chainId\n name\n symbol\n decimals\n totalBalance\n communities {\n id\n chainId\n covenantIpfsHash\n communityFee\n isValid\n communityName\n strategies {\n id\n }\n members {\n id\n memberAddress\n }\n }\n }\n}\n\nquery getMemberStrategy($member_strategy: ID!) {\n memberStrategy(id: $member_strategy) {\n id\n totalStakedPoints\n activatedPoints\n strategy {\n id\n }\n member {\n id\n }\n }\n}\n\nquery isMember($me: ID!, $comm: String!) {\n member(id: $me) {\n id\n stakes {\n id\n amount\n proposal {\n id\n proposalNumber\n stakedAmount\n strategy {\n id\n poolId\n registryCommunity {\n id\n isValid\n garden {\n id\n symbol\n decimals\n }\n }\n }\n }\n }\n memberCommunity(where: {registryCommunity_contains: $comm}) {\n stakedTokens\n isRegistered\n registryCommunity {\n id\n }\n }\n }\n}\n\nquery getMember($me: ID!) {\n member(id: $me) {\n id\n memberCommunity {\n id\n stakedTokens\n isRegistered\n registryCommunity {\n id\n isValid\n }\n }\n stakes {\n id\n proposal {\n proposalNumber\n id\n }\n amount\n createdAt\n }\n }\n}\n\nquery getPoolCreationData($communityAddr: ID!, $tokenAddr: ID!) {\n tokenGarden(id: $tokenAddr) {\n decimals\n id\n symbol\n }\n allos {\n id\n }\n registryCommunity(id: $communityAddr) {\n communityName\n isValid\n }\n}\n\nquery getGardenCommunities($chainId: BigInt!, $tokenGarden: ID!) {\n registryCommunities(where: {chainId: $chainId, garden_: {id: $tokenGarden}}) {\n id\n garden {\n id\n }\n chainId\n isValid\n covenantIpfsHash\n communityName\n protocolFee\n communityFee\n registerToken\n registerStakeAmount\n alloAddress\n members(where: {stakedTokens_gt: \"0\"}) {\n id\n memberAddress\n }\n strategies(where: {isEnabled: true}) {\n id\n totalEffectiveActivePoints\n poolId\n poolAmount\n }\n }\n}\n\nquery getCommunity($communityAddr: ID!, $tokenAddr: ID!) {\n registryCommunity(id: $communityAddr) {\n communityName\n id\n members(where: {stakedTokens_gt: \"0\"}) {\n id\n stakedTokens\n }\n strategies(orderBy: poolId, orderDirection: desc) {\n id\n proposals {\n id\n }\n isEnabled\n poolAmount\n poolId\n metadata\n config {\n proposalType\n pointSystem\n }\n proposals {\n id\n }\n }\n covenantIpfsHash\n communityFee\n protocolFee\n registerStakeAmount\n registerToken\n }\n tokenGarden(id: $tokenAddr) {\n symbol\n decimals\n id\n }\n}\n\nquery getCommunityCreationData {\n registryFactories {\n id\n }\n}\n\nquery getPoolData($garden: ID!, $poolId: BigInt!) {\n allos {\n id\n chainId\n tokenNative\n }\n tokenGarden(id: $garden) {\n address\n name\n symbol\n description\n totalBalance\n ipfsCovenant\n decimals\n }\n cvstrategies(where: {poolId: $poolId}) {\n token\n poolAmount\n metadata\n id\n poolId\n totalEffectiveActivePoints\n isEnabled\n sybilScorer {\n id\n }\n memberActive {\n id\n }\n config {\n id\n weight\n decay\n maxAmount\n maxRatio\n minThresholdPoints\n pointSystem\n proposalType\n allowlist\n }\n registryCommunity {\n id\n councilSafe\n isValid\n garden {\n id\n symbol\n decimals\n }\n }\n proposals(orderBy: createdAt, orderDirection: desc) {\n id\n proposalNumber\n metadata {\n title\n description\n }\n metadataHash\n beneficiary\n requestedAmount\n requestedToken\n proposalStatus\n stakedAmount\n convictionLast\n createdAt\n blockLast\n threshold\n strategy {\n id\n maxCVSupply\n totalEffectiveActivePoints\n }\n }\n }\n arbitrableConfigs(\n first: 1\n orderBy: version\n orderDirection: desc\n where: {strategy_: {poolId: $poolId}}\n ) {\n submitterCollateralAmount\n challengerCollateralAmount\n arbitrator\n defaultRuling\n defaultRulingTimeout\n tribunalSafe\n }\n}\n\nquery getProposalData($garden: ID!, $proposalId: ID!) {\n allos {\n id\n chainId\n tokenNative\n }\n tokenGarden(id: $garden) {\n name\n symbol\n decimals\n }\n cvproposal(id: $proposalId) {\n id\n proposalNumber\n beneficiary\n blockLast\n convictionLast\n createdAt\n metadata {\n title\n description\n }\n metadataHash\n proposalStatus\n requestedAmount\n requestedToken\n stakedAmount\n submitter\n threshold\n updatedAt\n version\n strategy {\n id\n token\n maxCVSupply\n totalEffectiveActivePoints\n poolId\n config {\n proposalType\n pointSystem\n minThresholdPoints\n decay\n }\n }\n arbitrableConfig {\n arbitrator\n defaultRuling\n defaultRulingTimeout\n challengerCollateralAmount\n submitterCollateralAmount\n tribunalSafe\n }\n }\n}\n\nquery getAllo {\n allos {\n id\n chainId\n tokenNative\n }\n}\n\nquery getStrategyByPool($poolId: BigInt!) {\n cvstrategies(where: {poolId: $poolId}) {\n id\n poolId\n totalEffectiveActivePoints\n isEnabled\n config {\n id\n proposalType\n pointSystem\n minThresholdPoints\n }\n memberActive {\n id\n }\n registryCommunity {\n id\n isValid\n garden {\n id\n symbol\n decimals\n }\n }\n proposals {\n id\n proposalNumber\n metadata {\n title\n description\n }\n metadataHash\n beneficiary\n requestedAmount\n requestedToken\n proposalStatus\n stakedAmount\n }\n }\n}\n\nquery getTokenTitle($tokenAddr: ID!) {\n tokenGarden(id: $tokenAddr) {\n name\n }\n}\n\nquery getCommunityTitles($communityAddr: ID!) {\n registryCommunity(id: $communityAddr) {\n communityName\n garden {\n name\n }\n }\n}\n\nquery getPoolTitles($poolId: BigInt!) {\n cvstrategies(where: {poolId: $poolId}) {\n poolId\n metadata\n registryCommunity {\n communityName\n garden {\n name\n }\n }\n metadata\n }\n}\n\nquery getProposalTitles($proposalId: ID!) {\n cvproposal(id: $proposalId) {\n proposalNumber\n metadata {\n title\n description\n }\n metadataHash\n strategy {\n poolId\n metadata\n registryCommunity {\n communityName\n garden {\n name\n }\n }\n }\n }\n}\n\nquery getPassportScorer($scorerId: ID!) {\n passportScorer(id: $scorerId) {\n id\n strategies {\n id\n strategy {\n id\n }\n threshold\n councilSafe\n active\n }\n users {\n id\n userAddress\n score\n lastUpdated\n }\n }\n}\n\nquery getPassportStrategy($strategyId: ID!) {\n passportStrategy(id: $strategyId) {\n id\n strategy {\n id\n }\n threshold\n councilSafe\n active\n }\n}\n\nquery getPassportUser($userId: ID!) {\n passportUser(id: $userId) {\n id\n userAddress\n score\n lastUpdated\n }\n}\n\nquery getProposalDisputes($proposalId: ID!) {\n proposalDisputes(where: {proposal_: {id: $proposalId}}) {\n id\n disputeId\n status\n challenger\n context\n metadata {\n reason\n }\n createdAt\n ruledAt\n rulingOutcome\n }\n}\n\nquery getArbitrableConfigs($strategyId: String!) {\n arbitrableConfigs(where: {strategy: $strategyId}) {\n arbitrator\n challengerCollateralAmount\n submitterCollateralAmount\n tribunalSafe\n defaultRuling\n defaultRulingTimeout\n }\n}\n\nquery getMemberPassportAndCommunities($memberId: ID!) {\n member(id: $memberId) {\n memberCommunity {\n id\n }\n }\n passportUser(id: $memberId) {\n lastUpdated\n score\n }\n}" + "21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa": "query getFactories {\n registryFactories {\n id\n registryCommunities {\n id\n chainId\n isValid\n communityName\n covenantIpfsHash\n registerToken\n alloAddress\n members {\n memberAddress\n }\n strategies {\n id\n poolId\n isEnabled\n config {\n id\n decay\n maxRatio\n weight\n minThresholdPoints\n }\n }\n }\n }\n}\n\nquery getTokenGardens {\n tokenGardens {\n id\n chainId\n name\n symbol\n decimals\n totalBalance\n communities {\n id\n chainId\n covenantIpfsHash\n communityFee\n isValid\n communityName\n strategies {\n id\n }\n members {\n id\n memberAddress\n }\n }\n }\n}\n\nquery getMemberStrategy($member_strategy: ID!) {\n memberStrategy(id: $member_strategy) {\n id\n totalStakedPoints\n activatedPoints\n strategy {\n id\n }\n member {\n id\n }\n }\n}\n\nquery isMember($me: ID!, $comm: String!) {\n member(id: $me) {\n id\n stakes {\n id\n amount\n proposal {\n id\n proposalNumber\n stakedAmount\n strategy {\n id\n poolId\n registryCommunity {\n id\n isValid\n garden {\n id\n symbol\n decimals\n }\n }\n }\n }\n }\n memberCommunity(where: {registryCommunity_contains: $comm}) {\n stakedTokens\n isRegistered\n registryCommunity {\n id\n }\n }\n }\n}\n\nquery getMember($me: ID!) {\n member(id: $me) {\n id\n memberCommunity {\n id\n stakedTokens\n isRegistered\n registryCommunity {\n id\n isValid\n }\n }\n stakes {\n id\n proposal {\n proposalNumber\n id\n }\n amount\n createdAt\n }\n }\n}\n\nquery getPoolCreationData($communityAddr: ID!, $tokenAddr: ID!) {\n tokenGarden(id: $tokenAddr) {\n decimals\n id\n symbol\n }\n allos {\n id\n }\n registryCommunity(id: $communityAddr) {\n communityName\n isValid\n }\n}\n\nquery getGardenCommunities($chainId: BigInt!, $tokenGarden: ID!) {\n registryCommunities(where: {chainId: $chainId, garden_: {id: $tokenGarden}}) {\n id\n garden {\n id\n }\n chainId\n isValid\n covenantIpfsHash\n communityName\n protocolFee\n communityFee\n registerToken\n registerStakeAmount\n alloAddress\n members(where: {stakedTokens_gt: \"0\"}) {\n id\n memberAddress\n }\n strategies(where: {isEnabled: true}) {\n id\n totalEffectiveActivePoints\n poolId\n poolAmount\n }\n }\n}\n\nquery getCommunity($communityAddr: ID!, $tokenAddr: ID!) {\n registryCommunity(id: $communityAddr) {\n communityName\n id\n members(where: {stakedTokens_gt: \"0\"}) {\n id\n stakedTokens\n }\n strategies(orderBy: poolId, orderDirection: desc) {\n id\n proposals {\n id\n }\n isEnabled\n poolAmount\n poolId\n token\n metadata\n config {\n proposalType\n pointSystem\n }\n proposals {\n id\n }\n }\n covenantIpfsHash\n communityFee\n protocolFee\n registerStakeAmount\n registerToken\n }\n tokenGarden(id: $tokenAddr) {\n symbol\n decimals\n id\n }\n}\n\nquery getCommunityCreationData {\n registryFactories {\n id\n }\n}\n\nquery getPoolData($garden: ID!, $poolId: BigInt!) {\n allos {\n id\n chainId\n tokenNative\n }\n tokenGarden(id: $garden) {\n address\n name\n symbol\n description\n totalBalance\n ipfsCovenant\n decimals\n }\n cvstrategies(where: {poolId: $poolId}) {\n token\n poolAmount\n metadata\n id\n poolId\n totalEffectiveActivePoints\n isEnabled\n sybilScorer {\n id\n }\n memberActive {\n id\n }\n config {\n id\n weight\n decay\n maxAmount\n maxRatio\n minThresholdPoints\n pointSystem\n proposalType\n allowlist\n }\n registryCommunity {\n id\n councilSafe\n isValid\n garden {\n id\n symbol\n decimals\n }\n }\n proposals(orderBy: createdAt, orderDirection: desc) {\n id\n proposalNumber\n metadata {\n title\n description\n }\n metadataHash\n beneficiary\n requestedAmount\n requestedToken\n proposalStatus\n stakedAmount\n convictionLast\n createdAt\n blockLast\n threshold\n strategy {\n id\n maxCVSupply\n totalEffectiveActivePoints\n }\n }\n }\n arbitrableConfigs(\n first: 1\n orderBy: version\n orderDirection: desc\n where: {strategy_: {poolId: $poolId}}\n ) {\n submitterCollateralAmount\n challengerCollateralAmount\n arbitrator\n defaultRuling\n defaultRulingTimeout\n tribunalSafe\n }\n}\n\nquery getProposalData($garden: ID!, $proposalId: ID!) {\n allos {\n id\n chainId\n tokenNative\n }\n tokenGarden(id: $garden) {\n name\n symbol\n decimals\n }\n cvproposal(id: $proposalId) {\n id\n proposalNumber\n beneficiary\n blockLast\n convictionLast\n createdAt\n metadata {\n title\n description\n }\n metadataHash\n proposalStatus\n requestedAmount\n requestedToken\n stakedAmount\n submitter\n threshold\n updatedAt\n version\n strategy {\n id\n token\n maxCVSupply\n totalEffectiveActivePoints\n poolId\n config {\n proposalType\n pointSystem\n minThresholdPoints\n decay\n }\n }\n arbitrableConfig {\n arbitrator\n defaultRuling\n defaultRulingTimeout\n challengerCollateralAmount\n submitterCollateralAmount\n tribunalSafe\n }\n }\n}\n\nquery getAllo {\n allos {\n id\n chainId\n tokenNative\n }\n}\n\nquery getStrategyByPool($poolId: BigInt!) {\n cvstrategies(where: {poolId: $poolId}) {\n id\n poolId\n totalEffectiveActivePoints\n isEnabled\n config {\n id\n proposalType\n pointSystem\n minThresholdPoints\n }\n memberActive {\n id\n }\n registryCommunity {\n id\n isValid\n garden {\n id\n symbol\n decimals\n }\n }\n proposals {\n id\n proposalNumber\n metadata {\n title\n description\n }\n metadataHash\n beneficiary\n requestedAmount\n requestedToken\n proposalStatus\n stakedAmount\n }\n }\n}\n\nquery getTokenTitle($tokenAddr: ID!) {\n tokenGarden(id: $tokenAddr) {\n name\n }\n}\n\nquery getCommunityTitles($communityAddr: ID!) {\n registryCommunity(id: $communityAddr) {\n communityName\n garden {\n name\n }\n }\n}\n\nquery getPoolTitles($poolId: BigInt!) {\n cvstrategies(where: {poolId: $poolId}) {\n poolId\n metadata\n registryCommunity {\n communityName\n garden {\n name\n }\n }\n metadata\n }\n}\n\nquery getProposalTitles($proposalId: ID!) {\n cvproposal(id: $proposalId) {\n proposalNumber\n metadata {\n title\n description\n }\n metadataHash\n strategy {\n poolId\n metadata\n registryCommunity {\n communityName\n garden {\n name\n }\n }\n }\n }\n}\n\nquery getPassportScorer($scorerId: ID!) {\n passportScorer(id: $scorerId) {\n id\n strategies {\n id\n strategy {\n id\n }\n threshold\n councilSafe\n active\n }\n users {\n id\n userAddress\n score\n lastUpdated\n }\n }\n}\n\nquery getPassportStrategy($strategyId: ID!) {\n passportStrategy(id: $strategyId) {\n id\n strategy {\n id\n }\n threshold\n councilSafe\n active\n }\n}\n\nquery getPassportUser($userId: ID!) {\n passportUser(id: $userId) {\n id\n userAddress\n score\n lastUpdated\n }\n}\n\nquery getProposalDisputes($proposalId: ID!) {\n proposalDisputes(where: {proposal_: {id: $proposalId}}) {\n id\n disputeId\n status\n challenger\n context\n metadata {\n reason\n }\n createdAt\n ruledAt\n rulingOutcome\n }\n}\n\nquery getArbitrableConfigs($strategyId: String!) {\n arbitrableConfigs(where: {strategy: $strategyId}) {\n arbitrator\n challengerCollateralAmount\n submitterCollateralAmount\n tribunalSafe\n defaultRuling\n defaultRulingTimeout\n }\n}\n\nquery getMemberPassportAndCommunities($memberId: ID!) {\n member(id: $memberId) {\n memberCommunity {\n id\n }\n }\n passportUser(id: $memberId) {\n lastUpdated\n score\n }\n}" } \ No newline at end of file diff --git a/pkg/subgraph/src/query/queries.graphql b/pkg/subgraph/src/query/queries.graphql index dcac26590..4db39a23e 100644 --- a/pkg/subgraph/src/query/queries.graphql +++ b/pkg/subgraph/src/query/queries.graphql @@ -188,6 +188,7 @@ query getCommunity($communityAddr: ID!, $tokenAddr: ID!) { isEnabled poolAmount poolId + token metadata config { proposalType