* Iterate over all errors, calling %%callback%%, sorted by their name.
(callback)
| 633 | * Iterate over all errors, calling %%callback%%, sorted by their name. |
| 634 | */ |
| 635 | forEachError(callback) { |
| 636 | const names = Array.from(this.#errors.keys()); |
| 637 | names.sort((a, b) => a.localeCompare(b)); |
| 638 | for (let i = 0; i < names.length; i++) { |
| 639 | const name = names[i]; |
| 640 | callback((this.#errors.get(name)), i); |
| 641 | } |
| 642 | } |
| 643 | // Get the 4-byte selector used by Solidity to identify a function |
| 644 | /* |
| 645 | getSelector(fragment: ErrorFragment | FunctionFragment): string { |