From 4c8cca7cc6ed0ac61718811549fe1a9e934875dc Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 12:53:23 +0300 Subject: [PATCH 01/12] template --- package-lock.json | 7 +- packages/network-subgraphs/package.json | 1 + .../scripts/fill-handlebars-template.mjs | 19 + packages/network-subgraphs/subgraph.yaml.hbs | 328 ++++++++++++++++++ 4 files changed, 353 insertions(+), 2 deletions(-) create mode 100644 packages/network-subgraphs/scripts/fill-handlebars-template.mjs create mode 100644 packages/network-subgraphs/subgraph.yaml.hbs diff --git a/package-lock.json b/package-lock.json index c176612ce..0043a8431 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17718,12 +17718,14 @@ } }, "node_modules/handlebars": { - "version": "4.7.7", + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "license": "MIT", "dependencies": { "minimist": "^1.2.5", - "neo-async": "^2.6.0", + "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, @@ -33031,6 +33033,7 @@ }, "devDependencies": { "@graphprotocol/graph-cli": "0.89.0", + "handlebars": "4.7.8", "matchstick-as": "0.5.0" } } diff --git a/packages/network-subgraphs/package.json b/packages/network-subgraphs/package.json index 810994957..225ff6fa0 100644 --- a/packages/network-subgraphs/package.json +++ b/packages/network-subgraphs/package.json @@ -12,6 +12,7 @@ }, "devDependencies": { "@graphprotocol/graph-cli": "0.89.0", + "handlebars": "4.7.8", "matchstick-as": "0.5.0" }, "dependencies": { diff --git a/packages/network-subgraphs/scripts/fill-handlebars-template.mjs b/packages/network-subgraphs/scripts/fill-handlebars-template.mjs new file mode 100644 index 000000000..dbec22ce0 --- /dev/null +++ b/packages/network-subgraphs/scripts/fill-handlebars-template.mjs @@ -0,0 +1,19 @@ +import { readFileSync } from 'fs' +import handlebars from 'handlebars' + +const readFromStdin = async () => { + let result = '' + for await (const chunk of process.stdin) { + result += chunk + } + return result +} + +const main = async () => { + const template = readFileSync(process.argv[2], 'utf8') + const compiled = handlebars.compile(template) + const data = JSON.parse(await readFromStdin()) + process.stdout.write(compiled(data)) +} + +main() diff --git a/packages/network-subgraphs/subgraph.yaml.hbs b/packages/network-subgraphs/subgraph.yaml.hbs new file mode 100644 index 000000000..63f996e25 --- /dev/null +++ b/packages/network-subgraphs/subgraph.yaml.hbs @@ -0,0 +1,328 @@ +specVersion: 0.0.4 +description: Subgraph definitions for the Streamr contracts +repository: +schema: + file: ./schema.graphql +features: + - fullTextSearch +dataSources: + - kind: ethereum/contract + name: StreamRegistry + network: {{networkId}} + source: + address: '{{contracts.StreamRegistry.address}}' + abi: StreamRegistry + startBlock: {{contracts.StreamRegistry.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Stream + - StreamPermission + abis: + - name: StreamRegistry + file: ./abis/StreamRegistry.json + eventHandlers: + - event: StreamCreated(string,string) + handler: handleStreamCreation + - event: StreamDeleted(string) + handler: handleStreamDeletion + - event: StreamUpdated(string,string) + handler: handleStreamUpdate + - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) + handler: handlePermissionUpdate + - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) + handler: handlePermissionUpdateForUserId + file: ./src/streamRegistry.ts + - kind: ethereum/contract + name: NodeRegistry + network: {{networkId}} + source: + address: '{{contracts.StorageNodeRegistry.address}}' + abi: NodeRegistry + startBlock: {{contracts.StorageNodeRegistry.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Node + abis: + - name: NodeRegistry + file: ./abis/NodeRegistry.json + eventHandlers: + - event: NodeUpdated(indexed address,string,indexed uint256,uint256) + handler: handleNodeUpdate + - event: NodeRemoved(indexed address) + handler: handleNodeRemoved + file: ./src/nodeRegistry.ts + - kind: ethereum/contract + name: StreamStorageRegistry + network: {{networkId}} + source: + address: '{{contracts.StreamStorageRegistry.address}}' + abi: StreamStorageRegistry + startBlock: {{contracts.StreamStorageRegistry.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Node + abis: + - name: StreamStorageRegistry + file: ./abis/StreamStorageRegistry.json + eventHandlers: + - event: Added(string,indexed address) + handler: handleStorageNodeAddedToStream + - event: Removed(string,indexed address) + handler: handleStorageNodeRemovedFromStream + file: ./src/streamStorageRegistry.ts +{{#if hubContracts}} + - kind: ethereum/contract + name: ProjectRegistryV1 + network: {{networkId}} + source: + address: '{{contracts.ProjectRegistryV1.address}}' + abi: ProjectRegistryV1 + startBlock: {{contracts.ProjectRegistryV1.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Project + - ProjectPermission + abis: + - name: ProjectRegistryV1 + file: ./abis/ProjectRegistryV1.json + eventHandlers: + - event: ProjectCreated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) + handler: handleProjectCreation + - event: ProjectDeleted(indexed bytes32) + handler: handleProjectDeletion + - event: ProjectUpdated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) + handler: handleProjectUpdate + - event: PaymentDetailsByChainUpdated(indexed bytes32,uint32,address,address,uint256) + handler: handlePaymentDetailsByChainUpdate + - event: StreamAdded(bytes32,string) + handler: handleStreamAddition + - event: StreamRemoved(bytes32,string) + handler: handleStreamRemoval + - event: PermissionUpdated(bytes32,address,bool,bool,bool,bool) + handler: handlePermissionUpdate + - event: Subscribed(indexed bytes32,indexed address,uint256) + handler: handleSubscriptionUpdate + file: ./src/projectRegistry.ts + - kind: ethereum/contract + name: MarketplaceV4 + network: {{networkId}} + source: + address: '{{contracts.MarketplaceV4.address}}' + abi: MarketplaceV4 + startBlock: {{contracts.MarketplaceV4.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Project + - ProjectPurchase + abis: + - name: MarketplaceV4 + file: ./abis/MarketplaceV4.json + eventHandlers: + - event: ProjectPurchased(bytes32,address,uint256,uint256,uint256) + handler: handleProjectPurchase + file: ./src/marketplaceV4.ts + - kind: ethereum/contract + name: ProjectStakingV1 + network: {{networkId}} + source: + address: '{{contracts.ProjectStakingV1.address}}' + abi: ProjectStakingV1 + startBlock: {{contracts.ProjectStakingV1.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Project + - ProjectStakeByUser + - ProjectStakingDayBucket + - ProjectPaymentDetails + - ProjectSubscription + abis: + - name: ProjectStakingV1 + file: ./abis/ProjectStakingV1.json + eventHandlers: + - event: Stake(indexed bytes32,indexed address,uint256,uint256) + handler: handleStake + - event: Unstake(indexed bytes32,indexed address,uint256,uint256) + handler: handleUnstake + file: ./src/projectStaking.ts +{{/if}} + - kind: ethereum/contract + name: StreamrConfig + network: {{networkId}} + source: + address: '{{contracts.StreamrConfig.address}}' + abi: StreamrConfig + startBlock: {{contracts.StreamrConfig.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/streamrConfig.ts + entities: + - Network + abis: + - name: StreamrConfig + file: ./abis/StreamrConfig.json + eventHandlers: + - event: ConfigChanged(indexed string,indexed uint256,indexed address) + handler: handleConfigChanged + - kind: ethereum/contract + name: SponsorshipFactory + network: {{networkId}} + source: + address: '{{contracts.SponsorshipFactory.address}}' + abi: SponsorshipFactory + startBlock: {{contracts.SponsorshipFactory.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/sponsorshipFactory.ts + entities: + - Sponsorship + - SponsorshipDailyBucket + - Network + abis: + - name: SponsorshipFactory + file: ./abis/SponsorshipFactory.json + - name: Sponsorship + file: ./abis/Sponsorship.json + eventHandlers: + - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) + handler: handleNewSponsorship + - kind: ethereum/contract + name: OperatorFactory + network: {{networkId}} + source: + address: '{{contracts.OperatorFactory.address}}' + abi: OperatorFactory + startBlock: {{contracts.OperatorFactory.startBlock}} + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/operatorFactory.ts + entities: + - Operator + - Network + abis: + - name: OperatorFactory + file: ./abis/OperatorFactory.json + - name: Operator + file: ./abis/Operator.json + eventHandlers: + - event: NewOperator(indexed address,indexed address) + handler: handleNewOperator + - event: VoterUpdate(indexed address,indexed bool) + handler: handleVoterUpdate + +templates: + - name: Sponsorship + kind: ethereum/contract + network: {{networkId}} + source: + abi: Sponsorship + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/sponsorship.ts + entities: + - Sponsorship + - Operator + - Stake + - StakingEvent + - SlashingEvent + - SponsoringEvent + - Flag + - Vote + - SponsorshipDailyBucket + abis: + - name: Sponsorship + file: ./abis/Sponsorship.json + eventHandlers: + - event: StakeUpdate(indexed address,uint256,uint256) + handler: handleStakeUpdated + - event: StakeLockUpdate(indexed address,uint256,uint256) + handler: handleStakeLockUpdated + - event: InsolvencyStarted(uint256) + handler: handleInsolvencyStarted + - event: InsolvencyEnded(uint256,uint256,uint256) + handler: handleInsolvencyEnded + - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) + handler: handleSponsorshipUpdated + - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) + handler: handleFlagged + - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) + handler: handleFlagUpdate + - event: OperatorSlashed(indexed address,uint256) + handler: handleOperatorSlashed + - event: SponsorshipReceived(indexed address,uint256) + handler: handleSponsorshipReceived + - name: Operator + kind: ethereum/contract + network: {{networkId}} + source: + abi: Operator + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/operator.ts + entities: + - Operator + - Delegator + - OperatorDailyBucket + - DelegatorDailyBucket + - Delegation + - QueueEntry + - Network + abis: + - name: Operator + file: ./abis/Operator.json + eventHandlers: + - event: Delegated(indexed address,uint256) + handler: handleDelegated + - event: Undelegated(indexed address,uint256) + handler: handleUndelegated + - event: BalanceUpdate(indexed address,uint256,uint256,uint256) + handler: handleBalanceUpdate + - event: OperatorValueUpdate(uint256,uint256) + handler: handleOperatorValueUpdate + - event: Profit(uint256,indexed uint256,indexed uint256) + handler: handleProfit + - event: Loss(uint256) + handler: handleLoss + - event: QueuedDataPayout(indexed address,uint256,uint256) + handler: handleQueuedDataPayout + - event: QueueUpdated(indexed address,uint256,uint256) + handler: handleQueueUpdated + - event: NodesSet(address[]) + handler: handleNodesSet + - event: Heartbeat(indexed address,string) + handler: handleHeartbeat + - event: MetadataUpdated(string,indexed address,indexed uint256) + handler: handleMetadataUpdate + - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) + handler: handleReviewRequest + - event: RoleGranted(indexed bytes32,indexed address,indexed address) + handler: handleRoleGranted + - event: RoleRevoked(indexed bytes32,indexed address,indexed address) + handler: handleRoleRevoked From 5bd98ad403392580632fcada29b9a8b593b88ab2 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 12:53:55 +0300 Subject: [PATCH 02/12] tmp: create-subgraph-config-json.mjs --- .../create-subgraph-config-json.mjs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/network-subgraphs/create-subgraph-config-json.mjs diff --git a/packages/network-subgraphs/create-subgraph-config-json.mjs b/packages/network-subgraphs/create-subgraph-config-json.mjs new file mode 100644 index 000000000..71fa6ff92 --- /dev/null +++ b/packages/network-subgraphs/create-subgraph-config-json.mjs @@ -0,0 +1,33 @@ +import { readFileSync } from 'fs' +import yaml from 'js-yaml' + +const ENVIRONMENT_IDS = ['dev2', 'polygon', 'polygonAmoy', 'peaq', 'iotex'] + +const output = {} + +for (const environmentId of ENVIRONMENT_IDS) { + const fileId = (environmentId === 'polygonAmoy') ? 'amoy' : environmentId + const fileName = `subgraph_${fileId}.yaml` + const fileContents = readFileSync(fileName, 'utf8') + const yamlData = yaml.load(fileContents) + const contracts = {} + for (const dataSource of yamlData.dataSources) { + const source = dataSource.source + const key = (source.abi === 'NodeRegistry') ? 'StorageNodeRegistry' : source.abi + contracts[key] = { + address: source.address, + startBlock: source.startBlock + } + } + const networkId = (environmentId === 'polygon') + ? 'matic' : + ((environmentId === 'polygonAmoy') ? 'polygon-amoy' : environmentId) + output[environmentId] = { + networkId, + hubContracts: (environmentId !== 'iotex'), + contracts + } +} + +console.log(JSON.stringify(output, undefined, 4)) + From 564fffa0466fc18fff8761d160cfbd6b9a72afd8 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 12:56:24 +0300 Subject: [PATCH 03/12] config file (created by create-subgraph-config-json.mjs) --- .../network-subgraphs/subgraph-config.json | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 packages/network-subgraphs/subgraph-config.json diff --git a/packages/network-subgraphs/subgraph-config.json b/packages/network-subgraphs/subgraph-config.json new file mode 100644 index 000000000..446da928b --- /dev/null +++ b/packages/network-subgraphs/subgraph-config.json @@ -0,0 +1,200 @@ +{ + "dev2": { + "networkId": "dev2", + "hubContracts": true, + "contracts": { + "StreamRegistry": { + "address": "0x18E0937099660B82464475Ea2B7e6Af4f2BFE5F0", + "startBlock": 0 + }, + "StorageNodeRegistry": { + "address": "0x338090C5492C5c5E41a4458f5FC4b205cbc54A24", + "startBlock": 0 + }, + "StreamStorageRegistry": { + "address": "0xB73189CeBCc870bE6f9aa16764bbB3665e4B49B6", + "startBlock": 0 + }, + "ProjectRegistryV1": { + "address": "0xA9166376706611110f814D1333b8E80FEc5d8f10", + "startBlock": 0 + }, + "MarketplaceV4": { + "address": "0xb8678223183d560280a7BEF68daAbB0E3daBd97D", + "startBlock": 0 + }, + "ProjectStakingV1": { + "address": "0x73a9310C43621B853C508902bb8c1DA8f1240EaE", + "startBlock": 0 + }, + "StreamrConfig": { + "address": "0x00E680d549FE53a627a3db86a6F88fA2471CFfAa", + "startBlock": 0 + }, + "SponsorshipFactory": { + "address": "0x699B4bE95614f017Bb622e427d3232837Cc814E6", + "startBlock": 0 + }, + "OperatorFactory": { + "address": "0xD13D34d37e2c94cb35EA8D5DE7498Cb7830d26e0", + "startBlock": 0 + } + } + }, + "polygon": { + "networkId": "matic", + "hubContracts": true, + "contracts": { + "StreamRegistry": { + "address": "0x0D483E10612F327FC11965Fc82E90dC19b141641", + "startBlock": 23586971 + }, + "StorageNodeRegistry": { + "address": "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6", + "startBlock": 23562861 + }, + "StreamStorageRegistry": { + "address": "0xe8e2660CeDf2a59C917a5ED05B72df4146b58399", + "startBlock": 23586998 + }, + "ProjectRegistryV1": { + "address": "0x496a6154da5aA6a021a3bd0DCd337DA80F48a6e1", + "startBlock": 38700928 + }, + "MarketplaceV4": { + "address": "0xdF8b74D735197dCD5C94bE933db080E69A958de6", + "startBlock": 39591313 + }, + "ProjectStakingV1": { + "address": "0xAA7a4BdBE91F143F3103206e48A8AfF21101B6DE", + "startBlock": 38701364 + }, + "StreamrConfig": { + "address": "0x869e88dB146ECAF20dDf199a12684cD80c263c8f", + "startBlock": 50045923 + }, + "SponsorshipFactory": { + "address": "0x820b2f9a15ed45F9802c59d0CC77C22C81755e45", + "startBlock": 50046404 + }, + "OperatorFactory": { + "address": "0x935734e66729b69260543Cf6e5EfeB42AC962183", + "startBlock": 50046356 + } + } + }, + "polygonAmoy": { + "networkId": "polygon-amoy", + "hubContracts": true, + "contracts": { + "StreamRegistry": { + "address": "0xE9C98bdE63248e58E9137Db8270D9675B9E34b93", + "startBlock": 6550000 + }, + "StorageNodeRegistry": { + "address": "0x02fdF917f4e6Ae8F7F1bBDd28179d819E2b76820", + "startBlock": 6550000 + }, + "StreamStorageRegistry": { + "address": "0x0f3671A9A92416E1aD32750faCf2AD4FA1b66f78", + "startBlock": 6550000 + }, + "ProjectRegistryV1": { + "address": "0xc5e1434d35c0c7291c7032Fd9C4096b4876C6823", + "startBlock": 6550000 + }, + "MarketplaceV4": { + "address": "0x6C8eaA8e0bF605469c15b6F9106387B4cEC99976", + "startBlock": 6550000 + }, + "ProjectStakingV1": { + "address": "0x3A27A16770477EbcFb4B81cE462F4f12591767A0", + "startBlock": 6550000 + }, + "StreamrConfig": { + "address": "0x835bC97D2a61bbF5d05932C5105Ca34e1b815F94", + "startBlock": 6550000 + }, + "SponsorshipFactory": { + "address": "0xb194a68b166f2e3074B551393fA61490D19c69f8", + "startBlock": 6550000 + }, + "OperatorFactory": { + "address": "0xE02E8E9fF5ea6a58F34D00C0e4B091e066B9fA81", + "startBlock": 6550000 + } + } + }, + "peaq": { + "networkId": "peaq", + "hubContracts": true, + "contracts": { + "StreamRegistry": { + "address": "0xD0C720e99Bd39311614f292d8B0B4e351Bde157c", + "startBlock": 900000 + }, + "StorageNodeRegistry": { + "address": "0xaCF9e8134047eDc671162D9404BF63a587435bAa", + "startBlock": 900000 + }, + "StreamStorageRegistry": { + "address": "0xB36CF8ee4219a3Ac9FBC3865C35E9a99353c26db", + "startBlock": 900000 + }, + "ProjectRegistryV1": { + "address": "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA", + "startBlock": 900000 + }, + "MarketplaceV4": { + "address": "0x959684926448296ea72BD4B05593426A3cD3F0dF", + "startBlock": 900000 + }, + "ProjectStakingV1": { + "address": "0xd1cBD6b1Be710C41c01A9613802209843407b8b9", + "startBlock": 900000 + }, + "StreamrConfig": { + "address": "0xc81Fa3Cc3E81dF24D21bfc608f8FB06262Da4F8c", + "startBlock": 900000 + }, + "SponsorshipFactory": { + "address": "0xdaF0905e19C45b9Fea7E60D232061edF78E9F570", + "startBlock": 900000 + }, + "OperatorFactory": { + "address": "0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3", + "startBlock": 900000 + } + } + }, + "iotex": { + "networkId": "iotex", + "hubContracts": false, + "contracts": { + "StreamRegistry": { + "address": "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6", + "startBlock": 33510000 + }, + "StorageNodeRegistry": { + "address": "0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D", + "startBlock": 33510000 + }, + "StreamStorageRegistry": { + "address": "0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2", + "startBlock": 33510000 + }, + "StreamrConfig": { + "address": "0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A", + "startBlock": 33510000 + }, + "SponsorshipFactory": { + "address": "0xe4Ae8e6c5b6E85914738803ad73c111eF2618621", + "startBlock": 33510000 + }, + "OperatorFactory": { + "address": "0xbC1cC84912d54fCf7316A6dA2e7A884731a87935", + "startBlock": 33510000 + } + } + } +} From d4aabd077aa92f8d03a233d6b2063b94f8cbc8a4 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 13:01:31 +0300 Subject: [PATCH 04/12] tmp: generate-yamls.sh --- packages/network-subgraphs/generate-yamls.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 packages/network-subgraphs/generate-yamls.sh diff --git a/packages/network-subgraphs/generate-yamls.sh b/packages/network-subgraphs/generate-yamls.sh new file mode 100755 index 000000000..483ea910b --- /dev/null +++ b/packages/network-subgraphs/generate-yamls.sh @@ -0,0 +1,6 @@ +jq '.dev2' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_dev2_generated.yaml +jq '.polygon' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_polygon_generated.yaml +jq '.polygonAmoy' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_amoy_generated.yaml +jq '.peaq' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_peaq_generated.yaml +jq '.iotex' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_iotext_generated.yaml + From 5b7e914468f799da9bbf9d11db9916460476fb69 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 13:14:06 +0300 Subject: [PATCH 05/12] unify yamls: remove comments (note that iotex SponsorshipFactory and OperatorFactory addresses don't match the config) --- packages/network-subgraphs/subgraph_amoy.yaml | 2 -- packages/network-subgraphs/subgraph_iotex.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/network-subgraphs/subgraph_amoy.yaml b/packages/network-subgraphs/subgraph_amoy.yaml index edec95292..7303364f5 100644 --- a/packages/network-subgraphs/subgraph_amoy.yaml +++ b/packages/network-subgraphs/subgraph_amoy.yaml @@ -185,7 +185,6 @@ dataSources: name: SponsorshipFactory network: polygon-amoy source: - # make sure this is same as config.contracts.SponsorshipFactory in https://github.com/streamr-dev/network-contracts/blob/develop/packages/config/src/networks.json address: '0xb194a68b166f2e3074B551393fA61490D19c69f8' abi: SponsorshipFactory startBlock: 6550000 @@ -210,7 +209,6 @@ dataSources: name: OperatorFactory network: polygon-amoy source: - # make sure this is same as config.contracts.OperatorFactory in https://github.com/streamr-dev/network-contracts/blob/develop/packages/config/src/networks.json address: '0xE02E8E9fF5ea6a58F34D00C0e4B091e066B9fA81' abi: OperatorFactory startBlock: 6550000 diff --git a/packages/network-subgraphs/subgraph_iotex.yaml b/packages/network-subgraphs/subgraph_iotex.yaml index fcf55aff2..cfaaf5cfd 100644 --- a/packages/network-subgraphs/subgraph_iotex.yaml +++ b/packages/network-subgraphs/subgraph_iotex.yaml @@ -103,7 +103,6 @@ dataSources: name: SponsorshipFactory network: iotex source: - # make sure this is same as config.contracts.SponsorshipFactory in https://github.com/streamr-dev/network-contracts/blob/develop/packages/config/src/networks.json address: '0xe4Ae8e6c5b6E85914738803ad73c111eF2618621' abi: SponsorshipFactory startBlock: 33510000 @@ -128,7 +127,6 @@ dataSources: name: OperatorFactory network: iotex source: - # make sure this is same as config.contracts.OperatorFactory in https://github.com/streamr-dev/network-contracts/blob/develop/packages/config/src/networks.json address: '0xbC1cC84912d54fCf7316A6dA2e7A884731a87935' abi: OperatorFactory startBlock: 33510000 From f2cabd419f6426e4281229d484ae1c54cb8660ef Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 13:20:38 +0300 Subject: [PATCH 06/12] unify yamls: use single quotes --- packages/network-subgraphs/subgraph_amoy.yaml | 12 ++++++------ packages/network-subgraphs/subgraph_dev2.yaml | 12 ++++++------ packages/network-subgraphs/subgraph_iotex.yaml | 6 +++--- packages/network-subgraphs/subgraph_peaq.yaml | 12 ++++++------ packages/network-subgraphs/subgraph_polygon.yaml | 12 ++++++------ 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/network-subgraphs/subgraph_amoy.yaml b/packages/network-subgraphs/subgraph_amoy.yaml index 7303364f5..c4ed317af 100644 --- a/packages/network-subgraphs/subgraph_amoy.yaml +++ b/packages/network-subgraphs/subgraph_amoy.yaml @@ -10,7 +10,7 @@ dataSources: name: StreamRegistry network: polygon-amoy source: - address: "0xE9C98bdE63248e58E9137Db8270D9675B9E34b93" + address: '0xE9C98bdE63248e58E9137Db8270D9675B9E34b93' abi: StreamRegistry startBlock: 6550000 mapping: @@ -39,7 +39,7 @@ dataSources: name: NodeRegistry network: polygon-amoy source: - address: "0x02fdF917f4e6Ae8F7F1bBDd28179d819E2b76820" + address: '0x02fdF917f4e6Ae8F7F1bBDd28179d819E2b76820' abi: NodeRegistry startBlock: 6550000 mapping: @@ -61,7 +61,7 @@ dataSources: name: StreamStorageRegistry network: polygon-amoy source: - address: "0x0f3671A9A92416E1aD32750faCf2AD4FA1b66f78" + address: '0x0f3671A9A92416E1aD32750faCf2AD4FA1b66f78' abi: StreamStorageRegistry startBlock: 6550000 mapping: @@ -83,7 +83,7 @@ dataSources: name: ProjectRegistryV1 network: polygon-amoy source: - address: "0xc5e1434d35c0c7291c7032Fd9C4096b4876C6823" + address: '0xc5e1434d35c0c7291c7032Fd9C4096b4876C6823' abi: ProjectRegistryV1 startBlock: 6550000 mapping: @@ -118,7 +118,7 @@ dataSources: name: MarketplaceV4 network: polygon-amoy source: - address: "0x6C8eaA8e0bF605469c15b6F9106387B4cEC99976" + address: '0x6C8eaA8e0bF605469c15b6F9106387B4cEC99976' abi: MarketplaceV4 startBlock: 6550000 mapping: @@ -139,7 +139,7 @@ dataSources: name: ProjectStakingV1 network: polygon-amoy source: - address: "0x3A27A16770477EbcFb4B81cE462F4f12591767A0" + address: '0x3A27A16770477EbcFb4B81cE462F4f12591767A0' abi: ProjectStakingV1 startBlock: 6550000 mapping: diff --git a/packages/network-subgraphs/subgraph_dev2.yaml b/packages/network-subgraphs/subgraph_dev2.yaml index 4c20a9888..a073efe1b 100644 --- a/packages/network-subgraphs/subgraph_dev2.yaml +++ b/packages/network-subgraphs/subgraph_dev2.yaml @@ -10,7 +10,7 @@ dataSources: name: StreamRegistry network: dev2 source: - address: "0x18E0937099660B82464475Ea2B7e6Af4f2BFE5F0" + address: '0x18E0937099660B82464475Ea2B7e6Af4f2BFE5F0' abi: StreamRegistry startBlock: 0 mapping: @@ -39,7 +39,7 @@ dataSources: name: NodeRegistry network: dev2 source: - address: "0x338090C5492C5c5E41a4458f5FC4b205cbc54A24" + address: '0x338090C5492C5c5E41a4458f5FC4b205cbc54A24' abi: NodeRegistry startBlock: 0 mapping: @@ -61,7 +61,7 @@ dataSources: name: StreamStorageRegistry network: dev2 source: - address: "0xB73189CeBCc870bE6f9aa16764bbB3665e4B49B6" + address: '0xB73189CeBCc870bE6f9aa16764bbB3665e4B49B6' abi: StreamStorageRegistry startBlock: 0 mapping: @@ -83,7 +83,7 @@ dataSources: name: ProjectRegistryV1 network: dev2 source: - address: "0xA9166376706611110f814D1333b8E80FEc5d8f10" + address: '0xA9166376706611110f814D1333b8E80FEc5d8f10' abi: ProjectRegistryV1 startBlock: 0 mapping: @@ -118,7 +118,7 @@ dataSources: name: MarketplaceV4 network: dev2 source: - address: "0xb8678223183d560280a7BEF68daAbB0E3daBd97D" + address: '0xb8678223183d560280a7BEF68daAbB0E3daBd97D' abi: MarketplaceV4 startBlock: 0 mapping: @@ -139,7 +139,7 @@ dataSources: name: ProjectStakingV1 network: dev2 source: - address: "0x73a9310C43621B853C508902bb8c1DA8f1240EaE" + address: '0x73a9310C43621B853C508902bb8c1DA8f1240EaE' abi: ProjectStakingV1 startBlock: 0 mapping: diff --git a/packages/network-subgraphs/subgraph_iotex.yaml b/packages/network-subgraphs/subgraph_iotex.yaml index cfaaf5cfd..b4611065f 100644 --- a/packages/network-subgraphs/subgraph_iotex.yaml +++ b/packages/network-subgraphs/subgraph_iotex.yaml @@ -10,7 +10,7 @@ dataSources: name: StreamRegistry network: iotex source: - address: "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6" + address: '0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6' abi: StreamRegistry startBlock: 33510000 mapping: @@ -39,7 +39,7 @@ dataSources: name: NodeRegistry network: iotex source: - address: "0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D" + address: '0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D' abi: NodeRegistry startBlock: 33510000 mapping: @@ -61,7 +61,7 @@ dataSources: name: StreamStorageRegistry network: iotex source: - address: "0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2" + address: '0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2' abi: StreamStorageRegistry startBlock: 33510000 mapping: diff --git a/packages/network-subgraphs/subgraph_peaq.yaml b/packages/network-subgraphs/subgraph_peaq.yaml index 30cf3aa1a..652892fd8 100644 --- a/packages/network-subgraphs/subgraph_peaq.yaml +++ b/packages/network-subgraphs/subgraph_peaq.yaml @@ -10,7 +10,7 @@ dataSources: name: StreamRegistry network: peaq source: - address: "0xD0C720e99Bd39311614f292d8B0B4e351Bde157c" + address: '0xD0C720e99Bd39311614f292d8B0B4e351Bde157c' abi: StreamRegistry startBlock: 900000 mapping: @@ -39,7 +39,7 @@ dataSources: name: NodeRegistry network: peaq source: - address: "0xaCF9e8134047eDc671162D9404BF63a587435bAa" + address: '0xaCF9e8134047eDc671162D9404BF63a587435bAa' abi: NodeRegistry startBlock: 900000 mapping: @@ -61,7 +61,7 @@ dataSources: name: StreamStorageRegistry network: peaq source: - address: "0xB36CF8ee4219a3Ac9FBC3865C35E9a99353c26db" + address: '0xB36CF8ee4219a3Ac9FBC3865C35E9a99353c26db' abi: StreamStorageRegistry startBlock: 900000 mapping: @@ -83,7 +83,7 @@ dataSources: name: ProjectRegistryV1 network: peaq source: - address: "0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA" + address: '0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA' abi: ProjectRegistryV1 startBlock: 900000 mapping: @@ -118,7 +118,7 @@ dataSources: name: MarketplaceV4 network: peaq source: - address: "0x959684926448296ea72BD4B05593426A3cD3F0dF" + address: '0x959684926448296ea72BD4B05593426A3cD3F0dF' abi: MarketplaceV4 startBlock: 900000 mapping: @@ -139,7 +139,7 @@ dataSources: name: ProjectStakingV1 network: peaq source: - address: "0xd1cBD6b1Be710C41c01A9613802209843407b8b9" + address: '0xd1cBD6b1Be710C41c01A9613802209843407b8b9' abi: ProjectStakingV1 startBlock: 900000 mapping: diff --git a/packages/network-subgraphs/subgraph_polygon.yaml b/packages/network-subgraphs/subgraph_polygon.yaml index 0c463cc37..69b4047f5 100644 --- a/packages/network-subgraphs/subgraph_polygon.yaml +++ b/packages/network-subgraphs/subgraph_polygon.yaml @@ -10,7 +10,7 @@ dataSources: name: StreamRegistry network: matic source: - address: "0x0D483E10612F327FC11965Fc82E90dC19b141641" + address: '0x0D483E10612F327FC11965Fc82E90dC19b141641' abi: StreamRegistry startBlock: 23586971 mapping: @@ -39,7 +39,7 @@ dataSources: name: NodeRegistry network: matic source: - address: "0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6" + address: '0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6' abi: NodeRegistry startBlock: 23562861 mapping: @@ -61,7 +61,7 @@ dataSources: name: StreamStorageRegistry network: matic source: - address: "0xe8e2660CeDf2a59C917a5ED05B72df4146b58399" + address: '0xe8e2660CeDf2a59C917a5ED05B72df4146b58399' abi: StreamStorageRegistry startBlock: 23586998 mapping: @@ -83,7 +83,7 @@ dataSources: name: ProjectRegistryV1 network: matic source: - address: "0x496a6154da5aA6a021a3bd0DCd337DA80F48a6e1" + address: '0x496a6154da5aA6a021a3bd0DCd337DA80F48a6e1' abi: ProjectRegistryV1 startBlock: 38700928 mapping: @@ -118,7 +118,7 @@ dataSources: name: MarketplaceV4 network: matic source: - address: "0xdF8b74D735197dCD5C94bE933db080E69A958de6" + address: '0xdF8b74D735197dCD5C94bE933db080E69A958de6' abi: MarketplaceV4 startBlock: 39591313 mapping: @@ -139,7 +139,7 @@ dataSources: name: ProjectStakingV1 network: matic source: - address: "0xAA7a4BdBE91F143F3103206e48A8AfF21101B6DE" + address: '0xAA7a4BdBE91F143F3103206e48A8AfF21101B6DE' abi: ProjectStakingV1 startBlock: 38701364 mapping: From b2be1e0ccbedd2aaa05f335033b5ada2b3831d17 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 13:30:36 +0300 Subject: [PATCH 07/12] unify yamls: description --- packages/network-subgraphs/subgraph_amoy.yaml | 2 +- packages/network-subgraphs/subgraph_dev2.yaml | 2 +- packages/network-subgraphs/subgraph_peaq.yaml | 2 +- packages/network-subgraphs/subgraph_polygon.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/network-subgraphs/subgraph_amoy.yaml b/packages/network-subgraphs/subgraph_amoy.yaml index c4ed317af..62f384c03 100644 --- a/packages/network-subgraphs/subgraph_amoy.yaml +++ b/packages/network-subgraphs/subgraph_amoy.yaml @@ -1,5 +1,5 @@ specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry +description: Subgraph definitions for the Streamr contracts repository: schema: file: ./schema.graphql diff --git a/packages/network-subgraphs/subgraph_dev2.yaml b/packages/network-subgraphs/subgraph_dev2.yaml index a073efe1b..c3b1939a9 100644 --- a/packages/network-subgraphs/subgraph_dev2.yaml +++ b/packages/network-subgraphs/subgraph_dev2.yaml @@ -1,5 +1,5 @@ specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry +description: Subgraph definitions for the Streamr contracts repository: schema: file: ./schema.graphql diff --git a/packages/network-subgraphs/subgraph_peaq.yaml b/packages/network-subgraphs/subgraph_peaq.yaml index 652892fd8..6c4eebd99 100644 --- a/packages/network-subgraphs/subgraph_peaq.yaml +++ b/packages/network-subgraphs/subgraph_peaq.yaml @@ -1,5 +1,5 @@ specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry +description: Subgraph definitions for the Streamr contracts repository: schema: file: ./schema.graphql diff --git a/packages/network-subgraphs/subgraph_polygon.yaml b/packages/network-subgraphs/subgraph_polygon.yaml index 69b4047f5..59ade4b1c 100644 --- a/packages/network-subgraphs/subgraph_polygon.yaml +++ b/packages/network-subgraphs/subgraph_polygon.yaml @@ -1,5 +1,5 @@ specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry +description: Subgraph definitions for the Streamr contracts repository: schema: file: ./schema.graphql From bda37c6e92792ef527011b2672bede922c224e8e Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 13:34:46 +0300 Subject: [PATCH 08/12] tmp: test.sh --- packages/network-subgraphs/test.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 packages/network-subgraphs/test.sh diff --git a/packages/network-subgraphs/test.sh b/packages/network-subgraphs/test.sh new file mode 100755 index 000000000..c3a725493 --- /dev/null +++ b/packages/network-subgraphs/test.sh @@ -0,0 +1,7 @@ +node create-subgraph-config-json.mjs > subgraph-config.json + ./generate-yamls.sh +diff subgraph_amoy.yaml subgraph_amoy_generated.yaml +diff subgraph_dev2.yaml subgraph_dev2_generated.yaml +diff subgraph_iotex.yaml subgraph_iotext_generated.yaml +diff subgraph_peaq.yaml subgraph_peaq_generated.yaml +diff subgraph_polygon.yaml subgraph_polygon_generated.yaml From 345daf659673e760e5997bb3111b2a781d117b11 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 14:17:07 +0300 Subject: [PATCH 09/12] use template in build.sh --- packages/network-subgraphs/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/network-subgraphs/build.sh b/packages/network-subgraphs/build.sh index 8a0d472ef..98c1f1fb0 100755 --- a/packages/network-subgraphs/build.sh +++ b/packages/network-subgraphs/build.sh @@ -7,7 +7,7 @@ fi # TODO could build these to "dist" directory so that we don't need to clean up the subgraph.yaml in package.json (the "rm subgraph.yaml" command) # - then we can also remove subgraph.yaml from .gitignore -cp subgraph_$1.yaml subgraph.yaml +jq '.'$1 subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph.yaml ./scripts/copyAbisFromContractsPackage.sh npx graph codegen npx graph build \ No newline at end of file From a4cca234d24e7e25cc82bc7e8d639c8bddbd0a6e Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 14:17:45 +0300 Subject: [PATCH 10/12] delete environment specific yaml files --- packages/network-subgraphs/subgraph_amoy.yaml | 326 ------------------ packages/network-subgraphs/subgraph_dev2.yaml | 326 ------------------ .../network-subgraphs/subgraph_iotex.yaml | 244 ------------- packages/network-subgraphs/subgraph_peaq.yaml | 326 ------------------ .../network-subgraphs/subgraph_polygon.yaml | 326 ------------------ 5 files changed, 1548 deletions(-) delete mode 100644 packages/network-subgraphs/subgraph_amoy.yaml delete mode 100644 packages/network-subgraphs/subgraph_dev2.yaml delete mode 100644 packages/network-subgraphs/subgraph_iotex.yaml delete mode 100644 packages/network-subgraphs/subgraph_peaq.yaml delete mode 100644 packages/network-subgraphs/subgraph_polygon.yaml diff --git a/packages/network-subgraphs/subgraph_amoy.yaml b/packages/network-subgraphs/subgraph_amoy.yaml deleted file mode 100644 index 62f384c03..000000000 --- a/packages/network-subgraphs/subgraph_amoy.yaml +++ /dev/null @@ -1,326 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the Streamr contracts -repository: -schema: - file: ./schema.graphql -features: - - fullTextSearch -dataSources: - - kind: ethereum/contract - name: StreamRegistry - network: polygon-amoy - source: - address: '0xE9C98bdE63248e58E9137Db8270D9675B9E34b93' - abi: StreamRegistry - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Stream - - StreamPermission - abis: - - name: StreamRegistry - file: ./abis/StreamRegistry.json - eventHandlers: - - event: StreamCreated(string,string) - handler: handleStreamCreation - - event: StreamDeleted(string) - handler: handleStreamDeletion - - event: StreamUpdated(string,string) - handler: handleStreamUpdate - - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdate - - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdateForUserId - file: ./src/streamRegistry.ts - - kind: ethereum/contract - name: NodeRegistry - network: polygon-amoy - source: - address: '0x02fdF917f4e6Ae8F7F1bBDd28179d819E2b76820' - abi: NodeRegistry - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: NodeRegistry - file: ./abis/NodeRegistry.json - eventHandlers: - - event: NodeUpdated(indexed address,string,indexed uint256,uint256) - handler: handleNodeUpdate - - event: NodeRemoved(indexed address) - handler: handleNodeRemoved - file: ./src/nodeRegistry.ts - - kind: ethereum/contract - name: StreamStorageRegistry - network: polygon-amoy - source: - address: '0x0f3671A9A92416E1aD32750faCf2AD4FA1b66f78' - abi: StreamStorageRegistry - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: StreamStorageRegistry - file: ./abis/StreamStorageRegistry.json - eventHandlers: - - event: Added(string,indexed address) - handler: handleStorageNodeAddedToStream - - event: Removed(string,indexed address) - handler: handleStorageNodeRemovedFromStream - file: ./src/streamStorageRegistry.ts - - kind: ethereum/contract - name: ProjectRegistryV1 - network: polygon-amoy - source: - address: '0xc5e1434d35c0c7291c7032Fd9C4096b4876C6823' - abi: ProjectRegistryV1 - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPermission - abis: - - name: ProjectRegistryV1 - file: ./abis/ProjectRegistryV1.json - eventHandlers: - - event: ProjectCreated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectCreation - - event: ProjectDeleted(indexed bytes32) - handler: handleProjectDeletion - - event: ProjectUpdated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectUpdate - - event: PaymentDetailsByChainUpdated(indexed bytes32,uint32,address,address,uint256) - handler: handlePaymentDetailsByChainUpdate - - event: StreamAdded(bytes32,string) - handler: handleStreamAddition - - event: StreamRemoved(bytes32,string) - handler: handleStreamRemoval - - event: PermissionUpdated(bytes32,address,bool,bool,bool,bool) - handler: handlePermissionUpdate - - event: Subscribed(indexed bytes32,indexed address,uint256) - handler: handleSubscriptionUpdate - file: ./src/projectRegistry.ts - - kind: ethereum/contract - name: MarketplaceV4 - network: polygon-amoy - source: - address: '0x6C8eaA8e0bF605469c15b6F9106387B4cEC99976' - abi: MarketplaceV4 - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPurchase - abis: - - name: MarketplaceV4 - file: ./abis/MarketplaceV4.json - eventHandlers: - - event: ProjectPurchased(bytes32,address,uint256,uint256,uint256) - handler: handleProjectPurchase - file: ./src/marketplaceV4.ts - - kind: ethereum/contract - name: ProjectStakingV1 - network: polygon-amoy - source: - address: '0x3A27A16770477EbcFb4B81cE462F4f12591767A0' - abi: ProjectStakingV1 - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectStakeByUser - - ProjectStakingDayBucket - - ProjectPaymentDetails - - ProjectSubscription - abis: - - name: ProjectStakingV1 - file: ./abis/ProjectStakingV1.json - eventHandlers: - - event: Stake(indexed bytes32,indexed address,uint256,uint256) - handler: handleStake - - event: Unstake(indexed bytes32,indexed address,uint256,uint256) - handler: handleUnstake - file: ./src/projectStaking.ts - - kind: ethereum/contract - name: StreamrConfig - network: polygon-amoy - source: - address: '0x835bC97D2a61bbF5d05932C5105Ca34e1b815F94' - abi: StreamrConfig - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/streamrConfig.ts - entities: - - Network - abis: - - name: StreamrConfig - file: ./abis/StreamrConfig.json - eventHandlers: - - event: ConfigChanged(indexed string,indexed uint256,indexed address) - handler: handleConfigChanged - - kind: ethereum/contract - name: SponsorshipFactory - network: polygon-amoy - source: - address: '0xb194a68b166f2e3074B551393fA61490D19c69f8' - abi: SponsorshipFactory - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorshipFactory.ts - entities: - - Sponsorship - - SponsorshipDailyBucket - - Network - abis: - - name: SponsorshipFactory - file: ./abis/SponsorshipFactory.json - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) - handler: handleNewSponsorship - - kind: ethereum/contract - name: OperatorFactory - network: polygon-amoy - source: - address: '0xE02E8E9fF5ea6a58F34D00C0e4B091e066B9fA81' - abi: OperatorFactory - startBlock: 6550000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operatorFactory.ts - entities: - - Operator - - Network - abis: - - name: OperatorFactory - file: ./abis/OperatorFactory.json - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: NewOperator(indexed address,indexed address) - handler: handleNewOperator - - event: VoterUpdate(indexed address,indexed bool) - handler: handleVoterUpdate - -templates: - - name: Sponsorship - kind: ethereum/contract - network: polygon-amoy - source: - abi: Sponsorship - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorship.ts - entities: - - Sponsorship - - Operator - - Stake - - StakingEvent - - SlashingEvent - - SponsoringEvent - - Flag - - Vote - - SponsorshipDailyBucket - abis: - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: StakeUpdate(indexed address,uint256,uint256) - handler: handleStakeUpdated - - event: StakeLockUpdate(indexed address,uint256,uint256) - handler: handleStakeLockUpdated - - event: InsolvencyStarted(uint256) - handler: handleInsolvencyStarted - - event: InsolvencyEnded(uint256,uint256,uint256) - handler: handleInsolvencyEnded - - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) - handler: handleSponsorshipUpdated - - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) - handler: handleFlagged - - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) - handler: handleFlagUpdate - - event: OperatorSlashed(indexed address,uint256) - handler: handleOperatorSlashed - - event: SponsorshipReceived(indexed address,uint256) - handler: handleSponsorshipReceived - - name: Operator - kind: ethereum/contract - network: polygon-amoy - source: - abi: Operator - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operator.ts - entities: - - Operator - - Delegator - - OperatorDailyBucket - - DelegatorDailyBucket - - Delegation - - QueueEntry - - Network - abis: - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: Delegated(indexed address,uint256) - handler: handleDelegated - - event: Undelegated(indexed address,uint256) - handler: handleUndelegated - - event: BalanceUpdate(indexed address,uint256,uint256,uint256) - handler: handleBalanceUpdate - - event: OperatorValueUpdate(uint256,uint256) - handler: handleOperatorValueUpdate - - event: Profit(uint256,indexed uint256,indexed uint256) - handler: handleProfit - - event: Loss(uint256) - handler: handleLoss - - event: QueuedDataPayout(indexed address,uint256,uint256) - handler: handleQueuedDataPayout - - event: QueueUpdated(indexed address,uint256,uint256) - handler: handleQueueUpdated - - event: NodesSet(address[]) - handler: handleNodesSet - - event: Heartbeat(indexed address,string) - handler: handleHeartbeat - - event: MetadataUpdated(string,indexed address,indexed uint256) - handler: handleMetadataUpdate - - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) - handler: handleReviewRequest - - event: RoleGranted(indexed bytes32,indexed address,indexed address) - handler: handleRoleGranted - - event: RoleRevoked(indexed bytes32,indexed address,indexed address) - handler: handleRoleRevoked diff --git a/packages/network-subgraphs/subgraph_dev2.yaml b/packages/network-subgraphs/subgraph_dev2.yaml deleted file mode 100644 index c3b1939a9..000000000 --- a/packages/network-subgraphs/subgraph_dev2.yaml +++ /dev/null @@ -1,326 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the Streamr contracts -repository: -schema: - file: ./schema.graphql -features: - - fullTextSearch -dataSources: - - kind: ethereum/contract - name: StreamRegistry - network: dev2 - source: - address: '0x18E0937099660B82464475Ea2B7e6Af4f2BFE5F0' - abi: StreamRegistry - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Stream - - StreamPermission - abis: - - name: StreamRegistry - file: ./abis/StreamRegistry.json - eventHandlers: - - event: StreamCreated(string,string) - handler: handleStreamCreation - - event: StreamDeleted(string) - handler: handleStreamDeletion - - event: StreamUpdated(string,string) - handler: handleStreamUpdate - - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdate - - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdateForUserId - file: ./src/streamRegistry.ts - - kind: ethereum/contract - name: NodeRegistry - network: dev2 - source: - address: '0x338090C5492C5c5E41a4458f5FC4b205cbc54A24' - abi: NodeRegistry - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: NodeRegistry - file: ./abis/NodeRegistry.json - eventHandlers: - - event: NodeUpdated(indexed address,string,indexed uint256,uint256) - handler: handleNodeUpdate - - event: NodeRemoved(indexed address) - handler: handleNodeRemoved - file: ./src/nodeRegistry.ts - - kind: ethereum/contract - name: StreamStorageRegistry - network: dev2 - source: - address: '0xB73189CeBCc870bE6f9aa16764bbB3665e4B49B6' - abi: StreamStorageRegistry - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: StreamStorageRegistry - file: ./abis/StreamStorageRegistry.json - eventHandlers: - - event: Added(string,indexed address) - handler: handleStorageNodeAddedToStream - - event: Removed(string,indexed address) - handler: handleStorageNodeRemovedFromStream - file: ./src/streamStorageRegistry.ts - - kind: ethereum/contract - name: ProjectRegistryV1 - network: dev2 - source: - address: '0xA9166376706611110f814D1333b8E80FEc5d8f10' - abi: ProjectRegistryV1 - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPermission - abis: - - name: ProjectRegistryV1 - file: ./abis/ProjectRegistryV1.json - eventHandlers: - - event: ProjectCreated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectCreation - - event: ProjectDeleted(indexed bytes32) - handler: handleProjectDeletion - - event: ProjectUpdated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectUpdate - - event: PaymentDetailsByChainUpdated(indexed bytes32,uint32,address,address,uint256) - handler: handlePaymentDetailsByChainUpdate - - event: StreamAdded(bytes32,string) - handler: handleStreamAddition - - event: StreamRemoved(bytes32,string) - handler: handleStreamRemoval - - event: PermissionUpdated(bytes32,address,bool,bool,bool,bool) - handler: handlePermissionUpdate - - event: Subscribed(indexed bytes32,indexed address,uint256) - handler: handleSubscriptionUpdate - file: ./src/projectRegistry.ts - - kind: ethereum/contract - name: MarketplaceV4 - network: dev2 - source: - address: '0xb8678223183d560280a7BEF68daAbB0E3daBd97D' - abi: MarketplaceV4 - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPurchase - abis: - - name: MarketplaceV4 - file: ./abis/MarketplaceV4.json - eventHandlers: - - event: ProjectPurchased(bytes32,address,uint256,uint256,uint256) - handler: handleProjectPurchase - file: ./src/marketplaceV4.ts - - kind: ethereum/contract - name: ProjectStakingV1 - network: dev2 - source: - address: '0x73a9310C43621B853C508902bb8c1DA8f1240EaE' - abi: ProjectStakingV1 - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectStakeByUser - - ProjectStakingDayBucket - - ProjectPaymentDetails - - ProjectSubscription - abis: - - name: ProjectStakingV1 - file: ./abis/ProjectStakingV1.json - eventHandlers: - - event: Stake(indexed bytes32,indexed address,uint256,uint256) - handler: handleStake - - event: Unstake(indexed bytes32,indexed address,uint256,uint256) - handler: handleUnstake - file: ./src/projectStaking.ts - - kind: ethereum/contract - name: StreamrConfig - network: dev2 - source: - address: '0x00E680d549FE53a627a3db86a6F88fA2471CFfAa' - abi: StreamrConfig - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/streamrConfig.ts - entities: - - Network - abis: - - name: StreamrConfig - file: ./abis/StreamrConfig.json - eventHandlers: - - event: ConfigChanged(indexed string,indexed uint256,indexed address) - handler: handleConfigChanged - - kind: ethereum/contract - name: SponsorshipFactory - network: dev2 - source: - address: '0x699B4bE95614f017Bb622e427d3232837Cc814E6' - abi: SponsorshipFactory - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorshipFactory.ts - entities: - - Sponsorship - - SponsorshipDailyBucket - - Network - abis: - - name: SponsorshipFactory - file: ./abis/SponsorshipFactory.json - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) - handler: handleNewSponsorship - - kind: ethereum/contract - name: OperatorFactory - network: dev2 - source: - address: '0xD13D34d37e2c94cb35EA8D5DE7498Cb7830d26e0' - abi: OperatorFactory - startBlock: 0 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operatorFactory.ts - entities: - - Operator - - Network - abis: - - name: OperatorFactory - file: ./abis/OperatorFactory.json - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: NewOperator(indexed address,indexed address) - handler: handleNewOperator - - event: VoterUpdate(indexed address,indexed bool) - handler: handleVoterUpdate - -templates: - - name: Sponsorship - kind: ethereum/contract - network: dev2 - source: - abi: Sponsorship - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorship.ts - entities: - - Sponsorship - - Operator - - Stake - - StakingEvent - - SlashingEvent - - SponsoringEvent - - Flag - - Vote - - SponsorshipDailyBucket - abis: - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: StakeUpdate(indexed address,uint256,uint256) - handler: handleStakeUpdated - - event: StakeLockUpdate(indexed address,uint256,uint256) - handler: handleStakeLockUpdated - - event: InsolvencyStarted(uint256) - handler: handleInsolvencyStarted - - event: InsolvencyEnded(uint256,uint256,uint256) - handler: handleInsolvencyEnded - - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) - handler: handleSponsorshipUpdated - - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) - handler: handleFlagged - - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) - handler: handleFlagUpdate - - event: OperatorSlashed(indexed address,uint256) - handler: handleOperatorSlashed - - event: SponsorshipReceived(indexed address,uint256) - handler: handleSponsorshipReceived - - name: Operator - kind: ethereum/contract - network: dev2 - source: - abi: Operator - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operator.ts - entities: - - Operator - - Delegator - - OperatorDailyBucket - - DelegatorDailyBucket - - Delegation - - QueueEntry - - Network - abis: - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: Delegated(indexed address,uint256) - handler: handleDelegated - - event: Undelegated(indexed address,uint256) - handler: handleUndelegated - - event: BalanceUpdate(indexed address,uint256,uint256,uint256) - handler: handleBalanceUpdate - - event: OperatorValueUpdate(uint256,uint256) - handler: handleOperatorValueUpdate - - event: Profit(uint256,indexed uint256,indexed uint256) - handler: handleProfit - - event: Loss(uint256) - handler: handleLoss - - event: QueuedDataPayout(indexed address,uint256,uint256) - handler: handleQueuedDataPayout - - event: QueueUpdated(indexed address,uint256,uint256) - handler: handleQueueUpdated - - event: NodesSet(address[]) - handler: handleNodesSet - - event: Heartbeat(indexed address,string) - handler: handleHeartbeat - - event: MetadataUpdated(string,indexed address,indexed uint256) - handler: handleMetadataUpdate - - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) - handler: handleReviewRequest - - event: RoleGranted(indexed bytes32,indexed address,indexed address) - handler: handleRoleGranted - - event: RoleRevoked(indexed bytes32,indexed address,indexed address) - handler: handleRoleRevoked diff --git a/packages/network-subgraphs/subgraph_iotex.yaml b/packages/network-subgraphs/subgraph_iotex.yaml deleted file mode 100644 index b4611065f..000000000 --- a/packages/network-subgraphs/subgraph_iotex.yaml +++ /dev/null @@ -1,244 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the Streamr contracts -repository: -schema: - file: ./schema.graphql -features: - - fullTextSearch -dataSources: - - kind: ethereum/contract - name: StreamRegistry - network: iotex - source: - address: '0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6' - abi: StreamRegistry - startBlock: 33510000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Stream - - StreamPermission - abis: - - name: StreamRegistry - file: ./abis/StreamRegistry.json - eventHandlers: - - event: StreamCreated(string,string) - handler: handleStreamCreation - - event: StreamDeleted(string) - handler: handleStreamDeletion - - event: StreamUpdated(string,string) - handler: handleStreamUpdate - - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdate - - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdateForUserId - file: ./src/streamRegistry.ts - - kind: ethereum/contract - name: NodeRegistry - network: iotex - source: - address: '0xb9e70Bd9833dd091f06edc8073aa86a76EdeF46D' - abi: NodeRegistry - startBlock: 33510000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: NodeRegistry - file: ./abis/NodeRegistry.json - eventHandlers: - - event: NodeUpdated(indexed address,string,indexed uint256,uint256) - handler: handleNodeUpdate - - event: NodeRemoved(indexed address) - handler: handleNodeRemoved - file: ./src/nodeRegistry.ts - - kind: ethereum/contract - name: StreamStorageRegistry - network: iotex - source: - address: '0xF79c40Fbc432f1f8B8B017441B644e0ac7bccea2' - abi: StreamStorageRegistry - startBlock: 33510000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: StreamStorageRegistry - file: ./abis/StreamStorageRegistry.json - eventHandlers: - - event: Added(string,indexed address) - handler: handleStorageNodeAddedToStream - - event: Removed(string,indexed address) - handler: handleStorageNodeRemovedFromStream - file: ./src/streamStorageRegistry.ts - - kind: ethereum/contract - name: StreamrConfig - network: iotex - source: - address: '0x23Dd2D1f39AD0f9d517ce56Ca490eF19B50e6f1A' - abi: StreamrConfig - startBlock: 33510000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/streamrConfig.ts - entities: - - Network - abis: - - name: StreamrConfig - file: ./abis/StreamrConfig.json - eventHandlers: - - event: ConfigChanged(indexed string,indexed uint256,indexed address) - handler: handleConfigChanged - - kind: ethereum/contract - name: SponsorshipFactory - network: iotex - source: - address: '0xe4Ae8e6c5b6E85914738803ad73c111eF2618621' - abi: SponsorshipFactory - startBlock: 33510000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorshipFactory.ts - entities: - - Sponsorship - - SponsorshipDailyBucket - - Network - abis: - - name: SponsorshipFactory - file: ./abis/SponsorshipFactory.json - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) - handler: handleNewSponsorship - - kind: ethereum/contract - name: OperatorFactory - network: iotex - source: - address: '0xbC1cC84912d54fCf7316A6dA2e7A884731a87935' - abi: OperatorFactory - startBlock: 33510000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operatorFactory.ts - entities: - - Operator - - Network - abis: - - name: OperatorFactory - file: ./abis/OperatorFactory.json - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: NewOperator(indexed address,indexed address) - handler: handleNewOperator - - event: VoterUpdate(indexed address,indexed bool) - handler: handleVoterUpdate - -templates: - - name: Sponsorship - kind: ethereum/contract - network: iotex - source: - abi: Sponsorship - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorship.ts - entities: - - Sponsorship - - Operator - - Stake - - StakingEvent - - SlashingEvent - - SponsoringEvent - - Flag - - Vote - - SponsorshipDailyBucket - abis: - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: StakeUpdate(indexed address,uint256,uint256) - handler: handleStakeUpdated - - event: StakeLockUpdate(indexed address,uint256,uint256) - handler: handleStakeLockUpdated - - event: InsolvencyStarted(uint256) - handler: handleInsolvencyStarted - - event: InsolvencyEnded(uint256,uint256,uint256) - handler: handleInsolvencyEnded - - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) - handler: handleSponsorshipUpdated - - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) - handler: handleFlagged - - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) - handler: handleFlagUpdate - - event: OperatorSlashed(indexed address,uint256) - handler: handleOperatorSlashed - - event: SponsorshipReceived(indexed address,uint256) - handler: handleSponsorshipReceived - - name: Operator - kind: ethereum/contract - network: iotex - source: - abi: Operator - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operator.ts - entities: - - Operator - - Delegator - - OperatorDailyBucket - - DelegatorDailyBucket - - Delegation - - QueueEntry - - Network - abis: - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: Delegated(indexed address,uint256) - handler: handleDelegated - - event: Undelegated(indexed address,uint256) - handler: handleUndelegated - - event: BalanceUpdate(indexed address,uint256,uint256,uint256) - handler: handleBalanceUpdate - - event: OperatorValueUpdate(uint256,uint256) - handler: handleOperatorValueUpdate - - event: Profit(uint256,indexed uint256,indexed uint256) - handler: handleProfit - - event: Loss(uint256) - handler: handleLoss - - event: QueuedDataPayout(indexed address,uint256,uint256) - handler: handleQueuedDataPayout - - event: QueueUpdated(indexed address,uint256,uint256) - handler: handleQueueUpdated - - event: NodesSet(address[]) - handler: handleNodesSet - - event: Heartbeat(indexed address,string) - handler: handleHeartbeat - - event: MetadataUpdated(string,indexed address,indexed uint256) - handler: handleMetadataUpdate - - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) - handler: handleReviewRequest - - event: RoleGranted(indexed bytes32,indexed address,indexed address) - handler: handleRoleGranted - - event: RoleRevoked(indexed bytes32,indexed address,indexed address) - handler: handleRoleRevoked diff --git a/packages/network-subgraphs/subgraph_peaq.yaml b/packages/network-subgraphs/subgraph_peaq.yaml deleted file mode 100644 index 6c4eebd99..000000000 --- a/packages/network-subgraphs/subgraph_peaq.yaml +++ /dev/null @@ -1,326 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the Streamr contracts -repository: -schema: - file: ./schema.graphql -features: - - fullTextSearch -dataSources: - - kind: ethereum/contract - name: StreamRegistry - network: peaq - source: - address: '0xD0C720e99Bd39311614f292d8B0B4e351Bde157c' - abi: StreamRegistry - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Stream - - StreamPermission - abis: - - name: StreamRegistry - file: ./abis/StreamRegistry.json - eventHandlers: - - event: StreamCreated(string,string) - handler: handleStreamCreation - - event: StreamDeleted(string) - handler: handleStreamDeletion - - event: StreamUpdated(string,string) - handler: handleStreamUpdate - - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdate - - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdateForUserId - file: ./src/streamRegistry.ts - - kind: ethereum/contract - name: NodeRegistry - network: peaq - source: - address: '0xaCF9e8134047eDc671162D9404BF63a587435bAa' - abi: NodeRegistry - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: NodeRegistry - file: ./abis/NodeRegistry.json - eventHandlers: - - event: NodeUpdated(indexed address,string,indexed uint256,uint256) - handler: handleNodeUpdate - - event: NodeRemoved(indexed address) - handler: handleNodeRemoved - file: ./src/nodeRegistry.ts - - kind: ethereum/contract - name: StreamStorageRegistry - network: peaq - source: - address: '0xB36CF8ee4219a3Ac9FBC3865C35E9a99353c26db' - abi: StreamStorageRegistry - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: StreamStorageRegistry - file: ./abis/StreamStorageRegistry.json - eventHandlers: - - event: Added(string,indexed address) - handler: handleStorageNodeAddedToStream - - event: Removed(string,indexed address) - handler: handleStorageNodeRemovedFromStream - file: ./src/streamStorageRegistry.ts - - kind: ethereum/contract - name: ProjectRegistryV1 - network: peaq - source: - address: '0xB14205AE3D7672B937B972EBdf2b986fB0B8CfaA' - abi: ProjectRegistryV1 - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPermission - abis: - - name: ProjectRegistryV1 - file: ./abis/ProjectRegistryV1.json - eventHandlers: - - event: ProjectCreated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectCreation - - event: ProjectDeleted(indexed bytes32) - handler: handleProjectDeletion - - event: ProjectUpdated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectUpdate - - event: PaymentDetailsByChainUpdated(indexed bytes32,uint32,address,address,uint256) - handler: handlePaymentDetailsByChainUpdate - - event: StreamAdded(bytes32,string) - handler: handleStreamAddition - - event: StreamRemoved(bytes32,string) - handler: handleStreamRemoval - - event: PermissionUpdated(bytes32,address,bool,bool,bool,bool) - handler: handlePermissionUpdate - - event: Subscribed(indexed bytes32,indexed address,uint256) - handler: handleSubscriptionUpdate - file: ./src/projectRegistry.ts - - kind: ethereum/contract - name: MarketplaceV4 - network: peaq - source: - address: '0x959684926448296ea72BD4B05593426A3cD3F0dF' - abi: MarketplaceV4 - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPurchase - abis: - - name: MarketplaceV4 - file: ./abis/MarketplaceV4.json - eventHandlers: - - event: ProjectPurchased(bytes32,address,uint256,uint256,uint256) - handler: handleProjectPurchase - file: ./src/marketplaceV4.ts - - kind: ethereum/contract - name: ProjectStakingV1 - network: peaq - source: - address: '0xd1cBD6b1Be710C41c01A9613802209843407b8b9' - abi: ProjectStakingV1 - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectStakeByUser - - ProjectStakingDayBucket - - ProjectPaymentDetails - - ProjectSubscription - abis: - - name: ProjectStakingV1 - file: ./abis/ProjectStakingV1.json - eventHandlers: - - event: Stake(indexed bytes32,indexed address,uint256,uint256) - handler: handleStake - - event: Unstake(indexed bytes32,indexed address,uint256,uint256) - handler: handleUnstake - file: ./src/projectStaking.ts - - kind: ethereum/contract - name: StreamrConfig - network: peaq - source: - address: '0xc81Fa3Cc3E81dF24D21bfc608f8FB06262Da4F8c' - abi: StreamrConfig - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/streamrConfig.ts - entities: - - Network - abis: - - name: StreamrConfig - file: ./abis/StreamrConfig.json - eventHandlers: - - event: ConfigChanged(indexed string,indexed uint256,indexed address) - handler: handleConfigChanged - - kind: ethereum/contract - name: SponsorshipFactory - network: peaq - source: - address: '0xdaF0905e19C45b9Fea7E60D232061edF78E9F570' - abi: SponsorshipFactory - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorshipFactory.ts - entities: - - Sponsorship - - SponsorshipDailyBucket - - Network - abis: - - name: SponsorshipFactory - file: ./abis/SponsorshipFactory.json - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) - handler: handleNewSponsorship - - kind: ethereum/contract - name: OperatorFactory - network: peaq - source: - address: '0x6d201374D7c28EF1c3cc1b6FA300f06110B597A3' - abi: OperatorFactory - startBlock: 900000 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operatorFactory.ts - entities: - - Operator - - Network - abis: - - name: OperatorFactory - file: ./abis/OperatorFactory.json - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: NewOperator(indexed address,indexed address) - handler: handleNewOperator - - event: VoterUpdate(indexed address,indexed bool) - handler: handleVoterUpdate - -templates: - - name: Sponsorship - kind: ethereum/contract - network: peaq - source: - abi: Sponsorship - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorship.ts - entities: - - Sponsorship - - Operator - - Stake - - StakingEvent - - SlashingEvent - - SponsoringEvent - - Flag - - Vote - - SponsorshipDailyBucket - abis: - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: StakeUpdate(indexed address,uint256,uint256) - handler: handleStakeUpdated - - event: StakeLockUpdate(indexed address,uint256,uint256) - handler: handleStakeLockUpdated - - event: InsolvencyStarted(uint256) - handler: handleInsolvencyStarted - - event: InsolvencyEnded(uint256,uint256,uint256) - handler: handleInsolvencyEnded - - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) - handler: handleSponsorshipUpdated - - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) - handler: handleFlagged - - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) - handler: handleFlagUpdate - - event: OperatorSlashed(indexed address,uint256) - handler: handleOperatorSlashed - - event: SponsorshipReceived(indexed address,uint256) - handler: handleSponsorshipReceived - - name: Operator - kind: ethereum/contract - network: peaq - source: - abi: Operator - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operator.ts - entities: - - Operator - - Delegator - - OperatorDailyBucket - - DelegatorDailyBucket - - Delegation - - QueueEntry - - Network - abis: - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: Delegated(indexed address,uint256) - handler: handleDelegated - - event: Undelegated(indexed address,uint256) - handler: handleUndelegated - - event: BalanceUpdate(indexed address,uint256,uint256,uint256) - handler: handleBalanceUpdate - - event: OperatorValueUpdate(uint256,uint256) - handler: handleOperatorValueUpdate - - event: Profit(uint256,indexed uint256,indexed uint256) - handler: handleProfit - - event: Loss(uint256) - handler: handleLoss - - event: QueuedDataPayout(indexed address,uint256,uint256) - handler: handleQueuedDataPayout - - event: QueueUpdated(indexed address,uint256,uint256) - handler: handleQueueUpdated - - event: NodesSet(address[]) - handler: handleNodesSet - - event: Heartbeat(indexed address,string) - handler: handleHeartbeat - - event: MetadataUpdated(string,indexed address,indexed uint256) - handler: handleMetadataUpdate - - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) - handler: handleReviewRequest - - event: RoleGranted(indexed bytes32,indexed address,indexed address) - handler: handleRoleGranted - - event: RoleRevoked(indexed bytes32,indexed address,indexed address) - handler: handleRoleRevoked diff --git a/packages/network-subgraphs/subgraph_polygon.yaml b/packages/network-subgraphs/subgraph_polygon.yaml deleted file mode 100644 index 59ade4b1c..000000000 --- a/packages/network-subgraphs/subgraph_polygon.yaml +++ /dev/null @@ -1,326 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the Streamr contracts -repository: -schema: - file: ./schema.graphql -features: - - fullTextSearch -dataSources: - - kind: ethereum/contract - name: StreamRegistry - network: matic - source: - address: '0x0D483E10612F327FC11965Fc82E90dC19b141641' - abi: StreamRegistry - startBlock: 23586971 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Stream - - StreamPermission - abis: - - name: StreamRegistry - file: ./abis/StreamRegistry.json - eventHandlers: - - event: StreamCreated(string,string) - handler: handleStreamCreation - - event: StreamDeleted(string) - handler: handleStreamDeletion - - event: StreamUpdated(string,string) - handler: handleStreamUpdate - - event: PermissionUpdated(string,address,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdate - - event: PermissionUpdatedForUserId(string,bytes,bool,bool,uint256,uint256,bool) - handler: handlePermissionUpdateForUserId - file: ./src/streamRegistry.ts - - kind: ethereum/contract - name: NodeRegistry - network: matic - source: - address: '0x080F34fec2bc33928999Ea9e39ADc798bEF3E0d6' - abi: NodeRegistry - startBlock: 23562861 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: NodeRegistry - file: ./abis/NodeRegistry.json - eventHandlers: - - event: NodeUpdated(indexed address,string,indexed uint256,uint256) - handler: handleNodeUpdate - - event: NodeRemoved(indexed address) - handler: handleNodeRemoved - file: ./src/nodeRegistry.ts - - kind: ethereum/contract - name: StreamStorageRegistry - network: matic - source: - address: '0xe8e2660CeDf2a59C917a5ED05B72df4146b58399' - abi: StreamStorageRegistry - startBlock: 23586998 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Node - abis: - - name: StreamStorageRegistry - file: ./abis/StreamStorageRegistry.json - eventHandlers: - - event: Added(string,indexed address) - handler: handleStorageNodeAddedToStream - - event: Removed(string,indexed address) - handler: handleStorageNodeRemovedFromStream - file: ./src/streamStorageRegistry.ts - - kind: ethereum/contract - name: ProjectRegistryV1 - network: matic - source: - address: '0x496a6154da5aA6a021a3bd0DCd337DA80F48a6e1' - abi: ProjectRegistryV1 - startBlock: 38700928 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPermission - abis: - - name: ProjectRegistryV1 - file: ./abis/ProjectRegistryV1.json - eventHandlers: - - event: ProjectCreated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectCreation - - event: ProjectDeleted(indexed bytes32) - handler: handleProjectDeletion - - event: ProjectUpdated(indexed bytes32,uint32[],(address,address,uint256)[],string[],uint256,string) - handler: handleProjectUpdate - - event: PaymentDetailsByChainUpdated(indexed bytes32,uint32,address,address,uint256) - handler: handlePaymentDetailsByChainUpdate - - event: StreamAdded(bytes32,string) - handler: handleStreamAddition - - event: StreamRemoved(bytes32,string) - handler: handleStreamRemoval - - event: PermissionUpdated(bytes32,address,bool,bool,bool,bool) - handler: handlePermissionUpdate - - event: Subscribed(indexed bytes32,indexed address,uint256) - handler: handleSubscriptionUpdate - file: ./src/projectRegistry.ts - - kind: ethereum/contract - name: MarketplaceV4 - network: matic - source: - address: '0xdF8b74D735197dCD5C94bE933db080E69A958de6' - abi: MarketplaceV4 - startBlock: 39591313 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectPurchase - abis: - - name: MarketplaceV4 - file: ./abis/MarketplaceV4.json - eventHandlers: - - event: ProjectPurchased(bytes32,address,uint256,uint256,uint256) - handler: handleProjectPurchase - file: ./src/marketplaceV4.ts - - kind: ethereum/contract - name: ProjectStakingV1 - network: matic - source: - address: '0xAA7a4BdBE91F143F3103206e48A8AfF21101B6DE' - abi: ProjectStakingV1 - startBlock: 38701364 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - entities: - - Project - - ProjectStakeByUser - - ProjectStakingDayBucket - - ProjectPaymentDetails - - ProjectSubscription - abis: - - name: ProjectStakingV1 - file: ./abis/ProjectStakingV1.json - eventHandlers: - - event: Stake(indexed bytes32,indexed address,uint256,uint256) - handler: handleStake - - event: Unstake(indexed bytes32,indexed address,uint256,uint256) - handler: handleUnstake - file: ./src/projectStaking.ts - - kind: ethereum/contract - name: StreamrConfig - network: matic - source: - address: '0x869e88dB146ECAF20dDf199a12684cD80c263c8f' - abi: StreamrConfig - startBlock: 50045923 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/streamrConfig.ts - entities: - - Network - abis: - - name: StreamrConfig - file: ./abis/StreamrConfig.json - eventHandlers: - - event: ConfigChanged(indexed string,indexed uint256,indexed address) - handler: handleConfigChanged - - kind: ethereum/contract - name: SponsorshipFactory - network: matic - source: - address: '0x820b2f9a15ed45F9802c59d0CC77C22C81755e45' - abi: SponsorshipFactory - startBlock: 50046404 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorshipFactory.ts - entities: - - Sponsorship - - SponsorshipDailyBucket - - Network - abis: - - name: SponsorshipFactory - file: ./abis/SponsorshipFactory.json - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: NewSponsorship(indexed address,string,string,address[],uint256[],indexed address) - handler: handleNewSponsorship - - kind: ethereum/contract - name: OperatorFactory - network: matic - source: - address: '0x935734e66729b69260543Cf6e5EfeB42AC962183' - abi: OperatorFactory - startBlock: 50046356 - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operatorFactory.ts - entities: - - Operator - - Network - abis: - - name: OperatorFactory - file: ./abis/OperatorFactory.json - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: NewOperator(indexed address,indexed address) - handler: handleNewOperator - - event: VoterUpdate(indexed address,indexed bool) - handler: handleVoterUpdate - -templates: - - name: Sponsorship - kind: ethereum/contract - network: matic - source: - abi: Sponsorship - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/sponsorship.ts - entities: - - Sponsorship - - Operator - - Stake - - StakingEvent - - SlashingEvent - - SponsoringEvent - - Flag - - Vote - - SponsorshipDailyBucket - abis: - - name: Sponsorship - file: ./abis/Sponsorship.json - eventHandlers: - - event: StakeUpdate(indexed address,uint256,uint256) - handler: handleStakeUpdated - - event: StakeLockUpdate(indexed address,uint256,uint256) - handler: handleStakeLockUpdated - - event: InsolvencyStarted(uint256) - handler: handleInsolvencyStarted - - event: InsolvencyEnded(uint256,uint256,uint256) - handler: handleInsolvencyEnded - - event: SponsorshipUpdate(uint256,uint256,indexed uint256,indexed bool) - handler: handleSponsorshipUpdated - - event: Flagged(indexed address,indexed address,uint256,indexed uint256,string) - handler: handleFlagged - - event: FlagUpdate(indexed address,indexed uint8,uint256,uint256,indexed address,int256) - handler: handleFlagUpdate - - event: OperatorSlashed(indexed address,uint256) - handler: handleOperatorSlashed - - event: SponsorshipReceived(indexed address,uint256) - handler: handleSponsorshipReceived - - name: Operator - kind: ethereum/contract - network: matic - source: - abi: Operator - mapping: - kind: ethereum/events - apiVersion: 0.0.6 - language: wasm/assemblyscript - file: ./src/operator.ts - entities: - - Operator - - Delegator - - OperatorDailyBucket - - DelegatorDailyBucket - - Delegation - - QueueEntry - - Network - abis: - - name: Operator - file: ./abis/Operator.json - eventHandlers: - - event: Delegated(indexed address,uint256) - handler: handleDelegated - - event: Undelegated(indexed address,uint256) - handler: handleUndelegated - - event: BalanceUpdate(indexed address,uint256,uint256,uint256) - handler: handleBalanceUpdate - - event: OperatorValueUpdate(uint256,uint256) - handler: handleOperatorValueUpdate - - event: Profit(uint256,indexed uint256,indexed uint256) - handler: handleProfit - - event: Loss(uint256) - handler: handleLoss - - event: QueuedDataPayout(indexed address,uint256,uint256) - handler: handleQueuedDataPayout - - event: QueueUpdated(indexed address,uint256,uint256) - handler: handleQueueUpdated - - event: NodesSet(address[]) - handler: handleNodesSet - - event: Heartbeat(indexed address,string) - handler: handleHeartbeat - - event: MetadataUpdated(string,indexed address,indexed uint256) - handler: handleMetadataUpdate - - event: ReviewRequest(indexed address,indexed address,uint256,uint256,string) - handler: handleReviewRequest - - event: RoleGranted(indexed bytes32,indexed address,indexed address) - handler: handleRoleGranted - - event: RoleRevoked(indexed bytes32,indexed address,indexed address) - handler: handleRoleRevoked From de15ec478efc266ce577d92d2294d8b0edcad316 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Wed, 11 Jun 2025 14:34:33 +0300 Subject: [PATCH 11/12] rm temporary tools --- .../create-subgraph-config-json.mjs | 33 ------------------- packages/network-subgraphs/generate-yamls.sh | 6 ---- packages/network-subgraphs/test.sh | 7 ---- 3 files changed, 46 deletions(-) delete mode 100644 packages/network-subgraphs/create-subgraph-config-json.mjs delete mode 100755 packages/network-subgraphs/generate-yamls.sh delete mode 100755 packages/network-subgraphs/test.sh diff --git a/packages/network-subgraphs/create-subgraph-config-json.mjs b/packages/network-subgraphs/create-subgraph-config-json.mjs deleted file mode 100644 index 71fa6ff92..000000000 --- a/packages/network-subgraphs/create-subgraph-config-json.mjs +++ /dev/null @@ -1,33 +0,0 @@ -import { readFileSync } from 'fs' -import yaml from 'js-yaml' - -const ENVIRONMENT_IDS = ['dev2', 'polygon', 'polygonAmoy', 'peaq', 'iotex'] - -const output = {} - -for (const environmentId of ENVIRONMENT_IDS) { - const fileId = (environmentId === 'polygonAmoy') ? 'amoy' : environmentId - const fileName = `subgraph_${fileId}.yaml` - const fileContents = readFileSync(fileName, 'utf8') - const yamlData = yaml.load(fileContents) - const contracts = {} - for (const dataSource of yamlData.dataSources) { - const source = dataSource.source - const key = (source.abi === 'NodeRegistry') ? 'StorageNodeRegistry' : source.abi - contracts[key] = { - address: source.address, - startBlock: source.startBlock - } - } - const networkId = (environmentId === 'polygon') - ? 'matic' : - ((environmentId === 'polygonAmoy') ? 'polygon-amoy' : environmentId) - output[environmentId] = { - networkId, - hubContracts: (environmentId !== 'iotex'), - contracts - } -} - -console.log(JSON.stringify(output, undefined, 4)) - diff --git a/packages/network-subgraphs/generate-yamls.sh b/packages/network-subgraphs/generate-yamls.sh deleted file mode 100755 index 483ea910b..000000000 --- a/packages/network-subgraphs/generate-yamls.sh +++ /dev/null @@ -1,6 +0,0 @@ -jq '.dev2' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_dev2_generated.yaml -jq '.polygon' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_polygon_generated.yaml -jq '.polygonAmoy' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_amoy_generated.yaml -jq '.peaq' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_peaq_generated.yaml -jq '.iotex' subgraph-config.json | node scripts/fill-handlebars-template.mjs subgraph.yaml.hbs > subgraph_iotext_generated.yaml - diff --git a/packages/network-subgraphs/test.sh b/packages/network-subgraphs/test.sh deleted file mode 100755 index c3a725493..000000000 --- a/packages/network-subgraphs/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -node create-subgraph-config-json.mjs > subgraph-config.json - ./generate-yamls.sh -diff subgraph_amoy.yaml subgraph_amoy_generated.yaml -diff subgraph_dev2.yaml subgraph_dev2_generated.yaml -diff subgraph_iotex.yaml subgraph_iotext_generated.yaml -diff subgraph_peaq.yaml subgraph_peaq_generated.yaml -diff subgraph_polygon.yaml subgraph_polygon_generated.yaml From 92bf06176c88efadc98680447065a5a1bf42665d Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Thu, 12 Jun 2025 00:12:23 +0300 Subject: [PATCH 12/12] update readme --- packages/network-subgraphs/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/network-subgraphs/README.md b/packages/network-subgraphs/README.md index 933a918aa..17f407e63 100644 --- a/packages/network-subgraphs/README.md +++ b/packages/network-subgraphs/README.md @@ -21,8 +21,7 @@ Troubleshooting tips: ## 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 DEPLOY_KEY` -1. `cp subgraph_matic.yaml subgraph.yaml` -1. `npm run build` (optional) +1. `./build.sh polygon` 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 @@ -30,8 +29,7 @@ Troubleshooting tips: ## Testnet deployment to Studio (indexing Polygon Amoy) 1. Log into: `https://thegraph.com/studio/subgraph/streamr-amoy-testnet/` 1. `npx graph auth --studio ` -1. `cp subgraph_amoy.yaml subgraph.yaml` -1. `npm run build` +1. `./build.sh polygonAmoy` 1. `npx graph deploy --studio streamr-amoy-testnet` 1. Follow progress and look at https://thegraph.com/hosted-service/subgraph/streamr-dev/network?version=pending&selected=logs for errors ``