* 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)
| 700 | * a result from a Contract. |
| 701 | */ |
| 702 | encodeErrorResult(fragment, values) { |
| 703 | if (typeof (fragment) === "string") { |
| 704 | const f = this.getError(fragment); |
| 705 | assertArgument(f, "unknown error", "fragment", fragment); |
| 706 | fragment = f; |
| 707 | } |
| 708 | return concat([ |
| 709 | fragment.selector, |
| 710 | this._encodeParams(fragment.inputs, values || []) |
| 711 | ]); |
| 712 | } |
| 713 | /** |
| 714 | * Decodes the %%data%% from a transaction ``tx.data`` for |
| 715 | * the function specified (see [[getFunction]] for valid values |
nothing calls this directly
no test coverage detected