-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.ts
134 lines (132 loc) · 3.62 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import {
CosmosDatasourceKind,
CosmosHandlerKind,
CosmosProject,
} from "@subql/types-cosmos";
// Can expand the Datasource processor types via the genreic param
const project: CosmosProject = {
specVersion: "1.0.0",
version: "0.0.1",
name: "bitsong-bs721-base",
description:
"",
runner: {
node: {
name: "@subql/node-cosmos",
version: ">=3.0.0",
},
query: {
name: "@subql/query",
version: "*",
},
},
schema: {
file: "./schema.graphql",
},
network: {
/* The unique chainID of the Cosmos Zone */
chainId: "bitsong-2b",
/**
* These endpoint(s) should be public non-pruned archive node
* We recommend providing more than one endpoint for improved reliability, performance, and uptime
* Public nodes may be rate limited, which can affect indexing speed
* When developing your project we suggest getting a private API key
* If you use a rate limited endpoint, adjust the --batch-size and --workers parameters
* These settings can be found in your docker-compose.yaml, they will slow indexing but prevent your project being rate limited
*/
endpoint: ["https://rpc.explorebitsong.com"],
chaintypes: new Map([
[
"cosmos.base.v1beta1",
{
file: "./proto/cosmos/cosmos.base.v1beta1.coin.proto",
messages: ["Coin"]
}
],
[
"bitsong.fantoken",
{
file: "./proto/bitsong/fantoken/v1beta1/tx.proto",
messages: ["MsgIssue", "MsgDisableMint", "MsgMint", "MsgBurn", "MsgSetMinter", "MsgSetAuthority", "MsgSetUri"]
}
],
[
"bitsong.fantoken.v1beta1",
{
file: "./proto/bitsong/fantoken/v1beta1/events.proto",
messages: ["EventIssue", "EventDisableMint", "EventMint", "EventBurn", "EventSetAuthority", "EventSetMinter", "EventSetUri"]
}
],
[
"bitsong.merkledrop.v1beta1",
{
file: "./proto/bitsong/merkledrop/v1beta1/events.proto",
messages: ["EventCreate", "EventClaim", "EventWithdraw"]
}
]
])
},
dataSources: [
{
kind: CosmosDatasourceKind.Runtime,
startBlock: 14963829, // Studio genesis block
mapping: {
file: "./dist/index.js",
handlers: [
{
handler: "handleInstantiate",
kind: CosmosHandlerKind.Event,
filter: {
type: "instantiate",
attributes: {
code_id: "1", // bs721-base store code_id
},
},
},
{
handler: "handleMint",
kind: CosmosHandlerKind.Event,
filter: {
type: "wasm",
attributes: {
action: "mint",
},
},
},
{
handler: "handleBurn",
kind: CosmosHandlerKind.Event,
filter: {
type: "wasm",
attributes: {
action: "burn",
},
},
},
{
handler: "handleTransfer",
kind: CosmosHandlerKind.Event,
filter: {
type: "wasm",
attributes: {
action: "transfer_nft",
},
},
},
{
handler: "handleTransfer",
kind: CosmosHandlerKind.Event,
filter: {
type: "wasm",
attributes: {
action: "send_nft",
},
},
},
],
},
},
],
};
// Must set default to the project instance
export default project;