* Encodes the ``tx.data`` for a transaction that calls the function * specified (see [[getFunction]] for valid values for %%fragment%%) with * the %%values%%.
(fragment, values)
| 741 | * the %%values%%. |
| 742 | */ |
| 743 | encodeFunctionData(fragment, values) { |
| 744 | if (typeof (fragment) === "string") { |
| 745 | const f = this.getFunction(fragment); |
| 746 | (0, index_js_3.assertArgument)(f, "unknown function", "fragment", fragment); |
| 747 | fragment = f; |
| 748 | } |
| 749 | return (0, index_js_3.concat)([ |
| 750 | fragment.selector, |
| 751 | this._encodeParams(fragment.inputs, values || []) |
| 752 | ]); |
| 753 | } |
| 754 | /** |
| 755 | * Decodes the result %%data%% (e.g. from an ``eth_call``) for the |
| 756 | * specified function (see [[getFunction]] for valid values for |
no test coverage detected