-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.ts
62 lines (57 loc) · 1.54 KB
/
project.ts
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
// Copyright 2020-2023 SubQuery Pte Ltd authors & contributors
// SPDX-License-Identifier: GPL-3.0
import {
SubstrateCustomDatasource,
SubstrateDatasourceKind,
SubstrateHandlerKind,
} from '@subql/types';
// import {FileReference} from '@subql/types-core';
const myAssets = new Map<string, any>();
myAssets.set('erc20',{file:'./abis/erc20Metadata.json'})
// user could import FrontierEvmDatasource/wasm etc
const CustomDs: any = {
kind:'substrate/FrontierEvm',
startBlock:1,
assets: myAssets,
processor: {file: '', options:{}},
mapping:{
file:'',
handlers:[{handler:'handleBond',kind:'substrate/BlockHandler'}],
}
}
const project: any = {
version: '1',
name: 'tsProject',
schema: {file:'./schema.graphql'},
specVersion: '1.0.0',
network: {
chainId: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
endpoint: ["wss://polkadot.api.onfinality.io/public-ws", "wss://rpc.polkadot.io"],
dictionary: "https://api.subquery.network/sq/subquery/polkadot-dictionary",
chaintypes: {file: './dist/chaintypes.js'}
},
dataSources:[
{
kind: SubstrateDatasourceKind.Runtime,
startBlock:1,
mapping:{
file: './dist/index.js',
handlers:[{handler:'handleEvent',kind: SubstrateHandlerKind.Event,filter:{
module:'balances',
method:'Transfer'
}}],
}
},
],
runner: {
query:{
name:'@subql/query',
version:'*'
},
node:{
name:'@subql/node',
version:'*'
}},
description:''
}
export default project;