Skip to content

Commit

Permalink
resort project.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
bz888 committed Oct 11, 2023
1 parent d2868e9 commit c127241
Show file tree
Hide file tree
Showing 108 changed files with 4,375 additions and 2,723 deletions.
83 changes: 83 additions & 0 deletions Acala/acala-evm-starter/project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import {
SubstrateDatasourceKind,
SubstrateHandlerKind,
SubstrateProject,
} from "@subql/types";

import { AcalaEvmDatasource } from '@subql/acala-evm-processor';

// Can expand the Datasource processor types via the genreic param
const project: SubstrateProject<AcalaEvmDatasource> = {
specVersion: "1.0.0",
version: "0.0.1",
name: "acala-evm-starter",
description:
"A basic Acala EVM example",
runner: {
node: {
name: "@subql/node",
version: ">=3.0.1",
},
query: {
name: "@subql/query",
version: "*",
},
},
schema: {
file: "./schema.graphql",
},
network: {
/* The genesis hash of the network (hash of block 0) */
chainId:
"0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c",
/**
* This endpoint must be a public non-pruned archive node
* Public nodes may be rate limited, which can affect indexing speed
* When developing your project we suggest getting a private API key
* You can get them from OnFinality for free https://app.onfinality.io
* https://documentation.onfinality.io/support/the-enhanced-api-service
*/
endpoint: [
"wss://acala-polkadot.api.onfinality.io/public-ws",
"wss://acala-rpc-0.aca-api.network",
],
dictionary: 'https://explorer.subquery.network/subquery/subquery/acala-dictionary',
},
dataSources: [
{
kind: 'substrate/AcalaEvm',
startBlock: 1000000,
processor: {
file: './node_modules/@subql/acala-evm-processor/dist/bundle.js',
options: {
abi: 'erc20',
address: "0x0000000000000000000100000000000000000000" // ACA Token https://blockscout.acala.network/address/0x0000000000000000000100000000000000000000
}
},
assets: new Map([['erc20', { file: './erc20.abi.json' }]]),
mapping: {
file: './dist/index.js',
handlers: [
{
handler: 'handleAcalaEvmEvent',
kind: 'substrate/AcalaEvmEvent',
filter: {
topics: [
'Transfer(address indexed from,address indexed to,uint256 value)'
]
}
},
{
handler: 'handleAcalaEvmCall',
kind: 'substrate/AcalaEvmCall',
filter: {
function: 'approve(address to,uint256 value)'
}
}
]
},
},
],
};

export default project;
57 changes: 0 additions & 57 deletions Acala/acala-evm-starter/project.yaml

This file was deleted.

82 changes: 82 additions & 0 deletions Acala/acala-starter/project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import {
SubstrateDatasourceKind,
SubstrateHandlerKind,
SubstrateProject,
} from "@subql/types";

// Can expand the Datasource processor types via the genreic param
const project: SubstrateProject = {
specVersion: "1.0.0",
version: "0.0.1",
name: "acala-starter",
description:
"This project can be used as a starting point for developing your SubQuery project. It indexes all transfers on Acala network",
runner: {
node: {
name: "@subql/node",
version: ">=3.0.1",
},
query: {
name: "@subql/query",
version: "*",
},
},
schema: {
file: "./schema.graphql",
},
network: {
/* The genesis hash of the network (hash of block 0) */
chainId:
"0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",
/**
* This endpoint must be a public non-pruned archive node
* Public nodes may be rate limited, which can affect indexing speed
* When developing your project we suggest getting a private API key
* You can get them from OnFinality for free https://app.onfinality.io
* https://documentation.onfinality.io/support/the-enhanced-api-service
*/
endpoint: [
"wss://acala-polkadot.api.onfinality.io/public-ws",
"wss://acala-rpc-0.aca-api.network",
],
dictionary: 'https://api.subquery.network/sq/subquery/acala-dictionary',
chaintypes: {
file: './dist/chaintypes.js',
}
},
dataSources: [
{
kind: SubstrateDatasourceKind.Runtime,
startBlock: 1,
mapping: {
file: "./dist/index.js",
handlers: [
/*{
kind: SubstrateHandlerKind.Block,
handler: "handleBlock",
filter: {
modulo: 100,
},
},*/
/*{
kind: SubstrateHandlerKind.Call,
handler: "handleCall",
filter: {
module: "balances",
},
},*/
{
kind: SubstrateHandlerKind.Event,
handler: "handleEvent",
filter: {
module: "balances",
method: "Transfer",
},
},
],
},
},
],
};

export default project;
51 changes: 0 additions & 51 deletions Acala/acala-starter/project.yaml

This file was deleted.

81 changes: 81 additions & 0 deletions Ajuna/ajuna-starter/project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import {
SubstrateDatasourceKind,
SubstrateHandlerKind,
SubstrateProject,
} from "@subql/types";

// Can expand the Datasource processor types via the genreic param
const project: SubstrateProject = {
specVersion: "1.0.0",
version: "0.0.1",
name: "ajuna-starter",
description:
"This project can be used as a starting point for developing your SubQuery project. It indexes all transfers on Ajuna network",
runner: {
node: {
name: "@subql/node",
version: ">=3.0.1",
},
query: {
name: "@subql/query",
version: "*",
},
},
schema: {
file: "./schema.graphql",
},
network: {
/* The genesis hash of the network (hash of block 0) */
chainId:
"0xe358eb1d11b31255a286c12e44fe6780b7edb171d657905a97e39f71d9c6c3ee",
/**
* This endpoint must be a public non-pruned archive node
* Public nodes may be rate limited, which can affect indexing speed
* When developing your project we suggest getting a private API key
* You can get them from OnFinality for free https://app.onfinality.io
* https://documentation.onfinality.io/support/the-enhanced-api-service
*/
endpoint: [
"wss://ajuna.api.onfinality.io/public-ws",
"wss://rpc-parachain.ajuna.network",
],
chaintypes: {
file: './dist/chaintypes.js'
}
},
dataSources: [
{
kind: SubstrateDatasourceKind.Runtime,
startBlock: 1,
mapping: {
file: "./dist/index.js",
handlers: [
/*{
kind: SubstrateHandlerKind.Block,
handler: "handleBlock",
filter: {
modulo: 100,
},
},*/
/*{
kind: SubstrateHandlerKind.Call,
handler: "handleCall",
filter: {
module: "balances",
},
},*/
{
kind: SubstrateHandlerKind.Event,
handler: "handleEvent",
filter: {
module: "balances",
method: "Transfer",
},
},
],
},
},
],
};

export default project;
Loading

0 comments on commit c127241

Please sign in to comment.