diff --git a/apps/web/components/Badge.tsx b/apps/web/components/Badge.tsx index 8a10c768a..405ad0b10 100644 --- a/apps/web/components/Badge.tsx +++ b/apps/web/components/Badge.tsx @@ -12,6 +12,7 @@ type BadgeProps = { className?: string; icon?: React.ReactNode; isCapitalize?: boolean; + tooltip?: string; }; // Styles for different pool badge types @@ -39,6 +40,7 @@ export function Badge({ status, label, className, + tooltip, icon, }: BadgeProps): JSX.Element { const isStatusBadge = status !== undefined; @@ -70,7 +72,8 @@ export function Badge({ return (
{iconIncluded && (
{iconIncluded}
diff --git a/apps/web/components/Button.tsx b/apps/web/components/Button.tsx index 032653a6e..397e609c7 100644 --- a/apps/web/components/Button.tsx +++ b/apps/web/components/Button.tsx @@ -51,12 +51,12 @@ const btnStyles: BtnStyles = { }, outline: { primary: - "text-primary-content border border-primary-content hover:text-primary-hover-content hover:outline-primary-hover-content", + "text-primary-content border border-primary-content hover:text-primary-hover-content hover:border-primary-hover-content", secondary: - "text-secondary-content border border-secondary-content hover:text-secondary-hover-content hover:outline-secondary-hover-content", + "text-secondary-content border border-secondary-content hover:text-secondary-hover-content hover:border-secondary-hover-content", tertiary: "", danger: - "text-danger-button border border-danger-button hover:text-danger-hover-content hover:outline-danger-hover-content", + "text-danger-button border border-danger-button hover:text-danger-hover-content hover:border-danger-hover-content", disabled: "text-neutral-soft-content border border-neutral-soft-content", }, link: { diff --git a/apps/web/components/Forms/PoolForm.tsx b/apps/web/components/Forms/PoolForm.tsx index 386365256..8c38933eb 100644 --- a/apps/web/components/Forms/PoolForm.tsx +++ b/apps/web/components/Forms/PoolForm.tsx @@ -17,7 +17,10 @@ import { FormRadioButton } from "./FormRadioButton"; import { FormSelect } from "./FormSelect"; import { EthAddress } from "../EthAddress"; import { Button } from "@/components/Button"; -import { DEFAULT_RULING_TIMEOUT_SEC } from "@/configs/constants"; +import { + DEFAULT_RULING_TIMEOUT_SEC, + VOTING_POINT_SYSTEM_DESCRIPTION, +} from "@/configs/constants"; import { QUERY_PARAMS } from "@/constants/query-params"; import { usePubSubContext } from "@/contexts/pubsub.context"; import { useChainFromPath } from "@/hooks/useChainFromPath"; @@ -595,14 +598,6 @@ export function PoolForm({ token, communityAddr }: Props) { } }, [customTokenData, watchedAddress, trigger]); - const votingWeightSystemDescriptions = { - fixed: "Everyone has the same voting weight, limited to registration stake", - capped: "Voting weight is equal to tokens staked, up to a limit", - unlimited: "Voting weight is equal to tokens staked, no limit.", - quadratic: - "Voting weight increases as more tokens are staked, following a quadratic curve.", - }; - return (
{showPreview ? @@ -676,18 +671,18 @@ export function PoolForm({ token, communityAddr }: Props) { *
- {Object.entries(PointSystems).map(([value, label], i) => ( + {Object.entries(PointSystems).map(([value, id], i) => (
setValue("pointSystemType", parseInt(value)) } checked={parseInt(value) === pointSystemType} registerKey="pointSystemType" - description={votingWeightSystemDescriptions[label]} + description={VOTING_POINT_SYSTEM_DESCRIPTION[id]} /> {PointSystems[pointSystemType] === "capped" && i === Object.values(PointSystems).indexOf("capped") && ( diff --git a/apps/web/components/PoolHeader.tsx b/apps/web/components/PoolHeader.tsx index f2723c8ab..c8fc8bf22 100644 --- a/apps/web/components/PoolHeader.tsx +++ b/apps/web/components/PoolHeader.tsx @@ -5,13 +5,18 @@ import { ChartBarIcon, CheckIcon, ClockIcon, - Cog6ToothIcon, InformationCircleIcon, Square3Stack3DIcon, } from "@heroicons/react/24/outline"; -import { StopIcon } from "@heroicons/react/24/solid"; +import { + ArchiveBoxIcon, + NoSymbolIcon, + StopIcon, + Cog6ToothIcon, +} from "@heroicons/react/24/solid"; import { FetchTokenResult } from "@wagmi/core"; import Image from "next/image"; +import { usePathname, useRouter } from "next/navigation"; import { Address, zeroAddress } from "viem"; import { useAccount, useContractRead } from "wagmi"; import { @@ -32,6 +37,7 @@ import { Skeleton } from "./Skeleton"; import { Statistic } from "./Statistic"; import { blueLand, grassLarge } from "@/assets"; import { chainConfigMap } from "@/configs/chains"; +import { VOTING_POINT_SYSTEM_DESCRIPTION } from "@/configs/constants"; import { usePubSubContext } from "@/contexts/pubsub.context"; import { useChainFromPath } from "@/hooks/useChainFromPath"; import { useContractWriteWithConfirmations } from "@/hooks/useContractWriteWithConfirmations"; @@ -95,7 +101,6 @@ function calculateMinimumConviction(weight: number, spendingLimit: number) { return minimumConviction; } - export default function PoolHeader({ ipfsResult, poolId, @@ -110,6 +115,9 @@ export default function PoolHeader({ const { address } = useAccount(); const { publish } = usePubSubContext(); const { id: chainId, safePrefix } = useChainFromPath()!; + const router = useRouter(); + const path = usePathname(); + const isArchived = strategy.archived; const { data: passportStrategyData } = useSubgraphQuery({ @@ -128,7 +136,6 @@ export default function PoolHeader({ passportStrategy?.threshold ? Number(passportStrategy?.threshold) / CV_PASSPORT_THRESHOLD_SCALE : null; - const blockTime = chainConfigMap[chainId!].blockTime; const spendingLimitPct = (Number(strategy.config.maxRatio || 0) / CV_SCALE_PRECISION) * 100; @@ -275,6 +282,31 @@ export default function PoolHeader({ }, }); + const { write: rejectPoolWrite } = useContractWriteWithConfirmations({ + address: communityAddr, + abi: registryCommunityABI, + contractName: "Registry Community", + functionName: "rejectPool", + fallbackErrorMessage: "Error rejecting pool, please report a bug.", + args: [strategy.id as Address], + onConfirmations: () => { + publish({ + topic: "pool", + function: "rejectPool", + type: "update", + containerId: communityAddr, + chainId: chainId, + }); + const pathSegments = path.split("/"); + pathSegments.pop(); + if (pathSegments.length === 6) { + pathSegments.pop(); + } + const newPath = pathSegments.join("/"); + router.push(newPath); + }, + }); + const { write: addStrategyByPoolId } = useContractWriteWithConfirmations({ address: communityAddr, abi: registryCommunityABI, @@ -338,22 +370,6 @@ export default function PoolHeader({ {(!!isCouncilMember || isCouncilSafe) && (
- - {isEnabled ? + {isArchived ? - : + : isEnabled ? + <> + + + + : <> + + + }
)}
-
+
+
} /> - } /> + } + />
diff --git a/apps/web/components/PoolMetrics.tsx b/apps/web/components/PoolMetrics.tsx index 39938013f..eabb7f373 100644 --- a/apps/web/components/PoolMetrics.tsx +++ b/apps/web/components/PoolMetrics.tsx @@ -153,17 +153,19 @@ export const PoolMetrics: FC = ({ className="subtitle2 text-primary-content" />
-
-

Wallet balance:

- - - -
+ {accountAddress && ( +
+

Wallet balance:

+ + + +
+ )} >>; or?: InputMaybe>>; }; -export type ArbitrableConfig_orderBy = 'id' | 'version' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'arbitrator' | 'tribunalSafe' | 'challengerCollateralAmount' | 'submitterCollateralAmount' | 'defaultRuling' | 'defaultRulingTimeout' | 'allowlist'; +export type ArbitrableConfig_orderBy = 'id' | 'version' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'strategy__archived' | 'arbitrator' | 'tribunalSafe' | 'challengerCollateralAmount' | 'submitterCollateralAmount' | 'defaultRuling' | 'defaultRulingTimeout' | 'allowlist'; export type BlockChangedFilter = { number_gte: Scalars['Int']['input']; }; @@ -529,7 +529,7 @@ export type CVProposal_filter = { and?: InputMaybe>>; or?: InputMaybe>>; }; -export type CVProposal_orderBy = 'id' | 'proposalNumber' | 'metadata' | 'metadata__id' | 'metadata__title' | 'metadata__description' | 'metadataHash' | 'version' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'beneficiary' | 'requestedAmount' | 'requestedToken' | 'proposalStatus' | 'blockLast' | 'convictionLast' | 'threshold' | 'maxCVStaked' | 'stakedAmount' | 'submitter' | 'createdAt' | 'updatedAt' | 'arbitrableConfig' | 'arbitrableConfig__id' | 'arbitrableConfig__version' | 'arbitrableConfig__arbitrator' | 'arbitrableConfig__tribunalSafe' | 'arbitrableConfig__challengerCollateralAmount' | 'arbitrableConfig__submitterCollateralAmount' | 'arbitrableConfig__defaultRuling' | 'arbitrableConfig__defaultRulingTimeout'; +export type CVProposal_orderBy = 'id' | 'proposalNumber' | 'metadata' | 'metadata__id' | 'metadata__title' | 'metadata__description' | 'metadataHash' | 'version' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'strategy__archived' | 'beneficiary' | 'requestedAmount' | 'requestedToken' | 'proposalStatus' | 'blockLast' | 'convictionLast' | 'threshold' | 'maxCVStaked' | 'stakedAmount' | 'submitter' | 'createdAt' | 'updatedAt' | 'arbitrableConfig' | 'arbitrableConfig__id' | 'arbitrableConfig__version' | 'arbitrableConfig__arbitrator' | 'arbitrableConfig__tribunalSafe' | 'arbitrableConfig__challengerCollateralAmount' | 'arbitrableConfig__submitterCollateralAmount' | 'arbitrableConfig__defaultRuling' | 'arbitrableConfig__defaultRulingTimeout'; export type CVStrategy = { id: Scalars['ID']['output']; poolId: Scalars['BigInt']['output']; @@ -544,6 +544,7 @@ export type CVStrategy = { isEnabled: Scalars['Boolean']['output']; token: Scalars['String']['output']; sybilScorer?: Maybe; + archived: Scalars['Boolean']['output']; }; export type CVStrategyproposalsArgs = { skip?: InputMaybe; @@ -657,7 +658,7 @@ export type CVStrategyConfig_filter = { and?: InputMaybe>>; or?: InputMaybe>>; }; -export type CVStrategyConfig_orderBy = 'id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'D' | 'decay' | 'maxRatio' | 'minThresholdPoints' | 'weight' | 'proposalType' | 'pointSystem' | 'maxAmount' | 'allowlist'; +export type CVStrategyConfig_orderBy = 'id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'strategy__archived' | 'D' | 'decay' | 'maxRatio' | 'minThresholdPoints' | 'weight' | 'proposalType' | 'pointSystem' | 'maxAmount' | 'allowlist'; export type CVStrategy_filter = { id?: InputMaybe; id_not?: InputMaybe; @@ -814,12 +815,16 @@ export type CVStrategy_filter = { sybilScorer_not_ends_with?: InputMaybe; sybilScorer_not_ends_with_nocase?: InputMaybe; sybilScorer_?: InputMaybe; + archived?: InputMaybe; + archived_not?: InputMaybe; + archived_in?: InputMaybe>; + archived_not_in?: InputMaybe>; /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; or?: InputMaybe>>; }; -export type CVStrategy_orderBy = 'id' | 'poolId' | 'poolAmount' | 'metadata' | 'registryCommunity' | 'registryCommunity__id' | 'registryCommunity__chainId' | 'registryCommunity__strategyTemplate' | 'registryCommunity__profileId' | 'registryCommunity__communityFee' | 'registryCommunity__protocolFee' | 'registryCommunity__protocolFeeReceiver' | 'registryCommunity__communityName' | 'registryCommunity__covenantIpfsHash' | 'registryCommunity__councilSafe' | 'registryCommunity__pendingNewCouncilSafe' | 'registryCommunity__isKickEnabled' | 'registryCommunity__registerStakeAmount' | 'registryCommunity__registerToken' | 'registryCommunity__alloAddress' | 'registryCommunity__isValid' | 'config' | 'config__id' | 'config__D' | 'config__decay' | 'config__maxRatio' | 'config__minThresholdPoints' | 'config__weight' | 'config__proposalType' | 'config__pointSystem' | 'config__maxAmount' | 'proposals' | 'memberActive' | 'maxCVSupply' | 'totalEffectiveActivePoints' | 'isEnabled' | 'token' | 'sybilScorer' | 'sybilScorer__id'; +export type CVStrategy_orderBy = 'id' | 'poolId' | 'poolAmount' | 'metadata' | 'registryCommunity' | 'registryCommunity__id' | 'registryCommunity__chainId' | 'registryCommunity__strategyTemplate' | 'registryCommunity__profileId' | 'registryCommunity__communityFee' | 'registryCommunity__protocolFee' | 'registryCommunity__protocolFeeReceiver' | 'registryCommunity__communityName' | 'registryCommunity__covenantIpfsHash' | 'registryCommunity__councilSafe' | 'registryCommunity__pendingNewCouncilSafe' | 'registryCommunity__isKickEnabled' | 'registryCommunity__registerStakeAmount' | 'registryCommunity__registerToken' | 'registryCommunity__alloAddress' | 'registryCommunity__isValid' | 'config' | 'config__id' | 'config__D' | 'config__decay' | 'config__maxRatio' | 'config__minThresholdPoints' | 'config__weight' | 'config__proposalType' | 'config__pointSystem' | 'config__maxAmount' | 'proposals' | 'memberActive' | 'maxCVSupply' | 'totalEffectiveActivePoints' | 'isEnabled' | 'token' | 'sybilScorer' | 'sybilScorer__id' | 'archived'; export type CollateralVault = { id: Scalars['ID']['output']; strategy: CVStrategy; @@ -966,7 +971,7 @@ export type CollateralVault_filter = { and?: InputMaybe>>; or?: InputMaybe>>; }; -export type CollateralVault_orderBy = 'id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'collaterals'; +export type CollateralVault_orderBy = 'id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'strategy__archived' | 'collaterals'; export type Member = { id: Scalars['ID']['output']; memberCommunity?: Maybe>; @@ -1183,7 +1188,7 @@ export type MemberStrategy_filter = { and?: InputMaybe>>; or?: InputMaybe>>; }; -export type MemberStrategy_orderBy = 'id' | 'member' | 'member__id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'totalStakedPoints' | 'activatedPoints'; +export type MemberStrategy_orderBy = 'id' | 'member' | 'member__id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'strategy__archived' | 'totalStakedPoints' | 'activatedPoints'; export type Member_filter = { id?: InputMaybe; id_not?: InputMaybe; @@ -1335,7 +1340,7 @@ export type PassportStrategy_filter = { and?: InputMaybe>>; or?: InputMaybe>>; }; -export type PassportStrategy_orderBy = 'id' | 'passportScorer' | 'passportScorer__id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'threshold' | 'councilSafe' | 'active'; +export type PassportStrategy_orderBy = 'id' | 'passportScorer' | 'passportScorer__id' | 'strategy' | 'strategy__id' | 'strategy__poolId' | 'strategy__poolAmount' | 'strategy__metadata' | 'strategy__maxCVSupply' | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' | 'strategy__archived' | 'threshold' | 'councilSafe' | 'active'; export type PassportUser = { id: Scalars['ID']['output']; passportScorer: PassportScorer; @@ -3198,6 +3203,7 @@ export type CVStrategyResolvers; token?: Resolver; sybilScorer?: Resolver, ParentType, ContextType>; + archived?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }>; export type CVStrategyConfigResolvers = ResolversObject<{ @@ -3692,7 +3698,7 @@ export type getPoolDataQueryVariables = Exact<{ export type getPoolDataQuery = { allos: Array>; tokenGarden?: Maybe>; - cvstrategies: Array<(Pick & { + cvstrategies: Array<(Pick & { sybilScorer?: Maybe>; memberActive?: Maybe>>; config: Pick; @@ -3731,7 +3737,7 @@ export type getStrategyByPoolQueryVariables = Exact<{ poolId: Scalars['BigInt']['input']; }>; export type getStrategyByPoolQuery = { - cvstrategies: Array<(Pick & { + cvstrategies: Array<(Pick & { config: Pick; memberActive?: Maybe>>; registryCommunity: (Pick & { diff --git a/pkg/subgraph/.graphclient/index.js b/pkg/subgraph/.graphclient/index.js index 4f6b1c3c0..632e88220 100644 --- a/pkg/subgraph/.graphclient/index.js +++ b/pkg/subgraph/.graphclient/index.js @@ -50,7 +50,7 @@ export async function getMeshOptions() { const additionalTypeDefs = []; const gv2Handler = new GraphqlHandler({ name: "gv2", - config: { "endpoint": "https://api.studio.thegraph.com/query/40931/gardens-v2---arbitrum-sepolia/0.2.0" }, + config: { "endpoint": "https://api.studio.thegraph.com/query/70985/gardens-v2---arbitrum-sepolia/0.2.4" }, baseDir, cache, pubsub, @@ -71,29 +71,29 @@ export async function getMeshOptions() { store: rootStore.child('bareMerger') }); const documentHashMap = { - "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 + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetFactoriesDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetTokenGardensDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetMemberStrategyDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": IsMemberDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetMemberDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetPoolCreationDataDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetGardenCommunitiesDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetCommunityDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetCommunityCreationDataDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetPoolDataDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetProposalDataDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetAlloDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetStrategyByPoolDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetTokenTitleDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetCommunityTitlesDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetPoolTitlesDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetProposalTitlesDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetPassportScorerDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetPassportStrategyDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetPassportUserDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetProposalDisputesDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetArbitrableConfigsDocument, + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": GetMemberPassportAndCommunitiesDocument }; additionalEnvelopPlugins.push(usePersistedOperations({ getPersistedOperation(key) { @@ -119,161 +119,161 @@ export async function getMeshOptions() { return printWithCache(GetFactoriesDocument); }, location: 'GetFactoriesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetTokenGardensDocument, get rawSDL() { return printWithCache(GetTokenGardensDocument); }, location: 'GetTokenGardensDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetMemberStrategyDocument, get rawSDL() { return printWithCache(GetMemberStrategyDocument); }, location: 'GetMemberStrategyDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: IsMemberDocument, get rawSDL() { return printWithCache(IsMemberDocument); }, location: 'IsMemberDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetMemberDocument, get rawSDL() { return printWithCache(GetMemberDocument); }, location: 'GetMemberDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetPoolCreationDataDocument, get rawSDL() { return printWithCache(GetPoolCreationDataDocument); }, location: 'GetPoolCreationDataDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetGardenCommunitiesDocument, get rawSDL() { return printWithCache(GetGardenCommunitiesDocument); }, location: 'GetGardenCommunitiesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetCommunityDocument, get rawSDL() { return printWithCache(GetCommunityDocument); }, location: 'GetCommunityDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetCommunityCreationDataDocument, get rawSDL() { return printWithCache(GetCommunityCreationDataDocument); }, location: 'GetCommunityCreationDataDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetPoolDataDocument, get rawSDL() { return printWithCache(GetPoolDataDocument); }, location: 'GetPoolDataDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetProposalDataDocument, get rawSDL() { return printWithCache(GetProposalDataDocument); }, location: 'GetProposalDataDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetAlloDocument, get rawSDL() { return printWithCache(GetAlloDocument); }, location: 'GetAlloDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetStrategyByPoolDocument, get rawSDL() { return printWithCache(GetStrategyByPoolDocument); }, location: 'GetStrategyByPoolDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetTokenTitleDocument, get rawSDL() { return printWithCache(GetTokenTitleDocument); }, location: 'GetTokenTitleDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetCommunityTitlesDocument, get rawSDL() { return printWithCache(GetCommunityTitlesDocument); }, location: 'GetCommunityTitlesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetPoolTitlesDocument, get rawSDL() { return printWithCache(GetPoolTitlesDocument); }, location: 'GetPoolTitlesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetProposalTitlesDocument, get rawSDL() { return printWithCache(GetProposalTitlesDocument); }, location: 'GetProposalTitlesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetPassportScorerDocument, get rawSDL() { return printWithCache(GetPassportScorerDocument); }, location: 'GetPassportScorerDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetPassportStrategyDocument, get rawSDL() { return printWithCache(GetPassportStrategyDocument); }, location: 'GetPassportStrategyDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetPassportUserDocument, get rawSDL() { return printWithCache(GetPassportUserDocument); }, location: 'GetPassportUserDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetProposalDisputesDocument, get rawSDL() { return printWithCache(GetProposalDisputesDocument); }, location: 'GetProposalDisputesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetArbitrableConfigsDocument, get rawSDL() { return printWithCache(GetArbitrableConfigsDocument); }, location: 'GetArbitrableConfigsDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' }, { document: GetMemberPassportAndCommunitiesDocument, get rawSDL() { return printWithCache(GetMemberPassportAndCommunitiesDocument); }, location: 'GetMemberPassportAndCommunitiesDocument.graphql', - sha256Hash: '21229f9d4b89789bd890d0c0bb2110cff569de8fcc57bc021b4610c3e7397bfa' + sha256Hash: '67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec' } ]; }, @@ -507,7 +507,7 @@ export const getCommunityDocument = gql ` id stakedTokens } - strategies(orderBy: poolId, orderDirection: desc) { + strategies(orderBy: poolId, orderDirection: desc, where: {archived: false}) { id proposals { id @@ -570,6 +570,7 @@ export const getPoolDataDocument = gql ` totalEffectiveActivePoints isEnabled maxCVSupply + archived sybilScorer { id } @@ -708,6 +709,7 @@ export const getStrategyByPoolDocument = gql ` poolId totalEffectiveActivePoints isEnabled + archived config { id proposalType diff --git a/pkg/subgraph/.graphclient/persisted_operations.json b/pkg/subgraph/.graphclient/persisted_operations.json index e889d047e..48ae65257 100644 --- a/pkg/subgraph/.graphclient/persisted_operations.json +++ b/pkg/subgraph/.graphclient/persisted_operations.json @@ -1,3 +1,3 @@ { - "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}" + "67f63761732b211149e54c0edb8712b2a2cddd1ab68a30429d5263de6b11e8ec": "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, where: {archived: false}) {\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 maxCVSupply\n archived\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 archived\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/.graphclient/schema.graphql b/pkg/subgraph/.graphclient/schema.graphql index d11a1a593..5bc26dc6e 100644 --- a/pkg/subgraph/.graphclient/schema.graphql +++ b/pkg/subgraph/.graphclient/schema.graphql @@ -223,6 +223,7 @@ enum ArbitrableConfig_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived arbitrator tribunalSafe challengerCollateralAmount @@ -534,6 +535,7 @@ enum CVProposal_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived beneficiary requestedAmount requestedToken @@ -571,6 +573,7 @@ type CVStrategy { isEnabled: Boolean! token: String! sybilScorer: PassportScorer + archived: Boolean! } type CVStrategyConfig { @@ -684,6 +687,7 @@ enum CVStrategyConfig_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived D decay maxRatio @@ -851,6 +855,10 @@ input CVStrategy_filter { sybilScorer_not_ends_with: String sybilScorer_not_ends_with_nocase: String sybilScorer_: PassportScorer_filter + archived: Boolean + archived_not: Boolean + archived_in: [Boolean!] + archived_not_in: [Boolean!] """Filter for the block changed event.""" _change_block: BlockChangedFilter and: [CVStrategy_filter] @@ -897,6 +905,7 @@ enum CVStrategy_orderBy { token sybilScorer sybilScorer__id + archived } type CollateralVault { @@ -1064,6 +1073,7 @@ enum CollateralVault_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived collaterals } @@ -1319,6 +1329,7 @@ enum MemberStrategy_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived totalStakedPoints activatedPoints } @@ -1492,6 +1503,7 @@ enum PassportStrategy_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived threshold councilSafe active diff --git a/pkg/subgraph/.graphclient/sources/gv2/introspectionSchema.js b/pkg/subgraph/.graphclient/sources/gv2/introspectionSchema.js index 41c8f66dc..55e453102 100644 --- a/pkg/subgraph/.graphclient/sources/gv2/introspectionSchema.js +++ b/pkg/subgraph/.graphclient/sources/gv2/introspectionSchema.js @@ -3134,6 +3134,14 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "strategy__archived" + }, + "directives": [] + }, { "kind": "EnumValueDefinition", "name": { @@ -7688,6 +7696,14 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "strategy__archived" + }, + "directives": [] + }, { "kind": "EnumValueDefinition", "name": { @@ -8283,6 +8299,25 @@ const schemaAST = { } }, "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "archived" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + }, + "directives": [] } ], "interfaces": [], @@ -9990,6 +10025,14 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "strategy__archived" + }, + "directives": [] + }, { "kind": "EnumValueDefinition", "name": { @@ -12565,6 +12608,78 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "archived" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "archived_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "archived_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "archived_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, { "kind": "InputValueDefinition", "description": { @@ -12942,6 +13057,14 @@ const schemaAST = { "value": "sybilScorer__id" }, "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "archived" + }, + "directives": [] } ], "directives": [] @@ -15344,6 +15467,14 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "strategy__archived" + }, + "directives": [] + }, { "kind": "EnumValueDefinition", "name": { @@ -18946,6 +19077,14 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "strategy__archived" + }, + "directives": [] + }, { "kind": "EnumValueDefinition", "name": { @@ -21358,6 +21497,14 @@ const schemaAST = { }, "directives": [] }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "strategy__archived" + }, + "directives": [] + }, { "kind": "EnumValueDefinition", "name": { diff --git a/pkg/subgraph/.graphclient/sources/gv2/schema.graphql b/pkg/subgraph/.graphclient/sources/gv2/schema.graphql index d11a1a593..5bc26dc6e 100644 --- a/pkg/subgraph/.graphclient/sources/gv2/schema.graphql +++ b/pkg/subgraph/.graphclient/sources/gv2/schema.graphql @@ -223,6 +223,7 @@ enum ArbitrableConfig_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived arbitrator tribunalSafe challengerCollateralAmount @@ -534,6 +535,7 @@ enum CVProposal_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived beneficiary requestedAmount requestedToken @@ -571,6 +573,7 @@ type CVStrategy { isEnabled: Boolean! token: String! sybilScorer: PassportScorer + archived: Boolean! } type CVStrategyConfig { @@ -684,6 +687,7 @@ enum CVStrategyConfig_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived D decay maxRatio @@ -851,6 +855,10 @@ input CVStrategy_filter { sybilScorer_not_ends_with: String sybilScorer_not_ends_with_nocase: String sybilScorer_: PassportScorer_filter + archived: Boolean + archived_not: Boolean + archived_in: [Boolean!] + archived_not_in: [Boolean!] """Filter for the block changed event.""" _change_block: BlockChangedFilter and: [CVStrategy_filter] @@ -897,6 +905,7 @@ enum CVStrategy_orderBy { token sybilScorer sybilScorer__id + archived } type CollateralVault { @@ -1064,6 +1073,7 @@ enum CollateralVault_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived collaterals } @@ -1319,6 +1329,7 @@ enum MemberStrategy_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived totalStakedPoints activatedPoints } @@ -1492,6 +1503,7 @@ enum PassportStrategy_orderBy { strategy__totalEffectiveActivePoints strategy__isEnabled strategy__token + strategy__archived threshold councilSafe active diff --git a/pkg/subgraph/.graphclient/sources/gv2/types.ts b/pkg/subgraph/.graphclient/sources/gv2/types.ts index eede775d7..5b9396f4e 100644 --- a/pkg/subgraph/.graphclient/sources/gv2/types.ts +++ b/pkg/subgraph/.graphclient/sources/gv2/types.ts @@ -230,6 +230,7 @@ export type ArbitrableConfig_orderBy = | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' + | 'strategy__archived' | 'arbitrator' | 'tribunalSafe' | 'challengerCollateralAmount' @@ -534,6 +535,7 @@ export type CVProposal_orderBy = | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' + | 'strategy__archived' | 'beneficiary' | 'requestedAmount' | 'requestedToken' @@ -570,6 +572,7 @@ export type CVStrategy = { isEnabled: Scalars['Boolean']['output']; token: Scalars['String']['output']; sybilScorer?: Maybe; + archived: Scalars['Boolean']['output']; }; @@ -701,6 +704,7 @@ export type CVStrategyConfig_orderBy = | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' + | 'strategy__archived' | 'D' | 'decay' | 'maxRatio' @@ -867,6 +871,10 @@ export type CVStrategy_filter = { sybilScorer_not_ends_with?: InputMaybe; sybilScorer_not_ends_with_nocase?: InputMaybe; sybilScorer_?: InputMaybe; + archived?: InputMaybe; + archived_not?: InputMaybe; + archived_in?: InputMaybe>; + archived_not_in?: InputMaybe>; /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; @@ -912,7 +920,8 @@ export type CVStrategy_orderBy = | 'isEnabled' | 'token' | 'sybilScorer' - | 'sybilScorer__id'; + | 'sybilScorer__id' + | 'archived'; export type CollateralVault = { id: Scalars['ID']['output']; @@ -1087,6 +1096,7 @@ export type CollateralVault_orderBy = | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' + | 'strategy__archived' | 'collaterals'; export type Member = { @@ -1352,6 +1362,7 @@ export type MemberStrategy_orderBy = | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' + | 'strategy__archived' | 'totalStakedPoints' | 'activatedPoints'; @@ -1539,6 +1550,7 @@ export type PassportStrategy_orderBy = | 'strategy__totalEffectiveActivePoints' | 'strategy__isEnabled' | 'strategy__token' + | 'strategy__archived' | 'threshold' | 'councilSafe' | 'active'; diff --git a/pkg/subgraph/.graphclientrc.template.yml b/pkg/subgraph/.graphclientrc.template.yml index 2454baabc..2bcdac529 100644 --- a/pkg/subgraph/.graphclientrc.template.yml +++ b/pkg/subgraph/.graphclientrc.template.yml @@ -2,6 +2,6 @@ sources: - name: gv2 handler: graphql: - endpoint: https://api.studio.thegraph.com/query/40931/gardens-v2---arbitrum-sepolia/{{VERSION_TESTNET}} + endpoint: https://api.studio.thegraph.com/query/70985/gardens-v2---arbitrum-sepolia/{{VERSION_TESTNET}} documents: - ./src/query/queries.graphql diff --git a/pkg/subgraph/.graphclientrc.yml b/pkg/subgraph/.graphclientrc.yml index e47105944..50ee8dddc 100644 --- a/pkg/subgraph/.graphclientrc.yml +++ b/pkg/subgraph/.graphclientrc.yml @@ -2,6 +2,6 @@ sources: - name: gv2 handler: graphql: - endpoint: https://api.studio.thegraph.com/query/40931/gardens-v2---arbitrum-sepolia/0.2.0 + endpoint: https://api.studio.thegraph.com/query/70985/gardens-v2---arbitrum-sepolia/0.2.4 documents: - ./src/query/queries.graphql diff --git a/pkg/subgraph/src/mappings/registry-community.ts b/pkg/subgraph/src/mappings/registry-community.ts index d6a281a53..8814db591 100644 --- a/pkg/subgraph/src/mappings/registry-community.ts +++ b/pkg/subgraph/src/mappings/registry-community.ts @@ -251,7 +251,7 @@ export function handleMemberKicked(event: MemberKicked): void { memberCommunity.save(); } -// // handleStrategyAdded +// handleStrategyAdded export function handleStrategyAdded(event: StrategyAdded): void { log.debug("RegistryCommunity: handleStrategyAdded", [ event.params._strategy.toHexString() @@ -270,7 +270,7 @@ export function handleStrategyAdded(event: StrategyAdded): void { cvs.save(); } -// // handleStrategyAdded +// handleStrategyRemoved export function handleStrategyRemoved(event: StrategyRemoved): void { log.debug("RegistryCommunity: handleStrategyRemoved", [ event.params._strategy.toHexString() diff --git a/pkg/subgraph/src/query/queries.graphql b/pkg/subgraph/src/query/queries.graphql index 4db39a23e..0ad1a86ba 100644 --- a/pkg/subgraph/src/query/queries.graphql +++ b/pkg/subgraph/src/query/queries.graphql @@ -180,7 +180,11 @@ query getCommunity($communityAddr: ID!, $tokenAddr: ID!) { id stakedTokens } - strategies(orderBy: poolId, orderDirection: desc) { + strategies( + orderBy: poolId + orderDirection: desc + where: { archived: false } + ) { id proposals { id @@ -241,6 +245,7 @@ query getPoolData($garden: ID!, $poolId: BigInt!) { totalEffectiveActivePoints isEnabled maxCVSupply + archived sybilScorer { id } @@ -376,6 +381,7 @@ query getStrategyByPool($poolId: BigInt!) { poolId totalEffectiveActivePoints isEnabled + archived config { id proposalType diff --git a/pkg/subgraph/subgraph.yaml b/pkg/subgraph/subgraph.yaml index a26cd30b3..5d54395bc 100644 --- a/pkg/subgraph/subgraph.yaml +++ b/pkg/subgraph/subgraph.yaml @@ -6,15 +6,15 @@ schema: dataSources: - kind: ethereum/contract name: RegistryFactoryV0_0 - network: arbitrum-sepolia + network: localhost context: chainId: type: Int - data: 421614 + data: 1337 source: - address: "0x2689b1e4afcbfb393d9727fba2ab52930035ee85" + address: "0xb7f8bc63bbcad18155201308c8f3540b07f84f5e" abi: RegistryFactoryV0_0 - startBlock: 95965509 + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -40,15 +40,15 @@ dataSources: - kind: ethereum/contract name: PassportScorer - network: arbitrum-sepolia + network: localhost context: chainId: type: Int - data: 421614 + data: 1337 source: - address: "0x2053E225672776deb23Af0A3EBa9CE2c87838a72" + address: "0x0165878a594ca255338adfa4d48449f69242eb8f" abi: PassportScorer - startBlock: 95965509 + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -78,7 +78,7 @@ dataSources: templates: - kind: ethereum/contract name: RegistryCommunityV0_0 - network: arbitrum-sepolia + network: localhost source: abi: RegistryCommunityV0_0 mapping: @@ -150,7 +150,7 @@ templates: - kind: ethereum/contract name: CVStrategyV0_0 - network: arbitrum-sepolia + network: localhost source: abi: CVStrategyV0_0 mapping: @@ -209,7 +209,7 @@ templates: - kind: ethereum/contract name: CollateralVault - network: arbitrum-sepolia + network: localhost source: abi: CollateralVault mapping: