call_context

Builds the optional EVM-visible context attached to one PROGRAM call step.

Example

Local

1
WITH actors AS (
2
SELECT
3
'0x1000000000000000000000000000000000000001'::ADDRESS AS sender,
4
'0x2000000000000000000000000000000000000002'::ADDRESS AS writer
5
),
6
authored AS (
7
SELECT
8
access_list,
9
context,
10
execute_call(
11
sender,
12
writer,
13
'0x000000000000000000000000000000000000000000000000000000000000002a'::BYTES,
14
1::UINT256,
15
100000::UBIGINT,
16
context
17
) AS step
18
FROM (
19
SELECT
20
*,
21
call_context(
22
1::UINT256,
23
access_list,
24
[]::BYTES32[]
25
) AS context
26
FROM (
27
SELECT
28
*,
29
[{
30
address: writer,
31
storage_keys: [
32
'0x0000000000000000000000000000000000000000000000000000000000000000'::BYTES32
33
]
34
}] AS access_list
35
FROM actors
36
)
37
)
38
)
39
SELECT
40
len(access_list)::INTEGER AS warmed_accounts,
41
step IS NOT NULL AS contextual_step
42
FROM authored;
43
-- => [{"warmed_accounts":1,"contextual_step":"true"}]
Notebook ready in readonly mode.

API reference

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

call_context(UINT256, STRUCT(address ADDRESS, storage_keys BYTES32[])[], BYTES32[]) #

Builds the optional EVM-visible context attached to one PROGRAM call step.

Inputs

Name Type Use
gas_price UINT256

Required typed SQL value committed to the authored context.

required positional
access_list STRUCT(address ADDRESS, storage_keys BYTES32[])[]

Required typed SQL value committed to the authored context.

required positional
blob_versioned_hashes BYTES32[]

Required typed SQL value committed to the authored context.

required positional

Returns

Name Type
context CALL_CONTEXT

Typed CONTEXT 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.

Related functions

Category and tags

Category
Simulation
Tag
Simulate