Skip to content

Commit

Permalink
Fix/slash_handler (#306)
Browse files Browse the repository at this point in the history
* fix: some additional settings

* fix: pool slash

* fix: remove logger

* Update kusama.yaml
  • Loading branch information
stepanLav authored Nov 29, 2024
1 parent 6052203 commit 34e0bc1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ services:
command:
- -f=/app/${PROJECT_PATH}
- --disable-historical=true
# - --local #remove
# - --batch-size=50
- --batch-size=1

graphql-engine:
container_name: "query-${PROJECT_PATH}"
Expand Down
8 changes: 4 additions & 4 deletions kusama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ dataSources:
mapping:
file: ./dist/index.js
handlers:
# - handler: handleHistoryElement
# kind: substrate/CallHandler
# filter:
# isSigned: true
- handler: handleHistoryElement
kind: substrate/CallHandler
filter:
isSigned: true
- handler: handleReward
kind: substrate/EventHandler
filter:
Expand Down
8 changes: 4 additions & 4 deletions polkadot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ dataSources:
mapping:
file: ./dist/index.js
handlers:
# - handler: handleHistoryElement
# kind: substrate/CallHandler
# filter:
# isSigned: true
- handler: handleHistoryElement
kind: substrate/CallHandler
filter:
isSigned: true
- handler: handleReward
kind: substrate/EventHandler
filter:
Expand Down
4 changes: 2 additions & 2 deletions src/mappings/PoolRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ export async function handlePoolBondedSlash(

export async function handlePoolUnbondingSlash(
unbondingSlashEvent: SubstrateEvent<
[era: INumber, poolId: INumber, slash: INumber]
[poolId: INumber, era: INumber, slash: INumber]
>,
): Promise<void> {
const {
event: {
data: [era, poolId, slash],
data: [poolId, era, slash],
},
} = unbondingSlashEvent;
const poolIdNumber = poolId.toNumber();
Expand Down

0 comments on commit 34e0bc1

Please sign in to comment.