-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsubgraph.yaml
59 lines (59 loc) · 2.31 KB
/
subgraph.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
specVersion: 0.0.1
description: A protocol for decentralized exchange of tokenized assets. Find open and filled orders.
repository: https://github.com/graphprotocol/0x-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ExchangeV2
network: mainnet
source:
address: "0x4f833a24e1f95d70f028921e27040ca56e09ab0b" # Mainnet 2.0: 0x4f833a24e1f95d70f028921e27040ca56e09ab0b # Ropsten 2.0 : 0x4530c0483a1633c7a1c97d2c53721caff2caaaaf # Kovan 2.0 0x35dd2932454449b14cee11a94d3674a936d5d7b2
abi: ExchangeV2
mapping:
kind: ethereum/events
apiVersion: 0.0.1
language: wasm/assemblyscript
entities:
- User
- FilledOrder
- CancelledOrder
# - ApprovedProxy
abis:
- name: ExchangeV2
file: ./abis/ExchangeV2.json
eventHandlers:
- event: Fill(address,address,address,address,uint256,uint256,uint256,uint256,bytes32,bytes,bytes) # From MExchangeCore.sol
handler: handleFill
- event: Cancel(address,address,address,bytes32,bytes,bytes) # From MExchangeCore.sol
handler: handleCancel
# - event: CancelUpTo(address,address,uint256) # From MExchangeCore.sol
# handler: handleCancleUpTo
# - event: AssetProxyRegistered(bytes4,address) # From MAssetProxyDispatcher.sol
# handler: handleAssetProxyRegistered
- event: SignatureValidatorApproval(address,address,bool) # From MSignatureValidator.sol
handler: handleSignatureValidatorApproval
file: ./src/mappings/ExchangeV2.ts
- kind: ethereum/contract
name: ExchangeV1
network: mainnet
source:
address: "0x12459c951127e0c374ff9105dda097662a027093" # Mainnet 1.0: 0x12459c951127e0c374ff9105dda097662a027093 # Ropsten 1.0 : 0x479cc461fecd078f766ecc58533d6f69580cf3ac # Kovan 1.0 0x90fe2af704b34e0224bf2299c838e04d4dcf1364
abi: ExchangeV1
mapping:
kind: ethereum/events
apiVersion: 0.0.1
language: wasm/assemblyscript
entities:
- User
- FilledOrder
- CancelledOrder
abis:
- name: ExchangeV1
file: ./abis/ExchangeV1.json
eventHandlers:
- event: LogFill(address,address,address,address,address,uint256,uint256,uint256,uint256,bytes32,bytes32)
handler: handleLogFill
- event: LogCancel(address,address,address,address,uint256,uint256,bytes32,bytes32)
handler: handleLogCancel
file: ./src/mappings/ExchangeV1.ts