Skip to content

Commit d50b8a4

Browse files
committed
fix: removal of the unused instant staking events
1 parent 6c31770 commit d50b8a4

File tree

2 files changed

+8
-86
lines changed

2 files changed

+8
-86
lines changed

contracts/src/arbitration/SortitionModuleBase.sol

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,6 @@ abstract contract SortitionModuleBase is ISortitionModule, Initializable, UUPSPr
8181
/// @param _amountAllCourts The amount of tokens staked in all courts.
8282
event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);
8383

84-
/// @notice DEPRECATED Emitted when a juror's stake is delayed and tokens are not transferred yet.
85-
/// @param _address The address of the juror.
86-
/// @param _courtID The ID of the court.
87-
/// @param _amount The amount of tokens staked in the court.
88-
event StakeDelayedNotTransferred(address indexed _address, uint256 _courtID, uint256 _amount);
89-
90-
/// @notice DEPRECATED Emitted when a juror's stake is delayed and tokens are already deposited.
91-
/// @param _address The address of the juror.
92-
/// @param _courtID The ID of the court.
93-
/// @param _amount The amount of tokens staked in the court.
94-
event StakeDelayedAlreadyTransferredDeposited(address indexed _address, uint256 _courtID, uint256 _amount);
95-
96-
/// @notice DEPRECATED Emitted when a juror's stake is delayed and tokens are already withdrawn.
97-
/// @param _address The address of the juror.
98-
/// @param _courtID The ID of the court.
99-
/// @param _amount The amount of tokens withdrawn.
100-
event StakeDelayedAlreadyTransferredWithdrawn(address indexed _address, uint96 indexed _courtID, uint256 _amount);
101-
10284
/// @notice Emitted when a juror's stake is delayed.
10385
/// @param _address The address of the juror.
10486
/// @param _courtID The ID of the court.

subgraph/core/tests/sortition-module-utils.ts

Lines changed: 8 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,17 @@
11
import { newMockEvent } from "matchstick-as";
22
import { ethereum, BigInt, Address } from "@graphprotocol/graph-ts";
3-
import {
4-
StakeDelayedAlreadyTransferredDeposited,
5-
StakeDelayedAlreadyTransferredWithdrawn,
6-
StakeDelayedNotTransferred,
7-
StakeLocked,
8-
StakeSet,
9-
} from "../generated/SortitionModule/SortitionModule";
3+
import { StakeDelayed, StakeLocked, StakeSet } from "../generated/SortitionModule/SortitionModule";
104

11-
export function createStakeDelayedAlreadyTransferredDepositedEvent(
12-
_address: Address,
13-
_courtID: BigInt,
14-
_amount: BigInt
15-
): StakeDelayedAlreadyTransferredDeposited {
16-
let stakeDelayedAlreadyTransferredDepositedEvent: StakeDelayedAlreadyTransferredDeposited = newMockEvent();
5+
export function createStakeDelayedEvent(_address: Address, _courtID: BigInt, _amount: BigInt): StakeDelayed {
6+
let StakeDelayed: StakeDelayed = newMockEvent();
177

18-
stakeDelayedAlreadyTransferredDepositedEvent.parameters = new Array();
8+
StakeDelayed.parameters = new Array();
199

20-
stakeDelayedAlreadyTransferredDepositedEvent.parameters.push(
21-
new ethereum.EventParam("_address", ethereum.Value.fromAddress(_address))
22-
);
23-
stakeDelayedAlreadyTransferredDepositedEvent.parameters.push(
24-
new ethereum.EventParam("_courtID", ethereum.Value.fromUnsignedBigInt(_courtID))
25-
);
26-
stakeDelayedAlreadyTransferredDepositedEvent.parameters.push(
27-
new ethereum.EventParam("_amount", ethereum.Value.fromUnsignedBigInt(_amount))
28-
);
29-
30-
return stakeDelayedAlreadyTransferredDepositedEvent;
31-
}
32-
33-
export function createStakeDelayedAlreadyTransferredWithdrawnEvent(
34-
_address: Address,
35-
_courtID: BigInt,
36-
_amount: BigInt
37-
): StakeDelayedAlreadyTransferredWithdrawn {
38-
let stakeDelayedAlreadyTransferredWithdrawnEvent = newMockEvent();
39-
40-
stakeDelayedAlreadyTransferredWithdrawnEvent.parameters = new Array();
41-
42-
stakeDelayedAlreadyTransferredWithdrawnEvent.parameters.push(
43-
new ethereum.EventParam("_address", ethereum.Value.fromAddress(_address))
44-
);
45-
stakeDelayedAlreadyTransferredWithdrawnEvent.parameters.push(
46-
new ethereum.EventParam("_courtID", ethereum.Value.fromUnsignedBigInt(_courtID))
47-
);
48-
stakeDelayedAlreadyTransferredWithdrawnEvent.parameters.push(
49-
new ethereum.EventParam("_amount", ethereum.Value.fromUnsignedBigInt(_amount))
50-
);
51-
52-
return stakeDelayedAlreadyTransferredWithdrawnEvent;
53-
}
54-
55-
export function createStakeDelayedNotTransferredEvent(
56-
_address: Address,
57-
_courtID: BigInt,
58-
_amount: BigInt
59-
): StakeDelayedNotTransferred {
60-
let stakeDelayedNotTransferredEvent = newMockEvent();
61-
62-
stakeDelayedNotTransferredEvent.parameters = new Array();
63-
64-
stakeDelayedNotTransferredEvent.parameters.push(
65-
new ethereum.EventParam("_address", ethereum.Value.fromAddress(_address))
66-
);
67-
stakeDelayedNotTransferredEvent.parameters.push(
68-
new ethereum.EventParam("_courtID", ethereum.Value.fromUnsignedBigInt(_courtID))
69-
);
70-
stakeDelayedNotTransferredEvent.parameters.push(
71-
new ethereum.EventParam("_amount", ethereum.Value.fromUnsignedBigInt(_amount))
72-
);
10+
StakeDelayed.parameters.push(new ethereum.EventParam("_address", ethereum.Value.fromAddress(_address)));
11+
StakeDelayed.parameters.push(new ethereum.EventParam("_courtID", ethereum.Value.fromUnsignedBigInt(_courtID)));
12+
StakeDelayed.parameters.push(new ethereum.EventParam("_amount", ethereum.Value.fromUnsignedBigInt(_amount)));
7313

74-
return stakeDelayedNotTransferredEvent;
14+
return StakeDelayed;
7515
}
7616

7717
export function createStakeLockedEvent(_address: Address, _relativeAmount: BigInt, _unlock: boolean): StakeLocked {

0 commit comments

Comments
 (0)