* 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)
| 611 | * a result from a Contract. |
| 612 | */ |
| 613 | encodeErrorResult(fragment, values) { |
| 614 | if (typeof (fragment) === "string") { |
| 615 | const f = this.getError(fragment); |
| 616 | assertArgument(f, "unknown error", "fragment", fragment); |
| 617 | fragment = f; |
| 618 | } |
| 619 | return concat([ |
| 620 | fragment.selector, |
| 621 | this._encodeParams(fragment.inputs, values || []) |
| 622 | ]); |
| 623 | } |
| 624 | /** |
| 625 | * Decodes the %%data%% from a transaction ``tx.data`` for |
| 626 | * the function specified (see [[getFunction]] for valid values |
nothing calls this directly
no test coverage detected