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