Skip to content

Commit d128f10

Browse files
committed
chore: removed the handlers for the instant staking events
1 parent d876e24 commit d128f10

File tree

6 files changed

+77
-243
lines changed

6 files changed

+77
-243
lines changed

subgraph/core-neo/abi-migrations/SortitionModuleNeo.json

Lines changed: 38 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -60,67 +60,36 @@
6060
"name": "Initialized",
6161
"type": "event"
6262
},
63-
{
64-
"anonymous": false,
65-
"inputs": [
66-
{
67-
"indexed": false,
68-
"internalType": "enum ISortitionModule.Phase",
69-
"name": "_phase",
70-
"type": "uint8"
71-
}
72-
],
73-
"name": "NewPhase",
74-
"type": "event"
75-
},
7663
{
7764
"anonymous": false,
7865
"inputs": [
7966
{
8067
"indexed": true,
8168
"internalType": "address",
82-
"name": "_address",
69+
"name": "_account",
8370
"type": "address"
8471
},
85-
{
86-
"indexed": false,
87-
"internalType": "uint256",
88-
"name": "_courtID",
89-
"type": "uint256"
90-
},
9172
{
9273
"indexed": false,
9374
"internalType": "uint256",
9475
"name": "_amount",
9576
"type": "uint256"
9677
}
9778
],
98-
"name": "StakeDelayedAlreadyTransferredDeposited",
79+
"name": "LeftoverPNKWithdrawn",
9980
"type": "event"
10081
},
10182
{
10283
"anonymous": false,
10384
"inputs": [
104-
{
105-
"indexed": true,
106-
"internalType": "address",
107-
"name": "_address",
108-
"type": "address"
109-
},
11085
{
11186
"indexed": false,
112-
"internalType": "uint256",
113-
"name": "_courtID",
114-
"type": "uint256"
115-
},
116-
{
117-
"indexed": false,
118-
"internalType": "uint256",
119-
"name": "_amount",
120-
"type": "uint256"
87+
"internalType": "enum ISortitionModule.Phase",
88+
"name": "_phase",
89+
"type": "uint8"
12190
}
12291
],
123-
"name": "StakeDelayedAlreadyTransferred",
92+
"name": "NewPhase",
12493
"type": "event"
12594
},
12695
{
@@ -145,32 +114,7 @@
145114
"type": "uint256"
146115
}
147116
],
148-
"name": "StakeDelayedAlreadyTransferredWithdrawn",
149-
"type": "event"
150-
},
151-
{
152-
"anonymous": false,
153-
"inputs": [
154-
{
155-
"indexed": true,
156-
"internalType": "address",
157-
"name": "_address",
158-
"type": "address"
159-
},
160-
{
161-
"indexed": false,
162-
"internalType": "uint256",
163-
"name": "_courtID",
164-
"type": "uint256"
165-
},
166-
{
167-
"indexed": false,
168-
"internalType": "uint256",
169-
"name": "_amount",
170-
"type": "uint256"
171-
}
172-
],
173-
"name": "StakeDelayedNotTransferred",
117+
"name": "StakeDelayed",
174118
"type": "event"
175119
},
176120
{
@@ -449,11 +393,6 @@
449393
"internalType": "uint256",
450394
"name": "stake",
451395
"type": "uint256"
452-
},
453-
{
454-
"internalType": "bool",
455-
"name": "alreadyTransferred",
456-
"type": "bool"
457396
}
458397
],
459398
"stateMutability": "view",
@@ -696,30 +635,6 @@
696635
"stateMutability": "view",
697636
"type": "function"
698637
},
699-
{
700-
"inputs": [
701-
{
702-
"internalType": "address",
703-
"name": "jurorAccount",
704-
"type": "address"
705-
},
706-
{
707-
"internalType": "uint96",
708-
"name": "courtId",
709-
"type": "uint96"
710-
}
711-
],
712-
"name": "latestDelayedStakeIndex",
713-
"outputs": [
714-
{
715-
"internalType": "uint256",
716-
"name": "",
717-
"type": "uint256"
718-
}
719-
],
720-
"stateMutability": "view",
721-
"type": "function"
722-
},
723638
{
724639
"inputs": [
725640
{
@@ -824,7 +739,18 @@
824739
}
825740
],
826741
"name": "penalizeStake",
827-
"outputs": [],
742+
"outputs": [
743+
{
744+
"internalType": "uint256",
745+
"name": "pnkBalance",
746+
"type": "uint256"
747+
},
748+
{
749+
"internalType": "uint256",
750+
"name": "availablePenalty",
751+
"type": "uint256"
752+
}
753+
],
828754
"stateMutability": "nonpayable",
829755
"type": "function"
830756
},
@@ -956,7 +882,7 @@
956882
},
957883
{
958884
"internalType": "bool",
959-
"name": "_alreadyTransferred",
885+
"name": "",
960886
"type": "bool"
961887
}
962888
],
@@ -972,6 +898,11 @@
972898
"name": "pnkWithdrawal",
973899
"type": "uint256"
974900
},
901+
{
902+
"internalType": "uint256",
903+
"name": "oldStake",
904+
"type": "uint256"
905+
},
975906
{
976907
"internalType": "enum StakingResult",
977908
"name": "stakingResult",
@@ -1090,6 +1021,19 @@
10901021
],
10911022
"stateMutability": "view",
10921023
"type": "function"
1024+
},
1025+
{
1026+
"inputs": [
1027+
{
1028+
"internalType": "address",
1029+
"name": "_account",
1030+
"type": "address"
1031+
}
1032+
],
1033+
"name": "withdrawLeftoverPNK",
1034+
"outputs": [],
1035+
"stateMutability": "nonpayable",
1036+
"type": "function"
10931037
}
10941038
]
10951039
}

subgraph/core-neo/subgraph.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,8 @@ dataSources:
158158
# FIX: temporarily point to abi with event addition
159159
file: ./abi-migrations/SortitionModuleNeo.json
160160
eventHandlers:
161-
- event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256)
162-
handler: handleStakeDelayedAlreadyTransferredDeposited
163-
# FIX: temporarily indexing old event name
164-
- event: StakeDelayedAlreadyTransferred(indexed address,uint256,uint256)
165-
handler: handleStakeDelayedAlreadyTransferred
166-
- event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256)
167-
handler: handleStakeDelayedAlreadyTransferredWithdrawn
168-
- event: StakeDelayedNotTransferred(indexed address,uint256,uint256)
169-
handler: handleStakeDelayedNotTransferred
161+
- event: StakeDelayed(indexed address,indexed uint96,uint256)
162+
handler: handleStakeDelayed
170163
- event: StakeLocked(indexed address,uint256,bool)
171164
handler: handleStakeLocked
172165
- event: StakeSet(indexed address,uint256,uint256,uint256)

0 commit comments

Comments
 (0)