Last active
February 22, 2022 20:27
-
-
Save stwiname/3ef61bd44514b5e14469fcdc12d6be84 to your computer and use it in GitHub Desktop.
Example EVM with multiple ABIs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
specVersion: 0.2.0 | |
name: zoombies-subquery | |
version: 1.0.0 | |
description: Zoom Token mint, burn and approvals, Zoombies NFT events on Moonriver | |
repository: https://github.com/ryanprice/zoombies-subquery | |
schema: | |
file: ./schema.graphql | |
network: | |
genesisHash: '0x401a1f9dca3da46f5c4091016c8a2f26dcea05865116b286f60f668207d1474b' # Genesis hash of Moonriver | |
endpoint: wss://moonriver.api.onfinality.io/public-ws | |
dictionary: 'https://api.subquery.network/sq/subquery/moonriver-dictionary' | |
chaintypes: | |
file: "./types.yaml" | |
dataSources: | |
- kind: substrate/Moonbeam | |
startBlock: 442090 | |
processor: | |
file: './node_modules/@subql/contract-processors/dist/moonbeam.js' | |
options: | |
# Must be a key of assets | |
abi: "erc20" | |
address: "0x8bd5180Ccdd7AE4aF832c8C03e21Ce8484A128d4" | |
assets: {"erc20":"./erc20.abi.json","erc721":"./zoombies.json"} | |
mapping: | |
file: './dist/index.js' | |
handlers: | |
# ERC20 handlers go here | |
# LogCardTypeLoaded(uint32 indexed cardTypeId, string cardName, uint editionTotal) | |
- handler: handleLogCardTypeLoadedEvent | |
kind: substrate/MoonbeamEvent | |
filter: | |
topics: | |
- LogCardTypeLoaded(uint32 indexed cardTypeId, string cardName, uint editionTotal) | |
- kind: substrate/Moonbeam | |
startBlock: 442090 | |
processor: | |
file: './node_modules/@subql/contract-processors/dist/moonbeam.js' | |
options: | |
# Must be a key of assets | |
abi: erc721 | |
address: "0x08716e418e68564c96b68192e985762740728018" | |
assets: {"erc20":"./erc20.abi.json","erc721":"./zoombies.json"} | |
mapping: | |
file: './dist/index.js' | |
handlers: | |
# ERC721 handlers go here | |
# Transfer(address indexed from, address indexed to, uint256 indexed tokenId) | |
- handler: handleTransferEvent | |
kind: substrate/MoonbeamEvent | |
filter: | |
topics: | |
- Transfer(address indexed from, address indexed to, uint256 indexed tokenId) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment