* 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, values)
| 708 | * a result from a Contract. |
| 709 | */ |
| 710 | encodeErrorResult(fragment, values) { |
| 711 | if (typeof (fragment) === "string") { |
| 712 | const f = this.getError(fragment); |
| 713 | (0, index_js_3.assertArgument)(f, "unknown error", "fragment", fragment); |
| 714 | fragment = f; |
| 715 | } |
| 716 | return (0, index_js_3.concat)([ |
| 717 | fragment.selector, |
| 718 | this._encodeParams(fragment.inputs, values || []) |
| 719 | ]); |
| 720 | } |
| 721 | /** |
| 722 | * Decodes the %%data%% from a transaction ``tx.data`` for |
| 723 | * the function specified (see [[getFunction]] for valid values |
nothing calls this directly
no test coverage detected