Skip to main content
Function code is the Python computation invoked by a BlockX Call. You supply positional arguments, read the EVM or table data required by the computation, and return values for the Writer Plugin to handle.

Inputs and outputs

For an EVM-derived record, include the entity identifier and any context required by your target schema. Keep integer amounts exact instead of converting them to floating point.

Available computation

Use Write EVM data functions for a complete function. The runtime routes backend access through Worker IO.

Function identity and version

  • Inline source travels with the input configuration.
  • A registered function is resolved by its identifier.
  • A task pins a function-code snapshot for registered calls and sub-calls.
  • A code snapshot fixes function definitions. Set data-read context separately.
See Function Code View for code loading and snapshot lifecycle.

Execution boundaries

  • Produce output records; let the Writer Plugin perform task writes.
  • Use the runtime’s supported modules and capabilities.
  • Keep Calls independent of execution order.
  • Execution limits and audit checks can fail a function before it returns a value.

Summary

  • A function connects EVM data reads to derived outputs.
  • Pass historical read context explicitly.
  • Function-code versions and chain-data context are separate.
Continue reading: