Skip to content

Commit

Permalink
Update polkadot
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Oct 1, 2023
1 parent 2056b3f commit 4689402
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 53 deletions.
12 changes: 6 additions & 6 deletions Polkadot/Polkadot-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"author": "SubQuery Team",
"license": "MIT",
"devDependencies": {
"@subql/types": "latest",
"@subql/testing": "latest",
"@subql/node": "latest",
"@polkadot/api": "^10",
"typescript": "^4.1.3",
"@subql/cli": "latest"
"@subql/cli": "^3.6.2-11",
"@subql/testing": "latest",
"@subql/types": "latest",
"typescript": "^5.2.2"
},
"resolutions": {
"ipfs-unixfs": "6.0.6"
"ipfs-unixfs": "6.0.6",
"@subql/common": "^3.0.1"
}
}
65 changes: 65 additions & 0 deletions Polkadot/Polkadot-starter/project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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: 'polkadot-starter',
description: 'This project can be used as a starting point for developing your SubQuery project',
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://polkadot.api.onfinality.io/public-ws'
},
dataSources: [
{
kind: SubstrateDatasourceKind.Runtime,
startBlock: 1,
mapping: {
file: './dist/index.js',
handlers: [
/*{
kind: SubstrateHandlerKind.Block,
handler: 'handleBlock',
filter: {}
},*/
/*{
kind: SubstrateHandlerKind.Call,
handler: 'handleCall',
filter: {}
},*/
{
kind: SubstrateHandlerKind.Event,
handler: 'handleEvent',
filter: {
module: 'balances',
method: 'Deposit',
}
}
]
}
}
],
}

export default project;
46 changes: 0 additions & 46 deletions Polkadot/Polkadot-starter/project.yaml

This file was deleted.

6 changes: 5 additions & 1 deletion Polkadot/Polkadot-starter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"target": "es2017",
"strict": true
},
"include": ["src/**/*", "node_modules/@subql/types/dist/global.d.ts"]
"include": [
"src/**/*",
"node_modules/@subql/types-core/dist/global.d.ts",
"node_modules/@subql/types/dist/global.d.ts"
]
}

0 comments on commit 4689402

Please sign in to comment.