* 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)
| 1071 | * If the matching error cannot be found, returns null. |
| 1072 | */ |
| 1073 | parseError(data) { |
| 1074 | const hexData = (0, index_js_3.hexlify)(data); |
| 1075 | const fragment = this.getError((0, index_js_3.dataSlice)(hexData, 0, 4)); |
| 1076 | if (!fragment) { |
| 1077 | return null; |
| 1078 | } |
| 1079 | const args = this.#abiCoder.decode(fragment.inputs, (0, index_js_3.dataSlice)(hexData, 4)); |
| 1080 | return new ErrorDescription(fragment, fragment.selector, args); |
| 1081 | } |
| 1082 | /** |
| 1083 | * Creates a new [[Interface]] from the ABI %%value%%. |
| 1084 | * |