-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.ts
62 lines (58 loc) · 1.41 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
import {
NearDatasourceKind,
NearHandlerKind,
NearProject,
} from '@subql/types-near'
import { PUBLIC_NEAR_RPC_ENDPOINTS } from './config'
import * as dotenv from 'dotenv'
import path from 'path'
// Load the appropriate .env file
const dotenvPath = path.resolve(__dirname, `.env`)
dotenv.config({ path: dotenvPath })
const project: NearProject = {
specVersion: '1.0.0',
name: 'sourcescan-subql',
version: '0.0.1',
runner: {
node: {
name: '@subql/node-near',
version: '*',
},
query: {
name: '@subql/query',
version: '*',
},
},
description: 'NEAR indexer for DeployContract actions',
repository: 'https://github.com/SourceScan/sourcescan-subql',
schema: {
file: './schema.graphql',
},
network: {
chainId: process.env.CHAIN_ID!,
dictionary: 'https://api.subquery.network/sq/subquery/near-dictionary',
endpoint: PUBLIC_NEAR_RPC_ENDPOINTS.concat(
JSON.parse(process.env.PRIVATE_ENDPOINTS!)
),
bypassBlocks: [81003306],
},
dataSources: [
{
kind: NearDatasourceKind.Runtime,
startBlock: parseInt(process.env.START_BLOCK!),
mapping: {
file: './dist/index.js',
handlers: [
{
handler: 'handleAction',
kind: NearHandlerKind.Action,
filter: {
type: 'DeployContract',
},
},
],
},
},
],
}
export default project