* Encodes the ``tx.data`` for a transaction that calls the function * specified (see [[getFunction]] for valid values for %%fragment%%) with * the %%values%%.
(fragment, values)
| 733 | * the %%values%%. |
| 734 | */ |
| 735 | encodeFunctionData(fragment, values) { |
| 736 | if (typeof (fragment) === "string") { |
| 737 | const f = this.getFunction(fragment); |
| 738 | assertArgument(f, "unknown function", "fragment", fragment); |
| 739 | fragment = f; |
| 740 | } |
| 741 | return concat([ |
| 742 | fragment.selector, |
| 743 | this._encodeParams(fragment.inputs, values || []) |
| 744 | ]); |
| 745 | } |
| 746 | /** |
| 747 | * Decodes the result %%data%% (e.g. from an ``eth_call``) for the |
| 748 | * specified function (see [[getFunction]] for valid values for |
no test coverage detected