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/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 `` 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 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-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 + } + } + } +} diff --git a/packages/network-subgraphs/subgraph_dev2.yaml b/packages/network-subgraphs/subgraph.yaml.hbs similarity index 87% rename from packages/network-subgraphs/subgraph_dev2.yaml rename to packages/network-subgraphs/subgraph.yaml.hbs index 4c20a9888..63f996e25 100644 --- a/packages/network-subgraphs/subgraph_dev2.yaml +++ b/packages/network-subgraphs/subgraph.yaml.hbs @@ -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 @@ -8,11 +8,11 @@ features: dataSources: - kind: ethereum/contract name: StreamRegistry - network: dev2 + network: {{networkId}} source: - address: "0x18E0937099660B82464475Ea2B7e6Af4f2BFE5F0" + address: '{{contracts.StreamRegistry.address}}' abi: StreamRegistry - startBlock: 0 + startBlock: {{contracts.StreamRegistry.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -37,11 +37,11 @@ dataSources: file: ./src/streamRegistry.ts - kind: ethereum/contract name: NodeRegistry - network: dev2 + network: {{networkId}} source: - address: "0x338090C5492C5c5E41a4458f5FC4b205cbc54A24" + address: '{{contracts.StorageNodeRegistry.address}}' abi: NodeRegistry - startBlock: 0 + startBlock: {{contracts.StorageNodeRegistry.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -59,11 +59,11 @@ dataSources: file: ./src/nodeRegistry.ts - kind: ethereum/contract name: StreamStorageRegistry - network: dev2 + network: {{networkId}} source: - address: "0xB73189CeBCc870bE6f9aa16764bbB3665e4B49B6" + address: '{{contracts.StreamStorageRegistry.address}}' abi: StreamStorageRegistry - startBlock: 0 + startBlock: {{contracts.StreamStorageRegistry.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -79,13 +79,14 @@ dataSources: - event: Removed(string,indexed address) handler: handleStorageNodeRemovedFromStream file: ./src/streamStorageRegistry.ts +{{#if hubContracts}} - kind: ethereum/contract name: ProjectRegistryV1 - network: dev2 + network: {{networkId}} source: - address: "0xA9166376706611110f814D1333b8E80FEc5d8f10" + address: '{{contracts.ProjectRegistryV1.address}}' abi: ProjectRegistryV1 - startBlock: 0 + startBlock: {{contracts.ProjectRegistryV1.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -116,11 +117,11 @@ dataSources: file: ./src/projectRegistry.ts - kind: ethereum/contract name: MarketplaceV4 - network: dev2 + network: {{networkId}} source: - address: "0xb8678223183d560280a7BEF68daAbB0E3daBd97D" + address: '{{contracts.MarketplaceV4.address}}' abi: MarketplaceV4 - startBlock: 0 + startBlock: {{contracts.MarketplaceV4.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -137,11 +138,11 @@ dataSources: file: ./src/marketplaceV4.ts - kind: ethereum/contract name: ProjectStakingV1 - network: dev2 + network: {{networkId}} source: - address: "0x73a9310C43621B853C508902bb8c1DA8f1240EaE" + address: '{{contracts.ProjectStakingV1.address}}' abi: ProjectStakingV1 - startBlock: 0 + startBlock: {{contracts.ProjectStakingV1.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -161,13 +162,14 @@ dataSources: - event: Unstake(indexed bytes32,indexed address,uint256,uint256) handler: handleUnstake file: ./src/projectStaking.ts +{{/if}} - kind: ethereum/contract name: StreamrConfig - network: dev2 + network: {{networkId}} source: - address: '0x00E680d549FE53a627a3db86a6F88fA2471CFfAa' + address: '{{contracts.StreamrConfig.address}}' abi: StreamrConfig - startBlock: 0 + startBlock: {{contracts.StreamrConfig.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -183,11 +185,11 @@ dataSources: handler: handleConfigChanged - kind: ethereum/contract name: SponsorshipFactory - network: dev2 + network: {{networkId}} source: - address: '0x699B4bE95614f017Bb622e427d3232837Cc814E6' + address: '{{contracts.SponsorshipFactory.address}}' abi: SponsorshipFactory - startBlock: 0 + startBlock: {{contracts.SponsorshipFactory.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -207,11 +209,11 @@ dataSources: handler: handleNewSponsorship - kind: ethereum/contract name: OperatorFactory - network: dev2 + network: {{networkId}} source: - address: '0xD13D34d37e2c94cb35EA8D5DE7498Cb7830d26e0' + address: '{{contracts.OperatorFactory.address}}' abi: OperatorFactory - startBlock: 0 + startBlock: {{contracts.OperatorFactory.startBlock}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -234,7 +236,7 @@ dataSources: templates: - name: Sponsorship kind: ethereum/contract - network: dev2 + network: {{networkId}} source: abi: Sponsorship mapping: @@ -276,7 +278,7 @@ templates: handler: handleSponsorshipReceived - name: Operator kind: ethereum/contract - network: dev2 + network: {{networkId}} source: abi: Operator mapping: diff --git a/packages/network-subgraphs/subgraph_amoy.yaml b/packages/network-subgraphs/subgraph_amoy.yaml deleted file mode 100644 index edec95292..000000000 --- a/packages/network-subgraphs/subgraph_amoy.yaml +++ /dev/null @@ -1,328 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry -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: - # 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 - 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: - # 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 - 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_iotex.yaml b/packages/network-subgraphs/subgraph_iotex.yaml deleted file mode 100644 index fcf55aff2..000000000 --- a/packages/network-subgraphs/subgraph_iotex.yaml +++ /dev/null @@ -1,246 +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: - # 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 - 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: - # 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 - 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 30cf3aa1a..000000000 --- a/packages/network-subgraphs/subgraph_peaq.yaml +++ /dev/null @@ -1,326 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry -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 0c463cc37..000000000 --- a/packages/network-subgraphs/subgraph_polygon.yaml +++ /dev/null @@ -1,326 +0,0 @@ -specVersion: 0.0.4 -description: Subgraph definitions for the stream permission registry -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