Skip to content

Commit

Permalink
Dencun updates & award indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
solimander committed Mar 26, 2024
1 parent 0381da0 commit 11c0d00
Show file tree
Hide file tree
Showing 12 changed files with 268 additions and 80 deletions.
2 changes: 1 addition & 1 deletion packages/prop-house-protocol/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prophouse/protocol",
"version": "1.0.9",
"version": "1.0.12",
"license": "GPL-3.0",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/prop-house-sdk-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prophouse/sdk-react",
"version": "1.0.22",
"version": "1.0.32",
"description": "Useful tools for interacting with the Prop House protocol from React applications",
"author": "solimander",
"homepage": "https://prop.house",
Expand All @@ -18,7 +18,7 @@
"wagmi": ">=0.9.2"
},
"dependencies": {
"@prophouse/sdk": "1.0.27"
"@prophouse/sdk": "1.0.34"
},
"devDependencies": {
"react": "^17.0.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/prop-house-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prophouse/sdk",
"version": "1.0.28",
"version": "1.0.36",
"description": "Useful tools for interacting with the Prop House protocol",
"author": "solimander",
"homepage": "https://prop.house",
Expand All @@ -18,6 +18,8 @@
"codegen:starknet": "graphql-codegen --config scripts/gql-codegen.starknet.ts"
},
"dependencies": {
"@ethereumjs/block": "5.2.0",
"@ethereumjs/common": "4.3.0",
"@ethersproject/abi": "~5.7.0",
"@ethersproject/abstract-provider": "~5.7.0",
"@ethersproject/abstract-signer": "~5.7.0",
Expand All @@ -32,10 +34,8 @@
"@ethersproject/strings": "~5.7.0",
"@ethersproject/wallet": "^5.7.0",
"@pinata/sdk": "^2.1.0",
"@prophouse/protocol": "1.0.8",
"@prophouse/protocol": "1.0.11",
"bn.js": "^5.2.1",
"ethereumjs-fork-block": "^4.2.4",
"ethereumjs-fork-common": "^3.1.3",
"graphql": "^16.5.0",
"graphql-request": "5.0.0",
"merkletreejs": "^0.3.11",
Expand Down
6 changes: 3 additions & 3 deletions packages/prop-house-sdk/src/gql/evm/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const documents = {
types.HouseFieldsFragmentDoc,
'\n fragment GovPowerStrategyFields on GovPowerStrategy {\n id\n type\n address\n params\n }\n':
types.GovPowerStrategyFieldsFragmentDoc,
'\n fragment TimedRoundConfigFields on TimedRoundConfig {\n winnerCount\n proposalThreshold\n proposalPeriodStartTimestamp\n proposalPeriodEndTimestamp\n proposalPeriodDuration\n votePeriodStartTimestamp\n votePeriodEndTimestamp\n votePeriodDuration\n claimPeriodEndTimestamp\n awards {\n asset {\n assetType\n token\n identifier\n }\n amount\n }\n }\n':
'\n fragment TimedRoundConfigFields on TimedRoundConfig {\n winnerCount\n proposalThreshold\n proposalPeriodStartTimestamp\n proposalPeriodEndTimestamp\n proposalPeriodDuration\n votePeriodStartTimestamp\n votePeriodEndTimestamp\n votePeriodDuration\n claimPeriodEndTimestamp\n awards(orderBy: index, orderDirection: asc) {\n index\n asset {\n assetType\n token\n identifier\n }\n amount\n }\n }\n':
types.TimedRoundConfigFieldsFragmentDoc,
'\n fragment RoundFields on Round {\n id\n type\n title\n description\n createdAt\n eventState\n isFullyFunded\n manager {\n id\n }\n proposingStrategies {\n strategy {\n ...GovPowerStrategyFields\n }\n }\n votingStrategies {\n strategy {\n ...GovPowerStrategyFields\n }\n }\n timedConfig {\n ...TimedRoundConfigFields\n }\n }\n':
types.RoundFieldsFragmentDoc,
Expand Down Expand Up @@ -75,8 +75,8 @@ export function graphql(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
source: '\n fragment TimedRoundConfigFields on TimedRoundConfig {\n winnerCount\n proposalThreshold\n proposalPeriodStartTimestamp\n proposalPeriodEndTimestamp\n proposalPeriodDuration\n votePeriodStartTimestamp\n votePeriodEndTimestamp\n votePeriodDuration\n claimPeriodEndTimestamp\n awards {\n asset {\n assetType\n token\n identifier\n }\n amount\n }\n }\n',
): (typeof documents)['\n fragment TimedRoundConfigFields on TimedRoundConfig {\n winnerCount\n proposalThreshold\n proposalPeriodStartTimestamp\n proposalPeriodEndTimestamp\n proposalPeriodDuration\n votePeriodStartTimestamp\n votePeriodEndTimestamp\n votePeriodDuration\n claimPeriodEndTimestamp\n awards {\n asset {\n assetType\n token\n identifier\n }\n amount\n }\n }\n'];
source: '\n fragment TimedRoundConfigFields on TimedRoundConfig {\n winnerCount\n proposalThreshold\n proposalPeriodStartTimestamp\n proposalPeriodEndTimestamp\n proposalPeriodDuration\n votePeriodStartTimestamp\n votePeriodEndTimestamp\n votePeriodDuration\n claimPeriodEndTimestamp\n awards(orderBy: index, orderDirection: asc) {\n index\n asset {\n assetType\n token\n identifier\n }\n amount\n }\n }\n',
): (typeof documents)['\n fragment TimedRoundConfigFields on TimedRoundConfig {\n winnerCount\n proposalThreshold\n proposalPeriodStartTimestamp\n proposalPeriodEndTimestamp\n proposalPeriodDuration\n votePeriodStartTimestamp\n votePeriodEndTimestamp\n votePeriodDuration\n claimPeriodEndTimestamp\n awards(orderBy: index, orderDirection: asc) {\n index\n asset {\n assetType\n token\n identifier\n }\n amount\n }\n }\n'];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
118 changes: 116 additions & 2 deletions packages/prop-house-sdk/src/gql/evm/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ export enum Administrative_OrderBy {
Manager = 'manager',
}

export enum Aggregation_Interval {
Day = 'day',
Hour = 'hour',
}

export type Asset = {
__typename?: 'Asset';
/** The asset type (Native | ERC20 | ERC721 | ERC1155) */
Expand Down Expand Up @@ -270,6 +275,8 @@ export type Award = {
asset: Asset;
/** A concatenation of the round address and award index */
id: Scalars['ID'];
/** The award index */
index: Scalars['Int'];
/** The configuration in which the awards exist */
round: TimedRoundConfig;
};
Expand Down Expand Up @@ -315,6 +322,14 @@ export type Award_Filter = {
id_lte?: InputMaybe<Scalars['ID']>;
id_not?: InputMaybe<Scalars['ID']>;
id_not_in?: InputMaybe<Array<Scalars['ID']>>;
index?: InputMaybe<Scalars['Int']>;
index_gt?: InputMaybe<Scalars['Int']>;
index_gte?: InputMaybe<Scalars['Int']>;
index_in?: InputMaybe<Array<Scalars['Int']>>;
index_lt?: InputMaybe<Scalars['Int']>;
index_lte?: InputMaybe<Scalars['Int']>;
index_not?: InputMaybe<Scalars['Int']>;
index_not_in?: InputMaybe<Array<Scalars['Int']>>;
or?: InputMaybe<Array<InputMaybe<Award_Filter>>>;
round?: InputMaybe<Scalars['String']>;
round_?: InputMaybe<TimedRoundConfig_Filter>;
Expand Down Expand Up @@ -347,6 +362,7 @@ export enum Award_OrderBy {
AssetIdentifier = 'asset__identifier',
AssetToken = 'asset__token',
Id = 'id',
Index = 'index',
Round = 'round',
RoundClaimPeriodEndTimestamp = 'round__claimPeriodEndTimestamp',
RoundId = 'round__id',
Expand Down Expand Up @@ -1327,7 +1343,8 @@ export type Query = {
house?: Maybe<House>;
houseImplementation?: Maybe<HouseImplementation>;
houseImplementations: Array<HouseImplementation>;
houseMetadata: Array<HouseMetadata>;
houseMetadata?: Maybe<HouseMetadata>;
houseMetadata_collection: Array<HouseMetadata>;
houses: Array<House>;
reclaim?: Maybe<Reclaim>;
reclaims: Array<Reclaim>;
Expand Down Expand Up @@ -1502,6 +1519,12 @@ export type QueryHouseImplementationsArgs = {
};

export type QueryHouseMetadataArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID'];
subgraphError?: _SubgraphErrorPolicy_;
};

export type QueryHouseMetadata_CollectionArgs = {
block?: InputMaybe<Block_Height>;
first?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<HouseMetadata_OrderBy>;
Expand Down Expand Up @@ -2508,7 +2531,8 @@ export type Subscription = {
house?: Maybe<House>;
houseImplementation?: Maybe<HouseImplementation>;
houseImplementations: Array<HouseImplementation>;
houseMetadata: Array<HouseMetadata>;
houseMetadata?: Maybe<HouseMetadata>;
houseMetadata_collection: Array<HouseMetadata>;
houses: Array<House>;
reclaim?: Maybe<Reclaim>;
reclaims: Array<Reclaim>;
Expand Down Expand Up @@ -2683,6 +2707,12 @@ export type SubscriptionHouseImplementationsArgs = {
};

export type SubscriptionHouseMetadataArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID'];
subgraphError?: _SubgraphErrorPolicy_;
};

export type SubscriptionHouseMetadata_CollectionArgs = {
block?: InputMaybe<Block_Height>;
first?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<HouseMetadata_OrderBy>;
Expand Down Expand Up @@ -3278,6 +3308,7 @@ export type TimedRoundConfigFieldsFragment = {
claimPeriodEndTimestamp: any;
awards: Array<{
__typename?: 'Award';
index: number;
amount: any;
asset: { __typename?: 'Asset'; assetType: AssetType; token: any; identifier: any };
}>;
Expand Down Expand Up @@ -3326,6 +3357,7 @@ export type RoundFieldsFragment = {
claimPeriodEndTimestamp: any;
awards: Array<{
__typename?: 'Award';
index: number;
amount: any;
asset: { __typename?: 'Asset'; assetType: AssetType; token: any; identifier: any };
}>;
Expand Down Expand Up @@ -3441,6 +3473,7 @@ export type ManyRoundsQuery = {
claimPeriodEndTimestamp: any;
awards: Array<{
__typename?: 'Award';
index: number;
amount: any;
asset: { __typename?: 'Asset'; assetType: AssetType; token: any; identifier: any };
}>;
Expand Down Expand Up @@ -3519,6 +3552,7 @@ export type ManyRoundsWithHouseInfoQuery = {
claimPeriodEndTimestamp: any;
awards: Array<{
__typename?: 'Award';
index: number;
amount: any;
asset: { __typename?: 'Asset'; assetType: AssetType; token: any; identifier: any };
}>;
Expand Down Expand Up @@ -3575,6 +3609,7 @@ export type RoundQuery = {
claimPeriodEndTimestamp: any;
awards: Array<{
__typename?: 'Award';
index: number;
amount: any;
asset: { __typename?: 'Asset'; assetType: AssetType; token: any; identifier: any };
}>;
Expand Down Expand Up @@ -3649,6 +3684,7 @@ export type RoundWithHouseInfoQuery = {
claimPeriodEndTimestamp: any;
awards: Array<{
__typename?: 'Award';
index: number;
amount: any;
asset: { __typename?: 'Asset'; assetType: AssetType; token: any; identifier: any };
}>;
Expand Down Expand Up @@ -3859,9 +3895,22 @@ export const TimedRoundConfigFieldsFragmentDoc = {
{
kind: 'Field',
name: { kind: 'Name', value: 'awards' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderBy' },
value: { kind: 'EnumValue', value: 'index' },
},
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderDirection' },
value: { kind: 'EnumValue', value: 'asc' },
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'index' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'asset' },
Expand Down Expand Up @@ -3998,9 +4047,22 @@ export const RoundFieldsFragmentDoc = {
{
kind: 'Field',
name: { kind: 'Name', value: 'awards' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderBy' },
value: { kind: 'EnumValue', value: 'index' },
},
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderDirection' },
value: { kind: 'EnumValue', value: 'asc' },
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'index' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'asset' },
Expand Down Expand Up @@ -4367,9 +4429,22 @@ export const ManyRoundsDocument = {
{
kind: 'Field',
name: { kind: 'Name', value: 'awards' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderBy' },
value: { kind: 'EnumValue', value: 'index' },
},
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderDirection' },
value: { kind: 'EnumValue', value: 'asc' },
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'index' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'asset' },
Expand Down Expand Up @@ -4596,9 +4671,22 @@ export const ManyRoundsWithHouseInfoDocument = {
{
kind: 'Field',
name: { kind: 'Name', value: 'awards' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderBy' },
value: { kind: 'EnumValue', value: 'index' },
},
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderDirection' },
value: { kind: 'EnumValue', value: 'asc' },
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'index' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'asset' },
Expand Down Expand Up @@ -4823,9 +4911,22 @@ export const RoundDocument = {
{
kind: 'Field',
name: { kind: 'Name', value: 'awards' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderBy' },
value: { kind: 'EnumValue', value: 'index' },
},
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderDirection' },
value: { kind: 'EnumValue', value: 'asc' },
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'index' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'asset' },
Expand Down Expand Up @@ -5009,9 +5110,22 @@ export const RoundWithHouseInfoDocument = {
{
kind: 'Field',
name: { kind: 'Name', value: 'awards' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderBy' },
value: { kind: 'EnumValue', value: 'index' },
},
{
kind: 'Argument',
name: { kind: 'Name', value: 'orderDirection' },
value: { kind: 'EnumValue', value: 'asc' },
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'index' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'asset' },
Expand Down
3 changes: 2 additions & 1 deletion packages/prop-house-sdk/src/gql/queries.evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const TimedRoundConfigFields = graphql(`
votePeriodEndTimestamp
votePeriodDuration
claimPeriodEndTimestamp
awards {
awards(orderBy: index, orderDirection: asc) {
index
asset {
assetType
token
Expand Down
2 changes: 1 addition & 1 deletion packages/prop-house-sdk/src/gql/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface QueryConfig<OB, W> {
export const GRAPHQL_APIS: Record<number, GraphQL> = {
[ChainId.EthereumMainnet]: {
evm: 'https://api.thegraph.com/subgraphs/name/prop-house/prop-house',
starknet: 'https://starknet-subgraph-mainnet.onrender.com',
starknet: 'https://starknet-subgraph-mainnet-backup.onrender.com',
},
[ChainId.EthereumGoerli]: {
evm: 'https://api.thegraph.com/subgraphs/name/prop-house/prop-house-goerli-v2',
Expand Down
Loading

0 comments on commit 11c0d00

Please sign in to comment.