MCPcopy Create free account
hub / github.com/ccxt/ccxt / forEachError

Method forEachError

ts/src/static_dependencies/ethers/interface.ts:749–756  ·  view source on GitHub ↗

* Iterate over all errors, calling %%callback%%, sorted by their name.

(callback: (func: ErrorFragment, index: number) => void)

Source from the content-addressed store, hash-verified

747 * Iterate over all errors, calling %%callback%%, sorted by their name.
748 */
749 forEachError(callback: (func: ErrorFragment, index: number) => void): void {
750 const names = Array.from(this.#errors.keys());
751 names.sort((a, b) => a.localeCompare(b));
752 for (let i = 0; i < names.length; i++) {
753 const name = names[i];
754 callback(<ErrorFragment>(this.#errors.get(name)), i);
755 }
756 }
757
758 // Get the 4-byte selector used by Solidity to identify a function
759 /*

Callers

nothing calls this directly

Calls 4

callbackFunction · 0.85
fromMethod · 0.45
sortMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected