Variables and expressions
Variables turn a fixed transaction plan into a reusable template. A run supplies their concrete values before publication.
Add a required variable
Section titled “Add a required variable”- Choose a stable key such as
recipientoramountWei. - Select the value kind expected by the transaction argument.
- Add a description that tells the run creator what to enter and in which unit.
- Reference the variable from a transaction value or argument.
txcast stores references as structured data. Do not type {{recipient}} or use string interpolation.
Add a computed variable
Section titled “Add a computed variable”Expressions use txcast-cel-v1. Computed values can reference other workflow variables and are evaluated when the run is rendered.
For EVM amount math, use the supported Uint256 and Int256 semantics. These preserve Solidity-sized integer behavior and avoid JavaScript floating-point errors.
amountWei * feeBps / 10000Signed remainder and unsigned modulo follow Solidity integer behavior.
Reserved keys and dependencies
Section titled “Reserved keys and dependencies”Expression dependencies must be acyclic. Condition expressions bind their fetched onchain value to the reserved key value; do not create a workflow variable with that key when a condition needs it.
Validate a run
Section titled “Validate a run”Before publication, inspect the final rendered destination, value, function, and arguments. A valid expression can still represent the wrong business amount if its inputs or units are wrong.
If validation reports a missing, incompatible, or cyclic variable, return to the workflow definition, correct the key or type, and save a new revision.