Execution Metadata
What to expect when your Hook runs.
Last updated
What to expect when your Hook runs.
Last updated
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:
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 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 changes the Hook made during execution.