Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionResult ¶
type ExecutionResult struct { UsedGas uint64 // Total used gas but include the refunded gas Err error // Any error encountered during the execution(listed in core/vm/errors.go) ReturnData []byte // Returned data from evm(function result or data supplied with revert opcode) }
ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
func (*ExecutionResult) Failed ¶
func (result *ExecutionResult) Failed() bool
Failed returns the indicator whether the execution is successful or not
func (*ExecutionResult) Return ¶
func (result *ExecutionResult) Return() []byte
Return is a helper function to help caller distinguish between revert reason and function return. Return returns the data after execution if no error occurs.
func (*ExecutionResult) Revert ¶
func (result *ExecutionResult) Revert() []byte
Revert returns the concrete revert reason if the execution is aborted by `REVERT` opcode. Note the reason can be nil if no data supplied with revert opcode.
func (*ExecutionResult) Unwrap ¶
func (result *ExecutionResult) Unwrap() error
Unwrap returns the internal evm error which allows us for further analysis outside.
Click to show internal directories.
Click to hide internal directories.