Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev #269

Merged
merged 30 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
84343d3
added base implementation for dock indexer using polkadex
vovunku Jan 3, 2024
12afc00
added manta project using polimec as base
vovunku Jan 29, 2024
f53c84a
Merge pull request #262 from novasamatech/feature/add_manta
ERussel Jan 29, 2024
fbd3d9b
Hydra swaps
valentunn Jan 30, 2024
e306c69
Revert block number
valentunn Jan 30, 2024
15c82d5
Fix findLastEvent
valentunn Jan 31, 2024
d8e522a
doubled logic for payoutStakersByPage logic
vovunku Feb 4, 2024
e5b8402
deployed stakers payout paged logic
vovunku Feb 5, 2024
e46e321
Merge branch 'dev' into feature/add_dock
vovunku Feb 6, 2024
c3b02fc
updated dock ChainTypes and deployed
vovunku Feb 6, 2024
1d372c3
Merge pull request #265 from novasamatech/feature/payout_stakers_by_page
ERussel Feb 14, 2024
91cf733
Merge pull request #264 from novasamatech/hydradx_swaps_dev
ERussel Feb 14, 2024
b36434e
Merge pull request #266 from novasamatech/feature/add_dock
ERussel Feb 14, 2024
81fad32
fix history element
Feb 14, 2024
1740dda
make common orml currency id
ERussel Feb 15, 2024
0173714
process omnipool swap only if it is not part of router swap
ERussel Feb 15, 2024
881e3c7
fix filter logic
ERussel Feb 15, 2024
eb46b30
fix currency id representation
ERussel Feb 15, 2024
a0b356f
fix naming
ERussel Feb 15, 2024
ce17121
update deployment
ERussel Feb 15, 2024
5edb30e
fix tokens transfer
ERussel Feb 16, 2024
a357546
fix hydra cid
ERussel Feb 16, 2024
c31e0fa
Merge pull request #267 from novasamatech/feature/support-hydra-router
ERussel Feb 19, 2024
b2c7e75
fix router event
ERussel Feb 29, 2024
011ae46
fix event
ERussel Feb 29, 2024
01e85cc
fix hydra events
ERussel Feb 29, 2024
e8b4e8a
deploy cid
ERussel Feb 29, 2024
47c1c56
Merge pull request #268 from novasamatech/fix/hydra-router-event
ERussel Feb 29, 2024
078a1ac
deployed polkadot+kusama with new reward parsing logic
vovunku Apr 24, 2024
ee5d7fa
Merge pull request #270 from novasamatech/feature/deploy_polkadot_kus…
vovunku Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions chainTypes/dockChaintypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Adapted from https://github.com/polkadot-js/apps/blob/master/packages/apps-config/src/api/spec/dock-mainnet.ts

import { spec } from '@docknetwork/node-types';

