RevertErrorTracking
#
Revert error tracking contract.
A contract to track and store revert errors.
Events#
ContractRevertError
#
event ContractRevertError(
address theContract,
uint256 atBlock,
string theMessage
)
Emitted when a contract reverts.
Parameters | Type | Description |
---|---|---|
theContract |
address |
The culprit's address. |
atBlock |
uint256 |
Block number where the error happened. |
theMessage |
string |
Reason for the revert, as reported by the contract. |
Functions#
showLastRevertedError
#
function showLastRevertedError(
) external view returns (
uint256[] _lastErrorBlock,
uint256[] _numErrors,
string[] _errorString,
address[] _erroringContract,
uint256 _totalRevertedErrors);
Returns latest error information. All arrays will contain only one entry.
Returns | Type | Description |
---|---|---|
_lastErrorBlock |
uint256[] |
Array of block numbers where the errors occurred. |
_numErrors |
uint256[] |
Array of number of times same error with same contract address has been reverted. |
_errorString |
string[] |
Array of revert error messages. |
_erroringContract |
address[] |
Array of addresses of the reverting contracts. |
_totalRevertedErrors |
uint256 |
Total number of revert errors across all contracts. |
showRevertedErrors
#
function showRevertedErrors(
uint256 startIndex,
uint256 numErrorTypesToShow
) public view returns (
uint256[] _lastErrorBlock,
uint256[] _numErrors,
string[] _errorString,
address[] _erroringContract,
uint256 _totalRevertedErrors);
Returns latest errors.
Parameters | Type | Description |
---|---|---|
startIndex |
uint256 |
Starting index in the error list array. |
numErrorTypesToShow |
uint256 |
Number of errors to show. The total amount can be found in errorData . |
Returns | Type | Description |
---|---|---|
_lastErrorBlock |
uint256[] |
Array of block numbers where the errors occurred. |
_numErrors |
uint256[] |
Array of number of times same error with same contract address has been reverted. |
_errorString |
string[] |
Array of revert error messages. |
_erroringContract |
address[] |
Array of addresses of the reverting contracts. |
_totalRevertedErrors |
uint256 |
Total number of revert errors across all contracts. |