Skip to content
Closed
62 changes: 25 additions & 37 deletions apps/api-gateway/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ directive @httpOperation(subgraph: String, path: String, operationSpecificHeader
directive @transport(subgraph: String, kind: String, location: String, headers: [[String]], queryStringOptions: ObjMap, queryParams: [[String]]) repeatable on SCHEMA

type Query {
"""Get property data for a specific token"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/token`\nGet property data for a specific token\n"
token(currency: queryInput_token_currency = usd): token_200_response
tokens(where: tokenFilter, orderBy: String, orderDirection: String, before: String, after: String, limit: Int): tokenPage!
account(id: String!): account
Expand All @@ -38,69 +38,61 @@ type Query {
tokenPrices(where: tokenPriceFilter, orderBy: String, orderDirection: String, before: String, after: String, limit: Int): tokenPricePage!
_meta: Meta

"""Get historical market data for a specific token"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/token/historical-data`\nGet historical market data for a specific token\n"
historicalTokenData(skip: NonNegativeInt, limit: Float = 365): [query_historicalTokenData_items]

"""Compare total supply between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/total-supply/compare`\nCompare total supply between periods\n"
compareTotalSupply(days: queryInput_compareTotalSupply_days = _90d): compareTotalSupply_200_response

"""Compare delegated supply between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/delegated-supply/compare`\nCompare delegated supply between periods\n"
compareDelegatedSupply(days: queryInput_compareDelegatedSupply_days = _90d): compareDelegatedSupply_200_response

"""Compare circulating supply between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/circulating-supply/compare`\nCompare circulating supply between periods\n"
compareCirculatingSupply(days: queryInput_compareCirculatingSupply_days = _90d): compareCirculatingSupply_200_response

"""Compare treasury between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/treasury/compare`\nCompare treasury between periods\n"
compareTreasury(days: queryInput_compareTreasury_days = _90d): compareTreasury_200_response

"""Compare cex supply between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/cex-supply/compare`\nCompare cex supply between periods\n"
compareCexSupply(days: queryInput_compareCexSupply_days = _90d): compareCexSupply_200_response

"""Compare dex supply between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/dex-supply/compare`\nCompare dex supply between periods\n"
compareDexSupply(days: queryInput_compareDexSupply_days = _90d): compareDexSupply_200_response

"""Compare lending supply between periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/lending-supply/compare`\nCompare lending supply between periods\n"
compareLendingSupply(days: queryInput_compareLendingSupply_days = _90d): compareLendingSupply_200_response

"""Get active token supply for DAO"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/active-supply/compare`\nGet active token supply for DAO\n"
compareActiveSupply(days: queryInput_compareActiveSupply_days = _90d): compareActiveSupply_200_response

"""Compare number of proposals between time periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/proposals/compare`\nCompare number of proposals between time periods\n"
compareProposals(days: queryInput_compareProposals_days = _90d): compareProposals_200_response

"""Compare number of votes between time periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/votes/compare`\nCompare number of votes between time periods\n"
compareVotes(days: queryInput_compareVotes_days = _90d): compareVotes_200_response

"""Compare average turnout between time periods"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/average-turnout/compare`\nCompare average turnout between time periods\n"
compareAverageTurnout(days: queryInput_compareAverageTurnout_days = _90d): compareAverageTurnout_200_response

"""
Returns proposal activity data including voting history, win rates, and detailed proposal information for the specified delegate within the given time window
"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/proposals-activity`\nReturns proposal activity data including voting history, win rates, and detailed proposal information for the specified delegate within the given time window\n"
proposalsActivity(address: String!, fromDate: NonNegativeInt, skip: NonNegativeInt, limit: PositiveInt = 10, orderBy: queryInput_proposalsActivity_orderBy = timestamp, orderDirection: queryInput_proposalsActivity_orderDirection = desc, userVoteFilter: queryInput_proposalsActivity_userVoteFilter): proposalsActivity_200_response

"""Returns a list of proposal"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/proposals`\nReturns a list of proposal\n"
proposals(skip: NonNegativeInt, limit: PositiveInt = 10, orderDirection: queryInput_proposals_orderDirection = desc, status: JSON, fromDate: Float, fromEndDate: Float): proposals_200_response

"""Returns a single proposal by its ID"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/proposals/{args.id}`\nReturns a single proposal by its ID\n"
proposal(id: String!): proposal_200_response

"""Returns the active delegates that did not vote on a given proposal"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/proposals/{args.id}/non-voters`\nReturns the active delegates that did not vote on a given proposal\n"
proposalNonVoters(id: String!, skip: NonNegativeInt, limit: PositiveInt = 10, orderDirection: queryInput_proposalNonVoters_orderDirection = desc, addresses: JSON): proposalNonVoters_200_response

"""
Fetch historical token balances for multiple addresses at a specific time period using multicall
"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/historical-balances`\nFetch historical token balances for multiple addresses at a specific time period using multicall\n"
historicalBalances(addresses: JSON!, days: queryInput_historicalBalances_days = _7d): [query_historicalBalances_items]

"""
Fetch historical voting power for multiple addresses at a specific time period using multicall
"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/historical-voting-power`\nFetch historical voting power for multiple addresses at a specific time period using multicall\n"
historicalVotingPower(addresses: JSON!, days: queryInput_historicalVotingPower_days = _7d, fromDate: Float): [query_historicalVotingPower_items]

"""
Get transactions with their associated transfers and delegations, with optional filtering and sorting
"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/transactions`\nGet transactions with their associated transfers and delegations, with optional filtering and sorting\n"
transactions(
limit: PositiveInt = 50
offset: NonNegativeInt
Expand All @@ -122,23 +114,19 @@ type Query {
includes: JSON
): transactions_200_response

"""Get the last update time"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/last-update`\nGet the last update time\n"
lastUpdate(chart: queryInput_lastUpdate_chart!): lastUpdate_200_response

"""Get delegation percentage day buckets with forward-fill"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/delegation-percentage`\nGet delegation percentage day buckets with forward-fill\n"
delegationPercentageByDay(startDate: String, endDate: String, orderDirection: queryInput_delegationPercentageByDay_orderDirection = asc, limit: NonNegativeInt = 365, after: String, before: String): delegationPercentageByDay_200_response

"""Returns a list of voting power changes"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/voting-powers`\nReturns a list of voting power changes\n"
votingPowers(account: String!, skip: NonNegativeInt, limit: PositiveInt = 10, orderBy: queryInput_votingPowers_orderBy = timestamp, orderDirection: queryInput_votingPowers_orderDirection = desc, minDelta: String, maxDelta: String): votingPowers_200_response

"""
Returns a mapping of the biggest changes to voting power associated by delegate address
"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/voting-power/variations`\nReturns a mapping of the biggest changes to voting power associated by delegate address\n"
votingPowerVariations(days: queryInput_votingPowerVariations_days = _90d, limit: PositiveInt = 20, skip: NonNegativeInt, orderDirection: queryInput_votingPowerVariations_orderDirection = desc): votingPowerVariations_200_response

"""
Returns a mapping of the biggest variations to account balances associated by account address
"""
"\n>**Method**: `GET`\n>**Base URL**: `https://zk-api-dev.up.railway.app`\n>**Path**: `/account-balance/variations`\nReturns a mapping of the biggest variations to account balances associated by account address\n"
accountBalanceVariations(days: queryInput_accountBalanceVariations_days = _90d, limit: PositiveInt = 20, skip: NonNegativeInt, orderDirection: queryInput_accountBalanceVariations_orderDirection = desc): accountBalanceVariations_200_response

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.NOUNS]: `${baseUrl}/opengraph-images/nouns.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const imageUrl =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.NOUNS]: `${baseUrl}/opengraph-images/nouns.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const imageUrl =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.NOUNS]: `${baseUrl}/opengraph-images/nouns.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const imageUrl =
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/app/[daoId]/(main)/risk-analysis/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.NOUNS]: `${baseUrl}/opengraph-images/nouns.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const imageUrl =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.NOUNS]: `${baseUrl}/opengraph-images/nouns.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const imageUrl =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.SCR]: `${baseUrl}/opengraph-images/scr.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const ogTitle = `Anticapture - ${daoId} DAO`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
[DaoIdEnum.SCR]: `${baseUrl}/opengraph-images/scr.png`,
[DaoIdEnum.OBOL]: `${baseUrl}/opengraph-images/obol.png`,
[DaoIdEnum.COMP]: `${baseUrl}/opengraph-images/comp.png`,
[DaoIdEnum.ZK]: `${baseUrl}/opengraph-images/zk.png`,
};

const imageUrl =
Expand Down
10 changes: 6 additions & 4 deletions apps/dashboard/features/panel/components/PanelTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ export const PanelTable = ({ currency }: PanelTableProps) => {
const quorumGapValues = useRef<Record<number, number>>({});

// Create initial data
const data = Object.values(DaoIdEnum).map((daoId, index) => ({
id: index,
dao: daoId,
}));
const data = Object.values(DaoIdEnum) // TODO: un-hide ZK once released
.filter((daoIdValue, _) => daoIdValue !== DaoIdEnum.ZK)
.map((daoId, index) => ({
id: index,
dao: daoId,
}));

// Liquid Treasury Cell
// const LiquidTreasuryCell = ({
Expand Down
Binary file added apps/dashboard/public/opengraph-images/zk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ export const HeaderDAOSidebarDropdown = () => {
// stable, single-build dropdown items (imports are static)
const dropdownItemsRef = useRef<Item[] | null>(null);
if (!dropdownItemsRef.current) {
dropdownItemsRef.current = Object.values(DaoIdEnum).map(
(daoIdValue, index) => ({
dropdownItemsRef.current = Object.values(DaoIdEnum)
.filter((daoIdValue, _) => daoIdValue !== DaoIdEnum.ZK) // TODO: un-hide ZK once released
.map((daoIdValue, index) => ({
id: index,
label: daoConfigByDaoId[daoIdValue].name,
icon: (
Expand All @@ -65,8 +66,7 @@ export const HeaderDAOSidebarDropdown = () => {
),
href: `/${daoIdValue.toLowerCase()}`,
name: daoIdValue,
}),
);
}));
}
const dropdownItems = dropdownItemsRef.current!;

Expand Down
27 changes: 27 additions & 0 deletions apps/dashboard/shared/components/icons/ZKIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { DaoIconProps } from "@/shared/components/icons/types";

export const ZKIcon = ({ ...props }: DaoIconProps) => {
return (
<svg
{...props}
width="100%"
height="100%"
viewBox="0 0 27 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M26.3 7.40154L18.8635 0V5.41922L11.4805 10.8447L18.8635 10.851V14.8L26.3 7.40154Z"
fill="white"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M0 7.3984L7.43648 14.7969V9.4216L14.8194 3.9521L7.43648 3.94582V0L0 7.3984Z"
fill="white"
/>
</svg>
);
};
1 change: 1 addition & 0 deletions apps/dashboard/shared/components/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export * from "@/shared/components/icons/GitcoinIcon";
export * from "@/shared/components/icons/ScrollIcon";
export * from "@/shared/components/icons/CompoundIcon";
export * from "@/shared/components/icons/ObolIcon";
export * from "@/shared/components/icons/ZKIcon";
// THE IMPORT OF DAO AVATAR ICON MUST BE LAST
export * from "@/shared/components/icons/DaoAvatarIcon";
export * from "@/shared/components/icons/CookieBackground";
2 changes: 2 additions & 0 deletions apps/dashboard/shared/dao-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SCR } from "@/shared/dao-config/scr";
import { COMP } from "@/shared/dao-config/comp";
import { OBOL } from "@/shared/dao-config/obol";
import { NOUNS } from "@/shared/dao-config/nouns";
import { ZK } from "@/shared/dao-config/zk";

export default {
UNI,
Expand All @@ -16,4 +17,5 @@ export default {
NOUNS,
COMP,
OBOL,
ZK,
} as const;
1 change: 1 addition & 0 deletions apps/dashboard/shared/dao-config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export interface DaoAddresses {
scrUSDC: Address;
};
[DaoIdEnum.OBOL]: Record<string, string>;
[DaoIdEnum.ZK]: Record<string, string>;
}

export interface AttackProfitabilityConfig {
Expand Down
Loading