Skip to content

Commit

Permalink
feat(arb sepolia): add support for arbitrum-sepolia. update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwhited committed Nov 29, 2023
1 parent 87e9ecb commit efebf46
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 68 deletions.
156 changes: 112 additions & 44 deletions subgraph/generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,49 +146,54 @@ export class User extends Entity {
this.set("id", Value.fromBytes(value));
}

get subscribeEvents(): Array<Bytes> {
let value = this.get("subscribeEvents");
if (!value || value.kind == ValueKind.NULL) {
throw new Error("Cannot return null for a required field.");
} else {
return value.toBytesArray();
}
get subscribeEvents(): SubscribeLoader {
return new SubscribeLoader(
"User",
this.get("id")!
.toBytes()
.toHexString(),
"subscribeEvents"
);
}

get unsubscribeEvents(): Array<Bytes> | null {
let value = this.get("unsubscribeEvents");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toBytesArray();
}
get unsubscribeEvents(): UnsubscribeLoader {
return new UnsubscribeLoader(
"User",
this.get("id")!
.toBytes()
.toHexString(),
"unsubscribeEvents"
);
}

get extendEvents(): Array<Bytes> | null {
let value = this.get("extendEvents");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toBytesArray();
}
get extendEvents(): UnsubscribeLoader {
return new UnsubscribeLoader(
"User",
this.get("id")!
.toBytes()
.toHexString(),
"extendEvents"
);
}

get userSubscriptions(): Array<Bytes> | null {
let value = this.get("userSubscriptions");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toBytesArray();
}
get userSubscriptions(): UserSubscriptionLoader {
return new UserSubscriptionLoader(
"User",
this.get("id")!
.toBytes()
.toHexString(),
"userSubscriptions"
);
}

get authorizedSigners(): Array<Bytes> | null {
let value = this.get("authorizedSigners");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toBytesArray();
}
get authorizedSigners(): AuthorizedSignerLoader {
return new AuthorizedSignerLoader(
"User",
this.get("id")!
.toBytes()
.toHexString(),
"authorizedSigners"
);
}

get eventCount(): i32 {
Expand All @@ -203,15 +208,6 @@ export class User extends Entity {
set eventCount(value: i32) {
this.set("eventCount", Value.fromI32(value));
}

get events(): Array<Bytes> | null {
let value = this.get("events");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toBytesArray();
}
}
}

export class Subscribe extends Entity {
Expand Down Expand Up @@ -1570,3 +1566,75 @@ export class UserSubscriptionDowngradeEvent extends Entity {
this.set("currentSubscriptionRate", Value.fromBigInt(value));
}
}

export class SubscribeLoader extends Entity {
_entity: string;
_field: string;
_id: string;

constructor(entity: string, id: string, field: string) {
super();
this._entity = entity;
this._id = id;
this._field = field;
}

load(): Subscribe[] {
let value = store.loadRelated(this._entity, this._id, this._field);
return changetype<Subscribe[]>(value);
}
}

export class UnsubscribeLoader extends Entity {
_entity: string;
_field: string;
_id: string;

constructor(entity: string, id: string, field: string) {
super();
this._entity = entity;
this._id = id;
this._field = field;
}

load(): Unsubscribe[] {
let value = store.loadRelated(this._entity, this._id, this._field);
return changetype<Unsubscribe[]>(value);
}
}

export class UserSubscriptionLoader extends Entity {
_entity: string;
_field: string;
_id: string;

constructor(entity: string, id: string, field: string) {
super();
this._entity = entity;
this._id = id;
this._field = field;
}

load(): UserSubscription[] {
let value = store.loadRelated(this._entity, this._id, this._field);
return changetype<UserSubscription[]>(value);
}
}

export class AuthorizedSignerLoader extends Entity {
_entity: string;
_field: string;
_id: string;

constructor(entity: string, id: string, field: string) {
super();
this._entity = entity;
this._id = id;
this._field = field;
}

load(): AuthorizedSigner[] {
let value = store.loadRelated(this._entity, this._id, this._field);
return changetype<AuthorizedSigner[]>(value);
}
}
6 changes: 3 additions & 3 deletions subgraph/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
}
},
"arbitrum-goerli": {
"arbitrum-sepolia": {
"Subscriptions": {
"address": "0x29f49a438c747e7Dd1bfe7926b03783E47f9447B",
"startBlock": 10350834
"address": "0xCE7E2C9CC2f39de94E82b9E759DBd8cE1A8a54Ee",
"startBlock": 1305165
}
},
"arbitrum-one": {
Expand Down
6 changes: 3 additions & 3 deletions subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 edgeandnode-subscriptions -l v0.0.1"
},
"dependencies": {
"@graphprotocol/graph-cli": "^0.50.1",
"@graphprotocol/graph-ts": "^0.30.0",
"@graphprotocol/graph-cli": "^0.62.0",
"@graphprotocol/graph-ts": "^0.31.0",
"mustache": "^4.2.0"
},
"devDependencies": {
"matchstick-as": "^0.5.2"
"matchstick-as": "^0.6.0"
}
}
116 changes: 98 additions & 18 deletions subgraph/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,15 @@
graphql-import-node "^0.0.5"
js-yaml "^4.1.0"

