Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
112 changes: 58 additions & 54 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
version: "3"

volumes:
db:
services:
postgres:
build:
Expand All @@ -8,7 +10,7 @@ services:
ports:
- 5432:5432
volumes:
- .data/postgres:/var/lib/postgresql/data
- db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
healthcheck:
Expand All @@ -17,58 +19,58 @@ services:
timeout: 5s
retries: 5

subquery-node-osmosis:
image: subquerynetwork/subql-node-cosmos:latest
depends_on:
"postgres":
condition: service_healthy
restart: always
environment:
DB_USER: postgres
DB_PASS: postgres
DB_DATABASE: postgres
DB_HOST: postgres
DB_PORT: 5432
volumes:
- ./:/app
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/app/project-osmosis.yaml
- --multi-chain
- --db-schema=multi-transfers
- --disable-historical
- --batch-size=30
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node-osmosis:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
subquery-node-secret:
image: subquerynetwork/subql-node-cosmos:latest
depends_on:
"postgres":
condition: service_healthy
restart: always
environment:
DB_USER: postgres
DB_PASS: postgres
DB_DATABASE: postgres
DB_HOST: postgres
DB_PORT: 5432
volumes:
- ./:/app
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/app/project-secret.yaml
- --multi-chain
- --db-schema=multi-transfers
- --disable-historical
- --batch-size=30
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node-secret:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
# subquery-node-osmosis:
# image: subquerynetwork/subql-node-cosmos:latest
# depends_on:
# "postgres":
# condition: service_healthy
# restart: always
# environment:
# DB_USER: postgres
# DB_PASS: postgres
# DB_DATABASE: postgres
# DB_HOST: postgres
# DB_PORT: 5432
# volumes:
# - ./:/app
# command:
# - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
# - -f=/app/project-osmosis.yaml
# - --multi-chain
# - --db-schema=multi-transfers
# - --disable-historical
# - --batch-size=30
# healthcheck:
# test: ["CMD", "curl", "-f", "http://subquery-node-osmosis:3000/ready"]
# interval: 3s
# timeout: 5s
# retries: 10
# subquery-node-secret:
# image: subquerynetwork/subql-node-cosmos:latest
# depends_on:
# "postgres":
# condition: service_healthy
# restart: always
# environment:
# DB_USER: postgres
# DB_PASS: postgres
# DB_DATABASE: postgres
# DB_HOST: postgres
# DB_PORT: 5432
# volumes:
# - ./:/app
# command:
# - ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
# - -f=/app/project-secret.yaml
# - --multi-chain
# - --db-schema=multi-transfers
# - --disable-historical
# - --batch-size=30
# healthcheck:
# test: ["CMD", "curl", "-f", "http://subquery-node-secret:3000/ready"]
# interval: 3s
# timeout: 5s
# retries: 10

subquery-node-neutron:
image: subquerynetwork/subql-node-cosmos:latest
Expand All @@ -90,7 +92,9 @@ services:
- --multi-chain
- --db-schema=multi-transfers
- --disable-historical
- --batch-size=30
- --batch-size=60
- --debug
- --log-level=trace
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node-neutron:3000/ready"]
interval: 3s
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"build": "subql build",
"codegen": "subql codegen",
"start:docker": "docker-compose pull && docker-compose up --remove-orphans",
"dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans",
"start:docker": "docker-compose pull && docker-compose up --remove-orphans -d",
"_dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans",
"prepack": "rm -rf dist && npm run build",
"test": "jest"
},
Expand All @@ -22,16 +22,16 @@
"license": "MIT",
"packageManager": "[email protected]",
"devDependencies": {
"@cosmjs/stargate": "^0.28.9",
"@subql/cli": "^4.10.0",
"@subql/node-cosmos": "latest",
"@subql/testing": "latest",
"@cosmjs/stargate": "0.32.4",
"@subql/cli": "5.2.4",
"@subql/node-cosmos": "4.1.1",
"@subql/testing": "2.2.1",
"typescript": "^5.2.2"
},
"dependencies": {
"@subql/types-cosmos": "latest",
"@subql/types-cosmos": "3.5.2",
"@subql/utils": "^2.7.0",
"@types/node": "^17.0.21",
"@types/node": "22.2.0",
"pino": "^7.8.0",
"ts-proto": "^1.112.1",
"tslib": "^2.3.1"
Expand Down
30 changes: 20 additions & 10 deletions project-neutron-exec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,31 @@ runner:
schema:
file: ./schema.graphql
network:
chainId: pion-1
chainId: neutron-1
endpoint:
- https://rpc-lb-pion.ntrn.tech"
- https://rpc-falcron.pion-1.ntrn.tech
- https://neutron-rpc.polkachu.com/
- https://rpc-kralum.neutron-1.neutron.org/
- https://rpc-vertexa.neutron-1.neutron.org/
- https://rpc-solara.neutron-1.neutron.org/
- https://rpc-pulsarix.neutron-1.neutron.org/
- https://rpc-voidara.neutron-1.neutron.org/
- https://rpc-magnetix.neutron-1.neutron.org
- https://rpc-fireblocks.neutron-1.neutron.org
dataSources:
- kind: cosmos/Runtime
startBlock: 15450000
startBlock: 13340425
mapping:
file: ./dist/index.js
handlers:
- handler: handleBondExecution
kind: cosmos/MessageHandler
kind: cosmos/EventHandler
filter:
type: /cosmwasm.wasm.v1.MsgExecuteContract
includeFailedTx: true
contractCall: bond
values:
contract: 'neutron1frz8scdmukvp399kvpldtwvqjd3pyalym5qpfvyxm0dry27r5s6q6f36sc'
type: 'wasm-crates.io:drop-staking__drop-core-execute-bond'
attributes:
action: bond
- handler: handleMirrorBondExecution
kind: cosmos/EventHandler
filter:
type: 'wasm-crates.io:drop-staking__drop-mirror-execute_bond'
attributes:
action: execute_bond
20 changes: 7 additions & 13 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,18 @@
# Add the `@index` or `@index(unique: true)` annotation after any non-key field
# https://academy.subquery.network/build/graphql.html#indexing-by-non-primary-key-field

type UserBalance @entity {
id: ID! # Index
balance: BigInt!
denom: String!, @index
chainId: String!, @index
lastDate: Date!
lastHeight: BigInt! @index
}

type UserBond @entity{
id: ID!
ref: String!,
height: BigInt!,
ts: BigInt!
}

type PoolPosition @entity{
id: ID!
created: Date!
type UserBondPlain @entity{
id: ID!
address: String! @index
ref: String! @index,
received: BigInt!
height: BigInt!
}
exchange_rate: Float!
}
Loading