-
Notifications
You must be signed in to change notification settings - Fork 694
Expand file tree
/
Copy pathErrorCodes.cs
More file actions
170 lines (137 loc) · 5.1 KB
/
ErrorCodes.cs
File metadata and controls
170 lines (137 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
namespace Nethermind.JsonRpc
{
public static class ErrorCodes
{
public const int None = 0;
/// <summary>
/// Execution reverted (Geth compatibility)
/// </summary>
public const int ExecutionReverted = 3;
/// <summary>
/// Invalid JSON
/// </summary>
public const int ParseError = -32700;
/// <summary>
/// JSON is not a valid request object
/// </summary>
public const int InvalidRequest = -32600;
/// <summary>
/// Method does not exist
/// </summary>
public const int MethodNotFound = -32601;
/// <summary>
/// Invalid method parameters
/// </summary>
public const int InvalidParams = -32602;
/// <summary>
/// Internal JSON-RPC error
/// </summary>
public const int InternalError = -32603;
/// <summary>
/// Missing or invalid parameters
/// </summary>
public const int InvalidInput = -32000;
/// <summary>
/// EVM execution error (out of gas, insufficient funds during execution, etc.)
/// </summary>
public const int ExecutionError = -32003;
/// <summary>
/// Requested resource not found
/// </summary>
public const int ResourceNotFound = -32000;
/// <summary>
/// Transaction creation failed
/// </summary>
public const int TransactionRejected = -32000;
/// <summary>
/// Requested resource not available
/// </summary>
public const int ResourceUnavailable = -32002;
/// <summary>
/// Account locked
/// </summary>
public const int AccountLocked = -32020;
/// <summary>
/// Request exceeds defined limit
/// </summary>
public const int LimitExceeded = -32005;
/// <summary>
/// Request exceeds defined timeout limit
/// </summary>
public const int Timeout = -32016;
/// <summary>
/// Request exceeds defined timeout limit
/// </summary>
public const int ModuleTimeout = -32017;
/// <summary>
/// Unknown block error
/// </summary>
public const int UnknownBlockError = -39001;
/// <summary>
/// Invalid RPC simulate call block number out of order
/// </summary>
public const int InvalidInputBlocksOutOfOrder = -38020;
/// <summary>
/// Invalid RPC simulate call Block timestamp in sequence did not increase
/// </summary>
public const int BlockTimestampNotIncreased = -38021;
/// <summary>
/// MovePrecompileToAddress referenced itself in replacement
/// </summary>
public const int MovePrecompileSelfReference = -38022;
/// <summary>
/// Too many blocks or calls — client limit exceeded
/// </summary>
public const int ClientLimitExceededError = -38026;
/// <summary>
/// Block is not available due to history expiry policy
/// </summary>
public const int PrunedHistoryUnavailable = 4444;
/// <summary>
/// Data is not available due to eip not being enabled yet
/// </summary>
public const int UnavailableBeforeFork = 4445;
/// <summary>
/// Default error code
/// </summary>
public const int Default = -32000;
/// <summary>
/// Transaction nonce is lower than the account's current nonce — eth_simulateV1 spec error
/// </summary>
public const int NonceTooLow = -38010;
/// <summary>
/// Transaction nonce is higher than the account's current nonce — eth_simulateV1 spec error
/// </summary>
public const int NonceTooHigh = -38011;
/// <summary>
/// Transaction maxFeePerGas is below the block base fee — eth_simulateV1 spec error
/// </summary>
public const int FeeCapBelowBaseFee = -38012;
/// <summary>
/// Transaction gas limit is below the intrinsic gas cost — eth_simulateV1 spec error
/// </summary>
public const int IntrinsicGas = -38013;
/// <summary>
/// Not enough value to cover transaction costs — eth_simulateV1 spec error
/// </summary>
public const int InsufficientFunds = -38014;
/// <summary>
/// Gas limit reached — eth_simulateV1 spec error
/// </summary>
public const int BlockGasLimitReached = -38015;
/// <summary>
/// Sender account has deployed code (is not an EOA) — eth_simulateV1 spec error
/// </summary>
public const int SenderIsNotEoa = -38024;
/// <summary>
/// EIP-3860. Code size is too big — eth_simulateV1 spec error
/// </summary>
public const int MaxInitCodeSizeExceeded = -38025;
/// <summary>
/// Error during EVM execution
/// </summary>
public const int VMError = -32015;
}
}