"@graphprotocol/graph-cli@^0.50.1":
version "0.50.1"
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.50.1.tgz#ca44138761e4d111e27c3645dd6bb6ea6e07753e"
integrity sha512-tk3e5NYBwXRuRD1y5+UKTRDv+Hwf3a78qmcpGOpIMjMgIpvDnepApRbqMqxt3Ma/RCRkACp0Kmkt3O5Ey4xlkQ==
"@graphprotocol/graph-cli@^0.62.0":
version "0.62.0"
resolved "https://registry.npmjs.org/@graphprotocol/graph-cli/-/graph-cli-0.62.0.tgz#948d3861d9ff027728097deac5d8751924ec0c8a"
integrity sha512-dyjhkCSXbdcul5h1wY2CmorjM4k+tjjzEFs5GFBSSdLC2VodKXEWJo9RzrpFSmRBJzwc7ywDf8Pbmy1cJTCXRA==
dependencies:
"@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4"
"@oclif/core" "2.8.4"
"@oclif/core" "2.8.6"
"@oclif/plugin-autocomplete" "^2.3.6"
"@oclif/plugin-not-found" "^2.4.0"
"@whatwg-node/fetch" "^0.8.4"
assemblyscript "0.19.23"
binary-install-raw "0.0.13"
Expand All @@ -249,10 +251,10 @@
which "2.0.2"
yaml "1.10.2"

"@graphprotocol/graph-ts@^0.30.0":
version "0.30.0"
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.30.0.tgz#591dee3c7d9fc236ad57ce0712779e94aef9a50a"
integrity sha512-h5tJqlsZXglGYM0PcBsBOqof4PT0Fr4Z3QBTYN/IjMF3VvRX2A8/bdpqaAnva+2N0uAfXXwRcwcOcW5O35yzXw==
"@graphprotocol/graph-ts@^0.31.0":
version "0.31.0"
resolved "https://registry.npmjs.org/@graphprotocol/graph-ts/-/graph-ts-0.31.0.tgz#730668c0369828b31bef81e8d9bc66b9b48e3480"
integrity sha512-xreRVM6ho2BtolyOh2flDkNoGZximybnzUnF53zJVp0+Ed0KnAlO1/KOCUYw06euVI9tk0c9nA2Z/D5SIQV2Rg==
dependencies:
assemblyscript "0.19.10"

Expand Down Expand Up @@ -318,10 +320,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@oclif/core@2.8.4":
version "2.8.4"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.8.4.tgz#7b453be6d4cd060ff4990bc8e31824a1de308354"
integrity sha512-VlFDhoAJ1RDwcpDF46wAlciWTIryapMUViACttY9GwX6Ci6Lud1awe/pC3k4jad5472XshnPQV4bHAl4a/yxpA==
"@oclif/core@2.8.6":
version "2.8.6"
resolved "https://registry.npmjs.org/@oclif/core/-/core-2.8.6.tgz#7eb6984108f471ad0d719d3c07cde14c47ab17c5"
integrity sha512-1QlPaHMhOORySCXkQyzjsIsy2GYTilOw3LkjeHkCgsPJQjAT4IclVytJusWktPbYNys9O+O4V23J44yomQvnBQ==
dependencies:
"@types/cli-progress" "^3.11.0"
ansi-escapes "^4.3.2"
Expand Down Expand Up @@ -353,6 +355,58 @@
wordwrap "^1.0.0"
wrap-ansi "^7.0.0"

