Skip to content

Commit

Permalink
chore(update): update deps graph and sdk (#1048)
Browse files Browse the repository at this point in the history
* chore(update): update deps graph and sdk

* feat(release): release 0.3.1
  • Loading branch information
bitbeckers authored Aug 28, 2023
1 parent 965f223 commit f757e88
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 1,017 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@graphprotocol/client-cli": "^2.2.16",
"@hypercerts-org/contracts": "0.0.13",
"@hypercerts-org/observabletreemap": "*",
"@hypercerts-org/sdk": "^0.3.0",
"@hypercerts-org/sdk": "^0.3.1",
"@mui/icons-material": "^5.11.9",
"@mui/material": "^5.11.2",
"@mui/x-date-pickers": "^5.0.12",
Expand Down
84 changes: 72 additions & 12 deletions graph/generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,21 @@ export class Allowlist extends Entity {
}
}

static loadInBlock(id: string): Allowlist | null {
return changetype<Allowlist | null>(store.get_in_block("Allowlist", id));
}

static load(id: string): Allowlist | null {
return changetype<Allowlist | null>(store.get("Allowlist", id));
}

get id(): string {
let value = this.get("id");
return value!.toString();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toString();
}
}

set id(value: string) {
Expand All @@ -44,7 +52,11 @@ export class Allowlist extends Entity {

get root(): Bytes {
let value = this.get("root");
return value!.toBytes();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBytes();
}
}

set root(value: Bytes) {
Expand All @@ -53,7 +65,11 @@ export class Allowlist extends Entity {

get claim(): string {
let value = this.get("claim");
return value!.toString();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toString();
}
}

set claim(value: string) {
Expand All @@ -79,13 +95,21 @@ export class Claim extends Entity {
}
}

static loadInBlock(id: string): Claim | null {
return changetype<Claim | null>(store.get_in_block("Claim", id));
}

static load(id: string): Claim | null {
return changetype<Claim | null>(store.get("Claim", id));
}

get id(): string {
let value = this.get("id");
return value!.toString();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toString();
}
}

set id(value: string) {
Expand All @@ -94,7 +118,11 @@ export class Claim extends Entity {

get creation(): BigInt {
let value = this.get("creation");
return value!.toBigInt();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBigInt();
}
}

set creation(value: BigInt) {
Expand All @@ -103,7 +131,11 @@ export class Claim extends Entity {

get tokenID(): BigInt {
let value = this.get("tokenID");
return value!.toBigInt();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBigInt();
}
}

set tokenID(value: BigInt) {
Expand All @@ -112,7 +144,11 @@ export class Claim extends Entity {

get contract(): string {
let value = this.get("contract");
return value!.toString();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toString();
}
}

set contract(value: string) {
Expand Down Expand Up @@ -206,13 +242,21 @@ export class ClaimToken extends Entity {
}
}

static loadInBlock(id: string): ClaimToken | null {
return changetype<ClaimToken | null>(store.get_in_block("ClaimToken", id));
}

static load(id: string): ClaimToken | null {
return changetype<ClaimToken | null>(store.get("ClaimToken", id));
}

get id(): string {
let value = this.get("id");
return value!.toString();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toString();
}
}

set id(value: string) {
Expand All @@ -221,7 +265,11 @@ export class ClaimToken extends Entity {

get tokenID(): BigInt {
let value = this.get("tokenID");
return value!.toBigInt();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBigInt();
}
}

set tokenID(value: BigInt) {
Expand All @@ -230,7 +278,11 @@ export class ClaimToken extends Entity {

get claim(): string {
let value = this.get("claim");
return value!.toString();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toString();
}
}

set claim(value: string) {
Expand All @@ -239,7 +291,11 @@ export class ClaimToken extends Entity {

get owner(): Bytes {
let value = this.get("owner");
return value!.toBytes();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBytes();
}
}

set owner(value: Bytes) {
Expand All @@ -248,7 +304,11 @@ export class ClaimToken extends Entity {

get units(): BigInt {
let value = this.get("units");
return value!.toBigInt();
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBigInt();
}
}

set units(value: BigInt) {
Expand Down
4 changes: 2 additions & 2 deletions graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"test": "graph test"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.44.0",
"@graphprotocol/graph-ts": "0.29.3"
"@graphprotocol/graph-cli": "0.56.0"
},
"devDependencies": {
"@graphprotocol/graph-ts": "0.31.0",
"matchstick-as": "https://github.com/LimeChain/matchstick-as#update-graph-ts"
}
}
5 changes: 5 additions & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release notes

## 0.3.1 Update dependencies

- Updated graph package dependencies
- Updated nft.storage and web3.storage dependencies

## 0.3.0 Simplify config

- Simplify config: merge the Signer and Provider into the operator. The SDK will determine which is available (provided
Expand Down
6 changes: 3 additions & 3 deletions sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hypercerts-org/sdk",
"version": "0.3.0",
"version": "0.3.1",
"description": "SDK for hypercerts protocol",
"repository": "[email protected]:hypercerts-org/hypercerts.git",
"author": "Hypercerts team",
Expand Down Expand Up @@ -30,10 +30,10 @@
"jest": "^29.3.1",
"loglevel": "^1.8.1",
"mime": "^3.0.0",
"nft.storage": "^7.0.0",
"nft.storage": "^7.1.1",
"ts-jest": "^29.0.3",
"ts-mocha": "^10.0.0",
"web3.storage": "^4.4.0"
"web3.storage": "^4.5.5"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
Expand Down
Loading

0 comments on commit f757e88

Please sign in to comment.