@@ -3,15 +3,85 @@ pragma solidity ^0.8.9;
3
3
4
4
import {Decimal} from "../common/Decimal.sol " ;
5
5
import {SFCState} from "./SFCState.sol " ;
6
- import {IErrors} from "../IErrors.sol " ;
7
6
8
- contract SFCBase is IErrors , SFCState {
7
+ contract SFCBase is SFCState {
9
8
uint256 internal constant OK_STATUS = 0 ;
10
9
uint256 internal constant WITHDRAWN_BIT = 1 ;
11
10
uint256 internal constant OFFLINE_BIT = 1 << 3 ;
12
11
uint256 internal constant DOUBLESIGN_BIT = 1 << 7 ;
13
12
uint256 internal constant CHEATER_MASK = DOUBLESIGN_BIT;
14
13
14
+ // auth
15
+ error NotDriverAuth ();
16
+ error NotAuthorized ();
17
+
18
+ // addresses
19
+ error ZeroAddress ();
20
+ error SameAddress ();
21
+
22
+ // values
23
+ error ZeroAmount ();
24
+ error ZeroRewards ();
25
+
26
+ // pubkeys
27
+ error PubkeyExists ();
28
+ error MalformedPubkey ();
29
+ error SamePubkey ();
30
+ error EmptyPubkey ();
31
+ error PubkeyAllowedOnlyOnce ();
32
+
33
+ // redirections
34
+ error SameRedirectionAuthorizer ();
35
+ error Redirected ();
36
+
37
+ // validators
38
+ error ValidatorNotExists ();
39
+ error ValidatorExists ();
40
+ error ValidatorNotActive ();
41
+ error ValidatorDelegationLimitExceeded ();
42
+ error WrongValidatorStatus ();
43
+
44
+ // requests
45
+ error RequestedCompleted ();
46
+ error RequestExists ();
47
+ error RequestNotExists ();
48
+
49
+ // transfers
50
+ error TransfersNotAllowed ();
51
+ error TransferFailed ();
52
+
53
+ // updater
54
+ error SFCAlreadyUpdated ();
55
+ error SFCWrongVersion ();
56
+ error SFCGovAlreadyUpdated ();
57
+ error SFCWrongGovVersion ();
58
+
59
+ // governance
60
+ error GovVotesRecountFailed ();
61
+
62
+ // staking
63
+ error LockedStakeGreaterThanTotalStake ();
64
+ error InsufficientSelfStake ();
65
+ error NotEnoughUnlockedStake ();
66
+ error NotEnoughLockedStake ();
67
+ error NotEnoughTimePassed ();
68
+ error NotEnoughEpochsPassed ();
69
+ error StakeIsFullySlashed ();
70
+ error IncorrectDuration ();
71
+ error ValidatorLockupTooShort ();
72
+ error TooManyReLocks ();
73
+ error TooFrequentReLocks ();
74
+ error LockupDurationDecreased ();
75
+ error AlreadyLockedUp ();
76
+ error NotLockedUp ();
77
+
78
+ // stashing
79
+ error NothingToStash ();
80
+
81
+ // slashing
82
+ error ValidatorNotSlashed ();
83
+ error RefundRatioTooHigh ();
84
+
15
85
event DeactivatedValidator (uint256 indexed validatorID , uint256 deactivatedEpoch , uint256 deactivatedTime );
16
86
event ChangedValidatorStatus (uint256 indexed validatorID , uint256 status );
17
87
0 commit comments