Evaluation
Tools for simulating HAL expressions before publishing. Expressions run in a sandboxed Tevm fork — no real transactions are submitted.
Evaluate Existing Action
Simulate a saved action by ID. Loads the action’s HAL expression, injects the main() call with provided inputs, and simulates the entire action.
Parameters
Parameter Required Description actionIdYes Action ID to simulate inputsYes Input values for the action’s parameters
Returns
Evaluation result — Final output of the expression
Operation log (oplog) — Full trace of every function call during execution
Simulated transaction hashes — Can be inspected with Query Transaction
Always simulate actions before publishing. Iteration is expected: simulate → inspect results with Query Transaction (works on simulated tx hashes) → fix issues → simulate again.
Evaluate Arbitrary Expression
Evaluate a complete, self-contained HAL expression in a sandboxed Tevm fork. Use this for testing expressions that aren’t saved yet.
Parameters
Parameter Required Description expressionYes Complete HAL expression (JSON array) inputsNo Input values if the expression has parameters
Returns
Evaluation result — Final output
Operation log (oplog) — Full execution trace
Before constructing a HAL expression, read the HAL documentation using the Documentation tool with document IDs hal://spec/syntax, hal://spec/modules/herd, and hal://spec/examples. HAL has non-obvious syntax requirements (e.g., ABI arrays must be wrapped in ["quote", [...]] to prevent evaluation).
Tevm Fork Behavior
Forks are created lazily — only when the expression performs on-chain actions (read-function, write-function, swap)
Pure expressions evaluate without any blockchain interaction
Simulated transaction hashes can be queried with Query Transaction to inspect traces
Understanding Oplogs
Both evaluation tools return an operation log (oplog) — a detailed trace of every function call during execution. Each entry contains:
Field Description operationIdUnique ID for this operation functionNameFunction called (e.g., code, read-function, getPath, user-defined) statussuccess or errorargsArguments passed to the function resultReturn value (or error message) timestampWhen the operation executed
Debugging with Oplogs
Trace execution flow — See which functions run and in what order
Inspect inputs/outputs — Check what each function receives and returns
Identify failures — Failed operations show "status": "error" with error messages
Inspect transactions — Use simulated tx hashes with Query Transaction to discover missing approvals, encoding errors, etc.
Simulation Workflow
Read docs — Fetch HAL documentation with the Documentation tool
Search adapters — Find existing adapters with Actions & Adapters
Build expression — Construct your HAL expression
Simulate — Run with Evaluate Arbitrary or Evaluate Existing
Inspect — Check oplog and use Query Transaction on simulated hashes
Iterate — Fix issues and simulate again
Publish — Once validated, publish via Actions & Adapters
Next Steps
Query Transaction Inspect simulated transactions
HAL Reference Full HAL language documentation