> ## 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.

# Task configuration

> Wire fields for Call Builders and Writer Plugins.

Task configuration selects input and output behavior through a registered `type` and JSON `config`. The examples below show the JSON inside `config`, not the surrounding protobuf message. Their block and record values are illustrative.

## Call Builder fields

| Type | Fields |
| - | - |
| `InputsCallConfig` | `function` or inline `code.sourceCode`, `callList` |
| `BlockTableCallConfig` | `block`, `triggerSources` with `table`, `functionId` or `code`, `params`, optional `operator` |
| `BlockBundleCallConfig` | `blockBundle.number`, `triggerSources` with `tableId`, `function` or `code`, `param`, optional `operator` |

Use `${<table>}` to substitute a source row in a positional argument template. Empty scan parameters pass the row as the only argument. The bundle wire keys are `function` and `param`; the block wire keys are `functionId` and `params`.

### InputsCallConfig

```json theme={null}
{
  "function": "",
  "code": {
    "sourceCode": "def _(chain_id, record):\n    return record\n"
  },
  "callList": [
    [
      "eth",
      {
        "id": "sample"
      }
    ]
  ]
}
```

### BlockTableCallConfig

```json theme={null}
{
  "block": {
    "id": "0xabababababababababababababababababababababababababababababababab",
    "height": 18000000,
    "timestamp": "2024-06-08T00:00:00Z"
  },
  "triggerSources": [
    {
      "table": "chain.trace.eth",
      "functionId": "",
      "code": {
        "sourceCode": "def _(chain_id, record):\n    return record\n"
      },
      "params": [
        "eth",
        "${chain.trace.eth}"
      ]
    }
  ]
}
```

### BlockBundleCallConfig

```json theme={null}
{
  "blockBundle": {
    "number": 18001
  },
  "triggerSources": [
    {
      "tableId": "chain.trace.eth",
      "function": "",
      "code": {
        "sourceCode": "def _(chain_id, record):\n    return record\n"
      },
      "param": [
        "eth",
        "${chain.trace.eth}"
      ]
    }
  ]
}
```

## Writer Plugin fields

| Type | JSON config | Deployment |
| - | - | - |
| `BlockTableWriteHandler` | `targetTable`, `block` with `id`, `height`, `timestamp` | block |
| `BlockTableWriteHandler` | `targetTable`, `blockBundle` with `number` | bundle |
| `NormalTableWriteHandler` | `targetTable`, optional `condition` with `column`, `policy` | block or bundle |
| `TimeTableWriteHandler` | `targetTable` | block or bundle |
| `ReturnValueHandler` | `{}` | block |

`condition.policy` accepts `UpdateIfSmaller` or `UpdateIfLarger`. Table writers project records onto target columns. Omit the handler only when you do not need persisted or returned outputs.

The block-table handler's context must match its deployment. For debug table writes, `debug: true` requests preview behavior instead of persistence. See [execution semantics](/concepts/execution-semantics) for completion boundaries.

## Operators

An optional `operator` narrows trigger rows using filtering and deduplication. Its plan contains a `relations` chain rooted in `read`. Format details are documented in the BlockX repository's `docs/specs/substrait_ast.md`; implementation belongs to the [Plugin system](/components/plugins).

## Source and related docs

The configuration structs are in `internal/plugin/callbuilder/` and `internal/plugin/event/` in the BlockX repository. Names are defined in their `types/types.go` files.

* [Call Builder and Writer Plugin](/concepts/builders-and-handlers)
* [Compute per block](/guides/block-computation)
* [Backfill historical bundles](/guides/bundle-backfill)


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