Skip to content

Commit

Permalink
add subgraph c13
Browse files Browse the repository at this point in the history
  • Loading branch information
gfournieriExec committed Jun 18, 2024
1 parent c319e69 commit d75d429
Show file tree
Hide file tree
Showing 2 changed files with 222 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Jenkinsfile_Subgraph_c13
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
deploySubGraph(
targetRemoteHost : 'services.c13.az2.internal',
subgraphFolder: './',
subgraphFilename: 'subgraph.bellecour.yaml',
subgraphFilename: 'subgraph.c13.yaml',
subgraphVersionLabel: 'v1.0.0-rc.1',
subgraphLabel: 'c13/poco-v5'
)
221 changes: 221 additions & 0 deletions subgraph.c13.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
# Copyright 2024 IEXEC BLOCKCHAIN TECH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

specVersion: 0.0.4
description: iExecPoCoV5
repository: https://github.com/iExecBlockchainComputing/PoCo-subgraph
schema:
file: ./schema.graphql
dataSources:
- name: ERC1538
kind: ethereum/contract
network: c13
source:
address: "0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f"
abi: ERC1538
startBlock: 4543300
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- ERC1538Module
- ERC1538Function
- ERC1538FunctionUpdateEvent
- ERC1538CommitMessageEvent
abis:
- name: ERC1538
file: node_modules/@iexec/solidity/build/contracts/IERC1538.json
eventHandlers:
- event: CommitMessage(string)
handler: handleCommitMessage
- event: FunctionUpdate(indexed bytes4,indexed address,indexed address,string)
handler: handleFunctionUpdate
file: ./src/ERC1538/ERC1538.ts

- name: Core
kind: ethereum/contract
network: c13
source:
address: "0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f"
abi: IexecInterfaceToken
startBlock: 4543300
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Category
- Account
- AppOrder
- DatasetOrder
- WorkerpoolOrder
- RequesterOrder
- Deal
- SchedulerNotice
- Task
- Contribution
- TaskInitialize
- TaskContribute
- TaskConsensus
- TaskReveal
- TaskReopen
- TaskFinalize
- TaskClaimed
- AccurateContribution
- FaultyContribution
- Transfer
- Reward
- Seize
- Lock
- Unlock
abis:
- name: IexecInterfaceToken
file: node_modules/@iexec/poco/build/contracts/IexecInterfaceNative.json
eventHandlers:
- event: CreateCategory(uint256,string,string,uint256)
handler: handleCreateCategory
- event: OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)
handler: handleOrdersMatched
- event: SchedulerNotice(indexed address,bytes32)
handler: handleSchedulerNotice
- event: TaskInitialize(indexed bytes32,indexed address)
handler: handleTaskInitialize
- event: TaskContribute(indexed bytes32,indexed address,bytes32)
handler: handleTaskContribute
- event: TaskConsensus(indexed bytes32,bytes32)
handler: handleTaskConsensus
- event: TaskReveal(indexed bytes32,indexed address,bytes32)
handler: handleTaskReveal
- event: TaskReopen(indexed bytes32)
handler: handleTaskReopen
- event: TaskFinalize(indexed bytes32,bytes)
handler: handleTaskFinalize
- event: TaskClaimed(indexed bytes32)
handler: handleTaskClaimed
- event: AccurateContribution(indexed address,indexed bytes32)
handler: handleAccurateContribution
- event: FaultyContribution(indexed address,indexed bytes32)
handler: handleFaultyContribution
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: Reward(address,uint256,bytes32)
handler: handleReward
- event: Seize(address,uint256,bytes32)
handler: handleSeize
- event: Lock(address,uint256)
handler: handleLock
- event: Unlock(address,uint256)
handler: handleUnlock
callHandlers:
- function: matchOrders((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,uint256,uint256,address,address,address,bytes32,bytes),(address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes))
handler: handleMatchOrders
file: ./src/Modules/index.ts

# =============================== App registry ================================
- name: AppRegistry
kind: ethereum/contract
network: c13
source:
address: "0xB1C52075b276f87b1834919167312221d50c9D16"
abi: AppRegistry
startBlock: 4543300
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- App
- AppTransfer
abis:
- name: App
file: node_modules/@iexec/poco/build/contracts/App.json
- name: AppRegistry
file: node_modules/@iexec/poco/build/contracts/AppRegistry.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferApp
file: ./src/Registries/index.ts

# ============================= Dataset registry ==============================
- name: DatasetRegistry
kind: ethereum/contract
network: c13
source:
address: "0x799DAa22654128d0C64d5b79eac9283008158730"
abi: DatasetRegistry
startBlock: 4543300
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Dataset
- DatasetTransfer
abis:
- name: Dataset
file: node_modules/@iexec/poco/build/contracts/Dataset.json
- name: DatasetRegistry
file: node_modules/@iexec/poco/build/contracts/DatasetRegistry.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferDataset
file: ./src/Registries/index.ts

# ============================ Workerpool registry ============================
- name: WorkerpoolRegistry
kind: ethereum/contract
network: c13
source:
address: "0xC76A18c78B7e530A165c5683CB1aB134E21938B4"
abi: WorkerpoolRegistry
startBlock: 4543300
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Workerpool
- WorkerpoolTransfer
abis:
- name: Workerpool
file: node_modules/@iexec/poco/build/contracts/Workerpool.json
- name: WorkerpoolRegistry
file: node_modules/@iexec/poco/build/contracts/WorkerpoolRegistry.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferWorkerpool
file: ./src/Registries/index.ts

# ============================ Workerpool template ============================
templates:
- name: Workerpool
kind: ethereum/contract
network: c13
source:
abi: Workerpool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Workerpool
- PolicyChange
abis:
- name: Workerpool
file: node_modules/@iexec/poco/build/contracts/Workerpool.json
eventHandlers:
- event: PolicyUpdate(uint256,uint256,uint256,uint256)
handler: handlePolicyUpdate
file: ./src/Registries/index.ts

0 comments on commit d75d429

Please sign in to comment.