export default { typesBundle: { spec: spec } };
54 changes: 54 additions & 0 deletions dock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
specVersion: 1.0.0
name: subquery-nova-dock
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-nova
schema:
file: ./schema.graphql
network:
chainId: '0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae'
endpoint: >-
wss://mainnet-node.dock.io
chaintypes:
file: ./dist/dockChaintypes.js
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handleHistoryElement
kind: substrate/CallHandler
- handler: handleRewarded
kind: substrate/EventHandler
filter:
module: staking
method: Rewarded
- handler: handleSlashed
kind: substrate/EventHandler
filter:
module: staking
method: Slashed
- handler: handleTransfer
kind: substrate/EventHandler
filter:
module: balances
method: Transfer
- handler: handleNewEra
kind: substrate/EventHandler
filter:
module: staking
method: StakingElection
- handler: handleStakersElected
kind: substrate/EventHandler
filter:
module: staking
method: StakersElected
32 changes: 21 additions & 11 deletions hydra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ schema:
file: ./schema.graphql
network:
chainId: '0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d'
endpoint: wss://rpc-01.hydradx.io
endpoint: wss://rpc.hydradx.cloud
dataSources:
- name: main
kind: substrate/Runtime
Expand All @@ -24,11 +24,6 @@ dataSources:
handlers:
- handler: handleHistoryElement
kind: substrate/CallHandler
- handler: handleParachainRewarded
kind: substrate/EventHandler
filter:
module: parachainStaking
method: Rewarded
- handler: handleTransfer
kind: substrate/EventHandler
filter:
Expand All @@ -39,13 +34,28 @@ dataSources:
filter:
module: assets
method: Transferred
- handler: handleCurrencyTransfer
kind: substrate/EventHandler
filter:
module: currencies
method: Transferred
- handler: handleTokenTransfer
kind: substrate/EventHandler
filter:
module: tokens
method: Transfer
- handler: handleOmnipoolSwap
kind: substrate/EventHandler
filter:
module: omnipool
method: SellExecuted
- handler: handleOmnipoolSwap
kind: substrate/EventHandler
filter:
module: omnipool
method: BuyExecuted
- handler: handleHydraRouterSwap
kind: substrate/EventHandler
filter:
module: router
method: RouteExecuted
- handler: handleHydraRouterSwap
kind: substrate/EventHandler
filter:
module: router
method: Executed
1 change: 1 addition & 0 deletions ipfs-cids/.dock-cid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
QmSM8Q1xKcU17AXqajJcBcjPtNTyntzVH7yh31gmEz1HYV
2 changes: 1 addition & 1 deletion ipfs-cids/.hydra-cid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
QmYRGPQAZfMYLxSRvcEwn2MHfijykez4tAEm2At8gdwjsK
QmcLEzaNKuXCvSYe2ss7u64Y5UwKEGoE8TapDjhkqXe4v8
2 changes: 1 addition & 1 deletion ipfs-cids/.kusama-cid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Qmc2BGBGKe346v5nmt4f8QnA8YdTr8CnufCkgAwe9K6Akg
QmZxCUe4kmXwUzvUNHCQrTqShr5ipcqv3nPGoAz1vTZnj8
1 change: 1 addition & 0 deletions ipfs-cids/.manta-cid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
QmatFmxu7ZALVnasojm1zqV1xTQeiT9RDAvngC2mAprewV
2 changes: 1 addition & 1 deletion ipfs-cids/.polkadot-cid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
QmUciu8MN6Eiw2xN11XL1sNi3UPWQNoYoZ6LLTmdytv4Fb
QmQcPMkUd63AKSJYki1J8omYREKTQKeq87E3nxTiZe89sF
2 changes: 1 addition & 1 deletion ipfs-cids/.westend-cid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
QmbpSWKejfPqwxex6E8KSqWD5sxSHedVKyWR5Rfs1AmbmQ
QmWffzTpd4fCa2Ewpm78BBB76guRruF9zbL2uSai8rMTtX
41 changes: 41 additions & 0 deletions manta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
specVersion: 1.0.0
name: subquery-nova-manta
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-nova
schema:
file: ./schema.graphql
network:
chainId: '0xf3c7ad88f6a80f366c4be216691411ef0622e8b809b1046ea297ef106058d4eb'
endpoint: wss://ws.manta.systems
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 1
mapping:
file: ./dist/index.js
handlers:
- handler: handleHistoryElement
kind: substrate/CallHandler
- handler: handleParachainRewarded
kind: substrate/EventHandler
filter:
module: parachainStaking
method: Rewarded
- handler: handleTransfer
kind: substrate/EventHandler
filter:
module: balances
method: Transfer
- handler: handleAssetTransfer
kind: substrate/EventHandler
filter:
module: assets
method: Transferred
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"devDependencies": {
"@acala-network/type-definitions": "^4.1.5",
"@crustio/type-definitions": "^1.3.0",
"@docknetwork/node-types": "0.17.0",
"@equilab/definitions": "^1.4.18",
"@interlay/interbtc-types": "^1.5.10",
"@kiltprotocol/type-definitions": "^0.1.23",
Expand Down Expand Up @@ -53,6 +54,7 @@
"alephZeroChaintypes": "./chainTypes/alephZeroChaintypes.ts",
"basiliskChaintypes": "./chainTypes/basiliskChaintypes.ts",
"centrifugeChaintypes": "./chainTypes/centrifugeChaintypes.ts",
"dockChaintypes": "./chainTypes/dockChaintypes.ts",
"encointerChaintypes": "./chainTypes/encointerChaintypes.ts",
"frequencyChaintypes": "./chainTypes/frequencyChaintypes.ts",
"krestChaintypes": "./chainTypes/krestChaintypes.ts",
Expand Down
2 changes: 1 addition & 1 deletion rococo-assethub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dataSources:
filter:
module: tokens
method: Transfer
- handler: handleSwap
- handler: handleAssetConversionSwap
kind: substrate/EventHandler
filter:
module: assetConversion
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export * from './mappings/Rewards'
export * from './mappings/PoolRewards'
export * from './mappings/Transfers'
export * from './mappings/NewEra'
export * from './mappings/swaps'
import "@polkadot/api-augment"
Loading