> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockx.chaintable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 一次性计算并返回结果

> 提交显式输入并检查结果记录。

使用显式输入测试函数或查询选定 EVM 实体。先运行纯函数；节点访问就绪后，再换成[读取合约的函数](/zh/guides/write-functions)。

## 前置条件

完成[快速开始](/zh/quickstart)，或使用已配置连接代理的环境。客户端通过 `PROXY_SOCKET_PATH` 访问代理。依赖版本以 BlockX checkout 的 `python/pyproject.toml` 为准。

## 提交最小任务

本例返回参数，不读取链数据。区块与地址均为合成测试值。

```python theme={null}
from blockx import Function, InputsCallConfig, ReturnValueHandler, TaskBuilder

source_code = """
def _(chain_id, block_id, holder):
    return {"chain_id": chain_id, "block_id": block_id, "id": holder}
"""

task = TaskBuilder.build(
    InputsCallConfig(
        func=Function(source_code=source_code),
        callList=[["eth", "0x" + "ab" * 32, "0x" + "11" * 20]],
    ),
    ReturnValueHandler(),
)
result = task.submit(timeout=30)
if not result.task_result.success:
    raise RuntimeError(result.task_result.failure_code)
print(result.handler_result)
```

`callList` 每行提供一次函数调用的位置参数。执行真实 EVM 读取时，将合成值换成后端可以提供的区块与地址。

## 确认完成

`ReturnValueHandler` 在 `handler_result` 中返回收集到的输出。根据标识符关联结果，不依赖列表位置。任务不会写表。

## 处理失败

连接异常不能证明任务已经进入终态。保留 `task.task_id` 用于排查。返回的失败结果包含失败码；见[查询结果与处理失败](/zh/guides/results-and-failures)。

## 继续阅读

* [编写 EVM 数据函数](/zh/guides/write-functions)
* [按区块计算](/zh/guides/block-computation)
* [结果与错误参考](/zh/reference/results-and-errors)
* [用 Go 提交任务](/zh/development/submit-task-example)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.