diff --git a/block-timestamp/package.json b/block-timestamp/package.json index 81c568f..619412b 100644 --- a/block-timestamp/package.json +++ b/block-timestamp/package.json @@ -22,6 +22,6 @@ "@polkadot/api": "^4", "@subql/types": "^0.7.1", "typescript": "^4.1.3", - "@subql/cli": "^0.9.3" + "@subql/cli": "^0.13.0" } } diff --git a/block-timestamp/project.yaml b/block-timestamp/project.yaml index 5cd330a..1ac4b36 100644 --- a/block-timestamp/project.yaml +++ b/block-timestamp/project.yaml @@ -1,17 +1,21 @@ -specVersion: "0.0.1" -description: "This subquery indexes timestamp of each block" +specVersion: "0.2.0" + +name: "Subql-block-timestamp" +version: "0.0.0" +description: "Indexes timestamp of each finalized block." repository: "https://github.com/subquery/subql-examples" -schema: "./schema.graphql" +schema: + file: "./schema.graphql" network: + genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" # Polkadot endpoint: "wss://polkadot.api.onfinality.io/public-ws" - dataSources: - - name: runtime - kind: substrate/Runtime + - kind: substrate/Runtime startBlock: 500000 mapping: + file: "./dist/index.js" handlers: - handler: handleTimestampSet kind: substrate/CallHandler diff --git a/entity-relation/package.json b/entity-relation/package.json index 5e911ba..06a1168 100644 --- a/entity-relation/package.json +++ b/entity-relation/package.json @@ -23,6 +23,6 @@ "@polkadot/api": "^4", "@subql/types": "^0.7.1", "typescript": "^4.1.3", - "@subql/cli": "^0.9.3" + "@subql/cli": "^0.13.0" } } diff --git a/entity-relation/project.yaml b/entity-relation/project.yaml index dfe344d..19b0f38 100644 --- a/entity-relation/project.yaml +++ b/entity-relation/project.yaml @@ -1,23 +1,30 @@ -specVersion: 0.0.1 -description: This is an example of using 1-N relations -repository: '' -schema: ./schema.graphql +specVersion: "0.2.0" + +name: "Subql-entityrelation" +version: "0.0.0" +description: "Indexes balance transfers between accounts, also indexes utility batchAll to find out the content of the extrinsic calls." +repository: "https://github.com/subquery/subql-examples" + +schema: + file: "./schema.graphql" + network: - endpoint: 'wss://polkadot.api.onfinality.io/public-ws' + genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" # Polkadot + endpoint: "wss://polkadot.api.onfinality.io/public-ws" dataSources: - - name: main - kind: substrate/Runtime + - kind: substrate/Runtime startBlock: 1 mapping: + file: "./dist/index.js" handlers: + - handler: handleTransfer + kind: substrate/EventHandler + filter: + module: balances + method: Transfer - handler: handleCall kind: substrate/CallHandler filter: module: utility method: batchAll success: true - - handler: handleTransfer - kind: substrate/EventHandler - filter: - module: balances - method: Transfer diff --git a/extrinsic-finalized-block/package.json b/extrinsic-finalized-block/package.json index 6da07db..670c8f4 100644 --- a/extrinsic-finalized-block/package.json +++ b/extrinsic-finalized-block/package.json @@ -22,6 +22,6 @@ "@polkadot/api": "^4", "@subql/types": "^0.7.1", "typescript": "^4.1.3", - "@subql/cli": "^0.9.3" + "@subql/cli": "^0.13.0" } } diff --git a/extrinsic-finalized-block/project.yaml b/extrinsic-finalized-block/project.yaml index eaffa74..021e0a8 100644 --- a/extrinsic-finalized-block/project.yaml +++ b/extrinsic-finalized-block/project.yaml @@ -1,22 +1,18 @@ -specVersion: "0.0.1" -description: "This subquery indexes which block a given extrinsic is finalized in" +specVersion: "0.2.0" +name: "Subql-extrinsic-finalized-block" +version: "0.0.0" +description: "Index extrinsics and so they can be queried by hash." repository: "https://github.com/subquery/subql-examples" - -schema: "./schema.graphql" - +schema: + file: "./schema.graphql" network: + genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" endpoint: "wss://polkadot.api.onfinality.io/public-ws" - dataSources: - - name: runtime - kind: substrate/Runtime + - kind: substrate/Runtime startBlock: 1 mapping: + file: "./dist/index.js" handlers: - handler: handleBlock kind: substrate/BlockHandler - - - - - diff --git a/kitty/package.json b/kitty/package.json index 9fb8c96..97de23c 100644 --- a/kitty/package.json +++ b/kitty/package.json @@ -25,7 +25,7 @@ "@polkadot/api": "4.6.1", "@subql/types": "^0.7.1", "typescript": "^4.1.3", - "@subql/cli": "^0.9.3", + "@subql/cli": "^0.13.0", "@polkadot/typegen": "4.6.1", "ts-node": "^8.6.2" }, diff --git a/kitty/project.yaml b/kitty/project.yaml index 4880d0e..869efb0 100644 --- a/kitty/project.yaml +++ b/kitty/project.yaml @@ -1,10 +1,16 @@ -specVersion: "0.0.1" -description: "This subquery indexes kitty's birth info" +specVersion: "0.2.0" + +name: "Subql-kitty" +version: "0.0.0" +description: "Indexes birthinfo of kitties." repository: "https://github.com/subquery/subql-examples" -schema: "./schema.graphql" +schema: + file: "./schema.graphql" network: + genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3' # Polkadot + # replace this one by user endpoint: "ws://host.docker.internal:9944" types: { "KittyIndex": "u32", @@ -39,10 +45,10 @@ network: } dataSources: - - name: runtime - kind: substrate/Runtime + - kind: substrate/Runtime startBlock: 1 mapping: + file: "./dist/index.js" handlers: - handler: handleKittyCreated kind: substrate/EventHandler diff --git a/sum-reward/package.json b/sum-reward/package.json index f5828cb..ddc7b57 100644 --- a/sum-reward/package.json +++ b/sum-reward/package.json @@ -22,6 +22,6 @@ "@polkadot/api": "^4", "@subql/types": "^0.7.1", "typescript": "^4.1.3", - "@subql/cli": "^0.9.3" + "@subql/cli": "^0.13.0" } } diff --git a/sum-reward/project.yaml b/sum-reward/project.yaml index 5f45d36..aa7a3a5 100644 --- a/sum-reward/project.yaml +++ b/sum-reward/project.yaml @@ -1,17 +1,21 @@ -specVersion: "0.0.1" -description: "This subquery indexes bond,reward and slash of each block, summarize total earning of an account" +specVersion: "0.2.0" + +name: "Subql-sum-reward" +version: "0.0.0" +description: "Indexes staking bond, reward and slash from events of finalized block." repository: "https://github.com/subquery/subql-examples" -schema: "./schema.graphql" +schema: + file: "./schema.graphql" network: endpoint: "wss://polkadot.api.onfinality.io/public-ws" - + genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" # Polkadot dataSources: - - name: runtime - kind: substrate/Runtime + - kind: substrate/Runtime startBlock: 1 mapping: + file: "./dist/index.js" handlers: - handler: handleBond kind: substrate/EventHandler @@ -57,4 +61,4 @@ dataSources: kind: substrate/EventHandler filter: module: staking - method: Slashed \ No newline at end of file + method: Slashed diff --git a/validator-threshold/package.json b/validator-threshold/package.json index 76b15c0..cc1996f 100644 --- a/validator-threshold/package.json +++ b/validator-threshold/package.json @@ -22,6 +22,6 @@ "@polkadot/api": "^4", "@subql/types": "^0.7.1", "typescript": "^4.1.3", - "@subql/cli": "^0.9.3" + "@subql/cli": "^0.13.0" } } diff --git a/validator-threshold/project.yaml b/validator-threshold/project.yaml index 3b49f1a..b3c0650 100644 --- a/validator-threshold/project.yaml +++ b/validator-threshold/project.yaml @@ -1,18 +1,22 @@ -specVersion: "0.0.1" -description: "This subquery indexes bond,reward and slash of each block, summarize total earning of an account" +specVersion: "0.2.0" + +name: "Subql-validator-threshold" +version: "0.0.0" +description: "Indexes the least staking amount required for a validator to be elected." repository: "https://github.com/subquery/subql-examples" -schema: "./schema.graphql" +schema: + file: "./schema.graphql" network: + genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" # Polkadot endpoint: "wss://polkadot.api.onfinality.io/public-ws" dataSources: - - name: runtime - kind: substrate/Runtime - # for kusama startBlock: 1445458 + - kind: substrate/Runtime startBlock: 1 mapping: + file: "./dist/index.js" handlers: - handler: handleBlock kind: substrate/EventHandler