From 7bbc27eaf7f65249482a5bd7b3095762ff88d7c3 Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Mon, 18 Nov 2024 13:53:00 +0200 Subject: [PATCH] deploy: update production subgraph to v0.0.10 --- package-lock.json | 328 ++++++++++++++++-- packages/network-subgraphs/README.md | 9 +- .../abis/StreamRegistry.json | 32 +- packages/network-subgraphs/package.json | 4 +- .../network-subgraphs/src/streamRegistry.ts | 2 +- 5 files changed, 323 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c24ce85e..82b8ff2e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1705,14 +1705,16 @@ "optional": true }, "node_modules/@graphprotocol/graph-cli": { - "version": "0.71.0", + "version": "0.89.0", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-cli/-/graph-cli-0.89.0.tgz", + "integrity": "sha512-dbWYt/Efv5gMUp2A/xXqF1iSy2EtxDFq24W+wOZur+sTAWRJ7q4O6npDV/xWbtcu3CeJIZDaU2km8ZZPzFcN1g==", "dev": true, - "license": "(Apache-2.0 OR MIT)", "dependencies": { "@float-capital/float-subgraph-uncrashable": "^0.0.0-alpha.4", "@oclif/core": "2.8.6", "@oclif/plugin-autocomplete": "^2.3.6", "@oclif/plugin-not-found": "^2.4.0", + "@oclif/plugin-warn-if-update-available": "^3.1.20", "@whatwg-node/fetch": "^0.8.4", "assemblyscript": "0.19.23", "binary-install-raw": "0.0.13", @@ -1729,6 +1731,7 @@ "ipfs-http-client": "55.0.0", "jayson": "4.0.0", "js-yaml": "3.14.1", + "open": "8.4.2", "prettier": "3.0.3", "semver": "7.4.0", "sync-request": "6.1.0", @@ -1985,6 +1988,23 @@ "node": ">=8" } }, + "node_modules/@graphprotocol/graph-cli/node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@graphprotocol/graph-cli/node_modules/prettier": { "version": "3.0.3", "dev": true, @@ -2056,7 +2076,9 @@ "license": "ISC" }, "node_modules/@graphprotocol/graph-ts": { - "version": "0.31.0", + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-ts/-/graph-ts-0.35.1.tgz", + "integrity": "sha512-74CfuQmf7JI76/XCC34FTkMMKeaf+3Pn0FIV3m9KNeaOJ+OI3CvjMIVRhOZdKcJxsFCBGaCCl0eQjh47xTjxKA==", "dependencies": { "assemblyscript": "0.19.10" } @@ -3946,6 +3968,144 @@ "dev": true, "license": "0BSD" }, + "node_modules/@oclif/plugin-warn-if-update-available": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.1.21.tgz", + "integrity": "sha512-yG03rR6Z795lSlkuS+6A9JBSq/VQZ40XspTsKdXa/PUJl52RTeZeOHlaecuv4TddAE6T8VsPdWvry68q5TPE4w==", + "dev": true, + "dependencies": { + "@oclif/core": "^4", + "ansis": "^3.3.1", + "debug": "^4.3.5", + "http-call": "^5.2.2", + "lodash": "^4.17.21", + "registry-auth-token": "^5.0.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/@oclif/core": { + "version": "4.0.32", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.32.tgz", + "integrity": "sha512-O3jfIAhqaJxXI2dzF81PLTMhKpFFA0Nyz8kfBnc9WYDJnvdmXK0fVAOSpwpi2mHTow/9FXxY6Kww8+Kbe7/sag==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.3.2", + "ansis": "^3.3.2", + "clean-stack": "^3.0.1", + "cli-spinners": "^2.9.2", + "debug": "^4.3.7", + "ejs": "^3.1.10", + "get-package-type": "^0.1.0", + "globby": "^11.1.0", + "indent-string": "^4.0.0", + "is-wsl": "^2.2.0", + "lilconfig": "^3.1.2", + "minimatch": "^9.0.5", + "semver": "^7.6.3", + "string-width": "^4.2.3", + "supports-color": "^8", + "widest-line": "^3.1.0", + "wordwrap": "^1.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/clean-stack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/@oclif/plugin-warn-if-update-available/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/@opengsn/common": { "version": "2.2.6", "dev": true, @@ -4153,6 +4313,47 @@ "dev": true, "license": "0BSD" }, + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "dev": true, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "dev": true, + "dependencies": { + "graceful-fs": "4.2.10" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "dev": true, + "dependencies": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "dev": true, @@ -5762,6 +5963,15 @@ "dev": true, "license": "MIT" }, + "node_modules/ansis": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.3.2.tgz", + "integrity": "sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==", + "dev": true, + "engines": { + "node": ">=15" + } + }, "node_modules/antlr4": { "version": "4.12.0", "dev": true, @@ -7180,9 +7390,10 @@ } }, "node_modules/cli-spinners": { - "version": "2.9.0", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -7461,6 +7672,16 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "node_modules/confusing-browser-globals": { "version": "1.0.11", "dev": true, @@ -7959,6 +8180,15 @@ "node": ">=10" } }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/define-properties": { "version": "1.2.0", "dev": true, @@ -18448,6 +18678,36 @@ "version": "4.1.1", "license": "BSD-2-Clause" }, + "node_modules/http-call": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/http-call/-/http-call-5.3.0.tgz", + "integrity": "sha512-ahwimsC23ICE4kPl9xTBjKB4inbRaeLyZeRunC/1Jy/Z6X8tv22MEAjK+KBOMSVLaqXPTTmd8638waVIKLGx2w==", + "dev": true, + "dependencies": { + "content-type": "^1.0.4", + "debug": "^4.1.1", + "is-retry-allowed": "^1.1.0", + "is-stream": "^2.0.0", + "parse-json": "^4.0.0", + "tunnel-agent": "^0.6.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-call/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/http-errors": { "version": "2.0.0", "license": "MIT", @@ -20117,6 +20377,18 @@ "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "dev": true, @@ -23350,6 +23622,12 @@ "signal-exit": "^3.0.2" } }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true + }, "node_modules/protobufjs": { "version": "6.11.3", "dev": true, @@ -23751,6 +24029,18 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/registry-auth-token": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", + "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==", + "dev": true, + "dependencies": { + "@pnpm/npm-conf": "^2.1.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/req-cwd": { "version": "2.0.0", "dev": true, @@ -24297,12 +24587,10 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.5.4", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -24310,22 +24598,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -33676,10 +33948,10 @@ "name": "@streamr-contracts/network-subgraphs", "version": "2.4.0", "dependencies": { - "@graphprotocol/graph-ts": "0.31.0" + "@graphprotocol/graph-ts": "0.35.1" }, "devDependencies": { - "@graphprotocol/graph-cli": "0.71.0", + "@graphprotocol/graph-cli": "0.89.0", "matchstick-as": "0.5.0" } } diff --git a/packages/network-subgraphs/README.md b/packages/network-subgraphs/README.md index 8657222e4..e7efab27f 100644 --- a/packages/network-subgraphs/README.md +++ b/packages/network-subgraphs/README.md @@ -14,10 +14,10 @@ can be recreated with the Dockerfile. To do so: - build & publish image: `docker:buildAndPushMultiArch` ## Mainnet deployment to the Arbitrum / decentralized service (indexing Polygon MATIC) -1. Authenticate: Log into `https://thegraph.com/studio/subgraph/streamr/` using "Streamr subgraph owner" key from 1password. On the right hand side, look for "Auth & Deploy" and "Authenticate in CLI". Copy the command and run it in the terminal: `npx graph auth --studio DEPLOY_KEY` +1. Authenticate: Log into `https://thegraph.com/studio/subgraph/streamr/` using "Streamr subgraph owner" key from 1password. On the right hand side, look for "Auth & Deploy" and "Authenticate in CLI". Copy the command and run it in the terminal: `npx graph auth DEPLOY_KEY` 1. `cp subgraph_matic.yaml subgraph.yaml` 1. `npm run build` (optional) -1. `npx graph deploy --studio streamr` +1. `npx graph deploy streamr` * check version number from browser UI, bump it when asked 1. Follow progress and look at https://thegraph.com/studio/subgraph/streamr/logs for errors @@ -47,6 +47,11 @@ can be recreated with the Dockerfile. To do so: * Sponsorship APY fix (ETH-759) * v0.0.8 * Sponsorship initial sponsoring event fix (FRONT-1921) + * Added StreamPermission.userId field, deprecated StreamPermission.userAddress (ETH-787) +* v0.0.9 + * StreamRegistryV5 (Arbitrary length user id, ETH-787) deployment to Polygon +* v0.0.10 + * Fixed log message # Developer notes diff --git a/packages/network-subgraphs/abis/StreamRegistry.json b/packages/network-subgraphs/abis/StreamRegistry.json index 6572b13e4..93543e1f2 100644 --- a/packages/network-subgraphs/abis/StreamRegistry.json +++ b/packages/network-subgraphs/abis/StreamRegistry.json @@ -322,6 +322,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "PUBLIC_PERMISSION_USER_ID", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "TRUSTED_ROLE", @@ -1625,25 +1638,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "streamIdToPublicPermissionUserKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/network-subgraphs/package.json b/packages/network-subgraphs/package.json index 228623bce..633bff1aa 100644 --- a/packages/network-subgraphs/package.json +++ b/packages/network-subgraphs/package.json @@ -19,10 +19,10 @@ "coverage": "cd ../../ && graph test -d -- -c" }, "devDependencies": { - "@graphprotocol/graph-cli": "0.71.0", + "@graphprotocol/graph-cli": "0.89.0", "matchstick-as": "0.5.0" }, "dependencies": { - "@graphprotocol/graph-ts": "0.31.0" + "@graphprotocol/graph-ts": "0.35.1" } } diff --git a/packages/network-subgraphs/src/streamRegistry.ts b/packages/network-subgraphs/src/streamRegistry.ts index ac0fdbe08..677ae15e6 100644 --- a/packages/network-subgraphs/src/streamRegistry.ts +++ b/packages/network-subgraphs/src/streamRegistry.ts @@ -56,7 +56,7 @@ export function handlePermissionUpdate(event: PermissionUpdated): void { } export function handlePermissionUpdateForUserId(event: PermissionUpdatedForUserId): void { - log.info('handlePermissionUpdate: user={} streamId={} blockNumber={}', + log.info('handlePermissionUpdateForUserId: user={} streamId={} blockNumber={}', [event.params.user.toHexString(), event.params.streamId, event.block.number.toString()]) let stream = Stream.load(event.params.streamId) if (stream == null) { return }