Web3FunctionSuccessContext
offers access to the transactionHash
, allowing you to reference and track the successful transaction within your application.
onFail
callback:
reason
: This is a string indicating why the failure occurred.transactionHash
: Provided when the reason for failure is ExecutionReverted
, this is the unique identifier of the reverted transaction.callData
: Available when the reason is SimulationFailed
, this is the data that was used during the function run, which can be useful for debugging the failure.