Skip to content

Commit

Permalink
Merge pull request #789 from Prop-House/master
Browse files Browse the repository at this point in the history
Initial Multisig Support [Production Release]
  • Loading branch information
solimander authored Mar 26, 2024
2 parents de41c9d + 9350033 commit 0021e70
Show file tree
Hide file tree
Showing 22 changed files with 452 additions and 170 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.cardRenderer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 AS builder
FROM node:18 AS builder
WORKDIR /app

ADD package.json .
Expand Down
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.13",
"license": "GPL-3.0",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions packages/prop-house-protocol/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface EVMContracts {
messenger: string;
house: HouseImpls;
round: RoundImpls;
starknetCommit: string;
}

export interface StarknetContracts {
Expand Down Expand Up @@ -80,6 +81,7 @@ export const contracts: Record<number, ContractAddresses> = {
infinite: goerli.ethereum.address.infiniteRoundImpl,
timed: goerli.ethereum.address.timedRoundImpl,
},
starknetCommit: goerli.ethereum.address.starknetCommit,
},
starknet: {
roundFactory: goerli.starknet.address.roundFactory,
Expand Down Expand Up @@ -124,6 +126,7 @@ export const contracts: Record<number, ContractAddresses> = {
infinite: constants.HashZero,
timed: mainnet.ethereum.address.timedRoundImpl,
},
starknetCommit: mainnet.ethereum.address.starknetCommit,
},
starknet: {
roundFactory: mainnet.starknet.address.roundFactory,
Expand Down
1 change: 1 addition & 0 deletions packages/prop-house-protocol/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export { PropHouse__factory } from '../typechain/factories/PropHouse__factory';
export { CommunityHouse__factory } from '../typechain/factories/CommunityHouse__factory';
export { InfiniteRound__factory } from '../typechain/factories/InfiniteRound__factory';
export { TimedRound__factory } from '../typechain/factories/TimedRound__factory';
export { StarknetCommit__factory } from '../typechain/factories/StarknetCommit__factory';

export { PropHouse as PropHouseContract } from '../typechain/PropHouse';
export { CommunityHouse as CommunityHouseContract } from '../typechain/CommunityHouse';
Expand Down
4 changes: 2 additions & 2 deletions packages/prop-house-protocol/test/utils/setup/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
MockStarknetMessaging__factory,
CreatorPassIssuer__factory,
PropHouse__factory,
StarkNetCommit__factory,
StarknetCommit__factory,
} from '../../../typechain';
import { ethers } from 'hardhat';
import { constants } from 'ethers';
Expand All @@ -17,7 +17,7 @@ export const commonL1Setup = async () => {
const creatorPassIssuerFactory = new CreatorPassIssuer__factory(deployer);

const mockStarknetMessagingFactory = new MockStarknetMessaging__factory(deployer);
const starknetCommitFactory = new StarkNetCommit__factory(deployer);
const starknetCommitFactory = new StarknetCommit__factory(deployer);
const messengerFactory = new Messenger__factory(deployer);

const manager = await managerFactory.deploy();
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.34",
"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.37"
},
"devDependencies": {
"react": "^17.0.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/prop-house-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.12",
"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
Loading

0 comments on commit 0021e70

Please sign in to comment.