2019-10-24 15:33:37 +00:00
|
|
|
specVersion: 0.0.2
|
2019-07-03 14:19:54 +00:00
|
|
|
schema:
|
|
|
|
file: ./schema.graphql
|
|
|
|
dataSources:
|
2019-08-15 02:44:49 +00:00
|
|
|
# This approach uses a particular event emitted once very early to trigger token registry
|
|
|
|
# initialization. It is not so important what the event is but rather that it was emitted before
|
|
|
|
# any other event of an ERC20 token. We even don't know what contract it is. Besides that, the ABI
|
|
|
|
# file for that contract was inferred since no contract information or source code is available
|
|
|
|
# out there.
|
2019-07-03 14:19:54 +00:00
|
|
|
- name: TokenRegistry
|
|
|
|
kind: ethereum/contract
|
|
|
|
network: mainnet
|
|
|
|
source:
|
|
|
|
abi: TokenRegistry
|
2019-07-17 02:36:40 +00:00
|
|
|
address: '0x7f751820be4b1e44464268c425af6095995e045a'
|
2019-12-04 16:42:47 +00:00
|
|
|
startBlock: 75563
|
2019-07-03 14:19:54 +00:00
|
|
|
mapping:
|
|
|
|
kind: ethereum/events
|
|
|
|
apiVersion: 0.0.3
|
|
|
|
language: wasm/assemblyscript
|
|
|
|
file: ./src/mappings/registry.ts
|
|
|
|
entities:
|
|
|
|
- Token
|
|
|
|
abis:
|
|
|
|
- name: TokenRegistry
|
|
|
|
file: ./abis/TokenRegistry.json
|
2019-12-06 17:32:19 +00:00
|
|
|
- name: ERC20
|
|
|
|
file: ./abis/ERC20.json
|
2019-07-12 13:42:25 +00:00
|
|
|
eventHandlers:
|
|
|
|
- event: 'Unknown(indexed bytes,indexed bytes)'
|
|
|
|
topic0: '0xa9e319c3b10db96c5cee4bc3ebffa9c5581f222f14a4deb0df7ec2088ccd0974'
|
|
|
|
handler: initRegistry
|
2019-10-24 15:33:37 +00:00
|
|
|
templates:
|
|
|
|
# These data sources templates exist to support the different flags that a token could specify
|
|
|
|
- name: StandardToken
|
|
|
|
kind: ethereum/contract
|
|
|
|
network: mainnet
|
|
|
|
source:
|
|
|
|
abi: ERC20
|
|
|
|
mapping:
|
|
|
|
kind: ethereum/events
|
|
|
|
apiVersion: 0.0.3
|
|
|
|
language: wasm/assemblyscript
|
|
|
|
file: ./src/mappings/token.ts
|
|
|
|
entities:
|
|
|
|
- TransferEvent
|
|
|
|
abis:
|
|
|
|
- name: ERC20
|
|
|
|
file: ./abis/ERC20.json
|
|
|
|
eventHandlers:
|
|
|
|
- event: Transfer(indexed address,indexed address,uint256)
|
|
|
|
handler: handleTransfer
|
|
|
|
- name: BurnableToken
|
|
|
|
kind: ethereum/contract
|
|
|
|
network: mainnet
|
|
|
|
source:
|
|
|
|
abi: Burnable
|
|
|
|
mapping:
|
|
|
|
kind: ethereum/events
|
|
|
|
apiVersion: 0.0.3
|
|
|
|
language: wasm/assemblyscript
|
|
|
|
file: ./src/mappings/token.ts
|
|
|
|
entities:
|
|
|
|
- BurnEvent
|
|
|
|
abis:
|
|
|
|
- name: Burnable
|
|
|
|
file: ./abis/Burnable.json
|
|
|
|
eventHandlers:
|
|
|
|
- event: Burn(indexed address,uint256)
|
|
|
|
handler: handleBurn
|
|
|
|
- name: MintableToken
|
|
|
|
kind: ethereum/contract
|
|
|
|
network: mainnet
|
|
|
|
source:
|
|
|
|
abi: Mintable
|
|
|
|
mapping:
|
|
|
|
kind: ethereum/events
|
|
|
|
apiVersion: 0.0.3
|
|
|
|
language: wasm/assemblyscript
|
|
|
|
file: ./src/mappings/token.ts
|
|
|
|
entities:
|
|
|
|
- MintEvent
|
|
|
|
abis:
|
|
|
|
- name: Mintable
|
|
|
|
file: ./abis/Mintable.json
|
|
|
|
eventHandlers:
|
|
|
|
- event: Mint(indexed address,uint256)
|
|
|
|
handler: handleMint
|
2020-03-26 19:05:16 +00:00
|
|
|
- name: PausableToken
|
|
|
|
kind: ethereum/contract
|
|
|
|
network: mainnet
|
|
|
|
source:
|
|
|
|
abi: Pausable
|
|
|
|
mapping:
|
|
|
|
kind: ethereum/events
|
|
|
|
apiVersion: 0.0.3
|
|
|
|
language: wasm/assemblyscript
|
|
|
|
file: ./src/mappings/token.ts
|
|
|
|
entities:
|
|
|
|
- Token
|
|
|
|
abis:
|
|
|
|
- name: Pausable
|
|
|
|
file: ./abis/Pausable.json
|
|
|
|
eventHandlers:
|
|
|
|
- event: Pause()
|
|
|
|
handler: handlePause
|
|
|
|
- event: Unpause()
|
|
|
|
handler: handleUnpause
|
|
|
|
- event: Paused(address)
|
|
|
|
handler: handlePaused
|
|
|
|
- event: Unpaused(address)
|
|
|
|
handler: handleUnpaused
|