Data action reference
This page is generated from the plugin registry. Do not edit it by hand.
Reshape workflow data without writing a script: encode and decode strings, convert numbers between decimal and hex, hash a value with keccak256 or SHA-2, pull named fields out of upstream node output, filter an array or pull one field from every item, flatten monitoring results into a findings list, and hold static configuration on the canvas.
For guidance and examples see the Data guide.
Set actionType in a node’s config to the action type shown under each heading. See the workflow definition page for the node format.
| Action | Action type |
|---|---|
| Compare Arrays | data/compare-arrays |
| Encode / Decode | data/encode |
| Extract Fields | data/extract-fields |
| Filter Array | data/filter |
| Flatten Findings | data/flatten-findings |
| Hash | data/hash |
| Static Config | data/static-config |
Compare Arrays
Action type: data/compare-arrays. Connection: not required.
Compare two arrays, typically the value a previous run stored (State Get) against this run’s value, and report which items were added, removed or changed. Match items by value, or by a key field such as id. Pure comparison: chain State Get, this node and State Set to alert on changes and store the new list.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
previous | string | No | Previous. A JSON array, usually State Get’s value. Empty, null or missing counts as an empty array, so the first run, where nothing is stored yet, works. Up to 10,000 items. | ||
current | string | Yes | Current. A JSON array, this run’s value. Up to 10,000 items. | ||
keyField | string | No | Key field. Optional. Match items of objects by this field instead of by whole value. |
Outputs
| Output | Description |
|---|---|
success | Whether the comparison succeeded |
added | Items in Current that are not in Previous |
removed | Items in Previous that are not in Current |
changed | With a Key field: the Current version of each item whose key is on both sides but whose content differs. Always empty without one |
previousChanged | The Previous version of each changed item, in the same order as changed |
unchanged | Items present and identical on both sides |
merged | Previous with changed items replaced by their Current version and added items appended. Removed items are kept, so once it is stored they show as removed on every later run: check addedCount rather than hasChanges, or store Current to drop them |
addedCount | Number of added items |
removedCount | Number of removed items |
changedCount | Number of changed items |
hasChanges | True when anything was added, removed or changed. Use it when you store Current; when you store merged, removed items stay in it, so check addedCount instead |
error | Error message if the comparison failed |
Encode / Decode
Action type: data/encode. Connection: not required.
Convert a string (or a JSON array of strings) to padded hex (bytes8/bytes16/bytes32), raw hex or base64, and back again; or convert a decimal number to hex (minimal or a padded uint word) and back. Replaces hand-written string-to-bytes32 and number-to-hex loops.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
operation | string | Yes | encode | encode, decode, decimal-to-hex, hex-to-decimal | Operation. |
value | string | Yes | Value. A single value, or a JSON array of values to convert in one step. Encode / Decode work on text: SKY -> 0x534b590000… [“SKY”, “MKR”] -> result is an array, map is keyed by SKY and MKR Decimal to hex takes a non-negative integer of any size: 255 -> 0xff Hex to decimal takes hex with or without 0x, padded or not: 0x00…00ff -> 255. | ||
format | string | Yes, when shown | bytes32 | bytes32, bytes16, bytes8, hex, base64 | Format. Shown when operation is one of encode, decode. |
numberFormat | string | No | hex | hex, uint256, uint128, uint64 | Number format. How wide the hex output is. A number is always padded on the left, so its value is unchanged. hex -> 0xff uint256 -> 0x00…00ff, the ABI word a contract argument expects A number too large for the chosen width fails the step rather than truncating. Shown when operation is decimal-to-hex. |
padding | string | No | right | right, left | Padding. Where the zero bytes go when text is encoded to, or decoded from, a fixed-size format. Solidity pads short strings on the right. Only applies to Encode and Decode. Decimal to hex always pads on the left, because zero bytes on the right would multiply the number. Shown when operation is one of encode, decode and format is one of bytes32, bytes16, bytes8. |
Outputs
| Output | Description |
|---|---|
success | Whether the conversion succeeded |
result | The converted value: a string for a single input, an array for an array input |
map | Object keyed by each original value, holding its converted value |
count | Number of values converted |
operation | encode, decode, decimal-to-hex or hex-to-decimal |
format | The format used: the text format for encode and decode, the number format (hex, uint256, uint128 or uint64) for decimal-to-hex. Absent for hex-to-decimal, which has no format |
error | Error message if the conversion failed |
Extract Fields
Action type: data/extract-fields. Connection: not required.
Pick named values out of one or more upstream node outputs by dotted path, returning null instead of failing when a path is missing.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
source | string | Yes | Source. A single upstream output, or a JSON object combining several so one node can pull fields from all of them. | ||
paths | string | Yes | Fields. One path per line. Use name = path to rename the output, or a bare path to keep its last segment as the name. vat = data.result.vat -> fields.vat data.result.jug -> fields.jug rows.0.amount -> fields.amount. | ||
mode | string | No | object | object, array | Mode. Map over an array applies the same paths to every item in the source array and returns them in items. |
onMissing | string | No | null | null, empty, fail | When a path is missing. |
Outputs
| Output | Description |
|---|---|
success | Whether extraction succeeded |
fields | Object of the extracted values, keyed by the name given to each path (object mode) |
items | Array of extracted objects, one per source item (array mode) |
missing | Names whose path was not found in the source |
foundCount | Number of paths resolved |
itemCount | Number of source items processed |
error | Error message if extraction failed |
Filter Array
Action type: data/filter. Connection: not required.
Keep only the items of an array that pass a test, using the Condition operators plus does not contain / start with / end with, and pull one field out of every match into a flat array. Reports the source position (and an optional label) of each match and how many items could not be tested. Choose keep every item to only pull the field.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
source | string | Yes | Source. A JSON array, usually an upstream array field. Up to 10,000 items. | ||
field | string | No | Field to test. Leave blank to test each item itself, e.g. an array of names. Shown when operator is not keepAll. | ||
operator | string | Yes | === | ===, !==, ==, !=, exists, doesNotExist, isNull, isNotNull, isUndefined, isNotUndefined, contains, notContains, startsWith, notStartsWith, endsWith, notEndsWith, matchesRegex, notMatchesRegex, isEmpty, isNotEmpty, >, >=, <, <=, isTrue, isFalse, arrayIsEmpty, arrayIsNotEmpty, arrayContains, arrayLength, objectIsEmpty, objectHasKey, keepAll | Operator. The Condition tests, plus does not contain, does not start with and does not end with. Each test only looks at items it applies to: number tests at numbers, numeric text and hex; boolean tests at true and false; text tests at text and numbers; array and object tests at lists and objects. By default any other item fails the step; see If an item can’t be tested. |
value | string | Yes, when shown | Value. What each item is compared with. Spaces around it are trimmed; quote it to keep them (except under regex). Matches regex and does not match regex: the regular expression exactly as it should run, e.g. ^VAULT_, without quotes or /…/ around it; no lookahead or back-references. To match a space at either end, write [ ] or \x20. Other text tests and has key: the text as typed, quotes removed. Number tests: a number, e.g. 100, 1.5 or 0x64. Array length: a whole number. Other tests: 5 is a number, true and false are booleans, null is null, anything else is text. Quote to force text, e.g. “true” matches the text, not the boolean. Quoting a number changes nothing under equals, which compares numbers by value. Shown when operator is not exists and operator is not doesNotExist and operator is not isNull and operator is not isNotNull and operator is not isUndefined and operator is not isNotUndefined and operator is not isEmpty and operator is not isNotEmpty and operator is not isTrue and operator is not isFalse and operator is not arrayIsEmpty and operator is not arrayIsNotEmpty and operator is not objectIsEmpty and operator is not keepAll. | ||
ignoreCase | boolean | No | false | Ignore case. Match text whatever its letter case, e.g. a checksummed address against a lowercase one. Shown when operator is not exists and operator is not doesNotExist and operator is not isNull and operator is not isNotNull and operator is not isUndefined and operator is not isNotUndefined and operator is not isEmpty and operator is not isNotEmpty and operator is not > and operator is not >= and operator is not < and operator is not <= and operator is not isTrue and operator is not isFalse and operator is not arrayIsEmpty and operator is not arrayIsNotEmpty and operator is not arrayLength and operator is not objectIsEmpty and operator is not objectHasKey and operator is not keepAll. | |
returnField | string | No | Return field. Dotted path pulled from each matching item into values. Leave blank to use Field to test. With Return field blank and either Field to test blank or keep every item, values holds the whole items. Example: Field to test success, Return field result. values then lists the result of every successful call. | ||
missingReturn | string | No | keep | keep, fail | If a match has no Return field. A matching item without the Return field gets null in values and is counted in missingReturn. Fail the step instead when a missing field means the path is wrong, e.g. a typo in Return field. |
labels | string | No | Labels. Optional. A list as long as Source, so an alert can name what matched. | ||
untestable | string | No | fail | fail, skip | If an item can’t be tested. An item can’t be tested when the field is missing, or its value is the wrong kind for the test: null under a number or boolean test, an object under a text test. A reverted batch read has result null, so it counts here. Fail the step is the default, so a read an attacker can make revert cannot pass quietly. Skip keeps the run going: branch on skipped > 0 to alert on it, and use skippedLabels to name the items. Shown when operator is not exists and operator is not doesNotExist and operator is not isNull and operator is not isNotNull and operator is not isUndefined and operator is not isNotUndefined and operator is not isEmpty and operator is not isNotEmpty and operator is not keepAll. |
Outputs
| Output | Description |
|---|---|
success | Whether filtering succeeded |
items | The items that passed the test |
values | The Return field of each matching item, as a flat array (null where an item has no such field) |
indexes | Source position (from 0) of each matching item, to look up a parallel array |
labels | The Labels entry of each matching item (empty when Labels is not set), e.g. the contract names a batch read was given |
count | Number of matching items |
skippedIndexes | Source position of each item the test could not apply to |
skippedLabels | The Labels entry of each skipped item (empty when Labels is not set), e.g. the contract whose read failed |
missingReturn | Number of matching items that have no Return field; their value is null |
skipped | Number of items the test could not apply to, e.g. a missing field or null under a number test |
total | Number of items in the source |
error | Error message if filtering failed |
Flatten Findings
Action type: data/flatten-findings. Connection: not required.
Flatten several monitoring results into one findings list with per-source labels and severities, plus a ready-to-alert count and summary.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
sources | string | Yes | Sources. JSON array of sources. Each entry needs a label and a value. value accepts: an object with events / transactions / logs / rows / items / results (each element becomes a finding), an array (each element becomes a finding), a boolean (true is one finding), or any other object (one finding). Optional per-entry keys: severity, and itemsPath to point at a nested array. | ||
defaultSeverity | string | No | warning | Default Severity. Used for any source that does not carry its own severity key. | |
hashField | string | No | transactionHash | Hash Field. Dotted path inside each finding to read a transaction hash from, used for firstHash. | |
maxFindings | number | No | 100 | min 1 | Max Findings. Cap on the findings array so a runaway source cannot blow up the alert payload. count still reports the true total. |
Outputs
| Output | Description |
|---|---|
success | Whether the scan succeeded |
anyFound | True when at least one source produced a finding |
count | Total number of findings |
findings | Array of { label, severity, hash, item } - one entry per finding |
labels | Labels of the sources that produced findings |
firstHash | The first transaction hash found across all findings, or null |
summary | Human-readable per-label summary for an alert body |
truncated | True when findings was capped by Max Findings |
error | Error message if the scan failed |
Hash
Action type: data/hash. Connection: not required.
Hash a value (or a JSON array of values) with keccak256, SHA-2, SHA3-256, RIPEMD-160 or BLAKE2b. One-way, unlike Encode / Decode. Optionally truncate and right-pad the digest to produce a function selector or an event topic.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
algorithm | string | Yes | keccak256 | blake2b-256, keccak256, ripemd160, sha256, sha512, sha3-256 | Algorithm. keccak256 is the hash the EVM uses: function selectors and event topics, including the topic that carries an indexed string or bytes argument. SHA3-256 is NOT the same thing. Ethereum adopted Keccak before NIST changed the padding, so the two give completely different results for the same input. Pick SHA3-256 only if a non-EVM protocol asked for it by that name. |
value | string | Yes | Value. A single value, or a JSON array of values to hash in one step. For an array, result is an array and map is keyed by each original value. A single value is trimmed, so a stray trailing newline cannot change the digest. Array elements are not, so [” a ”] hashes the spaces too. An empty value is hashed rather than refused: keccak256 of nothing is c5d24601… , the EXTCODEHASH of an account with no code. | ||
inputEncoding | string | Yes | utf8 | utf8, hex, base64 | Input encoding. How the value is read before hashing, and the easiest thing to get wrong. Given 0x1234, Text hashes the six characters 0 x 1 2 3 4, while Hex bytes hashes the two bytes 0x12 0x34. Both succeed and give different answers. Function and event signatures are Text. A raw byte payload from an upstream node is Hex bytes. Base64 is for a payload that arrived encoded - a webhook body, a signed blob - where decoding it to text first would corrupt any byte that is not valid UTF-8. Base64 accepts either alphabet, standard or URL-safe, with or without padding, but not a mixture of the two. |
outputBytes | number | No | min 1 | Output bytes. Keep only the first N bytes of the digest. Leave blank for the full digest. Set 4 to turn a function signature into its selector: frob(bytes32,address,address,address,int256,int256) -> 0x76088703 A truncated digest is not the shorter standard hash of the same family. SHA-512 cut to 32 bytes is not SHA-512/256, and BLAKE2b-256 is not BLAKE2b-512 cut down: both mix the output length into their initial state. Truncate for a selector, not to derive a shorter named hash. | |
padTo | number | No | min 1 | Pad to. Right-pad the result with zero bytes to this width. Leave blank for no padding. With Output bytes 4 and Pad to 32 you get the 32-byte topic that filters an anonymous LogNote event: 0x7608870300000000000000000000000000000000000000000000000000000000 Padding is on the right because that is where the EVM puts it - the selector sits left-aligned in the topic word. | |
outputFormat | string | No | hex | hex, base64, base64url | Output format. hex is what every on-chain use wants: a topic or a bytes32 argument. base64url swaps + and / for - and _ and drops the padding, so the digest can go into a URL, a filename or a header without further escaping. For a digest as a decimal number, feed hex into Encode / Decode with Hex to decimal, which stays exact above 2^53. |
Outputs
| Output | Description |
|---|---|
success | Whether hashing succeeded |
result | The digest: a string for a single input, an array for an array input |
map | Object keyed by each original value, holding its digest |
count | Number of values hashed |
algorithm | The algorithm used |
digestBytes | Width of each digest in bytes, after any truncation and padding |
error | Error message if hashing failed |
Static Config
Action type: data/static-config. Connection: not required.
Hold static JSON configuration on the canvas - address lists, constants, wallet registries - without wrapping it in a script.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
value | string | Yes | Value. Any JSON value. Downstream nodes read it with {{@this-node:Label.result}} and can index into it, e.g. result.vat. |
Outputs
| Output | Description |
|---|---|
success | Whether the JSON parsed |
result | The configuration value |
keys | Top-level keys when the value is an object |
count | Number of keys for an object, or entries for an array |
valueType | object, array or primitive |
error | Error message if the JSON is invalid |