-
Notifications
You must be signed in to change notification settings - Fork 178
/
codes.go
82 lines (71 loc) · 3.32 KB
/
codes.go
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
package errors
import "fmt"
type ErrorCode uint16
func (ec ErrorCode) String() string {
return fmt.Sprintf("[Error Code: %d]", ec)
}
type FailureCode uint16
func (fc FailureCode) String() string {
return fmt.Sprintf("[Failure Code: %d]", fc)
}
const (
FailureCodeUnknownFailure FailureCode = 2000
// Deprecated:
FailureCodeEncodingFailure FailureCode = 2001
FailureCodeLedgerFailure FailureCode = 2002
FailureCodeStateMergeFailure FailureCode = 2003
FailureCodeBlockFinderFailure FailureCode = 2004
FailureCodeHasherFailure FailureCode = 2005
FailureCodeMetaTransactionFailure FailureCode = 2100
)
const (
// tx validation errors 1000 - 1049
// ErrCodeTxValidationError ErrorCode = 1000 - reserved
ErrCodeInvalidTxByteSizeError ErrorCode = 1001
ErrCodeInvalidReferenceBlockError ErrorCode = 1002
// Deprecated: ErrCodeExpiredTransactionError
ErrCodeExpiredTransactionError ErrorCode = 1003
ErrCodeInvalidScriptError ErrorCode = 1004
ErrCodeInvalidGasLimitError ErrorCode = 1005
ErrCodeInvalidProposalSignatureError ErrorCode = 1006
ErrCodeInvalidProposalSeqNumberError ErrorCode = 1007
ErrCodeInvalidPayloadSignatureError ErrorCode = 1008
ErrCodeInvalidEnvelopeSignatureError ErrorCode = 1009
// base errors 1050 - 1100
ErrCodeFVMInternalError ErrorCode = 1050
ErrCodeValueError ErrorCode = 1051
ErrCodeInvalidArgumentError ErrorCode = 1052
ErrCodeInvalidAddressError ErrorCode = 1053
ErrCodeInvalidLocationError ErrorCode = 1054
ErrCodeAccountAuthorizationError ErrorCode = 1055
ErrCodeOperationAuthorizationError ErrorCode = 1056
ErrCodeOperationNotSupportedError ErrorCode = 1057
// execution errors 1100 - 1200
// ErrCodeExecutionError ErrorCode = 1100 - reserved
ErrCodeCadenceRunTimeError ErrorCode = 1101
ErrCodeEncodingUnsupportedValue ErrorCode = 1102
ErrCodeStorageCapacityExceeded ErrorCode = 1103
// Deprecated: ErrCodeGasLimitExceededError ErrorCode = 1104
ErrCodeEventLimitExceededError ErrorCode = 1105
ErrCodeLedgerIntractionLimitExceededError ErrorCode = 1106
ErrCodeStateKeySizeLimitError ErrorCode = 1107
ErrCodeStateValueSizeLimitError ErrorCode = 1108
ErrCodeTransactionFeeDeductionFailedError ErrorCode = 1109
ErrCodeComputationLimitExceededError ErrorCode = 1110
ErrCodeMemoryLimitExceededError ErrorCode = 1111
ErrCodeCouldNotDecodeExecutionParameterFromState ErrorCode = 1112
ErrCodeScriptExecutionTimedOutError ErrorCode = 1113
ErrCodeScriptExecutionCancelledError ErrorCode = 1114
ErrCodeEventEncodingError ErrorCode = 1115
// accounts errors 1200 - 1250
// ErrCodeAccountError ErrorCode = 1200 - reserved
ErrCodeAccountNotFoundError ErrorCode = 1201
ErrCodeAccountPublicKeyNotFoundError ErrorCode = 1202
ErrCodeAccountAlreadyExistsError ErrorCode = 1203
ErrCodeFrozenAccountError ErrorCode = 1204
ErrCodeAccountStorageNotInitializedError ErrorCode = 1205
// contract errors 1250 - 1300
// ErrCodeContractError ErrorCode = 1250 - reserved
ErrCodeContractNotFoundError ErrorCode = 1251
ErrCodeContractNamesNotFoundError ErrorCode = 1252
)