Skip to content

Commit

Permalink
feat: adding new networks for #2392 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanLav authored Oct 16, 2024
1 parent 6f00615 commit 9f924d4
Show file tree
Hide file tree
Showing 8 changed files with 374 additions and 1 deletion.
65 changes: 65 additions & 0 deletions aleph-zero.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
specVersion: 1.0.0
name: subquery-proxy-polkadot
version: 1.0.0
runner:
node:
name: "@subql/node"
version: "*"
query:
name: "@subql/query"
version: v1.5.0
description: Nova SubQuery project
repository: https://github.com/nova-wallet/subquery-proxy
schema:
file: ./schema.graphql
network:
chainId: "0x70255b4d28de0fc4e1a193d7e175ad1ccef431598211c55538f1018651a0344e"
endpoint: >-
wss://ws.azero.dev
chaintypes:
file: ./dist/alephZeroChaintypes.js
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: PureCreated
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: AnonymousCreated
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: approveAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: cancelAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMultiThreshold1
success: true
isSigned: true
22 changes: 22 additions & 0 deletions chainTypes/alephZeroChaintypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2017-2023 @polkadot/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0

/* eslint-disable sort-keys */

import type { OverrideBundleDefinition } from "@polkadot/types/types";

// structs need to be in order
/* eslint-disable sort-keys */

const definitions: OverrideBundleDefinition = {
types: [
{
minmax: [3, undefined],
types: {
DispatchErrorModule: "DispatchErrorModuleU8",
},
},
],
};

export default { typesBundle: { spec: { "aleph-node": definitions } } };
30 changes: 30 additions & 0 deletions chainTypes/kusamaAssetHubChaintypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { OverrideBundleDefinition } from "@polkadot/types/types";

const definitions: OverrideBundleDefinition = {
types: [
{
minmax: [0, 999999],
types: {
NovaAssetId: "Option<AssetId>",
},
},
{
minmax: [1000000, null],
types: {
NovaAssetId: "Option<MultiLocation>",
},
},
],
signedExtensions: {
ChargeAssetTxPayment: {
extrinsic: {
tip: "Compact<Balance>",
// eslint-disable-next-line sort-keys
assetId: "NovaAssetId",
},
payload: {},
},
},
};

export default { typesBundle: { spec: { statemine: definitions } } };
65 changes: 65 additions & 0 deletions kusama-asset-hub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
specVersion: 1.0.0
name: subquery-proxy-polkadot
version: 1.0.0
runner:
node:
name: "@subql/node"
version: "*"
query:
name: "@subql/query"
version: v1.5.0
description: Nova SubQuery project
repository: https://github.com/nova-wallet/subquery-proxy
schema:
file: ./schema.graphql
network:
chainId: "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"
endpoint: >-
wss://asset-hub-kusama-rpc.dwellir.com
chaintypes:
file: ./dist/kusamaAssetHubChaintypes.js
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: PureCreated
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: AnonymousCreated
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: approveAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: cancelAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMultiThreshold1
success: true
isSigned: true
63 changes: 63 additions & 0 deletions kusama-people-chain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
specVersion: 1.0.0
name: subquery-proxy-polkadot
version: 1.0.0
runner:
node:
name: "@subql/node"
version: "*"
query:
name: "@subql/query"
version: v1.5.0
description: Nova SubQuery project
repository: https://github.com/nova-wallet/subquery-proxy
schema:
file: ./schema.graphql
network:
chainId: "0xc1af4cb4eb3918e5db15086c0cc5ec17fb334f728b7c65dd44bfe1e174ff8b3f"
endpoint: >-
wss://kusama-people-rpc.polkadot.io
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: PureCreated
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: AnonymousCreated
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: approveAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: cancelAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMultiThreshold1
success: true
isSigned: true
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
},
"exports": {
"moonbeamChaintypes": "./chainTypes/moonbeamChaintypes.ts",
"bittensorChaintypes": "./chainTypes/bittensorChainTypes.ts"
"bittensorChaintypes": "./chainTypes/bittensorChainTypes.ts",
"alephZeroChaintypes": "./chainTypes/alephZeroChaintypes.ts",
"kusamaAssetHubChaintypes": "./chainTypes/kusamaAssetHubChaintypes.ts"
}
}
63 changes: 63 additions & 0 deletions polkadot-asset-hub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
specVersion: 1.0.0
name: subquery-proxy-polkadot
version: 1.0.0
runner:
node:
name: "@subql/node"
version: "*"
query:
name: "@subql/query"
version: v1.5.0
description: Nova SubQuery project
repository: https://github.com/nova-wallet/subquery-proxy
schema:
file: ./schema.graphql
network:
chainId: "0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f"
endpoint: >-
wss://statemint-rpc.dwellir.com
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: PureCreated
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: AnonymousCreated
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: approveAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: cancelAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMultiThreshold1
success: true
isSigned: true
63 changes: 63 additions & 0 deletions polkadot-people-chain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
specVersion: 1.0.0
name: subquery-proxy-polkadot
version: 1.0.0
runner:
node:
name: "@subql/node"
version: "*"
query:
name: "@subql/query"
version: v1.5.0
description: Nova SubQuery project
repository: https://github.com/nova-wallet/subquery-proxy
schema:
file: ./schema.graphql
network:
chainId: "0x67fa177a097bfa18f77ea95ab56e9bcdfeb0e5b8a40e46298bb93e16b6fc5008"
endpoint: >-
wss://polkadot-people-rpc.polkadot.io
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: PureCreated
- handler: handlePureProxyEvent
kind: substrate/EventHandler
filter:
module: proxy
method: AnonymousCreated
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: approveAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: cancelAsMulti
success: true
isSigned: true
- handler: handleMultisigCall
kind: substrate/CallHandler
filter:
module: multisig
method: asMultiThreshold1
success: true
isSigned: true

0 comments on commit 9f924d4

Please sign in to comment.