* Iterate over all errors, calling %%callback%%, sorted by their name.
(callback: (func: ErrorFragment, index: number) => void)
| 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 | /* |