* Encodes the transaction revert data for a call result that * reverted from the the Contract with the sepcified %%error%% * (see [[getError]] for valid values for %%fragment%%) with the %%values%%. * * This is generally not used by most developers, unless trying to mock
(fragment: ErrorFragment | string, values?: ReadonlyArray<any>)
| 833 | * a result from a Contract. |
| 834 | */ |
| 835 | encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray<any>): string { |
| 836 | if (typeof(fragment) === "string") { |
| 837 | const f = this.getError(fragment); |
| 838 | assertArgument(f, "unknown error", "fragment", fragment); |
| 839 | fragment = f; |
| 840 | } |
| 841 | |
| 842 | return concat([ |
| 843 | fragment.selector, |
| 844 | this._encodeParams(fragment.inputs, values || [ ]) |
| 845 | ]); |
| 846 | } |
| 847 | |
| 848 | /** |
| 849 | * Decodes the %%data%% from a transaction ``tx.data`` for |
nothing calls this directly
no test coverage detected