-
Notifications
You must be signed in to change notification settings - Fork 57
/
subgraph.yaml
67 lines (66 loc) · 2.14 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
60
61
62
63
64
65
66
67
specVersion: 0.0.2
description: Uniswap is a decentralized protocol for automated token exchange on Ethereum.
repository: https://github.com/graphprotocol/uniswap-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Factory
network: mainnet
source:
address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95'
abi: Factory
startBlock: 6627917
mapping:
kind: ethereum/events
apiVersion: 0.0.3
language: wasm/assemblyscript
file: ./src/mappings/factory.ts
entities:
- Exchange
abis:
- name: Factory
file: ./abis/factory.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20SymbolBytes
file: ./abis/ERC20SymbolBytes.json
- name: ERC20NameBytes
file: ./abis/ERC20NameBytes.json
eventHandlers:
- event: NewExchange(indexed address,indexed address)
handler: handleNewExchange
templates:
# These data sources templates exist to support the different flags that a token could specify- kind: ethereum/contract
- kind: ethereum/contract
name: Exchange
network: mainnet
source:
abi: Exchange
mapping:
kind: ethereum/events
apiVersion: 0.0.3
language: wasm/assemblyscript
file: ./src/mappings/exchange.ts
entities:
- Exchange
- Uniswap
- User
- UserExchangeData
- Transaction
- UniswapDayData
- UniswapHistoricalData
abis:
- name: Exchange
file: ./abis/exchange.json
eventHandlers:
- event: TokenPurchase(indexed address,indexed uint256,indexed uint256)
handler: handleTokenPurchase
- event: EthPurchase(indexed address,indexed uint256,indexed uint256)
handler: handleEthPurchase
- event: AddLiquidity(indexed address,indexed uint256,indexed uint256)
handler: handleAddLiquidity
- event: RemoveLiquidity(indexed address,indexed uint256,indexed uint256)
handler: handleRemoveLiquidity
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer