@seljs/runtime 1.3.0-beta.3 → 1.3.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/dependency-analyzer.cjs +3 -3
- package/dist/analysis/dependency-analyzer.mjs +4 -4
- package/dist/analysis/round-planner.cjs +3 -3
- package/dist/analysis/round-planner.mjs +4 -4
- package/dist/environment/client.d.cts +1 -1
- package/dist/environment/client.d.mts +1 -1
- package/dist/environment/contract-caller.cjs +1 -1
- package/dist/environment/contract-caller.mjs +2 -2
- package/dist/environment/environment.cjs +25 -15
- package/dist/environment/environment.d.cts +15 -4
- package/dist/environment/environment.d.mts +15 -4
- package/dist/environment/environment.mjs +26 -15
- package/dist/environment/error-wrapper.cjs +71 -13
- package/dist/environment/error-wrapper.mjs +71 -12
- package/dist/environment/types.d.cts +1 -1
- package/dist/environment/types.d.mts +1 -1
- package/dist/errors/errors.cjs +102 -33
- package/dist/errors/errors.d.cts +98 -31
- package/dist/errors/errors.d.mts +98 -31
- package/dist/errors/errors.mjs +96 -31
- package/dist/errors/index.d.mts +1 -1
- package/dist/execution/decode-revert.cjs +67 -0
- package/dist/execution/decode-revert.mjs +66 -0
- package/dist/execution/multicall-batcher.cjs +3 -3
- package/dist/execution/multicall-batcher.mjs +4 -4
- package/dist/execution/round-executor.cjs +18 -10
- package/dist/execution/round-executor.mjs +19 -11
- package/dist/execution/types.d.cts +37 -11
- package/dist/execution/types.d.mts +37 -11
- package/dist/index.cjs +11 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +8 -7
|
@@ -19,7 +19,7 @@ interface MulticallOptions {
|
|
|
19
19
|
* Limits for contract call execution.
|
|
20
20
|
*
|
|
21
21
|
* Execution limits (`maxRounds`, `maxCalls`) bound the multi-round contract
|
|
22
|
-
* execution engine. An {@link
|
|
22
|
+
* execution engine. An {@link SELExecutionLimitError} is thrown when exceeded.
|
|
23
23
|
*/
|
|
24
24
|
interface SELLimits {
|
|
25
25
|
/** Maximum number of dependency-ordered execution rounds (default: 10) */
|
|
@@ -19,7 +19,7 @@ interface MulticallOptions {
|
|
|
19
19
|
* Limits for contract call execution.
|
|
20
20
|
*
|
|
21
21
|
* Execution limits (`maxRounds`, `maxCalls`) bound the multi-round contract
|
|
22
|
-
* execution engine. An {@link
|
|
22
|
+
* execution engine. An {@link SELExecutionLimitError} is thrown when exceeded.
|
|
23
23
|
*/
|
|
24
24
|
interface SELLimits {
|
|
25
25
|
/** Maximum number of dependency-ordered execution rounds (default: 10) */
|
package/dist/errors/errors.cjs
CHANGED
|
@@ -2,15 +2,12 @@ require("../_virtual/_rolldown/runtime.cjs");
|
|
|
2
2
|
let _seljs_common = require("@seljs/common");
|
|
3
3
|
//#region src/errors/errors.ts
|
|
4
4
|
/**
|
|
5
|
-
* Thrown when
|
|
6
|
-
*
|
|
5
|
+
* Thrown when a contract-layer call fails after execution reached the
|
|
6
|
+
* chain (unknown method, ABI decode mismatch, etc.). Reverts are reported
|
|
7
|
+
* as {@link SELContractRevertError}, a subclass; batch-level Multicall3
|
|
8
|
+
* failures as {@link SELMulticallBatchError}.
|
|
7
9
|
*/
|
|
8
|
-
var
|
|
9
|
-
/**
|
|
10
|
-
* Thrown when contract validation or execution fails.
|
|
11
|
-
* Includes optional contract name and method name for context.
|
|
12
|
-
*/
|
|
13
|
-
var SELContractError = class extends _seljs_common.SELError {
|
|
10
|
+
var SELContractError = class extends _seljs_common.SELRuntimeError {
|
|
14
11
|
contractName;
|
|
15
12
|
methodName;
|
|
16
13
|
constructor(message, options) {
|
|
@@ -20,10 +17,93 @@ var SELContractError = class extends _seljs_common.SELError {
|
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
19
|
/**
|
|
23
|
-
* Thrown when a
|
|
24
|
-
*
|
|
20
|
+
* Thrown when a contract call reverted. Carries the decoded revert
|
|
21
|
+
* reason, raw revert data, and — when the selector matched a custom
|
|
22
|
+
* error in the contract's ABI — the decoded custom-error name and args.
|
|
23
|
+
*/
|
|
24
|
+
var SELContractRevertError = class extends SELContractError {
|
|
25
|
+
revertReason;
|
|
26
|
+
revertData;
|
|
27
|
+
decodedError;
|
|
28
|
+
constructor(message, options) {
|
|
29
|
+
super(message, {
|
|
30
|
+
cause: options?.cause,
|
|
31
|
+
contractName: options?.contractName,
|
|
32
|
+
methodName: options?.methodName
|
|
33
|
+
});
|
|
34
|
+
this.revertReason = options?.revertReason;
|
|
35
|
+
this.revertData = options?.revertData;
|
|
36
|
+
this.decodedError = options?.decodedError;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Thrown when a Multicall3 batch fails at the batch level — the aggregate
|
|
41
|
+
* call itself reverted, or individual calls could not be encoded/decoded.
|
|
42
|
+
* Individual sub-call reverts surface as {@link SELContractRevertError},
|
|
43
|
+
* not as this class.
|
|
44
|
+
*/
|
|
45
|
+
var SELMulticallBatchError = class extends SELContractError {
|
|
46
|
+
failedCallIndex;
|
|
47
|
+
constructor(message, options) {
|
|
48
|
+
super(message, {
|
|
49
|
+
cause: options?.cause,
|
|
50
|
+
contractName: options?.contractName,
|
|
51
|
+
methodName: options?.methodName
|
|
52
|
+
});
|
|
53
|
+
this.failedCallIndex = options?.failedCallIndex;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Base for failures from the JSON-RPC transport or node — the call never
|
|
58
|
+
* reached the contract. Transport errors (HTTP, WebSocket, timeout) use
|
|
59
|
+
* {@link SELProviderTransportError}; node-reported JSON-RPC errors use
|
|
60
|
+
* {@link SELProviderRpcError}. Catch the base to retry safely against an
|
|
61
|
+
* alternate RPC.
|
|
62
|
+
*/
|
|
63
|
+
var SELProviderError = class extends _seljs_common.SELRuntimeError {};
|
|
64
|
+
/**
|
|
65
|
+
* Thrown when the transport layer (HTTP, WebSocket) or a timeout
|
|
66
|
+
* prevented the request from reaching the node.
|
|
67
|
+
*/
|
|
68
|
+
var SELProviderTransportError = class extends SELProviderError {
|
|
69
|
+
httpStatus;
|
|
70
|
+
url;
|
|
71
|
+
body;
|
|
72
|
+
constructor(message, options) {
|
|
73
|
+
super(message, { cause: options?.cause });
|
|
74
|
+
this.httpStatus = options?.httpStatus;
|
|
75
|
+
this.url = options?.url;
|
|
76
|
+
this.body = options?.body;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Thrown when the node returned a JSON-RPC error response (rate limit,
|
|
81
|
+
* invalid params, unsupported method, user rejection, etc.).
|
|
25
82
|
*/
|
|
26
|
-
var
|
|
83
|
+
var SELProviderRpcError = class extends SELProviderError {
|
|
84
|
+
rpcCode;
|
|
85
|
+
rpcData;
|
|
86
|
+
method;
|
|
87
|
+
constructor(message, options) {
|
|
88
|
+
super(message, { cause: options?.cause });
|
|
89
|
+
this.rpcCode = options?.rpcCode;
|
|
90
|
+
this.rpcData = options?.rpcData;
|
|
91
|
+
this.method = options?.method;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Base for failures from the execution-framework layer that sits between
|
|
96
|
+
* parsed expressions and contract calls (dependency analysis, round
|
|
97
|
+
* planning). Concrete subclasses: {@link SELExecutionLimitError},
|
|
98
|
+
* {@link SELCircularDependencyError}.
|
|
99
|
+
*/
|
|
100
|
+
var SELExecutionError = class extends _seljs_common.SELRuntimeError {};
|
|
101
|
+
/**
|
|
102
|
+
* Thrown when a circular dependency is detected in the call dependency
|
|
103
|
+
* graph. Indicates that call A depends on call B which depends on call A
|
|
104
|
+
* (directly or transitively).
|
|
105
|
+
*/
|
|
106
|
+
var SELCircularDependencyError = class extends SELExecutionError {
|
|
27
107
|
callIds;
|
|
28
108
|
constructor(message, options) {
|
|
29
109
|
super(message, { cause: options?.cause });
|
|
@@ -34,7 +114,7 @@ var CircularDependencyError = class extends _seljs_common.SELError {
|
|
|
34
114
|
* Thrown when execution limits are exceeded (maxRounds or maxCalls).
|
|
35
115
|
* Prevents infinite loops and runaway execution.
|
|
36
116
|
*/
|
|
37
|
-
var
|
|
117
|
+
var SELExecutionLimitError = class extends SELExecutionError {
|
|
38
118
|
limitType;
|
|
39
119
|
limit;
|
|
40
120
|
actual;
|
|
@@ -46,31 +126,16 @@ var ExecutionLimitError = class extends _seljs_common.SELError {
|
|
|
46
126
|
}
|
|
47
127
|
};
|
|
48
128
|
/**
|
|
49
|
-
* Thrown when a Multicall3 batch execution fails.
|
|
50
|
-
* Includes the failed call index and optional contract name/method name for context.
|
|
51
|
-
*/
|
|
52
|
-
var MulticallBatchError = class extends _seljs_common.SELError {
|
|
53
|
-
failedCallIndex;
|
|
54
|
-
contractName;
|
|
55
|
-
methodName;
|
|
56
|
-
constructor(message, options) {
|
|
57
|
-
super(message, { cause: options?.cause });
|
|
58
|
-
this.failedCallIndex = options?.failedCallIndex;
|
|
59
|
-
this.contractName = options?.contractName;
|
|
60
|
-
this.methodName = options?.methodName;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
129
|
* Thrown when the provided client fails validation or is misconfigured.
|
|
65
130
|
*/
|
|
66
|
-
var SELClientError = class extends _seljs_common.
|
|
131
|
+
var SELClientError = class extends _seljs_common.SELStaticError {
|
|
67
132
|
name = "SELClientError";
|
|
68
133
|
};
|
|
69
134
|
/**
|
|
70
135
|
* Thrown when lint rules with error severity detect violations.
|
|
71
136
|
* Contains the diagnostics that caused the failure.
|
|
72
137
|
*/
|
|
73
|
-
var SELLintError = class extends _seljs_common.
|
|
138
|
+
var SELLintError = class extends _seljs_common.SELStaticError {
|
|
74
139
|
diagnostics;
|
|
75
140
|
constructor(diagnostics, options) {
|
|
76
141
|
const messages = diagnostics.map((d) => d.message).join("; ");
|
|
@@ -79,10 +144,14 @@ var SELLintError = class extends _seljs_common.SELError {
|
|
|
79
144
|
}
|
|
80
145
|
};
|
|
81
146
|
//#endregion
|
|
82
|
-
exports.
|
|
83
|
-
exports.ExecutionLimitError = ExecutionLimitError;
|
|
84
|
-
exports.MulticallBatchError = MulticallBatchError;
|
|
147
|
+
exports.SELCircularDependencyError = SELCircularDependencyError;
|
|
85
148
|
exports.SELClientError = SELClientError;
|
|
86
149
|
exports.SELContractError = SELContractError;
|
|
87
|
-
exports.
|
|
150
|
+
exports.SELContractRevertError = SELContractRevertError;
|
|
151
|
+
exports.SELExecutionError = SELExecutionError;
|
|
152
|
+
exports.SELExecutionLimitError = SELExecutionLimitError;
|
|
88
153
|
exports.SELLintError = SELLintError;
|
|
154
|
+
exports.SELMulticallBatchError = SELMulticallBatchError;
|
|
155
|
+
exports.SELProviderError = SELProviderError;
|
|
156
|
+
exports.SELProviderRpcError = SELProviderRpcError;
|
|
157
|
+
exports.SELProviderTransportError = SELProviderTransportError;
|
package/dist/errors/errors.d.cts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { SELDiagnostic } from "@seljs/checker";
|
|
2
|
-
import { SELError,
|
|
2
|
+
import { SELError, SELEvaluationError, SELRuntimeError, SELStaticError } from "@seljs/common";
|
|
3
3
|
|
|
4
4
|
//#region src/errors/errors.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Thrown when
|
|
7
|
-
*
|
|
6
|
+
* Thrown when a contract-layer call fails after execution reached the
|
|
7
|
+
* chain (unknown method, ABI decode mismatch, etc.). Reverts are reported
|
|
8
|
+
* as {@link SELContractRevertError}, a subclass; batch-level Multicall3
|
|
9
|
+
* failures as {@link SELMulticallBatchError}.
|
|
8
10
|
*/
|
|
9
|
-
declare class
|
|
10
|
-
/**
|
|
11
|
-
* Thrown when contract validation or execution fails.
|
|
12
|
-
* Includes optional contract name and method name for context.
|
|
13
|
-
*/
|
|
14
|
-
declare class SELContractError extends SELError {
|
|
11
|
+
declare class SELContractError extends SELRuntimeError {
|
|
15
12
|
readonly contractName?: string;
|
|
16
13
|
readonly methodName?: string;
|
|
17
14
|
constructor(message: string, options?: {
|
|
@@ -21,10 +18,95 @@ declare class SELContractError extends SELError {
|
|
|
21
18
|
});
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
|
-
* Thrown when a
|
|
25
|
-
*
|
|
21
|
+
* Thrown when a contract call reverted. Carries the decoded revert
|
|
22
|
+
* reason, raw revert data, and — when the selector matched a custom
|
|
23
|
+
* error in the contract's ABI — the decoded custom-error name and args.
|
|
24
|
+
*/
|
|
25
|
+
declare class SELContractRevertError extends SELContractError {
|
|
26
|
+
readonly revertReason?: string;
|
|
27
|
+
readonly revertData?: `0x${string}`;
|
|
28
|
+
readonly decodedError?: {
|
|
29
|
+
name: string;
|
|
30
|
+
args: readonly unknown[];
|
|
31
|
+
};
|
|
32
|
+
constructor(message: string, options?: {
|
|
33
|
+
cause?: unknown;
|
|
34
|
+
contractName?: string;
|
|
35
|
+
methodName?: string;
|
|
36
|
+
revertReason?: string;
|
|
37
|
+
revertData?: `0x${string}`;
|
|
38
|
+
decodedError?: {
|
|
39
|
+
name: string;
|
|
40
|
+
args: readonly unknown[];
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Thrown when a Multicall3 batch fails at the batch level — the aggregate
|
|
46
|
+
* call itself reverted, or individual calls could not be encoded/decoded.
|
|
47
|
+
* Individual sub-call reverts surface as {@link SELContractRevertError},
|
|
48
|
+
* not as this class.
|
|
49
|
+
*/
|
|
50
|
+
declare class SELMulticallBatchError extends SELContractError {
|
|
51
|
+
readonly failedCallIndex?: number;
|
|
52
|
+
constructor(message: string, options?: {
|
|
53
|
+
cause?: unknown;
|
|
54
|
+
failedCallIndex?: number;
|
|
55
|
+
contractName?: string;
|
|
56
|
+
methodName?: string;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Base for failures from the JSON-RPC transport or node — the call never
|
|
61
|
+
* reached the contract. Transport errors (HTTP, WebSocket, timeout) use
|
|
62
|
+
* {@link SELProviderTransportError}; node-reported JSON-RPC errors use
|
|
63
|
+
* {@link SELProviderRpcError}. Catch the base to retry safely against an
|
|
64
|
+
* alternate RPC.
|
|
65
|
+
*/
|
|
66
|
+
declare class SELProviderError extends SELRuntimeError {}
|
|
67
|
+
/**
|
|
68
|
+
* Thrown when the transport layer (HTTP, WebSocket) or a timeout
|
|
69
|
+
* prevented the request from reaching the node.
|
|
70
|
+
*/
|
|
71
|
+
declare class SELProviderTransportError extends SELProviderError {
|
|
72
|
+
readonly httpStatus?: number;
|
|
73
|
+
readonly url?: string;
|
|
74
|
+
readonly body?: string;
|
|
75
|
+
constructor(message: string, options?: {
|
|
76
|
+
cause?: unknown;
|
|
77
|
+
httpStatus?: number;
|
|
78
|
+
url?: string;
|
|
79
|
+
body?: string;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Thrown when the node returned a JSON-RPC error response (rate limit,
|
|
84
|
+
* invalid params, unsupported method, user rejection, etc.).
|
|
85
|
+
*/
|
|
86
|
+
declare class SELProviderRpcError extends SELProviderError {
|
|
87
|
+
readonly rpcCode?: number;
|
|
88
|
+
readonly rpcData?: unknown;
|
|
89
|
+
readonly method?: string;
|
|
90
|
+
constructor(message: string, options?: {
|
|
91
|
+
cause?: unknown;
|
|
92
|
+
rpcCode?: number;
|
|
93
|
+
rpcData?: unknown;
|
|
94
|
+
method?: string;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Base for failures from the execution-framework layer that sits between
|
|
99
|
+
* parsed expressions and contract calls (dependency analysis, round
|
|
100
|
+
* planning). Concrete subclasses: {@link SELExecutionLimitError},
|
|
101
|
+
* {@link SELCircularDependencyError}.
|
|
102
|
+
*/
|
|
103
|
+
declare class SELExecutionError extends SELRuntimeError {}
|
|
104
|
+
/**
|
|
105
|
+
* Thrown when a circular dependency is detected in the call dependency
|
|
106
|
+
* graph. Indicates that call A depends on call B which depends on call A
|
|
107
|
+
* (directly or transitively).
|
|
26
108
|
*/
|
|
27
|
-
declare class
|
|
109
|
+
declare class SELCircularDependencyError extends SELExecutionError {
|
|
28
110
|
readonly callIds: string[];
|
|
29
111
|
constructor(message: string, options?: {
|
|
30
112
|
cause?: unknown;
|
|
@@ -35,7 +117,7 @@ declare class CircularDependencyError extends SELError {
|
|
|
35
117
|
* Thrown when execution limits are exceeded (maxRounds or maxCalls).
|
|
36
118
|
* Prevents infinite loops and runaway execution.
|
|
37
119
|
*/
|
|
38
|
-
declare class
|
|
120
|
+
declare class SELExecutionLimitError extends SELExecutionError {
|
|
39
121
|
readonly limitType: "maxRounds" | "maxCalls";
|
|
40
122
|
readonly limit: number;
|
|
41
123
|
readonly actual: number;
|
|
@@ -46,36 +128,21 @@ declare class ExecutionLimitError extends SELError {
|
|
|
46
128
|
actual?: number;
|
|
47
129
|
});
|
|
48
130
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Thrown when a Multicall3 batch execution fails.
|
|
51
|
-
* Includes the failed call index and optional contract name/method name for context.
|
|
52
|
-
*/
|
|
53
|
-
declare class MulticallBatchError extends SELError {
|
|
54
|
-
readonly failedCallIndex?: number;
|
|
55
|
-
readonly contractName?: string;
|
|
56
|
-
readonly methodName?: string;
|
|
57
|
-
constructor(message: string, options?: {
|
|
58
|
-
cause?: unknown;
|
|
59
|
-
failedCallIndex?: number;
|
|
60
|
-
contractName?: string;
|
|
61
|
-
methodName?: string;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
131
|
/**
|
|
65
132
|
* Thrown when the provided client fails validation or is misconfigured.
|
|
66
133
|
*/
|
|
67
|
-
declare class SELClientError extends
|
|
134
|
+
declare class SELClientError extends SELStaticError {
|
|
68
135
|
readonly name = "SELClientError";
|
|
69
136
|
}
|
|
70
137
|
/**
|
|
71
138
|
* Thrown when lint rules with error severity detect violations.
|
|
72
139
|
* Contains the diagnostics that caused the failure.
|
|
73
140
|
*/
|
|
74
|
-
declare class SELLintError extends
|
|
141
|
+
declare class SELLintError extends SELStaticError {
|
|
75
142
|
readonly diagnostics: SELDiagnostic[];
|
|
76
143
|
constructor(diagnostics: SELDiagnostic[], options?: {
|
|
77
144
|
cause?: unknown;
|
|
78
145
|
});
|
|
79
146
|
}
|
|
80
147
|
//#endregion
|
|
81
|
-
export {
|
|
148
|
+
export { SELCircularDependencyError, SELClientError, SELContractError, SELContractRevertError, SELError, SELEvaluationError, SELExecutionError, SELExecutionLimitError, SELLintError, SELMulticallBatchError, SELProviderError, SELProviderRpcError, SELProviderTransportError, SELRuntimeError, SELStaticError };
|
package/dist/errors/errors.d.mts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { SELDiagnostic } from "@seljs/checker";
|
|
2
|
-
import { SELError,
|
|
2
|
+
import { SELError as SELError$1, SELEvaluationError as SELEvaluationError$1, SELRuntimeError, SELStaticError } from "@seljs/common";
|
|
3
3
|
|
|
4
4
|
//#region src/errors/errors.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Thrown when
|
|
7
|
-
*
|
|
6
|
+
* Thrown when a contract-layer call fails after execution reached the
|
|
7
|
+
* chain (unknown method, ABI decode mismatch, etc.). Reverts are reported
|
|
8
|
+
* as {@link SELContractRevertError}, a subclass; batch-level Multicall3
|
|
9
|
+
* failures as {@link SELMulticallBatchError}.
|
|
8
10
|
*/
|
|
9
|
-
declare class
|
|
10
|
-
/**
|
|
11
|
-
* Thrown when contract validation or execution fails.
|
|
12
|
-
* Includes optional contract name and method name for context.
|
|
13
|
-
*/
|
|
14
|
-
declare class SELContractError extends SELError {
|
|
11
|
+
declare class SELContractError extends SELRuntimeError {
|
|
15
12
|
readonly contractName?: string;
|
|
16
13
|
readonly methodName?: string;
|
|
17
14
|
constructor(message: string, options?: {
|
|
@@ -21,10 +18,95 @@ declare class SELContractError extends SELError {
|
|
|
21
18
|
});
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
|
-
* Thrown when a
|
|
25
|
-
*
|
|
21
|
+
* Thrown when a contract call reverted. Carries the decoded revert
|
|
22
|
+
* reason, raw revert data, and — when the selector matched a custom
|
|
23
|
+
* error in the contract's ABI — the decoded custom-error name and args.
|
|
24
|
+
*/
|
|
25
|
+
declare class SELContractRevertError extends SELContractError {
|
|
26
|
+
readonly revertReason?: string;
|
|
27
|
+
readonly revertData?: `0x${string}`;
|
|
28
|
+
readonly decodedError?: {
|
|
29
|
+
name: string;
|
|
30
|
+
args: readonly unknown[];
|
|
31
|
+
};
|
|
32
|
+
constructor(message: string, options?: {
|
|
33
|
+
cause?: unknown;
|
|
34
|
+
contractName?: string;
|
|
35
|
+
methodName?: string;
|
|
36
|
+
revertReason?: string;
|
|
37
|
+
revertData?: `0x${string}`;
|
|
38
|
+
decodedError?: {
|
|
39
|
+
name: string;
|
|
40
|
+
args: readonly unknown[];
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Thrown when a Multicall3 batch fails at the batch level — the aggregate
|
|
46
|
+
* call itself reverted, or individual calls could not be encoded/decoded.
|
|
47
|
+
* Individual sub-call reverts surface as {@link SELContractRevertError},
|
|
48
|
+
* not as this class.
|
|
49
|
+
*/
|
|
50
|
+
declare class SELMulticallBatchError extends SELContractError {
|
|
51
|
+
readonly failedCallIndex?: number;
|
|
52
|
+
constructor(message: string, options?: {
|
|
53
|
+
cause?: unknown;
|
|
54
|
+
failedCallIndex?: number;
|
|
55
|
+
contractName?: string;
|
|
56
|
+
methodName?: string;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Base for failures from the JSON-RPC transport or node — the call never
|
|
61
|
+
* reached the contract. Transport errors (HTTP, WebSocket, timeout) use
|
|
62
|
+
* {@link SELProviderTransportError}; node-reported JSON-RPC errors use
|
|
63
|
+
* {@link SELProviderRpcError}. Catch the base to retry safely against an
|
|
64
|
+
* alternate RPC.
|
|
65
|
+
*/
|
|
66
|
+
declare class SELProviderError extends SELRuntimeError {}
|
|
67
|
+
/**
|
|
68
|
+
* Thrown when the transport layer (HTTP, WebSocket) or a timeout
|
|
69
|
+
* prevented the request from reaching the node.
|
|
70
|
+
*/
|
|
71
|
+
declare class SELProviderTransportError extends SELProviderError {
|
|
72
|
+
readonly httpStatus?: number;
|
|
73
|
+
readonly url?: string;
|
|
74
|
+
readonly body?: string;
|
|
75
|
+
constructor(message: string, options?: {
|
|
76
|
+
cause?: unknown;
|
|
77
|
+
httpStatus?: number;
|
|
78
|
+
url?: string;
|
|
79
|
+
body?: string;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Thrown when the node returned a JSON-RPC error response (rate limit,
|
|
84
|
+
* invalid params, unsupported method, user rejection, etc.).
|
|
85
|
+
*/
|
|
86
|
+
declare class SELProviderRpcError extends SELProviderError {
|
|
87
|
+
readonly rpcCode?: number;
|
|
88
|
+
readonly rpcData?: unknown;
|
|
89
|
+
readonly method?: string;
|
|
90
|
+
constructor(message: string, options?: {
|
|
91
|
+
cause?: unknown;
|
|
92
|
+
rpcCode?: number;
|
|
93
|
+
rpcData?: unknown;
|
|
94
|
+
method?: string;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Base for failures from the execution-framework layer that sits between
|
|
99
|
+
* parsed expressions and contract calls (dependency analysis, round
|
|
100
|
+
* planning). Concrete subclasses: {@link SELExecutionLimitError},
|
|
101
|
+
* {@link SELCircularDependencyError}.
|
|
102
|
+
*/
|
|
103
|
+
declare class SELExecutionError extends SELRuntimeError {}
|
|
104
|
+
/**
|
|
105
|
+
* Thrown when a circular dependency is detected in the call dependency
|
|
106
|
+
* graph. Indicates that call A depends on call B which depends on call A
|
|
107
|
+
* (directly or transitively).
|
|
26
108
|
*/
|
|
27
|
-
declare class
|
|
109
|
+
declare class SELCircularDependencyError extends SELExecutionError {
|
|
28
110
|
readonly callIds: string[];
|
|
29
111
|
constructor(message: string, options?: {
|
|
30
112
|
cause?: unknown;
|
|
@@ -35,7 +117,7 @@ declare class CircularDependencyError extends SELError {
|
|
|
35
117
|
* Thrown when execution limits are exceeded (maxRounds or maxCalls).
|
|
36
118
|
* Prevents infinite loops and runaway execution.
|
|
37
119
|
*/
|
|
38
|
-
declare class
|
|
120
|
+
declare class SELExecutionLimitError extends SELExecutionError {
|
|
39
121
|
readonly limitType: "maxRounds" | "maxCalls";
|
|
40
122
|
readonly limit: number;
|
|
41
123
|
readonly actual: number;
|
|
@@ -46,36 +128,21 @@ declare class ExecutionLimitError extends SELError {
|
|
|
46
128
|
actual?: number;
|
|
47
129
|
});
|
|
48
130
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Thrown when a Multicall3 batch execution fails.
|
|
51
|
-
* Includes the failed call index and optional contract name/method name for context.
|
|
52
|
-
*/
|
|
53
|
-
declare class MulticallBatchError extends SELError {
|
|
54
|
-
readonly failedCallIndex?: number;
|
|
55
|
-
readonly contractName?: string;
|
|
56
|
-
readonly methodName?: string;
|
|
57
|
-
constructor(message: string, options?: {
|
|
58
|
-
cause?: unknown;
|
|
59
|
-
failedCallIndex?: number;
|
|
60
|
-
contractName?: string;
|
|
61
|
-
methodName?: string;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
131
|
/**
|
|
65
132
|
* Thrown when the provided client fails validation or is misconfigured.
|
|
66
133
|
*/
|
|
67
|
-
declare class SELClientError extends
|
|
134
|
+
declare class SELClientError extends SELStaticError {
|
|
68
135
|
readonly name = "SELClientError";
|
|
69
136
|
}
|
|
70
137
|
/**
|
|
71
138
|
* Thrown when lint rules with error severity detect violations.
|
|
72
139
|
* Contains the diagnostics that caused the failure.
|
|
73
140
|
*/
|
|
74
|
-
declare class SELLintError extends
|
|
141
|
+
declare class SELLintError extends SELStaticError {
|
|
75
142
|
readonly diagnostics: SELDiagnostic[];
|
|
76
143
|
constructor(diagnostics: SELDiagnostic[], options?: {
|
|
77
144
|
cause?: unknown;
|
|
78
145
|
});
|
|
79
146
|
}
|
|
80
147
|
//#endregion
|
|
81
|
-
export {
|
|
148
|
+
export { SELCircularDependencyError, SELClientError, SELContractError, SELContractRevertError, SELError$1 as SELError, SELEvaluationError$1 as SELEvaluationError, SELExecutionError, SELExecutionLimitError, SELLintError, SELMulticallBatchError, SELProviderError, SELProviderRpcError, SELProviderTransportError, SELRuntimeError, SELStaticError };
|