"@oclif/core@^2.15.0":
version "2.15.0"
resolved "https://registry.npmjs.org/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a"
integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==
dependencies:
"@types/cli-progress" "^3.11.0"
ansi-escapes "^4.3.2"
ansi-styles "^4.3.0"
cardinal "^2.1.1"
chalk "^4.1.2"
clean-stack "^3.0.1"
cli-progress "^3.12.0"
debug "^4.3.4"
ejs "^3.1.8"
get-package-type "^0.1.0"
globby "^11.1.0"
hyperlinker "^1.0.0"
indent-string "^4.0.0"
is-wsl "^2.2.0"
js-yaml "^3.14.1"
natural-orderby "^2.0.3"
object-treeify "^1.1.33"
password-prompt "^1.1.2"
slice-ansi "^4.0.0"
string-width "^4.2.3"
strip-ansi "^6.0.1"
supports-color "^8.1.1"
supports-hyperlinks "^2.2.0"
ts-node "^10.9.1"
tslib "^2.5.0"
widest-line "^3.1.0"
wordwrap "^1.0.0"
wrap-ansi "^7.0.0"

"@oclif/plugin-autocomplete@^2.3.6":
version "2.3.10"
resolved "https://registry.npmjs.org/@oclif/plugin-autocomplete/-/plugin-autocomplete-2.3.10.tgz#787f6208cdfe10ffc68ad89e9e7f1a7ad0e8987f"
integrity sha512-Ow1AR8WtjzlyCtiWWPgzMyT8SbcDJFr47009riLioHa+MHX2BCDtVn2DVnN/E6b9JlPV5ptQpjefoRSNWBesmg==
dependencies:
"@oclif/core" "^2.15.0"
chalk "^4.1.0"
debug "^4.3.4"

"@oclif/plugin-not-found@^2.4.0":
version "2.4.3"
resolved "https://registry.npmjs.org/@oclif/plugin-not-found/-/plugin-not-found-2.4.3.tgz#3d24095adb0f3876cb4bcfdfdcb775086cf6d4b5"
integrity sha512-nIyaR4y692frwh7wIHZ3fb+2L6XEecQwRDIb4zbEam0TvaVmBQWZoColQyWA84ljFBPZ8XWiQyTz+ixSwdRkqg==
dependencies:
"@oclif/core" "^2.15.0"
chalk "^4"
fast-levenshtein "^3.0.0"

"@peculiar/asn1-schema@^2.3.6":
version "2.3.6"
resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922"
Expand Down Expand Up @@ -773,6 +827,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0:
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==

astral-regex@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==

async@^3.2.3:
version "3.2.4"
resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c"
Expand Down Expand Up @@ -1039,7 +1098,7 @@ chalk@^2.0.0, chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chalk@^4.0.2, chalk@^4.1.2:
chalk@^4, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
Expand Down Expand Up @@ -1564,6 +1623,13 @@ fast-json-stable-stringify@^2.0.0:
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==

fast-levenshtein@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz#37b899ae47e1090e40e3fd2318e4d5f0142ca912"
integrity sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ==
dependencies:
fastest-levenshtein "^1.0.7"

fast-querystring@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/fast-querystring/-/fast-querystring-1.1.1.tgz#f4c56ef56b1a954880cfd8c01b83f9e1a3d3fda2"
Expand All @@ -1578,6 +1644,11 @@ fast-url-parser@^1.1.3:
dependencies:
punycode "^1.3.2"

fastest-levenshtein@^1.0.7:
version "1.0.16"
resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==

fastq@^1.6.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
Expand Down Expand Up @@ -2452,10 +2523,10 @@ make-error@^1.1.1:
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==

matchstick-as@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/matchstick-as/-/matchstick-as-0.5.2.tgz#6a6dde02d1d939c32458bd67bac688891a07a34c"
integrity sha512-fb1OVphDKEvJY06Ue02Eh1CNncuW95vp6b8tNAP7UIqplICSLoU/zgN6U7ge7R0upsoO78C7CRi4EyK/7Jxz7g==
matchstick-as@^0.6.0:
version "0.6.0"
resolved "https://registry.npmjs.org/matchstick-as/-/matchstick-as-0.6.0.tgz#c65296b1f51b1014d605c52067d9b5321ea630e8"
integrity sha512-E36fWsC1AbCkBFt05VsDDRoFvGSdcZg6oZJrtIe/YDBbuFh8SKbR5FcoqDhNWqSN+F7bN/iS2u8Md0SM+4pUpw==
dependencies:
wabt "1.0.24"

Expand Down Expand Up @@ -3191,6 +3262,15 @@ slash@^3.0.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==

slice-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
dependencies:
ansi-styles "^4.0.0"
astral-regex "^2.0.0"
is-fullwidth-code-point "^3.0.0"

source-map-support@^0.5.20:
version "0.5.21"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
Expand Down

0 comments on commit efebf46

Please sign in to comment.