execute_call

Builds one raw EVM call step for sequential, non-atomic PROGRAM execution.

Example

Local

1
WITH actors AS (
2
SELECT
3
'0x1000000000000000000000000000000000000001'::ADDRESS AS sender,
4
'0x2000000000000000000000000000000000000002'::ADDRESS AS writer,
5
'0x3000000000000000000000000000000000000003'::ADDRESS AS second_target
6
),
7
step_values AS (
8
SELECT [
9
execute_call(
10
sender,
11
writer,
12
'0x000000000000000000000000000000000000000000000000000000000000002a'::BYTES,
13
1::UINT256,
14
100000::UBIGINT
15
),
16
execute_contract(
17
sender,
18
second_target,
19
0::UINT256,
20
100000::UBIGINT,
21
'[{"type":"function","name":"set","inputs":[{"name":"value","type":"uint256"}],"outputs":[]}]'::JSON,
22
'set'::VARCHAR,
23
7::UINT256
24
)
25
] AS steps
26
FROM actors
27
),
28
authored AS (
29
SELECT steps, program(steps) AS program
30
FROM step_values
31
)
32
SELECT
33
len(steps)::INTEGER AS step_count,
34
'raw,abi'::VARCHAR AS step_order,
35
program IS NOT NULL AS runnable
36
FROM authored;
37
-- => [{"step_count":2,"step_order":"raw,abi","runnable":"true"}]
Notebook ready in readonly mode.

API reference

Exact signatures with descriptions, requirements, inputs, returns, and examples.

execute_call(ADDRESS, ADDRESS, BYTES, UINT256, UBIGINT) #

Builds one raw EVM call step for sequential, non-atomic PROGRAM execution.

Inputs

Name Type Use
sender ADDRESS

Required typed SQL value committed to the authored step.

required positional
target ADDRESS

Required typed SQL value committed to the authored step.

required positional
calldata BYTES

Required typed SQL value committed to the authored step.

required positional
value UINT256

Required typed SQL value committed to the authored step.

required positional
gas_limit UBIGINT

Required UBIGINT gas limit; constructor execution rejects values outside the supported bound.

required positional

Returns

Name Type
step STEP

Typed STEP authoring value. Returns one canonical typed value. Construction does not execute EVM code, contact RPC, or publish evidence.

Guidance

Behavior and consumption

Authors one typed value for later PROGRAM assembly or run consumption; it does not execute or publish.

Validation and failure timing

SQL types bind first; widths, ABI selection, duplicates, empty programs, and selectors validate when the constructor executes.

Determinism, network, and side effects

Construction is deterministic and offline: no RPC, chain mutation, or evidence write.

Use and do not use

Use it to author PROGRAM input, not as proof of execution or future success.

Additional overloads

execute_call(ADDRESS, ADDRESS, BYTES, UINT256, UBIGINT, CALL_CONTEXT) #

Builds one raw EVM call step for sequential, non-atomic PROGRAM execution.

Inputs

NameTypeUse
senderADDRESS

Required typed SQL value committed to the authored step.

requiredpositional
targetADDRESS

Required typed SQL value committed to the authored step.

requiredpositional
calldataBYTES

Required typed SQL value committed to the authored step.

requiredpositional
valueUINT256

Required typed SQL value committed to the authored step.

requiredpositional
gas_limitUBIGINT

Required UBIGINT gas limit; constructor execution rejects values outside the supported bound.

requiredpositional
Showing fewer

Returns

Name Type
step STEP

Typed STEP authoring value. Returns one canonical typed value. Construction does not execute EVM code, contact RPC, or publish evidence.

Examples

Local SQL

1
WITH actors AS (
2
SELECT
3
'0x1000000000000000000000000000000000000001'::ADDRESS AS sender,
4
'0x2000000000000000000000000000000000000002'::ADDRESS AS writer,
5
'0x3000000000000000000000000000000000000003'::ADDRESS AS second_target
6
),
7
inputs AS (
8
SELECT
9
*,
10
call_context(
11
1::UINT256,
12
[{
13
address: writer,
14
storage_keys: [
15
'0x0000000000000000000000000000000000000000000000000000000000000000'::BYTES32
16
]
17
}],
18
[]::BYTES32[]
19
) AS context
20
FROM actors
21
),
22
step_values AS (
23
SELECT [
24
execute_call(
25
sender,
26
writer,
27
'0x000000000000000000000000000000000000000000000000000000000000002a'::BYTES,
28
1::UINT256,
29
100000::UBIGINT,
30
context
31
),
32
execute_contract(
33
sender,
34
second_target,
35
0::UINT256,
36
100000::UBIGINT,
37
context,
38
'[{"type":"function","name":"set","inputs":[{"name":"value","type":"uint256"}],"outputs":[]}]'::JSON,
39
'set'::VARCHAR,
40
7::UINT256
41
)
42
] AS steps
43
FROM inputs
44
),
45
authored AS (
46
SELECT steps, program(steps) AS program
47
FROM step_values
48
)
49
SELECT
50
len(steps)::INTEGER AS step_count,
51
-- 4 more lines load when JavaScript runs
Notebook ready in readonly mode.

Related functions

Category and tags

Category
Simulation
Tag
Simulate