* 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)
| 941 | * If the matching error cannot be found, returns null. |
| 942 | */ |
| 943 | parseError(data) { |
| 944 | const hexData = hexlify(data); |
| 945 | const fragment = this.getError(dataSlice(hexData, 0, 4)); |
| 946 | if (!fragment) { |
| 947 | return null; |
| 948 | } |
| 949 | const args = this.#abiCoder.decode(fragment.inputs, dataSlice(hexData, 4)); |
| 950 | return new ErrorDescription(fragment, fragment.selector, args); |
| 951 | } |
| 952 | /** |
| 953 | * Creates a new [[Interface]] from the ABI %%value%%. |
| 954 | * |