Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Release to production #1254

Merged
merged 77 commits into from
Jan 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
7b32b0f
Fix/package build (#1124)
bitbeckers Oct 22, 2023
6d75f0a
Feat/deploy to celo (#1135)
bitbeckers Oct 23, 2023
c60e8f7
fix(gha): use pnpm cache in graph gha (#1138)
bitbeckers Oct 23, 2023
a99e85e
Merge branch 'main' into develop
bitbeckers Oct 23, 2023
fe9b359
chore: add wrapper components for split and merge functionality
Jipperism Oct 31, 2023
b033d77
Fix/handle batch transfers graph (#1149)
bitbeckers Nov 3, 2023
859366a
SDK remove default chainID dependency (#1146)
bitbeckers Nov 6, 2023
462abfd
Fix/gha graph (#1165)
bitbeckers Nov 6, 2023
6d8a7d4
feat(event): add event to merge
bitbeckers Nov 6, 2023
5cf30b3
chore(deploy): deployed to goerli and sepolia
bitbeckers Nov 7, 2023
a8beee5
Merge branch 'develop' into feat/splitmerged-event-to-splitmerge-func…
bitbeckers Nov 7, 2023
ee250ee
Feat/allowlist proof util (#1168)
bitbeckers Nov 7, 2023
44baf47
Add hypercerts to marketplace functionality (#1170)
bitbeckers Nov 8, 2023
a827b5e
feat(restriction): add transfer restriction to fe (#1173)
bitbeckers Nov 8, 2023
34436b9
feat(metadata): add application name (#1174)
bitbeckers Nov 9, 2023
fc0161d
feat(deployments): typed deployment contracts
bitbeckers Nov 9, 2023
55c1f57
fix(props): props from plas to form (#1176)
bitbeckers Nov 9, 2023
c93f391
format external url in case it is a direct ipfs link (#1182)
Jipperism Nov 13, 2023
dbdb083
fix(fix formatting of ipfs urls on hypercert page) (#1183)
Jipperism Nov 15, 2023
a6c3b8f
Feat/split and merge (#1185)
Jipperism Nov 21, 2023
84a623c
Feat/hardhat deploy script (#1177)
bitbeckers Nov 22, 2023
9657f17
feat(merkle): account allowlist strategy (#1186)
bitbeckers Nov 22, 2023
5623583
Added strategy and tests for hypercert functionality (#1188)
bitbeckers Nov 24, 2023
582af93
Feat/partial fraction sale (#1190)
bitbeckers Nov 24, 2023
3bc340a
Feat/sdk common js (#1191)
bitbeckers Nov 26, 2023
ccdf65b
feat(abis): updated SDK abis and restored tests (#1193)
bitbeckers Nov 29, 2023
c7dbb36
Merge branch 'develop' into feat/splitmerged-event-to-splitmerge-func…
bitbeckers Nov 29, 2023
1acbaa0
fix(test): add currency admin to test (#1197)
bitbeckers Nov 30, 2023
de5e0d0
fix build error - set output:export in next config (#1199)
Jipperism Dec 1, 2023
31ac54c
add placeholder for transfer fraction button (#1201)
Jipperism Dec 1, 2023
5c94088
change next build back to next export (#1202)
Jipperism Dec 1, 2023
6ef5b40
Feature/transfer fraction button (#1203)
Jipperism Dec 1, 2023
6488e79
add override chain id functionality for plasmic editing (#1204)
Jipperism Dec 1, 2023
a602567
Bugfix/add override chain id for plasmit editing (#1205)
Jipperism Dec 1, 2023
2406b96
remove transfer fraction button from split fraction button (#1206)
Jipperism Dec 1, 2023
6a93ec8
Bugfix/only show transfer button for fraction owned (#1207)
Jipperism Dec 1, 2023
f36b963
Feat/more robust split transfer logic with hc strategy (#1208)
bitbeckers Dec 2, 2023
4b86911
Feat/docs tests cleanup (#1210)
bitbeckers Dec 4, 2023
b253cd6
Feat/docs tests cleanup (#1211)
bitbeckers Dec 4, 2023
2637ed0
Feat/docs tests cleanup (#1212)
bitbeckers Dec 4, 2023
1cc481f
Feat/add batch transfer method to client methods (#1215)
bitbeckers Dec 6, 2023
0c249aa
Chore/lets merge together (#1220)
Jipperism Dec 7, 2023
435db09
feat(urql): refactored to urql and own codegen (#1223)
bitbeckers Dec 8, 2023
73b06f3
Feat/docs updates docusaurs v3 search release (#1226)
bitbeckers Dec 8, 2023
f1de3d6
Feat/sdk npm docs release 1 (#1228)
bitbeckers Dec 8, 2023
210c167
Feat/sdk npm docs release 1 (#1231)
bitbeckers Dec 8, 2023
c96bb1f
Faet/docs search function in documentation (#1236)
bitbeckers Dec 14, 2023
ad5d0c3
(feat): add initial version of delete on order fulfilled script
Jipperism Dec 14, 2023
0ea6ded
Merge branch 'develop' into feat/splitmerged-event-to-splitmerge-func…
bitbeckers Dec 14, 2023
7535f4e
Merge pull request #1167 from hypercerts-org/feat/splitmerged-event-t…
bitbeckers Dec 14, 2023
6dc0592
chore(bump): web3 connectors fe
bitbeckers Dec 14, 2023
dc04f74
Merge pull request #1239 from hypercerts-org/chore/dev_update_wagmi
bitbeckers Dec 14, 2023
0182b2e
Merge branch 'develop' into chore/main-to-develop
Jipperism Dec 15, 2023
1a3b8d8
Merge pull request #1243 from hypercerts-org/chore/main-to-develop
Jipperism Dec 15, 2023
1cb40c6
Merge branch 'develop' into feature/marketplace-defender-autotasks
Jipperism Dec 18, 2023
f7f0805
(feature): Delete order on execute taker bid autotask
Jipperism Dec 20, 2023
0619383
(feat): fix setup and rollouts, update scripts
Jipperism Dec 20, 2023
13a4852
(feat): remove redundancy from create-sentinel.ts config
Jipperism Dec 20, 2023
0f3e7d8
Merge pull request #1250 from hypercerts-org/feature/marketplace-defe…
Jipperism Dec 22, 2023
38ed2bf
(chore): delete goerli from SDK
Jipperism Dec 25, 2023
4386d02
(chore): delete goerli from defender config
Jipperism Dec 25, 2023
f4409b3
(chore): delete goerli from graph
Jipperism Dec 25, 2023
1635b01
(chore): delete goerli from frontend
Jipperism Dec 25, 2023
f172a19
(chore): update tests for goerli deprecation
Jipperism Dec 25, 2023
6d6e4f2
feat(apis): refactor to use hypercerts APIs
bitbeckers Jan 8, 2024
0f59f97
fix(api): migrate to railway
bitbeckers Jan 8, 2024
808e655
fix(build): update viem and fe client config
bitbeckers Jan 8, 2024
fd70875
chore(bump): sdk 1.1.0 release and bump fe
bitbeckers Jan 8, 2024
aa6d33a
Merge branch 'develop' into chore/deprecate-goerli
Jipperism Jan 8, 2024
0df2168
(chore): update changelog
Jipperism Jan 8, 2024
1cc289e
Merge pull request #1252 from hypercerts-org/chore/deprecate-goerli
Jipperism Jan 8, 2024
8a19334
Merge branch 'develop' into feat/sdk-use-w3up-in-sdk
Jipperism Jan 8, 2024
d87fa08
fix(ci): linting
bitbeckers Jan 8, 2024
cf8baf2
Merge branch 'feat/sdk-use-w3up-in-sdk' of github.com:hypercerts-org/…
bitbeckers Jan 8, 2024
a9d54f9
Merge pull request #1253 from hypercerts-org/feat/sdk-use-w3up-in-sdk
bitbeckers Jan 8, 2024
3a64188
chore(bump): fe sdk dep
bitbeckers Jan 8, 2024
547443b
Merge pull request #1255 from hypercerts-org/chore/bump_sdk_1_2_0
bitbeckers Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feat/sdk common js (#1191)
* feat(fractions): added strategy and tests

* feat(tests): update tests and tweak strat

* feat(test): fix all the test and clean comms

* fix(dist): moar contracts

* fix(tweak): little cleanups

* chore(lint): fix lint errors

* fix(lint): updated foundry lint

* feat(test): uncomment unused tests

* feat(bugs): cjs build and import alpha.13

* fix(only): unexpected only in sdk test
  • Loading branch information
bitbeckers authored Nov 26, 2023
commit 3bc340af11cb5838a0364b4fdb63aee1e440715d
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@
"url": "git+https://github.com/hypercerts-org/hypercerts.git"
},
"overrides": {
"graphql": "^16.6.0",
"graphql": "^16.8.1",
"@hypercerts/contracts": {
"ethers": "6.8.0"
},
911 changes: 567 additions & 344 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ parserOptions:
plugins:
- "@typescript-eslint"
root: true
ignorePatterns: ["rollup.config.js", "jest.config.ts", "dist/"]
ignorePatterns: ["rollup.config.js", "vitest.config.ts", "dist/"]
rules:
"@typescript-eslint/semi":
- warn
4 changes: 2 additions & 2 deletions sdk/.graphclientrc.yml
Original file line number Diff line number Diff line change
@@ -15,10 +15,10 @@ additionalTypeDefs: |
}

additionalResolvers:
- ./src/utils/resolvers.ts
- src/utils/resolvers.ts

documents:
- ./src/indexer/queries/*.graphql
- src/indexer/queries/*.graphql

codegen:
contextType: "MeshContext & { graphName: string }"
1 change: 0 additions & 1 deletion sdk/global.d.ts

This file was deleted.

20 changes: 0 additions & 20 deletions sdk/jest.config.ts

This file was deleted.

29 changes: 10 additions & 19 deletions sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hypercerts-org/sdk",
"version": "1.0.0-alpha.10",
"version": "1.0.0-alpha.13",
"description": "SDK for hypercerts protocol",
"repository": "[email protected]:hypercerts-org/hypercerts.git",
"author": "Hypercerts team",
@@ -11,11 +11,9 @@
"module": "./dist/esm/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js",
"types": "./dist/index.d.ts"
}
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js",
"types": "./dist/index.d.ts"
},
"files": [
"dist",
@@ -26,6 +24,7 @@
"@ethereum-attestation-service/eas-sdk": "1.2.2-beta.0",
"@ethersproject/abstract-signer": "^5.7.0",
"@graphprotocol/client-add-source-name": "^2.0.0",
"@graphprotocol/client-cli": "^3.0.0",
"@graphprotocol/client-polling-live": "^2.0.0",
"@graphql-mesh/cache-localforage": "^0.96.0",
"@graphql-mesh/cross-helpers": "^0.4.1",
@@ -34,7 +33,6 @@
"@graphql-mesh/merger-bare": "^0.95.7",
"@graphql-mesh/runtime": "^0.96.12",
"@graphql-mesh/store": "^0.95.7",
"@graphql-mesh/types": "^0.95.7",
"@graphql-mesh/utils": "^0.95.7",
"@graphql-typed-document-node/core": "^3.2.0",
"@hypercerts-org/contracts": "1.0.0-alpha.2",
@@ -57,8 +55,6 @@
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@faker-js/faker": "^8.0.2",
"@graphprotocol/client-cli": "^3.0.0",
"@jest/globals": "^29.7.0",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@@ -70,17 +66,12 @@
"@types/sinon": "^10.0.15",
"@viem/anvil": "^0.0.6",
"abitype": "^0.10.2",
"babel-jest": "^29.7.0",
"chai": "^4.3.7",
"chai-assertions-count": "^1.0.2",
"chai-subset": "^1.6.0",
"esbuild": "^0.17.10",
"ethereum-waffle": "^4.0.10",
"fetch-mock": "^9.11.0",
"it-all": "^2.0.0",
"jest": "^29.3.1",
"jest-extended": "^4.0.0",
"jest-fetch-mock": "^3.0.3",
"json-schema-to-typescript": "^12.0.0",
"nyc": "^15.1.0",
"rollup": "^3.17.2",
@@ -90,28 +81,28 @@
"rollup-plugin-node-polyfills": "^0.2.1",
"shx": "^0.3.4",
"sinon": "^15.2.0",
"ts-jest": "^29.0.3",
"ts-jest-resolver": "^2.0.0",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"tsx": "^3.14.0",
"typedoc": "^0.23.25",
"typedoc-plugin-markdown": "^3.14.0",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "5.1.6"
"typescript": "5.1.6",
"vitest": "^0.28.4"
},
"scripts": {
"build": "pnpm types:json && pnpm graph:build:esm && rollup -c",
"build": "pnpm types:json && pnpm graph:build && rollup -c",
"docs": "typedoc",
"graph:compile": "graphql-codegen",
"graph:serve": "graphclient serve-dev",
"graph:watch": "graphql-codegen -w",
"graph:build": "rm -rf ./src/.graphclient && graphclient build --throwOnInvalidConfig",
"graph:build:esm": "rm -rf ./src/.graphclient && NODE_OPTIONS='--loader ts-node/esm' graphclient build --throwOnInvalidConfig",
"clean": "rm -rf ./dist",
"prebuild": "pnpm clean",
"prepack": "pnpm build",
"test": "NODE_OPTIONS=\"--no-warnings --experimental-vm-modules\" jest --detectOpenHandles --forceExit",
"test": "vitest",
"types:json": "pnpm json2ts -i './src/resources/schema/' -o 'src/types' --cwd './src/resources/schema'"
}
}
10 changes: 5 additions & 5 deletions sdk/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HypercertMinterAbi } from "@hypercerts-org/contracts";
import { StandardMerkleTree } from "@openzeppelin/merkle-tree";
import { ByteArray, GetContractReturnType, Hex, PublicClient, WalletClient, getContract, parseAbi } from "viem";
import HypercertEvaluator from "./evaluations";
import HypercertIndexer from "./indexer";
import HypercertsStorage from "./storage";
import { HypercertEvaluator } from "./evaluations";
import { HypercertIndexer } from "./indexer";
import { HypercertsStorage } from "./storage";
import {
AllowlistEntry,
ClientError,
@@ -16,7 +16,7 @@ import {
TransferRestrictions,
} from "./types";
import { getConfig } from "./utils/config";
import logger from "./utils/logger";
import { logger } from "./utils";
import { validateAllowlist, validateMetaData, verifyMerkleProof, verifyMerkleProofs } from "./validator";

/**
@@ -33,7 +33,7 @@ import { validateAllowlist, validateMetaData, verifyMerkleProof, verifyMerklePro
*
* @param {Partial<HypercertClientConfig>} config - The configuration options for the client.
*/
export default class HypercertClient implements HypercertClientInterface {
export class HypercertClient implements HypercertClientInterface {
readonly _config;
private _storage: HypercertsStorage;
// TODO better handling readonly. For now not needed since we don't use this class;
4 changes: 2 additions & 2 deletions sdk/src/evaluations/index.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { isAddress } from "viem";
// @ts-ignore
import { CIDString } from "nft.storage";

import HypercertsStorage from "../storage";
import { HypercertsStorage } from "../storage";
import { HypercertClientConfig, HypercertEvaluationSchema, MalformedDataError } from "../types";

export interface EvaluatorInterface {
@@ -15,7 +15,7 @@ export interface EvaluatorInterface {
submitEvaluation: (evaluation: HypercertEvaluationSchema) => Promise<CIDString>;
}

export default class HypercertEvaluator implements EvaluatorInterface {
export class HypercertEvaluator implements EvaluatorInterface {
storage: HypercertsStorage;

readonly = true;
4 changes: 2 additions & 2 deletions sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HypercertMinterAbi, HypercertExchangeAbi } from "@hypercerts-org/contracts";

import { execute } from "../.graphclient";
import HypercertClient from "./client";
import HypercertsStorage from "./storage";
import { HypercertClient } from "./client";
import { HypercertsStorage } from "./storage";
import { DEPLOYMENTS } from "./constants";

/**
96 changes: 68 additions & 28 deletions sdk/src/indexer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
import { logger } from "ethers";
import { getBuiltGraphSDK, Sdk as GraphClient } from "../.graphclient";
import { logger } from "./utils";
import {
getBuiltGraphSDK,
Sdk as GraphClient,
execute,
ClaimsByOwnerDocument,
ClaimsByOwnerQuery,
ClaimByIdDocument,
ClaimByIdQuery,
RecentClaimsDocument,
RecentClaimsQuery,
ClaimsByOwnerQueryVariables,
ClaimByIdQueryVariables,
RecentClaimsQueryVariables,
ClaimTokensByOwnerDocument,
ClaimTokensByOwnerQuery,
ClaimTokensByOwnerQueryVariables,
ClaimTokensByClaimDocument,
ClaimTokensByClaimQueryVariables,
ClaimTokensByClaimQuery,
ClaimTokenByIdDocument,
ClaimTokenByIdQueryVariables,
ClaimTokenByIdQuery,
} from "../.graphclient";
import { defaultQueryParams } from "./indexer/utils";
import { HypercertClientConfig, HypercertIndexerInterface, QueryParams } from "./types";

@@ -15,27 +37,28 @@ import { HypercertClientConfig, HypercertIndexerInterface, QueryParams } from ".
* const indexer = new HypercertIndexer({ graphUrl: 'your-graph-url', graphName: 'your-graph-name' });
* const claims = await indexer.claimsByOwner('your-address');
*/
export default class HypercertIndexer implements HypercertIndexerInterface {
export class HypercertIndexer implements HypercertIndexerInterface {
/** The Graph client used by the indexer. */
private _graphClient: GraphClient;
private _graphName: string;

/**
* Creates a new instance of the `HypercertIndexer` class.
* @param options The configuration options for the indexer.
*/
constructor(options: Partial<HypercertClientConfig>) {
logger.info("Creating HypercertIndexer", "constructor", options);
this._graphClient = getBuiltGraphSDK({
graphName: options.graphName,
});
logger.info("Creating HypercertIndexer", "constructor", { name: options.graphName, url: options.graphUrl });
if (!options.graphName) throw new Error("Missing graphName");
this._graphName = options.graphName;
}

/**
* Gets the Graph client used by the indexer.
* @returns The Graph client.
*/
get graphClient(): GraphClient {
return this._graphClient;
return getBuiltGraphSDK({
graphName: this._graphName,
});
}

/**
@@ -44,63 +67,80 @@ export default class HypercertIndexer implements HypercertIndexerInterface {
* @param params The query parameters.
* @returns A Promise that resolves to the claims.
*/
claimsByOwner = async (owner: string, params: QueryParams = defaultQueryParams) =>
this.graphClient.ClaimsByOwner({
claimsByOwner = async (owner: string, params: QueryParams = defaultQueryParams) => {
const query = ClaimsByOwnerDocument;
const variables: ClaimsByOwnerQueryVariables = {
owner,
...params,
});
};
return (await execute(query, variables, { graphName: this._graphName })) as ClaimsByOwnerQuery;
};

/**
* Gets a claim by its ID.
* @param id The ID of the claim.
* @returns A Promise that resolves to the claim.
*/
claimById = async (id: string) =>
this.graphClient.ClaimById({
claimById = async (id: string) => {
const query = ClaimByIdDocument;
const variables: ClaimByIdQueryVariables = {
id,
});

};
return (await execute(query, variables, { graphName: this._graphName })) as ClaimByIdQuery;
};
/**
* Gets the most recent claims.
* @param params The query parameters.
* @returns A Promise that resolves to the claims.
*/
firstClaims = async (params: QueryParams = defaultQueryParams) =>
this.graphClient.RecentClaims({
firstClaims = async (params: QueryParams = defaultQueryParams) => {
const query = RecentClaimsDocument;
const variables: RecentClaimsQueryVariables = {
...params,
});
};
return (await execute(query, variables, { graphName: this._graphName })) as RecentClaimsQuery;
};

/**
* Gets the claim tokens owned by a given address.
* @param owner The address of the owner.
* @param params The query parameters.
* @returns A Promise that resolves to the claim tokens.
*/
fractionsByOwner = async (owner: string, params: QueryParams = defaultQueryParams) =>
this.graphClient.ClaimTokensByOwner({
fractionsByOwner = async (owner: string, params: QueryParams = defaultQueryParams) => {
const query = ClaimTokensByOwnerDocument;
const variables: ClaimTokensByOwnerQueryVariables = {
owner,
...params,
});
};
return (await execute(query, variables, { graphName: this._graphName })) as ClaimTokensByOwnerQuery;
};

/**
* Gets the claim tokens for a given claim.
* @param claimId The ID of the claim.
* @param params The query parameters.
* @returns A Promise that resolves to the claim tokens.
*/
fractionsByClaim = async (claimId: string, params: QueryParams = defaultQueryParams) =>
this.graphClient.ClaimTokensByClaim({
fractionsByClaim = async (claimId: string, params: QueryParams = defaultQueryParams) => {
const query = ClaimTokensByClaimDocument;
const variables: ClaimTokensByClaimQueryVariables = {
claimId,
...params,
});
};
return (await execute(query, variables, { graphName: this._graphName })) as ClaimTokensByClaimQuery;
};

/**
* Gets a claim token by its ID.
* @param fractionId The ID of the claim token.
* @returns A Promise that resolves to the claim token.
*/
fractionById = async (fractionId: string) =>
this.graphClient.ClaimTokenById({
fractionById = async (fractionId: string) => {
const query = ClaimTokenByIdDocument;
const variables: ClaimTokenByIdQueryVariables = {
claimTokenId: fractionId,
});
};
return (await execute(query, variables, { graphName: this._graphName })) as ClaimTokenByIdQuery;
};
}
Loading