@seljs/runtime 1.3.0-beta.2 → 1.3.0-beta.21
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/call-collector.cjs +19 -0
- package/dist/analysis/call-collector.mjs +19 -0
- package/dist/environment/builtin-contracts.cjs +22 -0
- package/dist/environment/builtin-contracts.mjs +22 -0
- package/dist/environment/client.d.cts +1 -1
- package/dist/environment/client.d.mts +1 -1
- package/dist/environment/environment.cjs +39 -21
- package/dist/environment/environment.d.cts +7 -3
- package/dist/environment/environment.d.mts +7 -3
- package/dist/environment/environment.mjs +40 -21
- package/dist/environment/error-wrapper.cjs +2 -3
- package/dist/environment/error-wrapper.mjs +3 -3
- package/dist/errors/errors.d.cts +2 -2
- package/dist/errors/errors.d.mts +2 -2
- package/dist/errors/errors.mjs +2 -2
- package/dist/errors/index.d.mts +1 -1
- package/dist/execution/multicall-batcher.cjs +1 -1
- package/dist/execution/multicall-batcher.mjs +1 -1
- package/dist/execution/multicall.cjs +18 -0
- package/dist/execution/multicall.mjs +18 -1
- package/dist/execution/types.d.cts +37 -11
- package/dist/execution/types.d.mts +37 -11
- package/dist/index.cjs +0 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
|
@@ -196,6 +196,25 @@ const collectCalls = (ast, registry) => {
|
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
if (!receiverName || !registry.get(receiverName)) {
|
|
199
|
+
if (method === "balance" && args.length === 0) {
|
|
200
|
+
const receiverNode = node.args[1];
|
|
201
|
+
const { arg: receiverArg, traversed } = classifyArg(receiverNode);
|
|
202
|
+
if (receiverArg) {
|
|
203
|
+
const call = {
|
|
204
|
+
id: generateCallId("__multicall3", "getEthBalance", [receiverArg]),
|
|
205
|
+
contract: "__multicall3",
|
|
206
|
+
method: "getEthBalance",
|
|
207
|
+
args: [receiverArg],
|
|
208
|
+
astNode: node
|
|
209
|
+
};
|
|
210
|
+
calls.push(call);
|
|
211
|
+
debug("found address accessor %s (id=%s)", "balance", call.id);
|
|
212
|
+
return call;
|
|
213
|
+
}
|
|
214
|
+
deferredNodes.add(node);
|
|
215
|
+
if (!traversed) traverse(receiverNode);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
199
218
|
handleNonContractRCall(node, method, args);
|
|
200
219
|
return;
|
|
201
220
|
}
|
|
@@ -195,6 +195,25 @@ const collectCalls = (ast, registry) => {
|
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
if (!receiverName || !registry.get(receiverName)) {
|
|
198
|
+
if (method === "balance" && args.length === 0) {
|
|
199
|
+
const receiverNode = node.args[1];
|
|
200
|
+
const { arg: receiverArg, traversed } = classifyArg(receiverNode);
|
|
201
|
+
if (receiverArg) {
|
|
202
|
+
const call = {
|
|
203
|
+
id: generateCallId("__multicall3", "getEthBalance", [receiverArg]),
|
|
204
|
+
contract: "__multicall3",
|
|
205
|
+
method: "getEthBalance",
|
|
206
|
+
args: [receiverArg],
|
|
207
|
+
astNode: node
|
|
208
|
+
};
|
|
209
|
+
calls.push(call);
|
|
210
|
+
debug("found address accessor %s (id=%s)", "balance", call.id);
|
|
211
|
+
return call;
|
|
212
|
+
}
|
|
213
|
+
deferredNodes.add(node);
|
|
214
|
+
if (!traversed) traverse(receiverNode);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
198
217
|
handleNonContractRCall(node, method, args);
|
|
199
218
|
return;
|
|
200
219
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_multicall = require("../execution/multicall.cjs");
|
|
2
|
+
//#region src/environment/builtin-contracts.ts
|
|
3
|
+
/**
|
|
4
|
+
* Returns built-in contract schemas that are always available in the runtime.
|
|
5
|
+
* These are internal contracts not defined by the user schema but required
|
|
6
|
+
* for built-in features like address accessors.
|
|
7
|
+
*/
|
|
8
|
+
const getBuiltinContracts = (multicall) => [{
|
|
9
|
+
name: "__multicall3",
|
|
10
|
+
address: multicall?.address ?? "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
11
|
+
methods: [{
|
|
12
|
+
name: "getEthBalance",
|
|
13
|
+
params: [{
|
|
14
|
+
name: "addr",
|
|
15
|
+
type: "sol_address"
|
|
16
|
+
}],
|
|
17
|
+
returns: "sol_int",
|
|
18
|
+
abi: require_multicall.getEthBalanceAbi
|
|
19
|
+
}]
|
|
20
|
+
}];
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.getBuiltinContracts = getBuiltinContracts;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEthBalanceAbi } from "../execution/multicall.mjs";
|
|
2
|
+
//#region src/environment/builtin-contracts.ts
|
|
3
|
+
/**
|
|
4
|
+
* Returns built-in contract schemas that are always available in the runtime.
|
|
5
|
+
* These are internal contracts not defined by the user schema but required
|
|
6
|
+
* for built-in features like address accessors.
|
|
7
|
+
*/
|
|
8
|
+
const getBuiltinContracts = (multicall) => [{
|
|
9
|
+
name: "__multicall3",
|
|
10
|
+
address: multicall?.address ?? "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
11
|
+
methods: [{
|
|
12
|
+
name: "getEthBalance",
|
|
13
|
+
params: [{
|
|
14
|
+
name: "addr",
|
|
15
|
+
type: "sol_address"
|
|
16
|
+
}],
|
|
17
|
+
returns: "sol_int",
|
|
18
|
+
abi: getEthBalanceAbi
|
|
19
|
+
}]
|
|
20
|
+
}];
|
|
21
|
+
//#endregion
|
|
22
|
+
export { getBuiltinContracts };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_builtin_contracts = require("./builtin-contracts.cjs");
|
|
2
3
|
const require_errors = require("../errors/errors.cjs");
|
|
3
4
|
require("../errors/index.cjs");
|
|
4
5
|
const require_client = require("./client.cjs");
|
|
@@ -12,7 +13,6 @@ const require_dependency_analyzer = require("../analysis/dependency-analyzer.cjs
|
|
|
12
13
|
const require_round_planner = require("../analysis/round-planner.cjs");
|
|
13
14
|
const require_multi_round_executor = require("../execution/multi-round-executor.cjs");
|
|
14
15
|
let _seljs_checker = require("@seljs/checker");
|
|
15
|
-
let _seljs_common = require("@seljs/common");
|
|
16
16
|
//#region src/environment/environment.ts
|
|
17
17
|
/**
|
|
18
18
|
* Core SEL runtime that bridges CEL expression evaluation with EVM contract reads.
|
|
@@ -73,16 +73,20 @@ var SELRuntime = class {
|
|
|
73
73
|
this.multicallOptions = config.multicall;
|
|
74
74
|
if (config.client) require_client.validateClient(config.client);
|
|
75
75
|
this.client = config.client;
|
|
76
|
-
this.schema =
|
|
76
|
+
this.schema = {
|
|
77
|
+
...config.schema,
|
|
78
|
+
contracts: [...config.schema.contracts, ...require_builtin_contracts.getBuiltinContracts(config.multicall)]
|
|
79
|
+
};
|
|
77
80
|
const handler = (contractName, methodName, args) => {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const resolved = this.resolveCall(contractName, methodName, args);
|
|
82
|
+
const contract = this.findContract(resolved.contractName);
|
|
83
|
+
if (!contract) throw new require_errors.SELContractError(`Unknown contract "${resolved.contractName}"`, { contractName: resolved.contractName });
|
|
84
|
+
const method = contract.methods.find((m) => m.name === resolved.methodName);
|
|
85
|
+
if (!method) throw new require_errors.SELContractError(`Unknown method "${resolved.contractName}.${resolved.methodName}"`, {
|
|
86
|
+
contractName: resolved.contractName,
|
|
87
|
+
methodName: resolved.methodName
|
|
84
88
|
});
|
|
85
|
-
return require_contract_caller.executeContractCall(contract, method, args, {
|
|
89
|
+
return require_contract_caller.executeContractCall(contract, method, resolved.args, {
|
|
86
90
|
executionCache: this.currentCache,
|
|
87
91
|
client: this.currentClient ?? this.client,
|
|
88
92
|
codecRegistry: this.codecRegistry,
|
|
@@ -101,7 +105,7 @@ var SELRuntime = class {
|
|
|
101
105
|
*
|
|
102
106
|
* @param expression - A CEL expression string to type-check
|
|
103
107
|
* @returns The type-check result containing validity, inferred type, and any errors
|
|
104
|
-
* @throws {@link
|
|
108
|
+
* @throws {@link SELEvaluationError} If the expression contains unrecoverable type errors
|
|
105
109
|
*/
|
|
106
110
|
check(expression) {
|
|
107
111
|
try {
|
|
@@ -125,8 +129,7 @@ var SELRuntime = class {
|
|
|
125
129
|
* @param context Variable bindings for evaluation
|
|
126
130
|
* @param options Optional client override
|
|
127
131
|
* @returns An {@link EvaluateResult} containing the value and optional execution metadata
|
|
128
|
-
* @throws {@link
|
|
129
|
-
* @throws {@link SELTypeError} If type-checking fails
|
|
132
|
+
* @throws {@link SELLintError} If the expression fails parse, type-check, or lint rules
|
|
130
133
|
* @throws {@link SELContractError} If a contract call fails or no client is available
|
|
131
134
|
* @throws {@link SELEvaluationError} If CEL evaluation fails
|
|
132
135
|
*/
|
|
@@ -144,23 +147,21 @@ var SELRuntime = class {
|
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
planExecution(expression, evaluationContext) {
|
|
150
|
+
const checkResult = this.checker.check(expression);
|
|
151
|
+
if (!checkResult.valid) throw new require_errors.SELLintError(checkResult.diagnostics.filter((d) => d.severity === "error"));
|
|
147
152
|
const parseResult = this.env.parse(expression);
|
|
148
153
|
const collectedCalls = require_call_collector.collectCalls(parseResult.ast, { get: (name) => this.findContract(name) });
|
|
149
154
|
debug("evaluate: collected %d calls", collectedCalls.length);
|
|
150
155
|
const normalizedContext = Object.keys(evaluationContext).length ? require_context.normalizeContextForEvaluation(evaluationContext, this.variableTypes, this.codecRegistry) : void 0;
|
|
151
156
|
const executionVariables = Object.keys(evaluationContext).length ? evaluationContext : {};
|
|
152
|
-
const
|
|
153
|
-
if (!typeCheckResult.valid) throw new _seljs_common.SELTypeError(typeCheckResult.error?.message ?? "Type check failed", { cause: typeCheckResult.error });
|
|
154
|
-
const lintResult = this.checker.check(expression);
|
|
155
|
-
const lintErrors = lintResult.diagnostics.filter((d) => d.severity === "error");
|
|
156
|
-
if (lintErrors.length > 0) throw new require_errors.SELLintError(lintErrors);
|
|
157
|
+
const diagnostics = checkResult.diagnostics.filter((d) => d.severity !== "error");
|
|
157
158
|
return {
|
|
158
159
|
parseResult,
|
|
159
160
|
collectedCalls,
|
|
160
161
|
normalizedContext,
|
|
161
162
|
executionVariables,
|
|
162
|
-
|
|
163
|
-
diagnostics
|
|
163
|
+
resolvedType: checkResult.type,
|
|
164
|
+
diagnostics
|
|
164
165
|
};
|
|
165
166
|
}
|
|
166
167
|
async executeContractCalls(collectedCalls, executionVariables, resolvedClient) {
|
|
@@ -211,7 +212,7 @@ var SELRuntime = class {
|
|
|
211
212
|
const resolvedClient = options?.client ?? this.client;
|
|
212
213
|
if (resolvedClient && resolvedClient !== this.client) require_client.validateClient(resolvedClient);
|
|
213
214
|
try {
|
|
214
|
-
const { parseResult, collectedCalls, normalizedContext, executionVariables,
|
|
215
|
+
const { parseResult, collectedCalls, normalizedContext, executionVariables, resolvedType, diagnostics } = this.planExecution(expression, context ?? {});
|
|
215
216
|
let executionMeta;
|
|
216
217
|
let executionCache;
|
|
217
218
|
if (collectedCalls.length > 0) {
|
|
@@ -235,18 +236,35 @@ var SELRuntime = class {
|
|
|
235
236
|
this.currentClient = void 0;
|
|
236
237
|
this.currentCallCounter = void 0;
|
|
237
238
|
}
|
|
238
|
-
const value =
|
|
239
|
+
const value = resolvedType ? this.codecRegistry.encode(resolvedType, result) : result;
|
|
239
240
|
debug("evaluate: result type=%s", typeof value);
|
|
240
241
|
const evalResult = executionMeta ? {
|
|
241
242
|
value,
|
|
242
243
|
meta: executionMeta
|
|
243
244
|
} : { value };
|
|
245
|
+
if (resolvedType) evalResult.type = resolvedType;
|
|
244
246
|
if (diagnostics.length > 0) evalResult.diagnostics = diagnostics;
|
|
245
247
|
return evalResult;
|
|
246
248
|
} catch (error) {
|
|
247
249
|
throw require_error_wrapper.wrapError(error);
|
|
248
250
|
}
|
|
249
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Remaps receiver method calls to their underlying contract calls.
|
|
254
|
+
* e.g., sol_address.balance() → __multicall3.getEthBalance(addr)
|
|
255
|
+
*/
|
|
256
|
+
resolveCall(contractName, methodName, args) {
|
|
257
|
+
if (contractName === "sol_address" && methodName === "balance") return {
|
|
258
|
+
contractName: "__multicall3",
|
|
259
|
+
methodName: "getEthBalance",
|
|
260
|
+
args
|
|
261
|
+
};
|
|
262
|
+
return {
|
|
263
|
+
contractName,
|
|
264
|
+
methodName,
|
|
265
|
+
args
|
|
266
|
+
};
|
|
267
|
+
}
|
|
250
268
|
findContract(name) {
|
|
251
269
|
return this.schema.contracts.find((c) => c.name === name);
|
|
252
270
|
}
|
|
@@ -52,7 +52,7 @@ declare class SELRuntime {
|
|
|
52
52
|
*
|
|
53
53
|
* @param expression - A CEL expression string to type-check
|
|
54
54
|
* @returns The type-check result containing validity, inferred type, and any errors
|
|
55
|
-
* @throws {@link
|
|
55
|
+
* @throws {@link SELEvaluationError} If the expression contains unrecoverable type errors
|
|
56
56
|
*/
|
|
57
57
|
check(expression: string): TypeCheckResult;
|
|
58
58
|
/**
|
|
@@ -70,8 +70,7 @@ declare class SELRuntime {
|
|
|
70
70
|
* @param context Variable bindings for evaluation
|
|
71
71
|
* @param options Optional client override
|
|
72
72
|
* @returns An {@link EvaluateResult} containing the value and optional execution metadata
|
|
73
|
-
* @throws {@link
|
|
74
|
-
* @throws {@link SELTypeError} If type-checking fails
|
|
73
|
+
* @throws {@link SELLintError} If the expression fails parse, type-check, or lint rules
|
|
75
74
|
* @throws {@link SELContractError} If a contract call fails or no client is available
|
|
76
75
|
* @throws {@link SELEvaluationError} If CEL evaluation fails
|
|
77
76
|
*/
|
|
@@ -79,6 +78,11 @@ declare class SELRuntime {
|
|
|
79
78
|
private planExecution;
|
|
80
79
|
private executeContractCalls;
|
|
81
80
|
private doEvaluate;
|
|
81
|
+
/**
|
|
82
|
+
* Remaps receiver method calls to their underlying contract calls.
|
|
83
|
+
* e.g., sol_address.balance() → __multicall3.getEthBalance(addr)
|
|
84
|
+
*/
|
|
85
|
+
private resolveCall;
|
|
82
86
|
private findContract;
|
|
83
87
|
}
|
|
84
88
|
//#endregion
|
|
@@ -52,7 +52,7 @@ declare class SELRuntime {
|
|
|
52
52
|
*
|
|
53
53
|
* @param expression - A CEL expression string to type-check
|
|
54
54
|
* @returns The type-check result containing validity, inferred type, and any errors
|
|
55
|
-
* @throws {@link
|
|
55
|
+
* @throws {@link SELEvaluationError} If the expression contains unrecoverable type errors
|
|
56
56
|
*/
|
|
57
57
|
check(expression: string): TypeCheckResult;
|
|
58
58
|
/**
|
|
@@ -70,8 +70,7 @@ declare class SELRuntime {
|
|
|
70
70
|
* @param context Variable bindings for evaluation
|
|
71
71
|
* @param options Optional client override
|
|
72
72
|
* @returns An {@link EvaluateResult} containing the value and optional execution metadata
|
|
73
|
-
* @throws {@link
|
|
74
|
-
* @throws {@link SELTypeError} If type-checking fails
|
|
73
|
+
* @throws {@link SELLintError} If the expression fails parse, type-check, or lint rules
|
|
75
74
|
* @throws {@link SELContractError} If a contract call fails or no client is available
|
|
76
75
|
* @throws {@link SELEvaluationError} If CEL evaluation fails
|
|
77
76
|
*/
|
|
@@ -79,6 +78,11 @@ declare class SELRuntime {
|
|
|
79
78
|
private planExecution;
|
|
80
79
|
private executeContractCalls;
|
|
81
80
|
private doEvaluate;
|
|
81
|
+
/**
|
|
82
|
+
* Remaps receiver method calls to their underlying contract calls.
|
|
83
|
+
* e.g., sol_address.balance() → __multicall3.getEthBalance(addr)
|
|
84
|
+
*/
|
|
85
|
+
private resolveCall;
|
|
82
86
|
private findContract;
|
|
83
87
|
}
|
|
84
88
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getBuiltinContracts } from "./builtin-contracts.mjs";
|
|
2
|
+
import { MulticallBatchError, SELContractError, SELLintError } from "../errors/errors.mjs";
|
|
2
3
|
import "../errors/index.mjs";
|
|
3
4
|
import { validateClient } from "./client.mjs";
|
|
4
5
|
import { normalizeContextForEvaluation } from "./context.mjs";
|
|
@@ -71,16 +72,20 @@ var SELRuntime = class {
|
|
|
71
72
|
this.multicallOptions = config.multicall;
|
|
72
73
|
if (config.client) validateClient(config.client);
|
|
73
74
|
this.client = config.client;
|
|
74
|
-
this.schema =
|
|
75
|
+
this.schema = {
|
|
76
|
+
...config.schema,
|
|
77
|
+
contracts: [...config.schema.contracts, ...getBuiltinContracts(config.multicall)]
|
|
78
|
+
};
|
|
75
79
|
const handler = (contractName, methodName, args) => {
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
const resolved = this.resolveCall(contractName, methodName, args);
|
|
81
|
+
const contract = this.findContract(resolved.contractName);
|
|
82
|
+
if (!contract) throw new SELContractError(`Unknown contract "${resolved.contractName}"`, { contractName: resolved.contractName });
|
|
83
|
+
const method = contract.methods.find((m) => m.name === resolved.methodName);
|
|
84
|
+
if (!method) throw new SELContractError(`Unknown method "${resolved.contractName}.${resolved.methodName}"`, {
|
|
85
|
+
contractName: resolved.contractName,
|
|
86
|
+
methodName: resolved.methodName
|
|
82
87
|
});
|
|
83
|
-
return executeContractCall(contract, method, args, {
|
|
88
|
+
return executeContractCall(contract, method, resolved.args, {
|
|
84
89
|
executionCache: this.currentCache,
|
|
85
90
|
client: this.currentClient ?? this.client,
|
|
86
91
|
codecRegistry: this.codecRegistry,
|
|
@@ -99,7 +104,7 @@ var SELRuntime = class {
|
|
|
99
104
|
*
|
|
100
105
|
* @param expression - A CEL expression string to type-check
|
|
101
106
|
* @returns The type-check result containing validity, inferred type, and any errors
|
|
102
|
-
* @throws {@link
|
|
107
|
+
* @throws {@link SELEvaluationError} If the expression contains unrecoverable type errors
|
|
103
108
|
*/
|
|
104
109
|
check(expression) {
|
|
105
110
|
try {
|
|
@@ -123,8 +128,7 @@ var SELRuntime = class {
|
|
|
123
128
|
* @param context Variable bindings for evaluation
|
|
124
129
|
* @param options Optional client override
|
|
125
130
|
* @returns An {@link EvaluateResult} containing the value and optional execution metadata
|
|
126
|
-
* @throws {@link
|
|
127
|
-
* @throws {@link SELTypeError} If type-checking fails
|
|
131
|
+
* @throws {@link SELLintError} If the expression fails parse, type-check, or lint rules
|
|
128
132
|
* @throws {@link SELContractError} If a contract call fails or no client is available
|
|
129
133
|
* @throws {@link SELEvaluationError} If CEL evaluation fails
|
|
130
134
|
*/
|
|
@@ -142,23 +146,21 @@ var SELRuntime = class {
|
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
planExecution(expression, evaluationContext) {
|
|
149
|
+
const checkResult = this.checker.check(expression);
|
|
150
|
+
if (!checkResult.valid) throw new SELLintError(checkResult.diagnostics.filter((d) => d.severity === "error"));
|
|
145
151
|
const parseResult = this.env.parse(expression);
|
|
146
152
|
const collectedCalls = collectCalls(parseResult.ast, { get: (name) => this.findContract(name) });
|
|
147
153
|
debug("evaluate: collected %d calls", collectedCalls.length);
|
|
148
154
|
const normalizedContext = Object.keys(evaluationContext).length ? normalizeContextForEvaluation(evaluationContext, this.variableTypes, this.codecRegistry) : void 0;
|
|
149
155
|
const executionVariables = Object.keys(evaluationContext).length ? evaluationContext : {};
|
|
150
|
-
const
|
|
151
|
-
if (!typeCheckResult.valid) throw new SELTypeError(typeCheckResult.error?.message ?? "Type check failed", { cause: typeCheckResult.error });
|
|
152
|
-
const lintResult = this.checker.check(expression);
|
|
153
|
-
const lintErrors = lintResult.diagnostics.filter((d) => d.severity === "error");
|
|
154
|
-
if (lintErrors.length > 0) throw new SELLintError(lintErrors);
|
|
156
|
+
const diagnostics = checkResult.diagnostics.filter((d) => d.severity !== "error");
|
|
155
157
|
return {
|
|
156
158
|
parseResult,
|
|
157
159
|
collectedCalls,
|
|
158
160
|
normalizedContext,
|
|
159
161
|
executionVariables,
|
|
160
|
-
|
|
161
|
-
diagnostics
|
|
162
|
+
resolvedType: checkResult.type,
|
|
163
|
+
diagnostics
|
|
162
164
|
};
|
|
163
165
|
}
|
|
164
166
|
async executeContractCalls(collectedCalls, executionVariables, resolvedClient) {
|
|
@@ -209,7 +211,7 @@ var SELRuntime = class {
|
|
|
209
211
|
const resolvedClient = options?.client ?? this.client;
|
|
210
212
|
if (resolvedClient && resolvedClient !== this.client) validateClient(resolvedClient);
|
|
211
213
|
try {
|
|
212
|
-
const { parseResult, collectedCalls, normalizedContext, executionVariables,
|
|
214
|
+
const { parseResult, collectedCalls, normalizedContext, executionVariables, resolvedType, diagnostics } = this.planExecution(expression, context ?? {});
|
|
213
215
|
let executionMeta;
|
|
214
216
|
let executionCache;
|
|
215
217
|
if (collectedCalls.length > 0) {
|
|
@@ -233,18 +235,35 @@ var SELRuntime = class {
|
|
|
233
235
|
this.currentClient = void 0;
|
|
234
236
|
this.currentCallCounter = void 0;
|
|
235
237
|
}
|
|
236
|
-
const value =
|
|
238
|
+
const value = resolvedType ? this.codecRegistry.encode(resolvedType, result) : result;
|
|
237
239
|
debug("evaluate: result type=%s", typeof value);
|
|
238
240
|
const evalResult = executionMeta ? {
|
|
239
241
|
value,
|
|
240
242
|
meta: executionMeta
|
|
241
243
|
} : { value };
|
|
244
|
+
if (resolvedType) evalResult.type = resolvedType;
|
|
242
245
|
if (diagnostics.length > 0) evalResult.diagnostics = diagnostics;
|
|
243
246
|
return evalResult;
|
|
244
247
|
} catch (error) {
|
|
245
248
|
throw wrapError(error);
|
|
246
249
|
}
|
|
247
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Remaps receiver method calls to their underlying contract calls.
|
|
253
|
+
* e.g., sol_address.balance() → __multicall3.getEthBalance(addr)
|
|
254
|
+
*/
|
|
255
|
+
resolveCall(contractName, methodName, args) {
|
|
256
|
+
if (contractName === "sol_address" && methodName === "balance") return {
|
|
257
|
+
contractName: "__multicall3",
|
|
258
|
+
methodName: "getEthBalance",
|
|
259
|
+
args
|
|
260
|
+
};
|
|
261
|
+
return {
|
|
262
|
+
contractName,
|
|
263
|
+
methodName,
|
|
264
|
+
args
|
|
265
|
+
};
|
|
266
|
+
}
|
|
248
267
|
findContract(name) {
|
|
249
268
|
return this.schema.contracts.find((c) => c.name === name);
|
|
250
269
|
}
|
|
@@ -2,7 +2,6 @@ require("../_virtual/_rolldown/runtime.cjs");
|
|
|
2
2
|
const require_errors = require("../errors/errors.cjs");
|
|
3
3
|
require("../errors/index.cjs");
|
|
4
4
|
let _marcbachmann_cel_js = require("@marcbachmann/cel-js");
|
|
5
|
-
let _seljs_common = require("@seljs/common");
|
|
6
5
|
//#region src/environment/error-wrapper.ts
|
|
7
6
|
/**
|
|
8
7
|
* Wraps an unknown error into a known SEL error type.
|
|
@@ -15,13 +14,13 @@ let _seljs_common = require("@seljs/common");
|
|
|
15
14
|
*/
|
|
16
15
|
const wrapError = (error) => {
|
|
17
16
|
if (error instanceof require_errors.SELContractError) return error;
|
|
18
|
-
if (error instanceof _marcbachmann_cel_js.ParseError) return new _seljs_common.SELParseError(error.message, { cause: error });
|
|
19
17
|
if (error instanceof _marcbachmann_cel_js.EvaluationError) {
|
|
20
18
|
const cause = error.cause;
|
|
21
19
|
if (cause instanceof require_errors.SELContractError) return cause;
|
|
22
20
|
return new require_errors.SELEvaluationError(error.message, { cause: error });
|
|
23
21
|
}
|
|
24
|
-
if (error instanceof _marcbachmann_cel_js.
|
|
22
|
+
if (error instanceof _marcbachmann_cel_js.ParseError) return new require_errors.SELEvaluationError(error.message, { cause: error });
|
|
23
|
+
if (error instanceof _marcbachmann_cel_js.TypeError) return new require_errors.SELEvaluationError(error.message, { cause: error });
|
|
25
24
|
if (error instanceof Error) return error;
|
|
26
25
|
return new Error(String(error));
|
|
27
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SELContractError, SELEvaluationError
|
|
1
|
+
import { SELContractError, SELEvaluationError } from "../errors/errors.mjs";
|
|
2
2
|
import "../errors/index.mjs";
|
|
3
3
|
import { EvaluationError, ParseError, TypeError } from "@marcbachmann/cel-js";
|
|
4
4
|
//#region src/environment/error-wrapper.ts
|
|
@@ -13,13 +13,13 @@ import { EvaluationError, ParseError, TypeError } from "@marcbachmann/cel-js";
|
|
|
13
13
|
*/
|
|
14
14
|
const wrapError = (error) => {
|
|
15
15
|
if (error instanceof SELContractError) return error;
|
|
16
|
-
if (error instanceof ParseError) return new SELParseError(error.message, { cause: error });
|
|
17
16
|
if (error instanceof EvaluationError) {
|
|
18
17
|
const cause = error.cause;
|
|
19
18
|
if (cause instanceof SELContractError) return cause;
|
|
20
19
|
return new SELEvaluationError(error.message, { cause: error });
|
|
21
20
|
}
|
|
22
|
-
if (error instanceof
|
|
21
|
+
if (error instanceof ParseError) return new SELEvaluationError(error.message, { cause: error });
|
|
22
|
+
if (error instanceof TypeError) return new SELEvaluationError(error.message, { cause: error });
|
|
23
23
|
if (error instanceof Error) return error;
|
|
24
24
|
return new Error(String(error));
|
|
25
25
|
};
|
package/dist/errors/errors.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SELDiagnostic } from "@seljs/checker";
|
|
2
|
-
import { SELError
|
|
2
|
+
import { SELError } from "@seljs/common";
|
|
3
3
|
|
|
4
4
|
//#region src/errors/errors.d.ts
|
|
5
5
|
/**
|
|
@@ -78,4 +78,4 @@ declare class SELLintError extends SELError {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
81
|
+
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError };
|
package/dist/errors/errors.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SELDiagnostic } from "@seljs/checker";
|
|
2
|
-
import { SELError
|
|
2
|
+
import { SELError } from "@seljs/common";
|
|
3
3
|
|
|
4
4
|
//#region src/errors/errors.d.ts
|
|
5
5
|
/**
|
|
@@ -78,4 +78,4 @@ declare class SELLintError extends SELError {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
81
|
+
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError };
|
package/dist/errors/errors.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SELError
|
|
1
|
+
import { SELError } from "@seljs/common";
|
|
2
2
|
//#region src/errors/errors.ts
|
|
3
3
|
/**
|
|
4
4
|
* Thrown when CEL expression evaluation fails.
|
|
@@ -78,4 +78,4 @@ var SELLintError = class extends SELError {
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
//#endregion
|
|
81
|
-
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
81
|
+
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError };
|
package/dist/errors/index.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
1
|
+
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError } from "./errors.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_multicall = require("./multicall.cjs");
|
|
2
3
|
const require_errors = require("../errors/errors.cjs");
|
|
3
4
|
require("../errors/index.cjs");
|
|
4
5
|
const require_debug = require("../debug.cjs");
|
|
5
|
-
const require_multicall = require("./multicall.cjs");
|
|
6
6
|
let ox = require("ox");
|
|
7
7
|
//#region src/execution/multicall-batcher.ts
|
|
8
8
|
const debug = require_debug.createLogger("execute:multicall");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { multicall3Function } from "./multicall.mjs";
|
|
1
2
|
import { MulticallBatchError } from "../errors/errors.mjs";
|
|
2
3
|
import "../errors/index.mjs";
|
|
3
4
|
import { createLogger } from "../debug.mjs";
|
|
4
|
-
import { multicall3Function } from "./multicall.mjs";
|
|
5
5
|
import { AbiFunction } from "ox";
|
|
6
6
|
//#region src/execution/multicall-batcher.ts
|
|
7
7
|
const debug = createLogger("execute:multicall");
|
|
@@ -40,6 +40,24 @@ const MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
|
40
40
|
* Pre-parsed Multicall3 aggregate3 ABI function for ox encoding/decoding.
|
|
41
41
|
*/
|
|
42
42
|
const multicall3Function = ox.AbiFunction.from(aggregate3Abi);
|
|
43
|
+
/**
|
|
44
|
+
* Multicall3 getEthBalance ABI — returns native ETH balance for an address.
|
|
45
|
+
* Used by the sol_address.balance() accessor.
|
|
46
|
+
*/
|
|
47
|
+
const getEthBalanceAbi = {
|
|
48
|
+
name: "getEthBalance",
|
|
49
|
+
type: "function",
|
|
50
|
+
stateMutability: "view",
|
|
51
|
+
inputs: [{
|
|
52
|
+
name: "addr",
|
|
53
|
+
type: "address"
|
|
54
|
+
}],
|
|
55
|
+
outputs: [{
|
|
56
|
+
name: "balance",
|
|
57
|
+
type: "uint256"
|
|
58
|
+
}]
|
|
59
|
+
};
|
|
43
60
|
//#endregion
|
|
44
61
|
exports.MULTICALL3_ADDRESS = MULTICALL3_ADDRESS;
|
|
62
|
+
exports.getEthBalanceAbi = getEthBalanceAbi;
|
|
45
63
|
exports.multicall3Function = multicall3Function;
|
|
@@ -39,5 +39,22 @@ const MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
|
39
39
|
* Pre-parsed Multicall3 aggregate3 ABI function for ox encoding/decoding.
|
|
40
40
|
*/
|
|
41
41
|
const multicall3Function = AbiFunction.from(aggregate3Abi);
|
|
42
|
+
/**
|
|
43
|
+
* Multicall3 getEthBalance ABI — returns native ETH balance for an address.
|
|
44
|
+
* Used by the sol_address.balance() accessor.
|
|
45
|
+
*/
|
|
46
|
+
const getEthBalanceAbi = {
|
|
47
|
+
name: "getEthBalance",
|
|
48
|
+
type: "function",
|
|
49
|
+
stateMutability: "view",
|
|
50
|
+
inputs: [{
|
|
51
|
+
name: "addr",
|
|
52
|
+
type: "address"
|
|
53
|
+
}],
|
|
54
|
+
outputs: [{
|
|
55
|
+
name: "balance",
|
|
56
|
+
type: "uint256"
|
|
57
|
+
}]
|
|
58
|
+
};
|
|
42
59
|
//#endregion
|
|
43
|
-
export { MULTICALL3_ADDRESS, multicall3Function };
|
|
60
|
+
export { MULTICALL3_ADDRESS, getEthBalanceAbi, multicall3Function };
|
|
@@ -7,11 +7,17 @@ import { SELDiagnostic } from "@seljs/checker";
|
|
|
7
7
|
* Contains statistics and block information from the execution run.
|
|
8
8
|
*/
|
|
9
9
|
interface ExecutionMeta {
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Number of rounds executed (topological depth)
|
|
12
|
+
*/
|
|
11
13
|
roundsExecuted: number;
|
|
12
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Total number of contract calls executed
|
|
16
|
+
*/
|
|
13
17
|
totalCalls: number;
|
|
14
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Block number at which calls were executed
|
|
20
|
+
*/
|
|
15
21
|
blockNumber: bigint;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
@@ -19,9 +25,13 @@ interface ExecutionMeta {
|
|
|
19
25
|
* Maps call IDs to their decoded results.
|
|
20
26
|
*/
|
|
21
27
|
interface ExecutionResult {
|
|
22
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Map of callId to decoded result value
|
|
30
|
+
*/
|
|
23
31
|
results: Map<string, unknown>;
|
|
24
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Execution metadata
|
|
34
|
+
*/
|
|
25
35
|
meta: ExecutionMeta;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
@@ -29,16 +39,22 @@ interface ExecutionResult {
|
|
|
29
39
|
* Contains the block number and variable bindings.
|
|
30
40
|
*/
|
|
31
41
|
interface ExecutionContext {
|
|
32
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Block number for consistent reads across all calls
|
|
44
|
+
*/
|
|
33
45
|
blockNumber: bigint;
|
|
34
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Variable name to value mapping from evaluate() context
|
|
48
|
+
*/
|
|
35
49
|
variables: Record<string, unknown>;
|
|
36
50
|
}
|
|
37
51
|
/**
|
|
38
52
|
* Options for the evaluate() call.
|
|
39
53
|
*/
|
|
40
54
|
interface EvaluateOptions {
|
|
41
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Override client for this evaluation
|
|
57
|
+
*/
|
|
42
58
|
client?: SELClient;
|
|
43
59
|
}
|
|
44
60
|
/**
|
|
@@ -48,11 +64,21 @@ interface EvaluateOptions {
|
|
|
48
64
|
* contract calls were executed, absent for pure CEL expressions.
|
|
49
65
|
*/
|
|
50
66
|
interface EvaluateResult<T = unknown> {
|
|
51
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* The evaluated result value
|
|
69
|
+
*/
|
|
52
70
|
value: T;
|
|
53
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* The inferred type of the expression, when available
|
|
73
|
+
*/
|
|
74
|
+
type?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Execution metadata, present when contract calls were executed
|
|
77
|
+
*/
|
|
54
78
|
meta?: ExecutionMeta;
|
|
55
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Advisory diagnostics (warnings/info) from lint rules, when non-empty
|
|
81
|
+
*/
|
|
56
82
|
diagnostics?: SELDiagnostic[];
|
|
57
83
|
}
|
|
58
84
|
//#endregion
|
|
@@ -7,11 +7,17 @@ import { SELDiagnostic } from "@seljs/checker";
|
|
|
7
7
|
* Contains statistics and block information from the execution run.
|
|
8
8
|
*/
|
|
9
9
|
interface ExecutionMeta {
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Number of rounds executed (topological depth)
|
|
12
|
+
*/
|
|
11
13
|
roundsExecuted: number;
|
|
12
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Total number of contract calls executed
|
|
16
|
+
*/
|
|
13
17
|
totalCalls: number;
|
|
14
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Block number at which calls were executed
|
|
20
|
+
*/
|
|
15
21
|
blockNumber: bigint;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
@@ -19,9 +25,13 @@ interface ExecutionMeta {
|
|
|
19
25
|
* Maps call IDs to their decoded results.
|
|
20
26
|
*/
|
|
21
27
|
interface ExecutionResult {
|
|
22
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Map of callId to decoded result value
|
|
30
|
+
*/
|
|
23
31
|
results: Map<string, unknown>;
|
|
24
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Execution metadata
|
|
34
|
+
*/
|
|
25
35
|
meta: ExecutionMeta;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
@@ -29,16 +39,22 @@ interface ExecutionResult {
|
|
|
29
39
|
* Contains the block number and variable bindings.
|
|
30
40
|
*/
|
|
31
41
|
interface ExecutionContext {
|
|
32
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Block number for consistent reads across all calls
|
|
44
|
+
*/
|
|
33
45
|
blockNumber: bigint;
|
|
34
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Variable name to value mapping from evaluate() context
|
|
48
|
+
*/
|
|
35
49
|
variables: Record<string, unknown>;
|
|
36
50
|
}
|
|
37
51
|
/**
|
|
38
52
|
* Options for the evaluate() call.
|
|
39
53
|
*/
|
|
40
54
|
interface EvaluateOptions {
|
|
41
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Override client for this evaluation
|
|
57
|
+
*/
|
|
42
58
|
client?: SELClient;
|
|
43
59
|
}
|
|
44
60
|
/**
|
|
@@ -48,11 +64,21 @@ interface EvaluateOptions {
|
|
|
48
64
|
* contract calls were executed, absent for pure CEL expressions.
|
|
49
65
|
*/
|
|
50
66
|
interface EvaluateResult<T = unknown> {
|
|
51
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* The evaluated result value
|
|
69
|
+
*/
|
|
52
70
|
value: T;
|
|
53
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* The inferred type of the expression, when available
|
|
73
|
+
*/
|
|
74
|
+
type?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Execution metadata, present when contract calls were executed
|
|
77
|
+
*/
|
|
54
78
|
meta?: ExecutionMeta;
|
|
55
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Advisory diagnostics (warnings/info) from lint rules, when non-empty
|
|
81
|
+
*/
|
|
56
82
|
diagnostics?: SELDiagnostic[];
|
|
57
83
|
}
|
|
58
84
|
//#endregion
|
package/dist/index.cjs
CHANGED
|
@@ -15,8 +15,6 @@ exports.SELContractError = require_errors.SELContractError;
|
|
|
15
15
|
exports.SELError = _seljs_common.SELError;
|
|
16
16
|
exports.SELEvaluationError = require_errors.SELEvaluationError;
|
|
17
17
|
exports.SELLintError = require_errors.SELLintError;
|
|
18
|
-
exports.SELParseError = _seljs_common.SELParseError;
|
|
19
18
|
exports.SELRuntime = require_environment.SELRuntime;
|
|
20
|
-
exports.SELTypeError = _seljs_common.SELTypeError;
|
|
21
19
|
exports.createSEL = require_factory.createSEL;
|
|
22
20
|
exports.validateClient = require_client.validateClient;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { SELClient, validateClient } from "./environment/client.cjs";
|
|
|
2
2
|
import { MulticallOptions, SELLimits, SELRuntimeConfig } from "./environment/types.cjs";
|
|
3
3
|
import { EvaluateOptions, EvaluateResult, ExecutionContext, ExecutionMeta, ExecutionResult } from "./execution/types.cjs";
|
|
4
4
|
import { SELRuntime } from "./environment/environment.cjs";
|
|
5
|
-
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
5
|
+
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError } from "./errors/errors.cjs";
|
|
6
6
|
import { createSEL } from "./factory.cjs";
|
|
7
7
|
import { CallArgument, CollectedCall, DependencyGraph, ExecutionPlan, ExecutionRound, GraphNode } from "./analysis/types.cjs";
|
|
8
|
-
export { CallArgument, CircularDependencyError, CollectedCall, DependencyGraph, EvaluateOptions, EvaluateResult, ExecutionContext, ExecutionLimitError, ExecutionMeta, ExecutionPlan, ExecutionResult, ExecutionRound, GraphNode, MulticallBatchError, MulticallOptions, SELClient, SELClientError, SELContractError, SELError, SELEvaluationError, SELLimits, SELLintError,
|
|
8
|
+
export { CallArgument, CircularDependencyError, CollectedCall, DependencyGraph, EvaluateOptions, EvaluateResult, ExecutionContext, ExecutionLimitError, ExecutionMeta, ExecutionPlan, ExecutionResult, ExecutionRound, GraphNode, MulticallBatchError, MulticallOptions, SELClient, SELClientError, SELContractError, SELError, SELEvaluationError, SELLimits, SELLintError, SELRuntime, SELRuntimeConfig, createSEL, validateClient };
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { SELClient, validateClient } from "./environment/client.mjs";
|
|
|
2
2
|
import { MulticallOptions, SELLimits, SELRuntimeConfig } from "./environment/types.mjs";
|
|
3
3
|
import { EvaluateOptions, EvaluateResult, ExecutionContext, ExecutionMeta, ExecutionResult } from "./execution/types.mjs";
|
|
4
4
|
import { SELRuntime } from "./environment/environment.mjs";
|
|
5
|
-
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
5
|
+
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError } from "./errors/errors.mjs";
|
|
6
6
|
import { createSEL } from "./factory.mjs";
|
|
7
7
|
import { CallArgument, CollectedCall, DependencyGraph, ExecutionPlan, ExecutionRound, GraphNode } from "./analysis/types.mjs";
|
|
8
|
-
export { CallArgument, CircularDependencyError, CollectedCall, DependencyGraph, EvaluateOptions, EvaluateResult, ExecutionContext, ExecutionLimitError, ExecutionMeta, ExecutionPlan, ExecutionResult, ExecutionRound, GraphNode, MulticallBatchError, MulticallOptions, SELClient, SELClientError, SELContractError, SELError, SELEvaluationError, SELLimits, SELLintError,
|
|
8
|
+
export { CallArgument, CircularDependencyError, CollectedCall, DependencyGraph, EvaluateOptions, EvaluateResult, ExecutionContext, ExecutionLimitError, ExecutionMeta, ExecutionPlan, ExecutionResult, ExecutionRound, GraphNode, MulticallBatchError, MulticallOptions, SELClient, SELClientError, SELContractError, SELError, SELEvaluationError, SELLimits, SELLintError, SELRuntime, SELRuntimeConfig, createSEL, validateClient };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError
|
|
1
|
+
import { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError } from "./errors/errors.mjs";
|
|
2
2
|
import "./errors/index.mjs";
|
|
3
3
|
import { validateClient } from "./environment/client.mjs";
|
|
4
4
|
import { SELRuntime } from "./environment/environment.mjs";
|
|
5
5
|
import "./environment/index.mjs";
|
|
6
6
|
import { createSEL } from "./factory.mjs";
|
|
7
|
-
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError,
|
|
7
|
+
export { CircularDependencyError, ExecutionLimitError, MulticallBatchError, SELClientError, SELContractError, SELError, SELEvaluationError, SELLintError, SELRuntime, createSEL, validateClient };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seljs/runtime",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
3
|
+
"version": "1.3.0-beta.21",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/abinnovision/seljs"
|
|
6
6
|
},
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@marcbachmann/cel-js": "^7.5.3",
|
|
53
|
-
"@seljs/checker": "1.3.0-beta.
|
|
54
|
-
"@seljs/common": "1.3.0-beta.
|
|
55
|
-
"@seljs/env": "1.3.0-beta.
|
|
53
|
+
"@seljs/checker": "1.3.0-beta.21",
|
|
54
|
+
"@seljs/common": "1.3.0-beta.21",
|
|
55
|
+
"@seljs/env": "1.3.0-beta.21",
|
|
56
56
|
"@seljs/schema": "1.2.0",
|
|
57
|
-
"@seljs/types": "1.3.0-beta.
|
|
57
|
+
"@seljs/types": "1.3.0-beta.21",
|
|
58
58
|
"debug": "^4.4.3",
|
|
59
|
-
"ox": "^0.14.
|
|
59
|
+
"ox": "^0.14.10"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@abinnovision/eslint-config-base": "^3.2.
|
|
62
|
+
"@abinnovision/eslint-config-base": "^3.2.2",
|
|
63
63
|
"@abinnovision/prettier-config": "^2.1.5",
|
|
64
64
|
"@seljs-internal/fixtures": "0.0.0",
|
|
65
65
|
"@seljs-internal/tsconfig": "^0.0.0",
|