Skip to main content

Actions and Adapters

Actions and adapters share the HAL language and version model, but they have different execution roles.

Actions

An action exports main and produces ordered batches of write calls. Each batch can contain one call, several calls, conditional calls, or a for-each that produces one call per selected item. Wallet behavior determines how a batch reaches the chain. A Safe can package several calls into one transaction, an atomic-capable EOA can submit a call bundle, and a plain EOA can submit one transaction per planned call.

Adapters

An adapter exports reusable logic. It can perform reads, construct a write call for an action, or invoke a typed code block. Published adapters can be imported into other adapters and actions. Start with logic inside an action. Extract an adapter when the same behavior needs reuse across workflows.

Available tools

Search before creating. Contract-address and function-selector searches produce the most precise matches. Updates use JSON Patch operations such as add, remove, replace, move, copy, and test. Use the smallest patch that expresses the change.
Deletion fails when another expression imports the target. Code-block-generated adapters also stay synchronized with their code block and cannot be edited or deleted directly.
To test an unpublished draft, pass its expression inline. Calls by saved ID only use published versions.