Execution Metadata
What to expect when your Hook runs.
Metadata
When Hooks execute they leave behind information about the status of that execution. This appears in the Originating Transaction metadata as an sfHookExecutions
block. This block contains the following fields:
Field | Description |
sfHookResult | Hooks can end in three ways: accept , rollback and error .This is not the same as sfHookReturnCode! |
sfHookHash | The SHA512H of the Hook at the time it was executed. |
sfHookAccount | The account the Hook ran on. |
sfHookReturnCode | The integer returned as the third parameter of accept or rollback . |
sfHookReturnString | The string returned in the first two parameters of accept or rollback , if any. |
sfHookInstructionCount | The total number of webassembly instructions that were executed when the Hook ran. |
sfHookEmitCount | The total number of Emitted Transactions produced by the Hook. |
sfHookExecutionIndex | The order in which the Hook was executed (as distinct from other Hook Executions on the same Originating Transaction.) |
sfHookStateChangeCount | The number of Hook State changes the Hook made during execution. |
Updated almost 3 years ago
What’s Next