MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / parseError

Method parseError

lib.esm/abi/interface.js:1065–1073  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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 *

Callers

nothing calls this directly

Calls 4

getErrorMethod · 0.95
hexlifyFunction · 0.90
dataSliceFunction · 0.90
decodeMethod · 0.45

Tested by

no test coverage detected