@@ -3,15 +3,90 @@ 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
+ error RecipientNotSFC ();
22
+
23
+ // values
24
+ error ZeroAmount ();
25
+ error ZeroRewards ();
26
+
27
+ // pubkeys
28
+ error PubkeyExists ();
29
+ error MalformedPubkey ();
30
+ error SamePubkey ();
31
+ error EmptyPubkey ();
32
+ error PubkeyAllowedOnlyOnce ();
33
+
34
+ // redirections
35
+ error SameRedirectionAuthorizer ();
36
+ error Redirected ();
37
+
38
+ // validators
39
+ error ValidatorNotExists ();
40
+ error ValidatorExists ();
41
+ error ValidatorNotActive ();
42
+ error ValidatorDelegationLimitExceeded ();
43
+ error WrongValidatorStatus ();
44
+
45
+ // requests
46
+ error RequestedCompleted ();
47
+ error RequestExists ();
48
+ error RequestNotExists ();
49
+
50
+ // transfers
51
+ error TransfersNotAllowed ();
52
+ error TransferFailed ();
53
+
54
+ // updater
55
+ error SFCAlreadyUpdated ();
56
+ error SFCWrongVersion ();
57
+ error SFCGovAlreadyUpdated ();
58
+ error SFCWrongGovVersion ();
59
+
60
+ // node driver
61
+ error SelfCodeHashMismatch ();
62
+ error DriverCodeHashMismatch ();
63
+
64
+ // governance
65
+ error GovVotesRecountFailed ();
66
+
67
+ // staking
68
+ error LockedStakeGreaterThanTotalStake ();
69
+ error InsufficientSelfStake ();
70
+ error NotEnoughUnlockedStake ();
71
+ error NotEnoughLockedStake ();
72
+ error NotEnoughTimePassed ();
73
+ error NotEnoughEpochsPassed ();
74
+ error StakeIsFullySlashed ();
75
+ error IncorrectDuration ();
76
+ error ValidatorLockupTooShort ();
77
+ error TooManyReLocks ();
78
+ error TooFrequentReLocks ();
79
+ error LockupDurationDecreased ();
80
+ error AlreadyLockedUp ();
81
+ error NotLockedUp ();
82
+
83
+ // stashing
84
+ error NothingToStash ();
85
+
86
+ // slashing
87
+ error ValidatorNotSlashed ();
88
+ error RefundRatioTooHigh ();
89
+
15
90
event DeactivatedValidator (uint256 indexed validatorID , uint256 deactivatedEpoch , uint256 deactivatedTime );
16
91
event ChangedValidatorStatus (uint256 indexed validatorID , uint256 status );
17
92
0 commit comments