* Parses a revert data, finding the matching error and extracts * the parameter values along with other useful error details. * * If the matching error cannot be found, returns null.
(data)
| 1063 | * If the matching error cannot be found, returns null. |
| 1064 | */ |
| 1065 | parseError(data) { |
| 1066 | const hexData = hexlify(data); |
| 1067 | const fragment = this.getError(dataSlice(hexData, 0, 4)); |
| 1068 | if (!fragment) { |
| 1069 | return null; |
| 1070 | } |
| 1071 | const args = this.#abiCoder.decode(fragment.inputs, dataSlice(hexData, 4)); |
| 1072 | return new ErrorDescription(fragment, fragment.selector, args); |
| 1073 | } |
| 1074 | /** |
| 1075 | * Creates a new [[Interface]] from the ABI %%value%%. |
| 1076 | * |