yaml 定義
specVersion: 0.0.4
description: test
repository: https://github.com/graphprotocol/example-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Apple
network: mainnet
source:
address: '0x2E6454222354BB4F5c8a05B3b30A929361cf77eC'
abi: Apple
startBlock: 222
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Apple
abis:
- name: Apple
file: ./abis/Apple.json
eventHandlers:
- event: NewApple(uint256,address,string,string)
handler: handleNewApple
- event: UpdatedApple(uint256,address,string,string)
handler: handleUpdatedApple
callHandlers:
- function: createApple(string,string)
handler: handleCreateApple
blockHandlers:
- handler: handleBlock
- handler: handleBlockWithCall
filter:
kind: call
file: ./src/mapping.tsLast updated